Car not death when enter in the water - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Car not death when enter in the water (
/showthread.php?tid=413658)
Car not death when enter in the water -
cChaD - 06.02.2013
Hi,
i have a problem with a callback OnVehicleDeath who should be call when the car entered the water but no...
Thanks !
Re: Car not death when enter in the water -
spedico - 06.02.2013
I think it is bugged. Or the vehicle must be submerged for some time.
Re : Car not death when enter in the water -
cChaD - 06.02.2013
Код:
#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);
}
}
Re : Car not death when enter in the water -
cChaD - 06.02.2013
i have seen on ****** that OnPlayerDeath was bugged, how make the same system (when the vehicle enter in the watter ?)