SetVehicleHealth help !!
#9

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
Or... this ?
PHP код:
public OnGameModeExit()
{
     for(new 
GetVehiclePoolSize(); 0i--)
    {
        
SetVehicleToRespawn(i);
    }
    return 
1;

PHP код:
public OnVehicleSpawn(vehicleid)
{
    switch(
GetVehicleModel(vehicleid))
    {
        case 
520425SetVehicleHealth(vehicleid2500);
        case 
528427SetVehicleHealth(vehicleid5000);
        case 
432SetVehicleHealth(vehicleid10000);
    }
    return 
1;

I don't if this way is working.
There is absolutely no need to loop through all the vehicles and respawn them just to call the OnVehicleSpawn callback. What if he is loading server vehicles from a database or files?

What Konstantinos posted above works absolutely fine and makes it easier to do what he's looking for. I also have a custom function to create vehicles and I do the same to set the vehicle health.
Reply


Messages In This Thread
SetVehicleHealth help !! - by D3vin - 13.05.2016, 13:24
Re: SetVehicleHealth help !! - by Nin9r - 13.05.2016, 13:30
Re: SetVehicleHealth help !! - by Konstantinos - 13.05.2016, 13:31
Re: SetVehicleHealth help !! - by F1N4L - 13.05.2016, 13:32
Re: SetVehicleHealth help !! - by D3vin - 13.05.2016, 13:43
Re: SetVehicleHealth help !! - by D3vin - 13.05.2016, 15:33
Re: SetVehicleHealth help !! - by D3vin - 13.05.2016, 15:49
Re: SetVehicleHealth help !! - by Dayrion - 13.05.2016, 16:56
Re: SetVehicleHealth help !! - by Sjn - 13.05.2016, 17:01
Re: SetVehicleHealth help !! - by Dayrion - 13.05.2016, 17:26

Forum Jump:


Users browsing this thread: 2 Guest(s)