SA-MP Forums Archive
arrays check - 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)
+--- Thread: arrays check (/showthread.php?tid=301044)



arrays check - juraska - 02.12.2011

I just want to know is posible array like new i[100];
if( vehicleid == since i[0] and to i[100] )
That do not need use if( vehicleid == since [0] || vehicleid == since [1]|| vehicleid == since [2].....vehicleid == since [100])
thanks in advance


Re: arrays check - sleepysnowflake - 02.12.2011

Looping ?
pawn Код:
for(new a=0; a < 100; a++)
{
if(vehicleid == since[a])
{
//CODE BLA BLA
}
}



Re: arrays check - WLSF - 02.12.2011

pawn Код:
if( vehicleid >= since[0] && vehicleid <= since[100] )



Re: arrays check - sleepysnowflake - 02.12.2011

^ Yeah. Ignore my one, it is just stupid . Looping ... *laughs*


Re: arrays check - juraska - 03.12.2011

Thanks!