SA-MP Forums Archive
OnVehicleDamageStatusUpdate - 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: OnVehicleDamageStatusUpdate (/showthread.php?tid=509262)



OnVehicleDamageStatusUpdate - Snoopythekill - 26.04.2014

How can I do to make the variable to be enabled and a car flipped the repair and turn to a position to continue running ?.

I tried in many ways, I knew not how to detect if a vehicle is dump, try that only tumbled the vehicle if you had 25 or less of life as well

But it didn't work, anyone can help me ? Thank you very much.

pawn Код:
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
new Float:health, veh = GetPlayerVehicleID(playerid);
new Float:vx, Float:vy, Float:vz, Float:angulo;
GetVehicleHealth(veh, health);

if(EnCarrera[playerid] == true)
{
SetVehicleHealth(veh, 1000);
{
if(veh, health < 25)
{
GetVehiclePos(veh, vx, vy, vz);
SetVehiclePos(veh, vx, vy, vz+2);
GetVehicleZAngle(veh, angulo);
SetVehicleZAngle(veh, angulo+1);
SetVehicleHealth(veh, 1000);
}
}
}
return 1;
}