note Help Needed
This wiki is the result of an ongoing community effort — thank you all for helping!
If you want to provide changes to this page then please click here.
GetObjectModel
warning
This function was added in SA-MP 0.3.7 and will not work in earlier versions!
Description
Get the model ID of an object (CreateObject).
Name | Description |
---|---|
objectid | The ID of the object to get the model of |
Returns
The model ID of the object.
-1 if object does not exist.
Examples
public OnGameModeInit()
{
new objectid = CreateObject(19609, 666.57239, 1750.79749, 4.95627, 0.00000, 0.00000, -156.00000);
new modelid = GetObjectModel(objectid);
printf("Object model: %d", modelid); // Output: "Object model: 19609"
return 1;
}
Related Functions
- GetPlayerObjectModel: Get the model ID of a player-object.