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

[TF2] Getting errors non stop.


Post New Thread Reply   
 
Thread Tools Display Modes
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 02-26-2015 , 16:24   Re: [TF2] Getting errors non stop.
Reply With Quote #11

Running a bot through IsClientInGame() will return true if the bot is in-game.
__________________
ddhoward is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 02-26-2015 , 17:14   Re: [TF2] Getting errors non stop.
Reply With Quote #12

Quote:
Originally Posted by Michalplyoutube View Post
Yes the point of this thread is how I can execute code on bots and players with one code segment
TnTSCS's code loops through all the clients in the server. It firsts checks if client is ingame(Calls a method in the game's code). If it is, checks if it's alive(again, using a method in the game). If both check out, the next if checks if it's a bot(again, another game method) if it is, run certain code, other run other code
__________________
WildCard65 is offline
Michalplyoutube
Veteran Member
Join Date: Jan 2013
Location: Tank Carrier in Mannhatt
Old 02-27-2015 , 06:36   Re: [TF2] Getting errors non stop.
Reply With Quote #13

Quote:
Originally Posted by ddhoward View Post
Running a bot through IsClientInGame() will return true if the bot is in-game.
but bots are always raporting that they aren't in game
__________________
The plugin developer of TF2BWR Reborn
And a TF2 Player
Michalplyoutube is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 02-27-2015 , 10:41   Re: [TF2] Getting errors non stop.
Reply With Quote #14

Quote:
Originally Posted by Michalplyoutube View Post
but bots are always raporting that they aren't in game
You're doing something else wrong then, because it's always worked for me.
__________________
ddhoward is offline
Michalplyoutube
Veteran Member
Join Date: Jan 2013
Location: Tank Carrier in Mannhatt
Old 02-27-2015 , 14:24   Re: [TF2] Getting errors non stop.
Reply With Quote #15

Quote:
Originally Posted by ddhoward View Post
You're doing something else wrong then, because it's always worked for me.
Sm version ?

Cos if u don't have that error ure lower than 1.7
__________________
The plugin developer of TF2BWR Reborn
And a TF2 Player
Michalplyoutube is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 02-27-2015 , 16:11   Re: [TF2] Getting errors non stop.
Reply With Quote #16

Bots are in-game. The second post in this thread is your solution.

PHP Code:
decl String:s[5];
for (new 
1<= MaxClientsi++)
{
    if (
IsClientInGame(i)) // THIS LOOP WILL CATCH BOTS AND HUMANS IN THE SAME LOOP
    
{
        
PrintToConsole("%N(E:%i U:%i) is in-game and is a %s"iiGetClientUserId(i), IsFakeClient(i) ? "bot" "human");
    }
    else 
// THIS PART OF THE LOOP IS NOT NEEDED, BUT WILL REPORT UNUSED CLIENT INDEXES - BOTS ARE NOT UNUSEDA
    
{
        
PrintToConsole("%i is not in-game"i);
    }

I doubt SM1.7 changed the behavior of a command it hooks from the game itself... (I assume it does for this anyway).
__________________

Last edited by Chdata; 02-27-2015 at 16:21.
Chdata is offline
Michalplyoutube
Veteran Member
Join Date: Jan 2013
Location: Tank Carrier in Mannhatt
Old 02-28-2015 , 09:09   Re: [TF2] Getting errors non stop.
Reply With Quote #17

Ok it worked I did maked stupid mistake.
__________________
The plugin developer of TF2BWR Reborn
And a TF2 Player

Last edited by Michalplyoutube; 02-28-2015 at 10:31.
Michalplyoutube 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 13:09.


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