Infinitely Vehicle Health
#1

Hello, how to make that an Vehicle have infinitely Health?
Reply
#2

SetVehicleHealth(vehicleid, 9999999);

Or use OnVehicleDamageStatusUpdate, there place code to RepairVehicle(vehicleid); this will repair the car if it hits something including bodywork. However sometimes it called too late and the player ies anyway
Reply
#3

And you cant make it otherwise, or with an other method or so?
Reply
#4

Do you want to make every vehicle to have infinite health or only specific vehicles, such as vehicles for players?
Reply
#5

Just say me if there is a method to give an vehicle infinite health.
Reply
#6

You could make a timer, which calls the (specific) vehicle and set the vehicle health to 1000.0 everytime.

pawn Код:
SetTimer("SetCarGod", 1000, true);

forward SetCarGod();
public SetCarGod()
{
     for(new i; i < MAX_PLAYERS; i++)
     {
          if(IsPlayerInAnyVehicle(i))
          {
               SetVehicleHealth(GetPlayerVehicleID(i), 1000.0);
          }
     }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)