SA-MP Forums Archive
??? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: ??? (/showthread.php?tid=536983)



??? - Gogeta101 - 13.09.2014

How to destroy a object attached to player.


Re: ??? - Thogy - 13.09.2014

https://sampwiki.blast.hk/wiki/RemovePlayerAttachedObject
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strmp(cmdtext, "/remove", 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;
}