18.03.2011, 15:42
I have compiled a /setskin command, but when I get IG i type /setskin [id] [skin] and it just says "You changed ...'s skin to ..." but my skin isn't changed. Here, the cmd:
When I compile it shows no error. Any help?!
pawn Код:
dcmd_setskin(playerid, params[])
{
new pID, pName[MAX_PLAYER_NAME], string[128], value;
if(sscanf(params, "ui", pID, value)) return SendClientMessage(playerid, COLOR_GOLD, "/setskin [playerid] [skinid]");
else if(PlayerInfo[playerid][AdminLevel] <= 3) return SendClientMessage(playerid, COLOR_RED, "You have no acces to this comamnd");
else if(pID == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREEN, "Player Not Found");
else
{
GetPlayerSkin(pID);
GetPlayerName(pID, pName, MAX_PLAYER_NAME);
format(string, sizeof(string), "You changed (%i) %s's skin to %i", pID, pName, value);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
return 1;
}