From SA-MP Wiki

Jump to: navigation, search

RemovePlayerAttachedObject was added in SA-MP 0.3c This function was added in SA-MP 0.3c and will not work in earlier versions!


Remove an attached object from a player.

(playerid, index)
playeridThe ID of the player to remove the object from.
indexThe index of the object to remove (set with SetPlayerAttachedObject).

Return Values:

1 on success, 0 on failure.

Example Usage:

public OnPlayerCommandText(playerid, cmdtext[])
    if(!strmp(cmdtext, "/remao", true)) // Remove Attached Objects
        for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
            if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
        return 1;
    return 0;

Related Functions

The following functions may be helpful as they relate to this function in one way or another.

Personal tools
In other languages