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

Strange behavior of parameters in `OnPlayerDeath` and `OnPlayerDamage`. #211

Closed daddyDOT closed 2 years ago

daddyDOT commented 3 years ago

Hello, I have a little problem with these two callbacks. OnPlayerDeath worked well before I included weapon-config but now it's acting strange just like OnPlayerDamage does.

The problem is that I get strange issuerid/killerid. I use FCNPC to interact with my NPCs and if I damage or kill one I get these IDs which are obiously incorrect, killerid is me but here it says that it's INVALID_PLAYER_ID instead of my ID (0). The only correct parameter in here is playerid in OnPlayerDeath and that is NPC's ID.

(OnPlayerDamage - Player damaged NPC)
playerid 32395684 | issuerid 32395688

(OnPlayerDeath - Player killed NPC)
killerid 65535, playerid 997

I also read this issue: #115 because similar problem is mentioned but it says the problem has already been fixed. I use sampctl and latest releases of weapon-config and FCNPC.

Thanks!