02.10.2015, 14:19
It seems that the PLAYER_STATE_SPAWNED is set only the moment the player spawns so you can't use it in a command like that.
I got the info here: https://sampforum.blast.hk/showthread.php?tid=112857
I'd recommend taking out the condition and making the code like this:
Or if you want, you could the command for admins only.
I got the info here: https://sampforum.blast.hk/showthread.php?tid=112857
I'd recommend taking out the condition and making the code like this:
PHP код:
CMD:skin(playerid,params[])
{
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;
}