About NPC's - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: About NPC's (
/showthread.php?tid=515664)
About NPC's -
TheSimpleGuy - 27.05.2014
Hi, I am thinking of a new gamemode to be released, and I've seen the greatest gamemode(
sarcastically) ever. The problem is, I do not know how to do it with NPC's. You may think there are many NPC Tutorials around, but, I've been wondering if "
the players CAN attack the NPCs and the NPCs will reduce health, until they die?" Sorry, just noob about NPCs
Re: About NPC's -
Riddick94 - 27.05.2014
OnPlayerGiveDamage callback is called for NPCs as well. That has been introduced in the latest version of SA-MP.
Re: About NPC's -
TheSimpleGuy - 27.05.2014
I don't understand it, please, can you say some of it? ;p
Re: About NPC's -
R0 - 27.05.2014
As riddick said,and you can use OnPlayerGiveDamage and detect if the damaged id is an npc,if yes then give him - amount of health,like if the npc was shot by minigun so give him -60 hp or...just like that
Re: About NPC's -
TheSimpleGuy - 27.05.2014
Okay,thank you for your answer. Scripting time.