Raised This Month: $ Target: $400
 0% 

Prevent bots from changing team or spectating? (FoxBot for TFC)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
pizzahut
Senior Member
Join Date: Oct 2004
Old 06-04-2017 , 07:34   Prevent bots from changing team or spectating? (FoxBot for TFC)
Reply With Quote #1

The problem with FoxBots is that they occasionally change team and do other weird things like they might be stuck in spectator mode or they sometimes don't select a class. I've written a plugin which corrects these mistakes after they happen.

Is there a way to block the random team changes / going into spectator mode? For humans I can just register the corresponding console commands and block them, but this doesn't work for bots.

Client commands are "jointeam (number)" and "spectate", e.g.

Code:
engclient_cmd(id, "jointeam", bot_team)

To join a class, the corresponding console command is the class name:

Code:
                case 1: engclient_cmd(id, "scout")                 case 2: engclient_cmd(id, "sniper")                 case 3: engclient_cmd(id, "soldier")                 case 4: engclient_cmd(id, "demoman")                 case 5: engclient_cmd(id, "medic")                 case 6: engclient_cmd(id, "hwguy")                 case 7: engclient_cmd(id, "pyro")                 case 8: engclient_cmd(id, "spy")                 case 9: engclient_cmd(id, "engineer")                 case 10: engclient_cmd(id, "randompc")
pizzahut is offline
 



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 06:57.


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