01.04.2011, 18:34
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
#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
ConnectNPC("MyFirstNPC","mynpc");
if(IsPlayerNPC(playerid)) return 1;
Yeah NPCS are difficult to learn.
first, is your NPC on foot? or in a vehicle? If on foot. Heres my "mynpc.pwn" pawn Код:
Under ModeInIt pawn Код:
pawn Код:
|