16.07.2014, 00:34
Does this help you?
Код:
CMD:setskin(playerid, params[]) { new id, ammount, name[MAX_PLAYER_NAME], string[128]; if(!(PlayerInfo[playerid][pAdmin] >= 4)) return SendClientMessage(playerid, COLOR_GREY,"You are not authorized to use this command"); else if(sscanf(params,"ui", id, ammount)) return SendClientMessage(playerid, COLOR_GREY,"[True:RP]: /setskin [playerid/partofname] [skinmodel]"); else if(ammount > 299 || ammount < 1) return SendClientMessage(playerid, COLOR_GREY,"Wrong Skin ID! Available ID's: 1-299"); else if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GREY,"Invalid player id"); else { GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string),"Your skin have been set to %i by admin %s", ammount, name); SendClientMessage(id, COLOR_GREEN, string); PlayerInfo[id][pSkin] = ammount; SetPlayerSkin(id, PlayerInfo[id][pSkin]); } return 1; }