02.10.2015, 14:07
Fixed Sellize's code.
PHP код:
CMD:skin(playerid,params[])
{
new playerState = GetPlayerState(playerid);
if(playerState == PLAYER_STATE_SPAWNED)
{
new skinid;
if(sscanf(params, "i", skinid)) return SendClientMessage(playerid, yellow, "Usage: /skin [skin ID]") ;
if(skinid < 0 || skinid > 311) return SendClientMessage(playerid, red, "Invaild skin ID!");
new Jstring[128];
format(Jstring, sizeof(Jstring), "You have set your skin ID to %i.", skinid);
SendClientMessage(playerid, 0xFDEE00FF, Jstring);
SetPVarInt(playerid,"Useskin",1);
SetPlayerSkin(playerid, skinid);
return 1;
}
else return SendClientMessage(playerid, -1, "You need to be spawned!");
}