முதன்மை உள்ளடக்கத்துக்குச் செல்லவும்

GetObjectType

எச்சரிக்கை

செயல்பாடு என்பது omp v1.1.0.2612 பதிப்பில் சேர்க்கப்பட்டது. இது முந்தைய பதிப்புகளில் இயங்காது!

Description​

Get the type of an object. (global or player)

NameDescription
playeridThe ID of the player.
objectidThe ID of the object to get the type of.

Returns​

0 - Function failed to execute. The objectid or playerid specified does not exist.

1 - Global object.

2 - Player object.

Examples​

new objectid = CreateObject(985, 1003.39154, -643.33423, 122.35060, 0.00000, 1.00000, 24.00000);

new objectType = GetObjectType(playerid, objectid);
// objectType = 1

Another example:

new playerobjectid = CreatePlayerObject(playerid, 19174, 978.88757, -986.34918, 40.95220, 0.00000, 0.00000, 228.00000);

new objectType = GetObjectType(playerid, playerobjectid);
// objectType = 2