Car not death when enter in the water
#1

Hi,

i have a problem with a callback OnVehicleDeath who should be call when the car entered the water but no...


Thanks !
Reply
#2

I think it is bugged. Or the vehicle must be submerged for some time.
Reply
#3

Код:
#define FILTERSCRIPT

#include <a_samp>

public OnPlayerUpdate(playerid)
{
	UpdateCarLife(playerid);
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	SetPlayerHealth(killerid, 0);
	return 1;
}

stock UpdateCarLife(playerid)
{
	if(IsPlayerInAnyVehicle(playerid))
	{
		new Float:PlayerHealth, Float:VehHealth, Float:TrueVehHealth;
		GetPlayerHealth(playerid, PlayerHealth);
		GetVehicleHealth(GetPlayerVehicleID(playerid), VehHealth);
		TrueVehHealth = floatround(floatround(VehHealth - 250)/ 7.5);

		SetPlayerHealth(playerid, TrueVehHealth);
	}
}
Reply
#4

i have seen on ****** that OnPlayerDeath was bugged, how make the same system (when the vehicle enter in the watter ?)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)