26.07.2012, 00:35
pawn Код:
if(strcmp(cmd, "/skin", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, red, "Usage: /skin [skinid]");
return 1;
}
new skin;
skin = strval(tmp);
if(skin > 299 || skin < 1) return SendClientMessage(playerid, COLOR_GREY, "Invalid skin ID!");
format(string, sizeof(string), "You have changed your skin to this skin ID: %d", skin);
SendClientMessage(playerid, COLOR_GREEN, string);
SetPlayerSkin(playerid, skin);
return 1;
}