citizenfx / fivem

The source code for the Cfx.re modification frameworks, such as FiveM, RedM and LibertyM, as well as FXServer.
https://cfx.re/
3.48k stars 2.06k forks source link

GetPlayerWeaponDamageModifier always returns 1 serverside #2748

Open mcNuggets1 opened 2 weeks ago

mcNuggets1 commented 2 weeks ago

What happened?

I used SetPlayerWeaponDamage clientside to set the damage to 1.5. GetPlayerWeaponDamage now correctly returns 1.5 on the clientside.

The server side tells me 1.0, when I call the native. If I use an invalid player serversidely I get a 0.0, so it should be the synced value.

Expected result

Syncing happening (documentation is terrible too)

Reproduction steps

  1. SetPlayerWeaponDamageModifier(PlayerId(), 1.5)
  2. sv: print(GetPlayerWeaponDamageModifier(1) -- Or whatever the player id is you currently have

Importancy

Slight inconvenience

Area(s)

FiveM, FXServer

Specific version(s)

FiveM newest version

Additional information

No response

Korioz commented 2 weeks ago

Please specify what game build you are using, this will help to repro this issue.

mcNuggets1 commented 2 weeks ago

b3095, I updated the artifact today a few minutes ago also im on windows. Didn't include it, because I dont feel anyone's really reading or working on the issues I report.

Korioz commented 2 weeks ago

Did you had this issue on older game build ? I can confirm a desync with GetPlayerInvincible too on b3095 or greater, those two desyncs depends on CPlayerGameStateDataNode parser so it might need adjustment for this game build.

mcNuggets1 commented 2 weeks ago

I never worked with this until now.