Raised This Month: $51 Target: $400
 12% 

A way to detect bots?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Old 07-03-2008 , 20:47   A way to detect bots?
Reply With Quote #1

Is there a way to detect bots in tf2? Here's what I wanna do: I want the bots to instant respawn but not actual players. I just need a line of code that can detect if a player is a bot or not, I can code the rest.

Thanks,

Alex

p.s Just in case there's no way to do this, one work-around would be to look at the player name to see if its the name of a bot, right? Thanks again.
pheadxdll is offline
Kigen
BANNED
Join Date: Feb 2008
Old 07-03-2008 , 20:58   Re: A way to detect bots?
Reply With Quote #2

IsFakePlayer?
Kigen is offline
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 07-03-2008 , 21:05   Re: A way to detect bots?
Reply With Quote #3

Code:
/**
 * Returns if a certain player is a fake client.
 *
 * @param client        Player index.
 * @return                True if player is a fake client, false otherwise.
 */
native bool:IsFakeClient(client);
And if that for some reason doesn't work, it'd be easier if you just retrieved their Auth String (steamid) and checked if it was equal to "BOT"
__________________
Greyscale is offline
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Old 07-03-2008 , 21:06   Re: A way to detect bots?
Reply With Quote #4

<3 you guys, I'll try them both!
pheadxdll is offline
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Old 07-03-2008 , 21:40   Re: A way to detect bots?
Reply With Quote #5

IsFakeClient worked like a charm. I edited the TF2_Respawn plugin and put a case in for bots. Thanks guys!
pheadxdll 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 21:44.


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