|
|
#1 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Dec 2007
Posts: 294
|
For those of you whom like to complain that NPCs don't have the potential to attack, stop complaining. You might want to edit your own script to place stationary NPCs around the server. The default way to set a NPC's position is with "/getnpc". Also, if you wish to throw off his accuracy a bit, just go to line 89 and change the dOffset value to whatever you want.
EDIT: Players can now shoot at and kill the NPC, though be warned, he has a nice chunk of hp. What he does: he faces the closest player that is within 30 units to him, and shoots at said player. It was requested that I simply turn this into a function, and so I did such. I've also left up the old one for those of you whom don't want to bother with the include. Function- CreateAttackingNPC Create an attacking npc at a specific location. Parameters- npcname, the NPC you wish to make an attacking NPC Float , the NPC's X positionFloat:y, the NPC's Y position Float:z, the NPC's Z position Float:AttackRadius (default: 60 units), the npc's firing distance Float:Accuracy (default: 10 degrees), the npc's firing accuracy Example on how to use it (you MUST use a timer): pawn Code:
Video (sorry, no audio!): SAMP Attacking NPC Download (old): ![]() Download (new): ![]() You also need this include (a_angles): ![]() EDIT: some people have had some problems regarding the creation of their own attacking NPCs, due to the lack of a NPC file, so I'll provide you all with one here: ![]() Have any suggestions for any future updates? Post em' here. Enjoy. |
|
|
|
|
|
#2 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Jul 2007
Posts: 654
|
damn dude, this is awesome.
It's great to see people are using NPC's to their full advantages |
|
|
|
|
|
#3 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Feb 2009
Posts: 271
|
Sexy job! i likie
|
|
|
|
|
|
#4 |
|
Big Clucker
![]() ![]() Join Date: Jun 2006
Posts: 57
|
Good job!! Now we need a way to kill npcs with guns.
|
|
|
|
|
|
#5 | |
|
Huge Clucker
![]() ![]() ![]() Join Date: Dec 2007
Posts: 294
|
Quote:
|
|
|
|
|
|
|
#6 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Dec 2007
Posts: 294
|
Main post updated, the NPC is now killable as well.
|
|
|
|
|
|
#7 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Apr 2009
Posts: 626
|
FUCK! EPIC!
I´ll be using THAT for sure. Thanks! |
|
|
|
|
|
#8 |
|
Huge Clucker
![]() ![]() ![]() Join Date: May 2008
Posts: 242
|
Dude you are an epic scripter you should consider selling your scripts
|
|
|
|
|
|
#9 | |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Apr 2009
Posts: 626
|
Quote:
|
|
|
|
|
|
|
#10 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Oct 2007
Posts: 469
|
Can someone mirror this please
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| No NPCs | regdude | Server Support | 6 | 08/07/2010 05:54 PM |
| Lol no stop attacking for me XD | 02manchestera | Everything and Nothing | 3 | 27/03/2010 11:14 AM |
| [Solved]How the hell do i make attacking turfs -->> click for more info <--- | Studio | Scripting Discussion | 4 | 15/07/2009 09:20 AM |
| [HELP] BAD RCON ATTACKING MY SERVER!!! | chenza | Server Support | 7 | 18/02/2009 05:12 AM |
| MY SERVER IS ATTACKING! HELP ME | Alexan | Server Support | 17 | 03/02/2009 12:48 PM |