Command problem - 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: Command problem (
/showthread.php?tid=264695)
Command problem -
bartje01 - 27.06.2011
I kind of forgot how to do this:
But at my command:
If you used that the rank is higher then 10 it should return a message that you can't do it higher then 10.
pawn Код:
COMMAND:spr(playerid,params[])
{
new rank;
if(PlayerInfo[playerid][pFrank] <9) return SendClientMessage(playerid,COLOR_GREY,"You have to be rank 9+ in a faction to use this command.");
if(sscanf(params,"ud",id,rank)) return SendClientMessage(playerid,COLOR_GREY,"USAGE: /spr [playerid] [factionrank]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_GREY,"This player is not connected");
return 1;
}
I tried like: if(rank) and then I got stuck xD
Re: Command problem -
[HiC]TheKiller - 27.06.2011
pawn Код:
if(rank > 10) return SendClientMessage(playerid,COLOR_GREY,"The rank cannot be higher than 10!");
Re: Command problem -
bartje01 - 27.06.2011
Ah yes. Thankyou.
Sorry for this lame questions xD