How to make bot? - 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: How to make bot? (
/showthread.php?tid=111996)
How to make bot? -
whitedragon - 05.12.2009
How to make bot?
Re: How to make bot? -
CJ101 - 05.12.2009
http://forum.sa-mp.com/index.php?topic=119947.0
Re: How to make bot? -
whitedragon - 05.12.2009
yeah but i want that he drive like normal player. I want make a bus driver for my server in LS
Re: How to make bot? -
Naruto4 - 05.12.2009
omg,i think he can drive a bus but he wont stop to pickup people.....
or are there any fucntions to control a NPC ??
Re: How to make bot? -
Faraday - 05.12.2009
You have to record it's path. So if you record its stops, then it will stop. Just drive around (the path the NPC should follow) and stop where you want to, wait 10 seconds for people to get on then continue the path. After that do like the tutorial says and it should be fine..
Re: How to make bot? -
whitedragon - 05.12.2009
but how i gone loop it?
Re: How to make bot? -
DJDhan - 05.12.2009
you can loop it .
Код:
#define RECORDING "yourrecording" //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);//this will loop the recording!!
#if RECORDING_TYPE == 1
public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnNPCExitVehicle() StopRecordingPlayback();
#else
public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#endif
Cheers
Dhananjay
Re: How to make bot? -
Faraday - 05.12.2009
Quote:
Originally Posted by whitedragon
but how i gone loop it?
|
It's all explained in the tutorial. They show you how to loop it.