Page 1 of 1

CSGO: update team score

Posted: Sat Apr 04, 2015 9:17 pm
by nullable
After updating Source.Python (8 march 2015) the following code stopped working:

Syntax: Select all

from filters.entity import EntityIter

def set_team_score(team, score):
for entity in EntityIter('cs_team_manager', return_types='entity'):
if entity.team != team:
continue
entity.score_total = score


entity.team - every time result 0. Please help to resolve my problem.

Posted: Sat Apr 04, 2015 9:22 pm
by L'In20Cible

Posted: Sat Apr 04, 2015 9:36 pm
by L'In20Cible
Ayuto just tested and seems that the KeyValue retrieved using <CTeam>.team always returns zero. We will do the change but the following proved to works, for now:

Syntax: Select all

if entity.get_property_int('m_iTeamNum') != team:

Posted: Sun Apr 05, 2015 7:02 am
by nullable

Syntax: Select all

entity.set_property_int('m_scoreTotal', team_score)
doesn't work correct. Because it not set team_score. Please help to resolve it.

Posted: Sun Apr 05, 2015 8:04 am
by nullable
Thanks. The problem has been resolved.