SA-MP Forums Archive
NPC's what am I doning wrong? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: NPC's what am I doning wrong? (/showthread.php?tid=253177)



NPC's what am I doning wrong? - Lars_Frederiksen - 05.05.2011

filterscripts:
Код:
#include <a_npc>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Ghost_Of_Jesus by lars");
	print("--------------------------------------\n");
  	ConnectNPC("God","coplv");
	return 1;
}
#endif
npcmodes:
Код:
#define RECORDING "coplv" //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 == 2
  public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
  public OnNPCExitVehicle() StopRecordingPlayback();
#else
  public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#endif
It loads the filterscript but the bot does not connect, can someone help me fix this?


Re: NPC's what am I doning wrong? - Backwardsman97 - 05.05.2011

In your script you need to place the npc in a vehicle apparently for this to start.


Re: NPC's what am I doning wrong? - Lars_Frederiksen - 05.05.2011

Yeah I added a vehicle, and onplayerspawn i made it putplayerinvehicle but still nothing...


Re: NPC's what am I doning wrong? - linuxthefish - 05.05.2011

You set the max numbers of npc's?


Re: NPC's what am I doning wrong? - Lars_Frederiksen - 05.05.2011

yeh its at 50