int UTIL_GetTeam(edict_t *pEntity)
{
union
{
short s;
char c[2];
} t;
char *p = g_engfuncs.pfnInfoKeyValue(g_engfuncs.pfnGetInfoKe yBuffer(pEntity), "model");
t.c[0] = p[0];
t.c[1] = p[1];
if (t.s == (('e' << 8 ) + 't') || // TError
t.s == (('e' << 8 ) + 'l') || // LEet
t.s == (('r' << 8 ) + 'a') || // ARctic
t.s == (('u' << 8 ) + 'g') || // GUerilla
t.s == (('i' << 8 ) + 'm')) // MIlitia
return TEAM_TERRORIST;
return TEAM_CT; // URban, GSg9, SAs, GIgn, VIp, SPetsnaz
}
^-- very 1337 one
also this may be the only way to detect teams if you don't have the source code to the MOD
edit: [ code ] tag doesn't work correctly in this forum ??????