How to add 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: How to add bots??? (
/showthread.php?tid=105523)
How to add bots??? -
doron122 - 29.10.2009
i want to add bots but how?? (plese help)
Re: How to add bots??? -
[WS]Hyper - 29.10.2009
They should HANG people like you!
Read the STICKIED TOPIC AT THE TOP OF THE DAMN PAGE!
http://forum.sa-mp.com/index.php?topic=119947.0
Re: How to add bots??? -
thimo - 29.10.2009
this is my tut
first put an NEW vehicleinit.
Код:
new myvehicle;
public OnGamemodeInit();
ConnectNPC("Mynpc","yourrecord");
myvehicle = AddstaticVehicle(431, 1358.1960, 1443.4098, 10.8251, 91.9678);
now we got the begin but this is an little bit confusing so.
makes sure to get a new name created for the car.
Код:
ConnectNPC("Mynpc","yourrecord");
this is connecting to your script and to your record.
under onplayer spawn me must make something like this
Код:
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
if(!strcmp(npcname, "Mynpc", true)) //Checking if the NPC's name is MyFirstNPC
{
PutPlayerInVehicle(playerid, myvehicle, 0); //Putting the NPC into the vehicle we created for it.
}
return 1;
}
make an new .pwn file now
and we must make an script to really connect to the record.
Код:
#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
now we are ready to compile
Re: How to add bots??? -
[WS]Hyper - 29.10.2009
Rofl..
You have: public OnGamemodeInit();
I like the ;
Re: How to add bots??? -
MenaceX^ - 29.10.2009
I liked that he doesn't understand what a tutorial is.