Look at this plz
#1

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 "=="
Reply
#2

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
Reply
#3

Thanks for the help, i now understand.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)