26.07.2012, 00:40
by Vernz . . Edited
Quote:
if a player type /skin ID then he should get the skin which he typed. |
pawn Код:
CMD:skin(playerid, params[])
{
new amount, name[MAX_PLAYER_NAME], string[128];
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]);
}
return 1;
}