SA-MP Forums Archive
NPC Deathmatch Bots - 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: NPC Deathmatch Bots (/showthread.php?tid=281064)



NPC Deathmatch Bots - Tasos_Killer - 04.09.2011

hello everyone! Can someone tell me link or pastebin link for some bots where i can kill them for score?? i have a Call Of Duty Modern Warfare 2 server and when there are no players i want some bots when im killing them i get score. I want them to shoot too. If someone knows please help me


Re: NPC Deathmatch Bots - Double-O-Seven - 04.09.2011

There was a plugin which supported killing NPCs, however, it's been deleted and is now forbidden.

However, it's possible to make NPCs killable and shooting NPCs with a filterscript, but trust me, if anyone creates this, he probably won't give it away... unless you pay him.


Re: NPC Deathmatch Bots - Tasos_Killer - 04.09.2011

ok but if i can make it then can you tell me how?


Re: NPC Deathmatch Bots - Double-O-Seven - 04.09.2011

NPC dies
Use a function like OnPlayerShootPlayer, store health as PVar, take health. Apply death animation when health is 0.
Done. NPC can be killed.

NPC shoots
To make an NPC shoot at you, make the player looking at you (calculating and setting facing angles), apply shooting animation, and add particles and sounds when NPC is shooting.

NPC walks (smooth [theoretically])
Apply walk animation, block OnPlayerUpdate with "return 0;" for the NPC, after a certain time, update his position using for example MapAndreas an use "return 1;" in OnPlayerUpdate. And apply walk animation again.
The position update requires some calculations with speed etc.

Now you have an awesome NPC script!


Re: NPC Deathmatch Bots - Improvement™ - 04.09.2011

Quote:
Originally Posted by Double-O-Seven
Посмотреть сообщение
There was a plugin which supported killing NPCs, however, it's been deleted and is now forbidden.
Forbidden? Where is this rule written because I am very curious about the reason behind forbidding that.
Could you please link me to a page where you read this?

Thanks in Advanced.

Kind Regards,
Improvement™