Thread: limiting humans
View Single Post
Re: limiting humans
Old
  (#6)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: limiting humans - 04-01-2004

well, i don't know of any in-side-hl variables which hold track of that. Therefor i suggest you keep your own list:

Code:
// somewhere in a header file.
 
// Player information
typedef struct
{
 edict_t *pEdict; // edict
 bool bIsBot; // is this edict a bot?
 float fConnectedTime;
} tPlayer;
 
// somewhere in dll.cpp
tPlayer Players[32]; // players
 
// somewhere in GameDLLInit()
int i=0;
for (i; i < 32; i++)
{
 Players[i].pEdict=NULL;
 Players[i].bIsBot=false;
 Players[i].fConnectedTime=0.0;
}
 
// Somewhere in clientconnect
// etc etc.. find the client, attach the information
hope it helps, pretty tired.


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote