Thread: players vs bots
View Single Post
Re: players vs bots
Old
  (#66)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: players vs bots - 25-06-2005

PHP Code:
int UTIL_GetTeam(edict_t *pEntity)
{
   
union
   
{
      
short s;
      
char c[2];
   } 
t;

   
char *g_engfuncs.pfnInfoKeyValue(g_engfuncs.pfnGetInfoKeyBuffer(pEntity), "model");
   
t.c[0] = p[0];
   
t.c[1] = p[1];

   if (
t.== (('e' << 8) + 't') || // TError
      
t.== (('e' << 8) + 'l') || // LEet
      
t.== (('r' << 8) + 'a') || // ARctic
      
t.== (('u' << 8) + 'g') || // GUerilla
      
t.== (('i' << 8) + 'm')) // MIlitia
      
return TEAM_TERRORIST;

   return 
TEAM_CT// URban, GSg9, SAs, GIgn, VIp, SPetsnaz

  
Reply With Quote