SA-MP Forums Archive
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: NPC's (/showthread.php?tid=349953)



NPC's - WillyP - 10.06.2012

I'm going to be honest. I suck at making NPC's, always have, probably always will be. I have tried the tutorials, done them word for word, done all that was said of, yet they do not connect! I have used NPC creating filterscripts, they connect in the filterscript but in my gamemode there is no response at all. I even make a blank gamemode, still nothing. I posted in a NPC topic about automatically saving the data to make life alot easier, some already do, but they lack the functions of the one I was using. Or for someone to actually show me what to do as I am terrible. Thanks


Re: NPC's - WillyP - 10.06.2012

It's the simplest of codes. Pretty much exactly the same as kc's tutorial script except the names are different.


Re: AW: NPC's - WillyP - 10.06.2012

Quote:
Originally Posted by malaka
Посмотреть сообщение
This could be a mistake, if you didn't rename them corectly.

I didn't see anything, so I can just gues what's wrong. Show us the parts which you've done and which don't work for you.
They are all the same. It's a blank gamemode with the required elements. I really have no idea.


Re: NPC's - Randy More - 10.06.2012

A little tutorial that would help you:
1. Create a npc file. (( Should be the easiest ))
2. Open "npcmodes" folder from your server directory.
3. As you are not that good with dealing with NPCs, make a copy of "onfoot_test.pwn" file and open the copy.
4. All you will have to edit is this line:
pawn Код:
StartRecordingPlayback(PLAYER_RECORDING_TYPE_ONFOOT,"aimtest");
Make the new with this format
pawn Код:
StartRecordingPlayback(Type, on foot or in vehicle,"npc record file name");
5. Now go to your gamemode or filter script and just add this line under the init callback:
pawn Код:
ConnectNPC("NPC Name you want in game","npc record file");
6. Compile.
7. Make sure you have "samp-npc.exe" file in the server directory.
8. Make sure the line of "maxnpc" has a value more than 0 in the configuration file.
9. Launch the server.

Hopes that work.



Re: NPC's - WillyP - 10.06.2012

Hahahaha. I am terribly sorry you two. I have made possibly the worst mistake ever. I forgot about the .pwn file for the recording and tried to connect the actual recoring. Silly me.