-
Notifications
You must be signed in to change notification settings - Fork 0
Items functions
-
CreateItem
CreateItem(schemaID)
Create a new item with a specified itemSchema.
return : New created item ID.
-
CreateItemEx
CreateItemEx(schemaID, Float:posx, Float:posy, Float:posz, Float:rotx, Float:roty, Float:rotz)
Create a new item with a specified itemSchema and positions.
return : New created item ID.
-
DestroyItem
DestroyItem(itemID)
Destroy a specified item.
return : 0 if item is not found, 1 if item is removed.
-
SetItemPos
SetItemPos(itemID, Float:posx, Float:posy, Float:posz)
Set item positions when it is shown.
return : 0 if item is not found, or 1 otherwise.
-
GetItemPos
GetItemPos(itemID, &Float:posx, &Float:posy, &Float:posz)
Get item positions.
return : 0 if item is not found, or 1 otherwise.
-
SetItemRot
SetItemRot(itemID, Float:rotx, Float:roty, Float:rotz)
Set item rotations when it is shown.
return : 0 if item is not found, or 1 otherwise.
-
GetItemRot
GetItemRot(itemID, &Float:rotx, &Float:roty, &Float:rotz)
Get item rotations.
return : 0 if item is not found, or 1 otherwise.
-
SetItemName
SetItemName(itemID, itemName[])
Set item name.
return : 0 if item is not found, or 1 otherwise.
-
SetItemDefaultName
SetItemDefaultName(itemID)
Set item default name (name defined by schema name).
return : 0 if item is not found, or 1 otherwise.
-
GetItemName
GetItemName(itemID, itemName[], len = sizeof(itemName))
Get item name.
return : 0 if item is not found, or 1 otherwise.
-
SetItemVar
SetItemVar(itemID, varID[], value)
Set an item variable. varID is the variable name and value, the... value !
return : 0 if item is not found, 1 if variable is created, 2 if variable is setted.
-
RemoveItemVar
RemoveItemVar(itemID, varID[])
Remove an item variable. varID is the variable name.
return : 0 if item is not found, 1 if variable was removed, 2 if variable was not found.
-
GetItemVar
GetItemVar(itemID, varID[])
Get . varID is the variable name.
return : 0 if item is not found or if variable doesn't exist, variable value if variable was found.
-
GetItemType
GetItemType(itemID)
Get item type.
return : 0 if item is not found, or type otherwise.
-
GetItemModel
GetItemModel(itemID)
Get item model.
return : 0 if item is not found, or model id otherwise.
-
GetItemObjectID
GetItemObjectID(itemID)
Get item object id inside SAMP server.
return : 0 if item is not found, or object id otherwise.
-
SetItemDrawDistance
SetItemDrawDistance(itemID, Float:distance)
Set item draw distance.
return : 0 if item is not found, or 1 otherwise.
-
GetItemSchemaID
GetItemSchemaID(itemID)
Get an itemSchema ID of the give item ID.
return : -1 if item is not found or itemSchema id if it was found.
-
ShowItem
ShowItem(itemID)
Show item with previously saved positions and rotations.
return : 0 if item is not found, 2 if it's already shown or 1 otherwise.
-
HideItem
HideItem(itemID)
Hide item.
return : 0 if item is not found, 2 if it's already hidden or 1 otherwise.
-
IsItemShown
IsItemShown(itemID)
Check if item is shown.
return : 0 is item is not found, 1 if it's shown, or 2 ir it's hidden.