SA-MP Forums Archive
Help with gangster mask. - 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: Help with gangster mask. (/showthread.php?tid=575783)



Help with gangster mask. - itachi - 30.05.2015

Hello.
Please I want this mask for rcon admin.
on commad /amask.
thank ! )


Re: Help with gangster mask. - rainbowPUKE - 30.05.2015

PHP код:
new bool:HasBandanaAttached[MAX_PLAYERS char];
CMD:amask(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000AA,"You can't use this command.");
    if(
HasBandanaAttached{playerid} == false)
    {
        
SetPlayerAttachedObject(playerid01891220.0785340.041857, -0.001727268.9704581.533374269.223754);
        
HasBandanaAttached{playerid} = true;
        return 
true;
    }
    else if(
HasBandanaAttached{playerid} == true)
    {
        if(
IsPlayerAttachedObjectSlotUsed(playerid0))
        {
            
RemovePlayerAttachedObject(playerid0);
            
HasBandanaAttached{playerid} = false;
        }
    }
    return 
true;

Untested