|
/* SA-MP Object Functions
|
|
*
|
|
* (c) Copyright 2005-2015, SA-MP Team
|
|
*
|
|
*/
|
|
|
|
#if defined _objects_included
|
|
#endinput
|
|
#endif
|
|
#define _objects_included
|
|
#pragma library objects
|
|
|
|
// Objects
|
|
|
|
native CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance = 0.0);
|
|
native AttachObjectToVehicle(objectid, vehicleid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ);
|
|
native AttachObjectToObject(objectid, attachtoid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ, SyncRotation = 1);
|
|
native AttachObjectToPlayer(objectid, playerid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ);
|
|
native SetObjectPos(objectid, Float:X, Float:Y, Float:Z);
|
|
native GetObjectPos(objectid, &Float:X, &Float:Y, &Float:Z);
|
|
native SetObjectRot(objectid, Float:RotX, Float:RotY, Float:RotZ);
|
|
native GetObjectRot(objectid, &Float:RotX, &Float:RotY, &Float:RotZ);
|
|
native GetObjectModel(objectid);
|
|
native SetObjectNoCameraCol(objectid);
|
|
native IsValidObject(objectid);
|
|
native DestroyObject(objectid);
|
|
native MoveObject(objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX = -1000.0, Float:RotY = -1000.0, Float:RotZ = -1000.0);
|
|
native StopObject(objectid);
|
|
native IsObjectMoving(objectid);
|
|
native EditObject(playerid, objectid);
|
|
native EditPlayerObject(playerid, objectid);
|
|
native SelectObject(playerid);
|
|
native CancelEdit(playerid);
|
|
native CreatePlayerObject(playerid, modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance = 0.0);
|
|
native AttachPlayerObjectToVehicle(playerid, objectid, vehicleid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:RotZ);
|
|
native SetPlayerObjectPos(playerid, objectid, Float:X, Float:Y, Float:Z);
|
|
native GetPlayerObjectPos(playerid, objectid, &Float:X, &Float:Y, &Float:Z);
|
|
native SetPlayerObjectRot(playerid, objectid, Float:RotX, Float:RotY, Float:RotZ);
|
|
native GetPlayerObjectRot(playerid, objectid, &Float:RotX, &Float:RotY, &Float:RotZ);
|
|
native GetPlayerObjectModel(playerid, objectid);
|
|
native SetPlayerObjectNoCameraCol(playerid, objectid);
|
|
native IsValidPlayerObject(playerid, objectid);
|
|
native DestroyPlayerObject(playerid, objectid);
|
|
native MovePlayerObject(playerid, objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX = -1000.0, Float:RotY = -1000.0, Float:RotZ = -1000.0);
|
|
native StopPlayerObject(playerid, objectid);
|
|
native IsPlayerObjectMoving(playerid, objectid);
|
|
native AttachPlayerObjectToPlayer(objectplayer, objectid, attachplayer, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:rX, Float:rY, Float:rZ);
|
|
|
|
#define OBJECT_MATERIAL_SIZE_32x32 10
|
|
#define OBJECT_MATERIAL_SIZE_64x32 20
|
|
#define OBJECT_MATERIAL_SIZE_64x64 30
|
|
#define OBJECT_MATERIAL_SIZE_128x32 40
|
|
#define OBJECT_MATERIAL_SIZE_128x64 50
|
|
#define OBJECT_MATERIAL_SIZE_128x128 60
|
|
#define OBJECT_MATERIAL_SIZE_256x32 70
|
|
#define OBJECT_MATERIAL_SIZE_256x64 80
|
|
#define OBJECT_MATERIAL_SIZE_256x128 90
|
|
#define OBJECT_MATERIAL_SIZE_256x256 100
|
|
#define OBJECT_MATERIAL_SIZE_512x64 110
|
|
#define OBJECT_MATERIAL_SIZE_512x128 120
|
|
#define OBJECT_MATERIAL_SIZE_512x256 130
|
|
#define OBJECT_MATERIAL_SIZE_512x512 140
|
|
|
|
#define OBJECT_MATERIAL_TEXT_ALIGN_LEFT 0
|
|
#define OBJECT_MATERIAL_TEXT_ALIGN_CENTER 1
|
|
#define OBJECT_MATERIAL_TEXT_ALIGN_RIGHT 2
|
|
|
|
native SetObjectMaterial(objectid, materialindex, modelid, txdname[], texturename[], materialcolor=0);
|
|
native SetPlayerObjectMaterial(playerid, objectid, materialindex, modelid, txdname[], texturename[], materialcolor=0);
|
|
|
|
native SetObjectMaterialText(objectid, text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0);
|
|
native SetPlayerObjectMaterialText(playerid, objectid, text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0);
|
|
|
|
native SetObjectsDefaultCameraCol(disable);
|