GetDistanceBetweenPlayers
#1

Hi

How would I make it so if(GetDistanceBetweenPlayers(playerid, CriminalID) > 5)
if the distance between the players is greater than 5 BUT LESS THAN 20, then return 1;?

I am making a /ticket command for cops, and I want the distance that they can ticket them to be greater than 5 but less than 20 so a cop cannot ticket someone on the other side of the map.

Sorry if this is confusing!

Thanks ,Noah
Reply
#2

pawn Код:
if(5.0 < GetDistanceBetweenPlayers(playerid, CriminalID) < 20.0)
Recommended to always add the .0 when working with floats.
Reply
#3

Thank you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)