21.03.2014, 18:02
Why this reduces player's health only for like 5 HP points.. How can I make it it will reduce players health based on how much damage vehicle recieved at crash?
pawn Код:
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
if(SeatBelt[playerid] ==0)
{
new Float:phealth;
new Float:vhealth;
GetPlayerHealth(playerid, phealth);
new veh = GetPlayerVehicleID(playerid);
GetVehicleHealth(veh, vhealth);
SetPlayerHealth(playerid, phealth - vhealth /168);
}
return 1;
}