VehicleHealth=PlayerHealth
#1

I would like to: When a player is in a vehicle is health is the same of the car, Car totalled = Player

+REP! So when he crash he loses life, more Rp
Reply
#2

OnVehicleDamageStatusUpdate

Example:

pawn Код:
public OnVehicleDamageStatusUpdate(vehicleid,playerid)
{
    new Float:health;
    GetPlayerHealth(playerid, health);
    SetPlayerHealth(playerid, health-10);
    return true;
}
Reply
#3

Not sure but try like this

Код:
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
       new Float:HP;
       GetVehicleHealth(vehicleid, HP);
       SetPlayerHealth(playerid, HP / 10);
}
Max player health is 100 and car heath is 1000
Reply
#4

Quote:
Originally Posted by TzAkS.
Посмотреть сообщение
Not sure but try like this

Код:
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
       new Float:HP;
       GetVehicleHealth(vehicleid, HP);
       SetPlayerHealth(playerid, HP / 10);
}
Max player health is 100 and car heath is 1000
It's kind of tricky, because a vehicle starts burning if the health is below 250. So even if the health is low, the player will still have some bit of health. But it's your own choice how you want it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)