altv-issues icon indicating copy to clipboard operation
altv-issues copied to clipboard

weaponDamage event returns same player in target & source when triggered by synced ped

Open xxshady opened this issue 1 year ago • 0 comments

Description of the problem

See repro

Reproduction steps

import alt from "alt-server"

new alt.Ped('mp_f_freemode_01', new alt.Vector3(0, 3, 70), alt.Vector3.zero)

alt.on("weaponDamage", (source, target) => {
  alt.log('weaponDamage', source, target) // weaponDamage Player {} Player {}
  alt.log(source === target) // true
})
  1. Trigger attack from ped

Expected behaviour

type of source parameter should be changed to Entity and ped returned?

Additional context

No response

Operating system

Windows 11

Version

release 16.1.10 (can't test on dev because js module is not updated to latest sdk)

Crashdump ID

No response

Confirmation of issue's presence

  • [X] By submitting this ticket, I affirm that I have verified the presence of this issue on the latest developer version available at the time of writing this ticket.

xxshady avatar Aug 09 '24 16:08 xxshady