|
| 1 | +/* Copyright (C) 2011-2015 Zeex |
| 2 | + * |
| 3 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | + * you may not use this file except in compliance with the License. |
| 5 | + * You may obtain a copy of the License at |
| 6 | + * |
| 7 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | + * |
| 9 | + * Unless required by applicable law or agreed to in writing, software |
| 10 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | + * See the License for the specific language governing permissions and |
| 13 | + * limitations under the License. |
| 14 | + */ |
| 15 | + |
| 16 | +[native] int CreateObject(int modelid, float x, float y, float z, float rX, float rY, float rZ, float DrawDistance = 0.0); |
| 17 | +[native] bool AttachObjectToVehicle(int objectid, int vehicleid, float fOffsetX, float fOffsetY, float fOffsetZ, float fRotX, float fRotY, float fRotZ); |
| 18 | +[native] bool AttachObjectToObject(int objectid, int attachtoid, float fOffsetX, float fOffsetY, float fOffsetZ, float fRotX, float fRotY, float fRotZ, bool SyncRotation = false); |
| 19 | +[native] bool AttachObjectToPlayer(int objectid, int playerid, float fOffsetX, float fOffsetY, float fOffsetZ, float fRotX, float fRotY, float fRotZ); |
| 20 | +[native] bool SetObjectPos(int objectid, float x, float y, float z); |
| 21 | +[native] bool GetObjectPos(int objectid, [out] float x, [out] float y, [out] float z); |
| 22 | +[native] bool SetObjectRot(int objectid, float rotX, float rotY, float rotZ); |
| 23 | +[native] bool GetObjectRot(int objectid, [out] float rotX, [out] float rotY, [out] float rotZ); |
| 24 | +[native] int GetObjectModel(int objectid); |
| 25 | +[native] bool SetObjectNoCameraCol(int objectid); |
| 26 | +[native] bool IsValidObject(int objectid); |
| 27 | +[native] bool DestroyObject(int objectid); |
| 28 | +[native] int MoveObject(int objectid, float X, float Y, float Z, float Speed, float RotX = -1000.0, float RotY = -1000.0, float RotZ = -1000.0); |
| 29 | +[native] bool StopObject(int objectid); |
| 30 | +[native] bool IsObjectMoving(int objectid); |
| 31 | +[native] bool EditObject(int playerid, int objectid); |
| 32 | +[native] bool EditPlayerObject(int playerid, int objectid); |
| 33 | +[native] bool SelectObject(int playerid); |
| 34 | +[native] bool CancelEdit(int playerid); |
| 35 | +[native] int CreatePlayerObject(int playerid, int modelid, float x, float y, float z, float rX, float rY, float rZ, float DrawDistance = 0.0); |
| 36 | +[native] bool AttachPlayerObjectToPlayer(int objectplayer, int objectid, int attachplayer, float OffsetX, float OffsetY, float OffsetZ, float rX, float rY, float rZ); |
| 37 | +[native] bool AttachPlayerObjectToVehicle(int playerid, int objectid, int vehicleid, float fOffsetX, float fOffsetY, float fOffsetZ, float fRotX, float fRotY, float RotZ); |
| 38 | +[native] bool SetPlayerObjectPos(int playerid, int objectid, float x, float y, float z); |
| 39 | +[native] bool GetPlayerObjectPos(int playerid, int objectid, [out] float x, [out] float y, [out] float z); |
| 40 | +[native] bool SetPlayerObjectRot(int playerid, int objectid, float rotX, float rotY, float rotZ); |
| 41 | +[native] bool GetPlayerObjectRot(int playerid, int objectid, [out] float rotX, [out] float rotY, [out] float rotZ); |
| 42 | +[native] int GetPlayerObjectModel(int playerid, int objectid); |
| 43 | +[native] bool SetPlayerObjectNoCameraCol(int playerid, int objectid); |
| 44 | +[native] bool IsValidPlayerObject(int playerid, int objectid); |
| 45 | +[native] bool DestroyPlayerObject(int playerid, int objectid); |
| 46 | +[native] int MovePlayerObject(int playerid, int objectid, float x, float y, float z, float Speed, float RotX = -1000.0, float RotY = -1000.0, float RotZ = -1000.0); |
| 47 | +[native] bool StopPlayerObject(int playerid, int objectid); |
| 48 | +[native] bool IsPlayerObjectMoving(int playerid, int objectid); |
| 49 | + |
| 50 | +const int OBJECT_MATERIAL_SIZE_32x32 = 10; |
| 51 | +const int OBJECT_MATERIAL_SIZE_64x32 = 20; |
| 52 | +const int OBJECT_MATERIAL_SIZE_64x64 = 30; |
| 53 | +const int OBJECT_MATERIAL_SIZE_128x32 = 40; |
| 54 | +const int OBJECT_MATERIAL_SIZE_128x64 = 50; |
| 55 | +const int OBJECT_MATERIAL_SIZE_128x128 = 60; |
| 56 | +const int OBJECT_MATERIAL_SIZE_256x32 = 70; |
| 57 | +const int OBJECT_MATERIAL_SIZE_256x64 = 80; |
| 58 | +const int OBJECT_MATERIAL_SIZE_256x128 = 90; |
| 59 | +const int OBJECT_MATERIAL_SIZE_256x256 = 100; |
| 60 | +const int OBJECT_MATERIAL_SIZE_512x64 = 110; |
| 61 | +const int OBJECT_MATERIAL_SIZE_512x128 = 120; |
| 62 | +const int OBJECT_MATERIAL_SIZE_512x256 = 130; |
| 63 | +const int OBJECT_MATERIAL_SIZE_512x512 = 140; |
| 64 | + |
| 65 | +const int OBJECT_MATERIAL_TEXT_ALIGN_LEFT = 0; |
| 66 | +const int OBJECT_MATERIAL_TEXT_ALIGN_CENTER = 1; |
| 67 | +const int OBJECT_MATERIAL_TEXT_ALIGN_RIGHT = 2; |
| 68 | + |
| 69 | +[native] bool SetObjectMaterial(int objectid, int materialindex, int modelid, string txdname, string texturename, int materialcolor = 0); |
| 70 | +[native] bool SetPlayerObjectMaterial(int playerid, int objectid, int materialindex, int modelid, string txdname, string texturename, int materialcolor = 0); |
| 71 | + |
| 72 | +[native] bool SetObjectMaterialText(int objectid, string text, int materialindex = 0, int materialsize = OBJECT_MATERIAL_SIZE_256x128, string fontface = "Arial", int fontsize = 24, bool bold = true, int fontcolor = 0xFFFFFFFF, int backcolor = 0, int textalignment = 0); |
| 73 | +[native] bool SetPlayerObjectMaterialText(int playerid, int objectid, string text, int materialindex = 0, int materialsize = OBJECT_MATERIAL_SIZE_256x128, string fontface = "Arial", int fontsize = 24, bool bold = true, int fontcolor = 0xFFFFFFFF, int backcolor = 0, int textalignment = 0); |
| 74 | + |
| 75 | +[native] bool SetObjectsDefaultCameraCol(bool disable); |
0 commit comments