npc help...
#1

help... script
pawn Код:
#define RECORDING "spawn" //This is the filename of your recording without the extension.
#define RECORDING_TYPE 1 //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

public OnFilterScriptInit()
{
  ConnectNPC("Tanush","spawn");
  return 1;
}
well i got this error and one warning
pawn Код:
D:\Users\Tanush\Desktop\SA-MP\filterscripts\NPC.pwn(15) : warning 235: public function lacks forward declaration (symbol "OnFilterScriptInit")
D:\Users\Tanush\Desktop\SA-MP\filterscripts\NPC.pwn(17) : error 017: undefined symbol "ConnectNPC"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

Код:
#include <a_samp>
Perhaps ?

Forget that i was'nt thinking. lol
Reply
#3

i did that and got 3error -.-, otherwise this topic wouldnt be here
pawn Код:
D:\Users\Tanush\Desktop\SA-MP\filterscripts\NPC.pwn(6) : warning 235: public function lacks forward declaration (symbol "OnRecordingPlaybackEnd")
D:\Users\Tanush\Desktop\SA-MP\filterscripts\NPC.pwn(6) : error 017: undefined symbol "StartRecordingPlayback"
D:\Users\Tanush\Desktop\SA-MP\filterscripts\NPC.pwn(9) : warning 235: public function lacks forward declaration (symbol "OnNPCEnterVehicle")
D:\Users\Tanush\Desktop\SA-MP\filterscripts\NPC.pwn(9) : error 017: undefined symbol "StartRecordingPlayback"
D:\Users\Tanush\Desktop\SA-MP\filterscripts\NPC.pwn(10) : warning 235: public function lacks forward declaration (symbol "OnNPCExitVehicle")
D:\Users\Tanush\Desktop\SA-MP\filterscripts\NPC.pwn(10) : error 017: undefined symbol "StopRecordingPlayback"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
Reply
#4

Its was just a suggestion.
Reply
#5

can u help me please
Reply
#6

Ok, so you did it completly wrong. First, you need to make a pawno file, with this one:

pawn Код:
#define RECORDING "spawn" //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
Compile it ...

Then, later on, you have to connect the NPC in your gamemode, or filterscript, using "ConnectNPC"

Better yet, read this tutorial please.

https://sampforum.blast.hk/showthread.php?tid=95034
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)