pawn Код:
CMD:skin(playerid, params[])
{
new amount, name[MAX_PLAYER_NAME], string[128];
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(sscanf(params,"i",amount)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setskin [skinmodel]");
else if(amount> 299 || amount< 1) return SendClientMessage(playerid,COLOR_GREY,"Invalid skinid [1-299].");
else
{
GetPlayerName(playerid, name, sizeof(name));
strreplace(name, '_', ' ');
format(string, sizeof(string),"You have set %s's money to %d.", name, amount);
SendClientMessage(playerid,COLOR_WHITE,string);
PlayerInfo[playerid][pSkin] = amount;
SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
}
}
else return SendClientMessage(playerid,COLOR_GREY,"You're not authorized to use that command!");
return 1;
}