bots - 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: bots (
/showthread.php?tid=235302)
bots -
mike_1 - 05.03.2011
can anyone help me please how can i add bots in my server how can i script them
Re: bots -
HyperZ - 05.03.2011
You mean NPC?
Click Me
Re: bots -
mike_1 - 05.03.2011
yes but if i want a npc on foot?
Re: bots -
antonio112 - 05.03.2011
Quote:
Originally Posted by mike_1
yes but if i want a npc on foot?
|
Why don`t you read the tutorial? It`s very well explained, for either on foot or in vehicle.
All you have to do is load the fs in game, record NPC move on foot using /ofrecord and /stoprecord.
Then, in the:
pawn Код:
#define RECORDING "mynpc" //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
Change the:
pawn Код:
#define RECORDING_TYPE 1 //1 for in vehicle and 2 for on foot.
to
2 (As you can see, it`s written there, 1 for vehicle and 2 for on foot.
Was that too hard ?
Re: bots -
OKStyle - 05.03.2011
Just spawn bot: in OnPlayerSpawn: SetPlayerPos... etc.
Re: bots -
mike_1 - 05.03.2011
okstyle please give me an example i dont understand...