SA-MP Forums Archive
Look at this plz - 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: Look at this plz (/showthread.php?tid=175532)



Look at this plz - zack3021 - 10.09.2010

Ok want to know if a player has a low wanted level he cant be jailed

pawn Код:
new Float:wanted
pawn Код:
if(wanted > 3)
pawn Код:
if(wanted == 3)return SendClientMessage(playerid,0xFF0000FF,"That player has a low wanted level, you cant jail him");
Is there a way to use "<" and ">" to say, if a player is a wanted level above......lets say 3, he cant be jailed instead of using "=="


Re: Look at this plz - Desert - 10.09.2010

Wanted level isn't a float. (Unless you plan on giving players wanted level 2.000001 or something like that)


On Topic:

The < and > means is bigger than, or less than. So "wanted < 3" means: wanted is less than 3. So any number below the value of 3 will give true. Using "wanted <= 3" means 3 AND below will give a true statement.

so therefor
pawn Код:
if(wanted < 3)
is what your looking for


Re: Look at this plz - zack3021 - 10.09.2010

Thanks for the help, i now understand.