Announcement

Collapse
No announcement yet.

OnPlayerWeaponShot gets called twice when the shot hits an NPC

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    OnPlayerWeaponShot gets called twice when the shot hits an NPC

    While debugging the OnPlayerWeaponShot event I noticed it was called twice when I hit an NPC. Don't think this should be the case.

    Code:
    AddEvent("OnPlayerWeaponShot", function(player, weapon, hitType, hitId, hitX, hitY, hitZ, startX, startY, normalX, normalY, normalZ)
        if hitType == 4 then
            AddPlayerChatAll("You have shot "..hitId.." with a "..weapon.." at: "..hitX.."(X)"..hitY.."(Y)"..hitZ.."(Z).")
        end
    end)
    Edit: I should specify it's the server event that gets called twice. Here's my debugger:

    Click image for larger version

Name:	event.png
Views:	399
Size:	52.5 KB
ID:	1326
    Last edited by BigMistake; 12-18-2019, 11:29 PM. Reason: Addendum

    #2
    Can no longer reproduce this.

    Comment

    Working...
    X