12.04.2012, 00:40
Try using this maybe :
If the problem still occurs, what does it tell ?
pawn Код:
if (strcmp("/setskin", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, 0xFFFFFFFF, "SYNTAX: /setskin [Playerid] [ID]");
return 1;
}
else
{
new value, string[128];
if(IsInvalidSkin(value))
{
SendClientMessage(playerid, 0xFFFFFFFF, "Invalid skin!");
}
else
{
format(string, sizeof(string), "You have set %s's skin to %d.", GetName(playeridid), Value);
SendClientMessage(playerid, 0xFFFFFFFF, string);
SetPlayerSkin(playerid, value);
}
}
}
else
{
SendClientMessage(playerid, 0x4F4F4FFF, "ERROR: You are unauthorized to use this command!");
}
return 1;
}