How to script with 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 script with bots? (
/showthread.php?tid=253795)
[Help] Uses of Bots. -
Luis- - 08.05.2011
Hello, I was wondering how I script using bots, I kind of know the basics as I have read KC's tutorial but I want to go further and discover a lot more, I just don't know what to do and what to use.
It would be really good if someone could tell me what to do if I was to create a bot with these features:
- Stops in one place until someone has entered the bot's car - I think I have figured that one out
TogglePlayerControllable();?
- Showing a dialog as soon as the player is inside of the bot's car - I know what to do there.
- Making the bot go to different locations depending on what the player chooses within the shown dialog - This is what I want to know.
Any help is highly appreciated.
Regards, Luis.
Re: How to script with bots? -
Backwardsman97 - 08.05.2011
You can make a bot do different recordings. Then, from within your server, you can tell the bot to playback whichever recording. What I did for something like this was SendClientMessage to whatever bot and then under the OnClientMessage in your NPC script, you can do whatever.
Re: How to script with bots? -
Luis- - 08.05.2011
Sorry, Could you possibly explain it a little easier?
Re: How to script with bots? -
Kitten - 08.05.2011
this should help you.
https://sampwiki.blast.hk/wiki/NPC:Main_Page
Re: How to script with bots? -
Luis- - 08.05.2011
I have actually read through that once but I still don't really know us to use the "npc pawn script".
Re: How to script with bots? -
Lorenc_ - 08.05.2011
I would use something like CNPC for this, although never to use the CreateNPCPlayer.
"Player NPC's violate the TOS."
Re: How to script with bots? -
Luis- - 08.05.2011
I am sure I could do this if I knew how to use the stand alone script which is used for bots.
Re: How to script with bots? -
Combrad - 08.05.2011
You will have to record all routes you want the bot to take, and then make it play when their selected.
Re: How to script with bots? -
Luis- - 08.05.2011
Yes but what functions shall I use?
Re: How to script with bots? -
Stigg - 08.05.2011
Quote:
Originally Posted by -Luis
Yes but what functions shall I use?
|
https://sampforum.blast.hk/showthread.php?tid=95034
Re: How to script with bots? -
Luis- - 08.05.2011
As I have state above I have already looked through this, I need to know how I can actually make the bot change routes when I tell it to.