car damage - 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 damage (
/showthread.php?tid=627443)
car damage -
Rix70 - 28.01.2017
its something wrong with the car damage and i bought a script so i dont where to find it ctrl+f and what should i search for? bcs the car explode when its like 20 hp left so :P
Re: car damage -
Amads - 28.01.2017
Search for SetVehicleHealth
Re: car damage -
Codeah - 28.01.2017
Search for 20 inside of an if statement.
Re: car damage -
Sew_Sumi - 28.01.2017
Cars catch fire at 250 HP or something...
Re: car damage -
Rix70 - 28.01.2017
nope didnt found it at that
Re: car damage -
Rix70 - 28.01.2017
what u mean?
Re: car damage -
rinori - 28.01.2017
Look for GetVehicleHealth
Re: car damage -
BiosMarcel - 28.01.2017
Max Health: 1000.0
Explode at: 250.0
Ways to solve it:
Set HP to 1250.0 when spawning/repairing it.
OR
If the problem is that you have a Health bar for your cars health, which displays something wrong, you just have to change calculations:
Here is an example:
PHP код:
new Float:vehHealth;
new playerVehicle = GetPlayerVehicleID(playerid);
GetVehicleHealth(playerVehicle, vehHealth);
vehHealth = floatdiv(floatsub(vehHealth, 150.0), 7.5);
Now you can use VehHealth to set your car health:
250HP = 0
1000HP = 100
Re: car damage -
Rix70 - 28.01.2017
i did only found like repair health
Re: car damage -
Rix70 - 28.01.2017
can u come help me on skype linus.45 ? cant find that php code