GetPlayerSkin
#1

^^^^^^^^
Reply
#2

Remove the "!" Before IsPlayerAdmin
Reply
#3

^^^^^^^^
Reply
#4

I got mixed upm aswell
pawn Код:
if(GetPlayerSkin(playerid) == 294 && IsPlayerAdmin(playerid)==0) return SendClientMessage(playerid, COLOR_RED, "You Must Be An Admin To Choose This Skin.");
Which then will be the same as "!" But the condition check might not work like that
Reply
#5

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(GetPlayerSkin( playerid ) == 294 && IsPlayerAdmin(playerid))
        else return SendClientMessage(playerid, COLOR_RED, "You Must Be An Admin To Choose This Skin.");

    return 1;
}
Reply
#6

^^^^^^^^
Reply
#7

Show more of the code
Reply
#8

^^^^^^^^
Reply
#9

1) it must be an "I"integer
2) why check the skin before applying it ?
pawn Код:
CMD:skin(playerid, params[])
{
    new skinid;
    if(sscanf(params, "i", skinid)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /skin (SkinID) - Enter A Valid Skin ID");
    if(skinid > 299 || skinid < 0) return SendClientMessage(playerid, COLOR_RED, "Invalid Skin ID.");
    if(skinid == 294 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You Must Be An Admin To Choose This Skin.");
    SetPlayerSkin(playerid, skinid);
    return 1;
}
Reply
#10

pawn Код:
CMD:skin(playerid, params[])
{
    new skinid;
    if(sscanf(params, "d", skinid)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /skin (SkinID) - Enter A Valid Skin ID");
    if(skinid > 299 || skinid < 0) return SendClientMessage(playerid, COLOR_RED, "Invalid Skin ID.");
    if(skinid == 294 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You Must Be An Admin To Choose This Skin.");
   SetPlayerSkin(playerid, skinid);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)