05.02.2014, 12:20
Quote:
We want the vehicle re-spawn and call the callback OnVehicleDeath.
|
pawn Code:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
new
Float: vH;
GetVehicleHealth(vehicleid, vH);
if (vH < 250.0)
{
CallRemoteFunction("OnVehicleDeath", "ii", vehicleid, forplayerid);
SetTimerEx("RespawnBuggedVehicle", 1000, false, "i", vehicleid);
}
return 1;
}
forward RespawnBuggedVehicle(vehicleid);
public RespawnBuggedVehicle(vehicleid)
{
SetVehicleToRespawn(vehicleid);
}