[SOLVED] [Please lock] Value between X & X
#1

How do I check if something is between one thing and another?

Like I wanna check If a vehicles ID is between 0 and 15 for example, how do I do that?
No, I'm not looking for a code that use all vehicles above 0, I want to be able to
like doing,

from 0-15, from 15-25, from 50-75, without the first one interrupting the other and so on.

pawn Код:
if(GetPlayerVehicleID(playerid) >=0 <=10){
Like that, but that wont work, but if you get what i mean.
( will give this error:
Код:
warning 205: redundant code: constant expression is zero
)
Reply
#2

pawn Код:
new
  vecid = GetPlayerVehicleID(playerid):
if(vecid >= 0 && vecid <= 15){
  //bla
}
Reply
#3

pawn Код:
if(GetPlayerVehicleID(playerid) >=0 && GetPlayerVehicleID(playerid) <=10)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)