My command /rac made too big lag on server
#2

It can be improved a lot by using foreach.

"Player" iterator is still much faster than using GetPlayerPoolSize.

About the vehicles, I create/destroy vehicles only in the gamemode so I've created an iterator called "Vehicle" and everytime a vehicle is created, I add it to the iterator and remove it when it's get destroyed. By that, if the server has 5 created vehicles, it will just loop 5 times ONLY instead of 2000.
Reply


Messages In This Thread
My command /rac made too big lag on server - by ilepopivanov - 29.05.2015, 11:49
Re: My command /rac made too big lag on server - by Konstantinos - 29.05.2015, 11:55
Re: My command /rac made too big lag on server - by ilepopivanov - 09.06.2015, 16:49
Re: My command /rac made too big lag on server - by ilepopivanov - 09.06.2015, 16:52

Forum Jump:


Users browsing this thread: 1 Guest(s)