SA-MP Forums Archive
Create Ingame Bots?? And Then play them ingame? - 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: Create Ingame Bots?? And Then play them ingame? (/showthread.php?tid=113731)



Create Ingame Bots?? And Then play them ingame? - asdfgh98 - 15.12.2009

Hello guys,
First: Sry for my bad english

Ok
Itґs achievable to create Bots ingame? Example: /rb NAME (/rb test) Then all what you do are record and with /stop you can Stop the Record
And then ingame type /pb NAME (/pb test) and then the Bot will play..
Hmm how i can make a Script for this?

Hmm i hope one can help me

I have make this Question in the German Forum too
Link: http://forum.sadfish/wbb/san-andreas...g-base/scriptwьnsche/25124-bots-ingame-erstellen-profi-scripter-gefragt/

PWN Code from DogZone:
if (strcmp("/rb", cmdtext, true, 10) == 0)
{
tmp = strtok(cmdtext,idx);
if(!tmp[0])return SendClientMessage(playerid,ROT,"Use: /rb [Name]");
if(newstate == 2){
StartRecordingPlayerData(playerid, PLAYER_RECORDING_TYPE_DRIVER, tmp);
SendClientMessage(playerid, 0xFFFFFFFF, "Type: Vehicle : Record Start");
}
else if(newstate == 1){
StartRecordingPlayerData(playerid, PLAYER_RECORDING_TYPE_ONFOOT,tmp);
SendClientMessage(playerid, 0xFFFFFFFF, "Typ: On Foot : Record Start");
}
return 1;
}
if (strcmp("/pb", cmdtext, true, 10) == 0)
{
new tmp[64];
tmp = strtok(cmdtext,idx);
if(!tmp[0])return SendClientMessage(playerid,ROT,"Use: /pb [Name]");
ConnectNPC(tmp,"BotFS");
}


Re: Create Ingame Bots?? And Then play them ingame? - Naruto4 - 15.12.2009

Code it first.


Re: Create Ingame Bots?? And Then play them ingame? - asdfgh98 - 16.12.2009

You mean this?
Code:
if (strcmp("/rb", cmdtext, true, 10) == 0)
{
tmp = strtok(cmdtext,idx);
if(!tmp[0])return SendClientMessage(playerid,ROT,"Use: /rb [Name]");
if(newstate == 2){
StartRecordingPlayerData(playerid, PLAYER_RECORDING_TYPE_DRIVER, tmp);
  SendClientMessage(playerid, 0xFFFFFFFF, "Type: Vehicle : Record Start");
}
else if(newstate == 1){
StartRecordingPlayerData(playerid, PLAYER_RECORDING_TYPE_ONFOOT,tmp);
  SendClientMessage(playerid, 0xFFFFFFFF, "Typ: On Foot : Record Start");
  }
  return 1;
}
if (strcmp("/pb", cmdtext, true, 10) == 0)
{
new tmp[64];
tmp = strtok(cmdtext,idx);
if(!tmp[0])return SendClientMessage(playerid,ROT,"Use: /pb [Name]");
ConnectNPC(tmp,"BotFS");
}