SA-MP Forums Archive
[Question] GetPlayerSkin - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Question] GetPlayerSkin (/showthread.php?tid=117607)



[Question] GetPlayerSkin - fsnameless - 01.01.2010

well ok here my code
pawn Код:
if(strcmp(cmdtext,"/closecg", true)==0) {
        if(GetPlayerSkin(playerid)==285)
        {
        SendClientMessage(playerid, 0x222222BB , "Closing LS Cops And Prison Base");
        MoveStreamObject(copgate, 836.3671875, -2072.7314453125, 12.89999961853, 5);
        }
        else
        {
        SendClientMessage(playerid, red, "Sorry you need to be a cop to Open or Close This Gate");
        }
    return 1;
    }
i want for make it so that ids 285 and 266 can open this gate but i cant seem to figure it out


Cheers,
Nameless


Re: [Question] GetPlayerSkin - [HiC]TheKiller - 01.01.2010

pawn Код:
if(GetPlayerSkin(playerid) == 285 || GetPlayerSkin(playerid) == 266)



Re: [Question] GetPlayerSkin - fsnameless - 01.01.2010

thanks


Re: [Question] GetPlayerSkin - Calon - 01.01.2010

|| is like the OR operator, use that in the future.
And for future reference, && is the AND operator, you can use it like this:

pawn Код:
if(GetPlayerSkin(playerid) && GetPlayerScore(playerid) == 69)
Though HiC's post is what you should use.


Re: [Question] GetPlayerSkin - fsnameless - 01.01.2010

sweet i might use that soon