oscar-broman / samp-weapon-config

A more consistent and responsive damage system with many new features
Apache License 2.0
93 stars 83 forks source link

Fix for another driver damage exploit #275

Closed NexiusTailer closed 9 months ago

NexiusTailer commented 9 months ago

This fixes driver damage exploit when it was possible to call double damage on players if the cheater spoof damage being in any car as driver and sending 31 or 38 weaponid as reason. This way the first damage were processed & applied without any problems inside OnPlayerGiveDamage (well, it was definitely easy before #273) and the second damage were applied because the victim called OnPlayerTakeDamage (as usual), but this check were passed: https://github.com/oscar-broman/samp-weapon-config/blob/826306951eda87c6b8f492d47cae0819cf4f3ee6/weapon-config.inc#L4205-L4209 making it able to process the same damage for the second time as "vehicle gun" damage.