oscar-broman / samp-weapon-config

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

weapon take damage out of range #241

Closed th1nk-er closed 6 months ago

th1nk-er commented 2 years ago

I know that when using this script, the default situation cannot be made beyond the weapon range, so I use SetWeaponMaxRange, set the range of the weapon desert eagle to 100 or even bigger, however, there is still no damage within the specified range, and there is no useful debug information. So I want to know how to let the weapon damage range to restore the original look, that is, the default range can also cause damage (this is considered a bug, but this is what I need)

th1nk-er commented 2 years ago

I had use SetWeaponMaxRange(24, 300)

(wc:1) OnPlayerWeaponShot(1 shot 2 with 24 at 0.058715, -0.229736, -0.174111)
(wc:1) (shot) last: 893 last 3: 1232
(wc:2) OnPlayerTakeDamage(2 took 46.200000 from 1 by 24 on bodypart 4)

This is the information that I hit somebody with Deagle far from somebody, it doesn't take any damage.

(wc:1) OnPlayerWeaponShot(1 shot 2 with 24 at 0.000732, 0.121459, -0.010813)
(wc:1) (shot) last: 225896 last 3: 113394
(wc:1) OnPlayerGiveDamage(1 gave 46.200000 to 2 using 24 on bodypart 4)
(wc:1) (hit) last: 296211 last 3: 154315
(wc) InflictDamage(2, 46.2000, 1, 24, 4) length = 2.267822
(wc) OnPlayerDamageDone(1 did 46.200000 to 2 with 24 on bodypart 4)
(wc:2) OnPlayerTakeDamage(2 took 46.200000 from 1 by 24 on bodypart 4)

This is the information to stand in front of someone and cause damage.

So how to make it possible to take damage if two players are far apart .

ADRFranklin commented 1 year ago

Which version of sa-mp are you on? I know there have been issues around using weapon-config on 0.3DL outside the world bounds where damage is not inflicted, so is this related or is this a similar issues now appearing on 0.3.7?

th1nk-er commented 1 year ago

It happened on 0.3.7. Just as you say

Because of a SA-MP bug, weapons can (and will) exceed this range

But for my players, many of them need this bug to shoot with each other for fun.

What I mean is that I set weapon's max range out of the default range, it doesn't work.

Example: I set the range of desert eagle to 50.0, players can only be damaged in range of 35.0(default max range).