[Question] GetPlayerSkin
#1

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
Reply
#2

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

thanks
Reply
#4

|| 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.
Reply
#5

sweet i might use that soon
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)