Command, need a little 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)
+--- Thread: Command, need a little help (
/showthread.php?tid=382790)
Command, need a little help -
UnknownGamer - 05.10.2012
pawn Код:
else if(strlen(tmp) == "165")
How do I do this, so if they type "/clothes 165" - They get an error message, they cannot use skin 165.
Cheers.
Re: Command, need a little help -
Passout - 05.10.2012
Код:
else if(strlen(tmp) == "165")
{
SendClientMessage(playerid,//UR COLOR//,"You cannot use this ID!");
return 1;
}
?? Im not really familiar with that(strlen(tmp) == "165")...Im not sure exactly what you are asking
Wish I could help you properly though ;p
Re: Command, need a little help -
Lordzy - 05.10.2012
You mean like this?
pawn Код:
CMD:skin(playerid,params[])
{
new skinid;
if(sscanf(params,"i",skinid)) return SendClientMessage(playerid, 0xFF0000FF, "Usage: /skin [skin id]");
if(skinid < 0 || skinid > 299) return SendClientMessage(playerid, 0xFF0000, "Invalid skin id");
if(skinid == 165) return SendClientMessage(playerid, 0xFF0000FF, "You cannot use this skin"); //Here, it checks whether the skinid choosen is 165 or not.
Respuesta: Command, need a little help -
hotspicytaco - 05.10.2012
pawn Код:
CMD:Clothes(playerid,params[])
{
if(!strlen(params)) return SendClientMessage(playerid,-1,"[USAGE] /Clothes [id]");
if(strlen(params) == 165) return SendClientMessage(playerid,0xFF0000FF,"[ERROR] You can't use these clothes!");
//Something else
return 1;
}