Post: Same Team Check
03-30-2017, 03:24 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); I am having problems with the same team check for my esp. My esp is on friendly and enemy, but i only want it on enemy.

int clientInfo(int ID)
{
* *int Centity = *(int*)(0x7BD010);
* * return Centity + 0x1FE04C + (ID * 0x594);
}

bool SameTeam(int Client)
{
* * if (cstrcmp(Dvar_GetString("ui_gametype"), "dm") == 0)
* * {
* * * * return true;
* * }
* * else
* * {
* * * * *if ((int*)(clientInfo(Client) + 0x24) != (int*)(clientInfo(me) + 0x24))
* * * * {
* * * * * * return true;
* * * * }
* * * * else
* * * * {
* * * * * * return false;
* * * * }
* * }
}

if(!SameTeam(i))
{
* *if (Visibility(0, CEntity(i), 0x803003))
* * {
* * * * DrawBorderBox(&Centity_s, HeadPosition, FootPosition, gESP);
* * }
* * else
* * {
* * * *DrawBorderBox(&Centity_s, HeadPosition, FootPosition, rESP);
* * }
}
(adsbygoogle = window.adsbygoogle || []).push({});
04-03-2017, 06:47 AM #11
SC58
Former Staff
Originally posted by UnholyTalonTSi View Post
I am having problems with the same team check for my esp. My esp is on friendly and enemy, but i only want it on enemy.

int clientInfo(int ID)
{
* *int Centity = *(int*)(0x7BD010);
* * return Centity + 0x1FE04C + (ID * 0x594);
}

bool SameTeam(int Client)
{
* * if (cstrcmp(Dvar_GetString("ui_gametype"), "dm") == 0)
* * {
* * * * return true;
* * }
* * else
* * {
* * * * *if ((int*)(clientInfo(Client) + 0x24) != (int*)(clientInfo(me) + 0x24))
* * * * {
* * * * * * return true;
* * * * }
* * * * else
* * * * {
* * * * * * return false;
* * * * }
* * }
}

if(!SameTeam(i))
{
* *if (Visibility(0, CEntity(i), 0x803003))
* * {
* * * * DrawBorderBox(&Centity_s, HeadPosition, FootPosition, gESP);
* * }
* * else
* * {
* * * *DrawBorderBox(&Centity_s, HeadPosition, FootPosition, rESP);
* * }
}



Something like this, if this don't work for whatever you need then google off host menu sources im sure there is some team check in them you can copy lol

    
bool IsClientOnMyTeam(int clientNum)
{
if (!strcmp(Dvar_GetString("ui_gametype"), "dm"))
return true;
else if (clientInfo[CG_GetClientNum()]->team == clientInfo[clientNum]->team)
return true;
else
return false;
}

CG_GetClientNum just gets ur clientnum if you r host or not host dont matter

The following user thanked SC58 for this useful post:

UnholyTalonTSi
04-03-2017, 06:03 PM #12
Originally posted by SC58 View Post
Something like this, if this don't work for whatever you need then google off host menu sources im sure there is some team check in them you can copy lol

    
bool IsClientOnMyTeam(int clientNum)
{
if (!strcmp(Dvar_GetString("ui_gametype"), "dm"))
return true;
else if (clientInfo[CG_GetClientNum()]->team == clientInfo[clientNum]->team)
return true;
else
return false;
}

CG_GetClientNum just gets ur clientnum if you r host or not host dont matter


I have googled the crap out of this. Thanks for your help.
04-05-2017, 04:42 AM #13
Please Close.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo