pawn-lang / sa-mp-fixes

Includes and plugins to fix various issues in the SA:MP server that can be fixed externally, leaving the devs time for other things.
135 stars 57 forks source link

OnVehicleRespray not called for Pay'n'Sprays #54

Open IstuntmanI opened 7 years ago

IstuntmanI commented 7 years ago

OnVehicleRespray isn't called for Pay'n'Sprays.

This is written on the wiki too: http://wiki.sa-mp.com/wiki/OnVehicleRespray http://wiki.sa-mp.com/wiki/Bugs

rt-2 commented 7 years ago

Well this limit vehicle's health to 999 instead of 1000, because this is what is uses to determine when the player really get resprayed. This instead uses the player camera I think: http://forum.sa-mp.com/showthread.php?t=490436 rt-2

IstuntmanI commented 7 years ago

Well, the maximum health will be lower with only 1 unit (not even), why does it matter ? It could also help to detect cheaters. (vehicle health bigger than 999.98 => ban ?) The detection from that include is interesting.

rt-2 commented 7 years ago

I personally have vehicles with more than 1000, so this methods is not good for me. We should not modify the behaviors normally isn't that right? The camera method works perfectly and vehicles have the real health, that's what I'm using.

IstuntmanI commented 7 years ago

You are right. Well, we should use that method then, if it really works correctly.

rt-2 commented 7 years ago

Been using it for some time now, in fact the complete package is very neat you should try it. And it calls another new function and doesn't disrupt the fact that OnVehicleRespray is not called at Pay'n'Sprays, it calls

OnPlayerUseGarage(playerid, vehicleid, type)
Description: Called when a player uses a Pay'n'Spray or bomb shop.

instead. rt-2

WoutProvost commented 6 years ago

Such a shame that thread got burried under all the other includes. It has some very useful callbacks.