Raised This Month: $ Target: $400
 0% 

CreateFakeClient


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Godis
Senior Member
Join Date: Jan 2014
Old 12-05-2015 , 13:56   CreateFakeClient
Reply With Quote #1

I am trying to spawn fake players (bots) using CreateFakeClient, the problem is the bots are just puppets unable to move from their initial position. I'm guessing this has to do with nav meshes and such but i really have no clue how to get them to move and act like normal bots since i have never really atempted this before. How do i do this?
Godis is offline
tommie113
AlliedModders Donor
Join Date: Oct 2013
Old 12-05-2015 , 14:51   Re: CreateFakeClient
Reply With Quote #2

For as far as I know:
Fake client is not a bot.
A fake client is an entity that looks the same as a player/bot but not acts the same.
For example a record bot (for surf or whatever) is a fake client, it does not behave like a bot but looks like one.
Fake client needs instructions on what to do or they won't do anything.
I have no source for this and it's just how I assume that it is and what makes sense for me.
__________________
No longer taking requests due to lack of time and interrest.
Only helping out with minor things through forum.
tommie113 is offline
Godis
Senior Member
Join Date: Jan 2014
Old 12-05-2015 , 15:06   Re: CreateFakeClient
Reply With Quote #3

Oh okay, well i guess i'll have to find some other way of spawning a bot and grabbing its entity index. I really wish there would be more documentation for things like this :/
Godis is offline
tommie113
AlliedModders Donor
Join Date: Oct 2013
Old 12-05-2015 , 15:15   Re: CreateFakeClient
Reply With Quote #4

I don't know if a bot also triggers client connect.
If so you could use add bot command and use on client connected to get it's index.
With a check if his name contains bot ofcourse so you dont get problems when a client connects at same time.
__________________
No longer taking requests due to lack of time and interrest.
Only helping out with minor things through forum.
tommie113 is offline
Godis
Senior Member
Join Date: Jan 2014
Old 12-05-2015 , 15:20   Re: CreateFakeClient
Reply With Quote #5

I believe that OnClientPutInServer is triggered when a bot joins, so that will have to do i guess. Thank you for your time
Godis is offline
jess
Member
Join Date: Aug 2015
Location: mb
Old 12-05-2015 , 16:56   Re: CreateFakeClient
Reply With Quote #6

It should be similar in each game, as long as you know the entName.

For example, this is left 4 dead 2:
Code:
new client = CreateFakeClient("Survivor Bot");
DispatchKeyValue(client, "classname", "survivorbot");
DispatchSpawn(client);
jess is offline
pcmaster
AlliedModders Donor
Join Date: Sep 2009
Old 12-05-2015 , 17:42   Re: CreateFakeClient
Reply With Quote #7

OnClientConnect also works for bots.
I am using it to assign bots to replays in my timer plugin (spawned through bot_add).
__________________
Stopped hosting servers as of November 2018, no longer active around here.
pcmaster is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:13.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode