*CLOSED* - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: *CLOSED* (
/showthread.php?tid=128150)
*CLOSED* -
Epic Shower - 16.02.2010
Is it possible to make a NPC not invencible?
And if Yes How?
Thanks
Re: How do i make a NPC Killable? -
aircombat - 16.02.2010
yes its possible , i don't know how , but i saw a gamemode or filterscript called [npc zombies] search and u will find it , and maybe from this script u will learn how to make them killalbe
________
Subaru ej engine
Re: How do i make a NPC Killable? -
Epic Shower - 16.02.2010
Ok i will search for it thanks alot man
Re: How do i make a NPC Killable? -
wafffllesss - 16.02.2010
Quote:
Originally Posted by aircombat
yes its possible , i don't know how , but i saw a gamemode or filterscript called [npc zombies] search and u will find it , and maybe from this script u will learn how to make them killalbe
|
Is not a perfect system, but it works =D
Re: How do i make a NPC Killable? -
Epic Shower - 16.02.2010
I found the filterscript and if i'm not wrong he used a timer?
It was something like If the player shoots the npc *number of times* setplayerhealth(playerid, 0.0);
Re: How do i make a NPC Killable? -
wafffllesss - 16.02.2010
Quote:
Originally Posted by Epic Shower
I found the filterscript and if i'm not wrong he used a timer?
It was something like If the player shoots the npc *number of times* setplayerhealth(playerid, 0.0);
|
I created a variable (LastZombieHealth) and set it down when player shoot at the X distance and pointing at the zombie, so when it reaches 0 I make the npc 'die' (SetPlayerHeath) and kick him.
Re: How do i make a NPC Killable? -
Epic Shower - 16.02.2010
Could you please post an example of that code?
I'm just a bit confused with wich codes i'll have to use.
Thanks.
Re: How do i make a NPC Killable? -
wafffllesss - 16.02.2010
Quote:
Originally Posted by Epic Shower
Could you please post an example of that code?
I'm just a bit confused with wich codes i'll have to use.
Thanks.
|
I'll try to post you a working code as soon as i get home. (like in 1h30m).
Re: How do i make a NPC Killable? -
Epic Shower - 16.02.2010
Ok.
Thank you very much
Re: How do i make a NPC Killable? -
wafffllesss - 16.02.2010
http://forum.sa-mp.com/index.php?topic=153482.0