SA-MP Forums Archive
OnPlayerGiveDamage using NPCs - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Bug Reports (https://sampforum.blast.hk/forumdisplay.php?fid=20)
+--- Thread: OnPlayerGiveDamage using NPCs (/showthread.php?tid=365418)



OnPlayerGiveDamage using NPCs - m33p4r34l - 02.08.2012

Hi,
i just played around with the new NPC plugin called "RNPC" by mauze and wanted to code a little zombie script.
But when I tested shooting an NPC using OnPlayerGiveDamage i recognized, that it's not called when the target is a NPC.. so I don't know if it's on purpose, but I think it would make much more things possible or easier using NPCs


Re: OnPlayerGiveDamage using NPCs - [MM]IKKE - 02.08.2012

https://sampwiki.blast.hk/wiki/OnPlayerGiveDamage
Quote:
Originally Posted by Wiki
This callback is called when a player gives damage to another player.
NPCs don't lose health...so they don't get any damage.


Re: OnPlayerGiveDamage using NPCs - RodriguezFais - 03.08.2012

As i know, NPC's are just walking around, you cant punch them / stop them from walking in anyway.


Re: OnPlayerGiveDamage using NPCs - rbN. - 03.08.2012

It's not even HARD to create your own damage 'system' for NPCs. You just need to know how to read the data from the weapon.dat file in the San Andreas directory.