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