SA-MP Forums Archive
Question - 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: Question (/showthread.php?tid=658225)



Question - m4karow - 27.08.2018

Hey there!

What do you recommend to loop through 250 * 6 array? (Sorry for my bad english, here is an example)

Код:
if( ... )
{
	for(new idx; idx < 250; idx++)
	{
	   	for(new slot; slot < 6; slot++)
		{
			if(Variable[idx][slot] == objectid)
			{
				<Move the object to a new pos>
			}
		}
	}
}
This callback also will called multiple times, becouse the player is interact with the object about random (1, 4) times so I'd like to run this on OnDynamicObjectMoved. Or should I re-move the object with a timer?
Or do you have any other advice?


Re: Question - m4karow - 01.09.2018

bump