17.09.2016, 11:25
First optimization is your loop, it's calling GetVehiclePoolSize at every iteration.
And a little (mistake or it's mean't to be like that?), it will respawn also used vehicles which will be annoying to players.
And a little (mistake or it's mean't to be like that?), it will respawn also used vehicles which will be annoying to players.
PHP Code:
for(new i, j=GetVehiclePoolSize(); i <= j; i++)
{
if(GetVehicleDriver(i) == INVALID_PLAYER_ID) SetVehicleToRespawn(i);
}