Avoid Reckless driving - 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: Avoid Reckless driving (
/showthread.php?tid=513627)
Avoid Reckless driving -
Lidor124 - 17.05.2014
Hey,
I see in a RP server that i was, there is a feature than if you in car and you ram at wall so your health will be reduced.
I mean if there are passangers in your vehicle so all players' health in a specific car will bge reduced, also it according to the vehicle speed while the ramming in the wall.
I think its a filterscript but idk how it called ?
+REP
Re: Avoid Reckless driving -
Rittik - 17.05.2014
I think in that server the scripter might added it for only some objects(wall) try crashing into different types of wall.
Re: Avoid Reckless driving -
Threshold - 17.05.2014
There are many ways to do this. Some people might use
OnVehicleDamageStatusUpdate which is called whenever the vehicle has a VISUAL damage applied to it. Then you can use
GetVehicleHealth to determine how hard the vehicle hit the wall.
Another method is to combine a timer with GetVehicleHealth so you can take an appropriate damage from all passengers in the vehicle when the vehicle receives damage. Hitting a wall at a very high speed might take about 400-500 vehicle health. So you would probably apply 10% or 20% damage to the passengers.
And ignore the above poster, he has no idea what he's talking about.