IsPlayerAttachedObjectSlotUsed
From SA-MP Wiki
Description:
Check if a player has an object attached in the specified index (slot).
(playerid, index)
playerid | The ID of the player to check. |
index | The index (slot) to check. |
Return Values:
- 1: The specified slot is used for an attached object.
- 0: The specified slot is not in use for an attached object.
Example Usage:
stock CountAttachedObjects(playerid) { new count; for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++) { if(IsPlayerAttachedObjectSlotUsed(playerid, i)) count++; } return count; }
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- SetPlayerAttachedObject: Attach an object to a player
- RemovePlayerAttachedObject: Remove an attached object from a player