SA-MP Forums Archive
Commands for a certain skin? - 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: Commands for a certain skin? (/showthread.php?tid=401329)



Commands for a certain skin? - Riggster - 22.12.2012

Can you make a command for a certain skin like /cuff only for cops and if you cant do it for a skin is there a way you can do it?


Re: Commands for a certain skin? - Jernu - 22.12.2012

pawn Код:
CMD:cuff(playerid, params[])
{
    if(GetPlayerSkin(playerid) == SKINID || GetPlayerSkin(playerid) == SKINID || GetPlayerSkin(playerid) == SKINID)
    {
        //code of cuff
    }
    else
    {
        //return 0;
    }
    return 1;
}



Re: Commands for a certain skin? - Faisal_khan - 22.12.2012

Why are you using "GetPlayerSkin" many times?
Instead, use it one time:
pawn Код:
CMD:cuff(playerid, params[])
{
    if(GetPlayerSkin(playerid) == SKINID1 || SKINID2 || SKINID3)
    {
        //code of cuff
    }
    else
    {
        //return 0;
    }
    return 1;
}



Re: Commands for a certain skin? - Jernu - 22.12.2012

Ahh, didn't think of it like that..


Re: Commands for a certain skin? - Riggster - 22.12.2012

Thanks guys