-
Notifications
You must be signed in to change notification settings - Fork 92
Natives (Objects)
samp-incognito edited this page Jan 18, 2016
·
21 revisions
Refer to the SA-MP wiki for more information. Many of these natives are derived from the default SA-MP natives.
-
CreateDynamicObject
(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_OBJECT_SD, Float:drawdistance = STREAMER_OBJECT_DD)
- The streaming distance (
streamdistance
) refers to how close the player needs to be to the object before it is streamed in by the plugin. - The draw distance (
drawdistance
) is a parameter used by the game that determines how close the player needs to be to the object before it is rendered on the player's screen. -
DestroyDynamicObject
(objectid)
-
IsValidDynamicObject
(objectid)
-
SetDynamicObjectPos
(objectid, Float:x, Float:y, Float:z)
-
GetDynamicObjectPos
(objectid, &Float:x, &Float:y, &Float:z)
-
SetDynamicObjectRot
(objectid, Float:rx, Float:ry, Float:rz)
-
GetDynamicObjectRot
(objectid, &Float:rx, &Float:ry, &Float:rz)
-
MoveDynamicObject
(objectid, Float:x, Float:y, Float:z, Float:speed, Float:rx = -1000.0, Float:ry = -1000.0, Float:rz = -1000.0)
-
StopDynamicObject
(objectid)
-
IsDynamicObjectMoving
(objectid)
-
AttachCameraToDynamicObject
(playerid, objectid)
-
AttachDynamicObjectToObject
(objectid, attachtoid, Float:offsetx, Float:offsety, Float:offsetz, Float:rx, Float:ry, Float:rz, syncrotation = 1)
- This attaches a dynamic object to another dynamic object.
- This requires kurta999's YSF plugin to be loaded.
-
AttachDynamicObjectToPlayer
(objectid, playerid, Float:offsetx, Float:offsety, Float:offsetz, Float:rx, Float:ry, Float:rz)
- This requires kurta999's YSF plugin to be loaded.
-
AttachDynamicObjectToVehicle
(objectid, vehicleid, Float:offsetx, Float:offsety, Float:offsetz, Float:rx, Float:ry, Float:rz)
-
EditDynamicObject
(playerid, objectid)
-
IsDynamicObjectMaterialUsed
(objectid, materialindex)
-
GetDynamicObjectMaterial
(objectid, materialindex, &modelid, txdname[], texturename[], &materialcolor, maxtxdname = sizeof txdname, maxtexturename = sizeof texturename)
-
SetDynamicObjectMaterial
(objectid, materialindex, modelid, const txdname[], const texturename[], materialcolor = 0)
-
IsDynamicObjectMaterialTextUsed
(objectid, materialindex)
-
GetDynamicObjectMaterialText
(objectid, materialindex, text[], &materialsize, fontface[], &fontsize, &bold, &fontcolor, &backcolor, &textalignment, maxtext = sizeof text, maxfontface = sizeof fontface)
-
SetDynamicObjectMaterialText
(objectid, materialindex, const text[], materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0)