22.01.2011, 14:23
On the callback OnPlayerCommandtext, add that line:
Also change your command for this one:
pawn Код:
dcmd(setskin,7,cmdtext);
pawn Код:
dcmd_setskin(playerid,params[])
{
new skin;
if (adminlevel[playerid] < 2) return SendClientMessage(playerid,COLOR_WHITE,"You're not an admin");
if(sscanf(params,"dd",player,skin)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setskin [playerid] [skinid]");
if(!IsPlayerConnected(player)) return SendClientMessage(playerid, COLOR_WHITE, "Invalid Player ID.");
if(IsInvalidSkin(skin)) return SendClientMessage(playerid, COLOR_GREY, "* Invalid Skin ID");
SetPlayerSkin(player, skin);
return 1;
}