22.08.2012, 23:50
pawn Код:
CMD: setskin(playerid, params[])
{
new skinid;
new ID;
new string[128];
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "ERRO: Vocк nгo й um adiministrador para usar esse comando.");
if (sscanf(params, "ui", ID, skinid)) return SendClientMessage(playerid, -1, "[.....]: Uso do Comando Correto: /setskin [ID] [Skin]");
if (!IsPlayerConnected(ID)) return SendClientMessage(playerid, -1, "ERRO: ID invalido.");
if (0 < (skinid) > 299) return SendClientMessage(playerid, -1, "SO EXISTE SKIN DE 0 A 299");
format(string, sizeof(string), "[NomeSV]: O Adiministrador %s alterou a skin de %s para o ID: [%d].", pname);
SendClientMessageToAll(0xFF00FFFF, string);
SetPlayerSkin(playerid, skinid);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
return 1;
}