Vehicle Health
#3

Quote:
Originally Posted by Don Correlli
Example:
pawn Код:
if(IsPlayerInAnyVehicle(playerid))
{
  new
      Float:vehicleHealth, vehicleID;
  vehicleID = GetPlayerVehicleID(playerid);
  GetVehicleHealth(vehicleID, vehicleHealth);
  if(vehicleHealth <= 500.0) SetVehicleHealth(vehicleID, 1000.0);
}
Note that vehicle's maximum health is 1000, this code will fix vehicle if it's health is 500.0 or below.
If you would like to repair vehicle's visual damage, then use RepairVehicle(...) function.
ok Thanks For Your help
Reply


Messages In This Thread
Vehicle Health - by GforceNL - 30.12.2009, 16:09
Re: Vehicle Health - by Correlli - 30.12.2009, 16:17
Re: Vehicle Health - by GforceNL - 30.12.2009, 16:33
Re: Vehicle Health - by Correlli - 30.12.2009, 16:39

Forum Jump:


Users browsing this thread: 1 Guest(s)