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



No dmg - StR_MaRy - 16.03.2016

hi guys , how can i do something to a car not to take damage from people or other cars ? only if the driver crash the car can some1 give me a tutorial or something i didn't find on internet


Re: No dmg - introzen - 16.03.2016

Use the callback "OnVehicleDamageStatusUpdate" along with "SetVehicleHealth" or "RepairVehicle".

EDIT: Sorry, didn't see that you wished for the car only to take damage from crashing.
Only way to do this would be to first check where the damage to the vehicle is coming from. I don't know a method for that unfortunately.


Re: No dmg - Joron - 16.03.2016

https://sampforum.blast.hk/showthread.php?tid=490436

Just download the inc.
Use the callback

PHP код:
OnPlayerCrashVehicle(playeridvehicleidFloat:damage)
DescriptionCalled when a player crashes a vehicle