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



veh loop. - BaubaS - 08.07.2011

Hello all, so I have a question about vehicle loop.

So, if every day player would buy a car - then I would need to update MAX_VEHICLES value? Its impossible

Then, if I set MAX_VEHICLES to high value, its bad for me, because Im saving some things with MySQL and y_ini. And if I set high value, then its creates SO MUCH .ini files, so I want to loop ONLY CREATED vehicles.

Any suggestions? :S


Re: veh loop. - Macluawn - 08.07.2011

use a variable


Re: veh loop. - BaubaS - 08.07.2011

So, I need to create variable first.

Then, if I have some vehicles in OnGameModeInit(for jobs, etc) at the last vehicle I need to add

var = (example: var = CreateVeh(...);

Then, if I create vehicle somewhere normally(just CreateVeh..()) I need to add var = too?

And then, loop would be

for(new something; something < var; something++)

Im correct?

But btw, maybe there's some other suggestions?


Re: veh loop. - BaubaS - 08.07.2011

Bump, any suggestions??