23.03.2010, 15:12
I know its a simple command but i have a problem when i type like /skin 289 (and i set the limit of skin 0-28
it sets the skin but it should return and send a inavlid skin id message.
CODE:
it sets the skin but it should return and send a inavlid skin id message.
CODE:
pawn Код:
stock InvalidSkinId(playerid)
{
new skin = GetPlayerSkin(playerid);
if(skin < 0 || skin > 288) return SendClientMessage(playerid, WHITE, "Invalid skin id");
return 0;
}
pawn Код:
dcmd_skin(playerid, params[])
{
new skinid;
if(sscanf(params, "i", skinid)) return SendClientMessage(playerid, WHITE, "USAGE: /skin <skinid>");
else if(InvalidSkinId(playerid)) return false;
{
SetPlayerSkin(playerid, skinid);
}
return 1;
}