samp-weapon-config icon indicating copy to clipboard operation
samp-weapon-config copied to clipboard

SetCustomFallDamage Bike Bug

Open codectile opened this issue 10 years ago • 7 comments

I was just testing this include and I came to know that as soon as a player falls with his bike into the water, he dies immediately , and on the screen it displays "collision -100.0", when SetCustomFallDamage is set to false. All other things works fine when it is set to true.

https://www.youtube.com/watch?v=gc1-BS39G6M

codectile avatar Feb 20 '15 15:02 codectile

Well it would be your "Fall from moving vehicle damage system" that is causing it right? If so it is your problem. Maybe check to see if the vehicle was a bike vehicle. Also, I think OnVehicleDeath is called when bike is entering water. Maybe you could add a hook for that to check.

Crayder avatar Feb 20 '15 21:02 Crayder

No, if it was the falt of "fall from moving vehicle" I would not create an issue here.

codectile avatar Feb 21 '15 03:02 codectile

It doesn't give me damage, tested by falling into the water from 100 meters above sea level on an nrg. The only thing called was OPTakeD: image How do I recreate your scenario?

EDIT: I'm using only weap-cfg and my colored health bar version. I didn't test it with your script yet, I will in a sec.

Crayder avatar Feb 21 '15 04:02 Crayder

Oh I am very sorry, by mistake I did download my fork again instead of the real version and I was thinking that it's the real version. Sorry once again.

codectile avatar Feb 21 '15 06:02 codectile

We all make mistakes, it's ight, no harm done. We could still consider this though:

OnPlayerTakeDamage, detects bodypart 3, reason 54, invalid player id, and exactly 0.0 health when falling into the water on a bike. We could add an amount of damage to that from the lastzvel for vehicle impact on water damage.

Crayder avatar Feb 21 '15 06:02 Crayder

I think, I need to reopen this issue as I was right, I guess. Crayder, I am going to send you a file in forums with a description go through it once.

codectile avatar Feb 21 '15 06:02 codectile

Added video.

codectile avatar Feb 21 '15 08:02 codectile