20.06.2011, 12:22
Hey, I need some help.
I need to check it before it does "SetPlayerSkin", if the tmp value is under 0 or over 299 then return with an error message to prevent bugging xD
Код:
if(strcmp(cmd, "/skin", true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, 0x919191FF, "Usage: /skin [SKINID]"); return 1; } if(IsAtClothShop(playerid) || PlayerInfo[playerid][pDonateRank] >= 1) { new chosenskin = strval(tmp); SetPlayerSkin(playerid, chosenskin); PlayerInfo[playerid][pModel] = chosenskin; return 1; } else if (PlayerInfo[playerid][pDonateRank] >= 1) { new chosenskin = strval(tmp); SetPlayerSkin(playerid, chosenskin); PlayerInfo[playerid][pModel] = chosenskin; return 1; } else { SendClientMessage(playerid, COLOR_YELLOW, " You are not inside a clothing store!"); } }