Need help
#1

Okay so basically I need help with this :
pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(z == 1.51)
if(z == 1.50)
How can I get the measurement of z == 1.51 and above
and z == 1.50 and below. If you know what I mean

Because, for example a command will only work on the z == 1.51 and onwards
and it won't work z == 1.50 and below, but in my case, it the commands only
work dead on spot of z == 1.51. and z == 1.50. I want it to make the commands
work for z == 1.51 and above and not work on z == 1.50 below.
Reply
#2

Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(z >= 1.51)
if(z <= 1.50)
>= greater then or equal
<= less then or equal

hope that is what you ment
Reply
#3

Quote:
Originally Posted by [T_S
DeStunter ]
Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(z >= 1.51)
if(z <= 1.50)
>= greater then or equal
<= less then or equal

hope that is what you ment
Wait, so this means that, I will be able to get the height of 1.51 and above
and 1.50 below?
Reply
#4

exactly right
Reply
#5

= : equal
> : bigger
< : smaller
>= : bigger or equal
<= : smaller or equal
Reply
#6

THANKS GUYS! O.O It now works perfectly!
Reply
#7

Quote:
Originally Posted by Etch ❽ H
= : equal <<<<<<<<<<<
> : bigger
< : smaller
>= : bigger or equal
<= : smaller or equal
pawn Код:
== : equal *
Reply
#8

sometimes its = and sometimes its ==
like u can do new Color = 0;
Reply
#9

wrong

= is to set a variable and == is to check if 2 items are equal
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)