NPC's hate me
#1

Well, I've followed kc's tutorial for NPC's, yet they won't connect, and ConnectNPC is undefined even though it's obviously included with <a_npc>? WTF is up with this? I can never understand NPC's. :L
Reply
#2

try doing it ni a filter scipt but put the define for the filterscript or it will be a gamemode
Reply
#3

Quote:
Originally Posted by GoldenM4
Посмотреть сообщение
try doing it ni a filter scipt but put the define for the filterscript or it will be a gamemode
I've already tried it in a blank GM/blank FS
Reply
#4

Yeah NPCS are difficult to learn.
first, is your NPC on foot? or in a vehicle?

If on foot. Heres my "mynpc.pwn"
pawn Код:
#define RECORDING "mynpc" //This is the filename of your recording without the extension.
#define RECORDING_TYPE 2 //1 for in vehicle and 2 for on foot.
#include <a_npc>
main(){}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#if RECORDING_TYPE == 1
public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnNPCExitVehicle() StopRecordingPlayback();
#else
public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#endif
And in your mode.
Under ModeInIt
pawn Код:
ConnectNPC("MyFirstNPC","mynpc");
And under Request class, spawn, and such.
pawn Код:
if(IsPlayerNPC(playerid)) return 1;
Reply
#5

Quote:
Originally Posted by -Rebel Son-
Посмотреть сообщение
Yeah NPCS are difficult to learn.
first, is your NPC on foot? or in a vehicle?

If on foot. Heres my "mynpc.pwn"
pawn Код:
#define RECORDING "mynpc" //This is the filename of your recording without the extension.
#define RECORDING_TYPE 2 //1 for in vehicle and 2 for on foot.
#include <a_npc>
main(){}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#if RECORDING_TYPE == 1
public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnNPCExitVehicle() StopRecordingPlayback();
#else
public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#endif
And in your mode.
Under ModeInIt
pawn Код:
ConnectNPC("MyFirstNPC","mynpc");
And under Request class, spawn, and such.
pawn Код:
if(IsPlayerNPC(playerid)) return 1;
I shall try now :P Thanks
Reply
#6

Yes sir, Reply either here or PM, If you cant get it working.
Reply
#7

Quote:
Originally Posted by -Rebel Son-
Посмотреть сообщение
Yes sir, Reply either here or PM, If you cant get it working.
I can't get it working, I'm terrible at NPC's
Reply
#8

PM'd
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)