How can i get teamscore in code?in hl2mp_gamerules.cpp i found this:
CTeam *pCombine = g_Teams[TEAM_COMBINE];
CTeam *pRebels = g_Teams[TEAM_REBELS];
if ( pCombine->GetScore() >= flFragLimit || pRebels->GetScore() >= flFragLimit )
{
And here's how i modified in my .cpp file:
CTeam *pRebels = GetGlobalTeam( TEAM_REBELS );
CTeam *pCombine = GetGlobalTeam( TEAM_COMBINE );
CBasePlayer *pPlayer = UTIL_PlayerByIndex(engine->GetLocalPlayer());
if(pCombine->GetScore() == 1)
{
vgui::surface()->DrawSetColor(GetFgColor());
vgui::surface()->DrawSetTexture( m_nTeamBlue );
vgui::surface()->DrawTexturedRect(0, 0, GetWide(), GetTall());
}
But it says: pRebels, pCombine, cTeam are undeclared identifiers. How can i declare them? Or what .h file i need to include?