Lil /skin help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Lil /skin help (
/showthread.php?tid=242425)
Lil /skin help -
tanush - 20.03.2011
if i accidently type /skin [over id299] i get crashed
, how i fix it
pawn Код:
COMMAND:skin(playerid, params[])
{
if(PlayerData[playerid][AdminLevel] > 0)
{
new string[128], skinid;
if(sscanf(params, "d", skinid)) return SendClientMessage(playerid,0xFF0000FF, "USAGE: /skin [id]");
SetPlayerSkin(playerid, skinid);
format(string, sizeof(string), "You have set your skin ID to %d", skinid);
SendClientMessage(playerid,0xFF9900AA, string);
}
else return SendClientMessage(playerid,0xFF0000FF, "ERROR: Your admin level isn't high enough!");
return 1;
}
Re: Lil /skin help -
antonio112 - 20.03.2011
pawn Код:
COMMAND:skin(playerid, params[])
{
if(PlayerData[playerid][AdminLevel] > 0)
{
new string[128], skinid;
if(sscanf(params, "d", skinid)) return SendClientMessage(playerid,0xFF0000FF, "USAGE: /skin [id]");
if( skinid< 0 && skinid > 299 )
return SendClientMessage( playerid, -1, "Invalid Skin ID!" );
SetPlayerSkin(playerid, skinid);
format(string, sizeof(string), "You have set your skin ID to %d", skinid);
SendClientMessage(playerid,0xFF9900AA, string);
}
else return SendClientMessage(playerid,0xFF0000FF, "ERROR: Your admin level isn't high enough!");
return 1;
}
This should work.