[SOLVED] [Please lock] Value between X & X - 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: [SOLVED] [Please lock] Value between X & X (
/showthread.php?tid=112884)
[SOLVED] [Please lock] Value between X & X -
Mike Garber - 10.12.2009
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
)
Re: Value between X & X -
yezizhu - 10.12.2009
pawn Код:
new
vecid = GetPlayerVehicleID(playerid):
if(vecid >= 0 && vecid <= 15){
//bla
}
Re: [SOLVED] [Please lock] Value between X & X -
[HiC]TheKiller - 11.12.2009
pawn Код:
if(GetPlayerVehicleID(playerid) >=0 && GetPlayerVehicleID(playerid) <=10)