Hello, i found a method to change the team score value:
>>
http://forums.alliedmods.net/showthr...set_team_score
But, in the topic the stock is:
PHP Code:
stock cs_set_team_score( CsTeams:cstTeam , iScore )
{
if ( !( CS_TEAM_T <= cstTeam <= CS_TEAM_CT ) )
return 0;
message_begin( MSG_ALL , get_user_msgid("TeamScore") , {0,0,0} );
write_string( cstTeam == CS_TEAM_T ? "TERRORIST" : "CT" );
write_byte( iScore );
message_end();
return 1;
}
I have decided to test, but this function set team score to -1 ..
I have to search a HL1 Game events and discovered its function its wrong:
http://wiki.amxmodx.org/Half-Life_1_...ents#TeamScore
in wiki a correct way its:
PHP Code:
stock cs_set_team_score(CsTeams:iTeam,iScore)
{
if(!(CS_TEAM_T <= iTeam <= CS_TEAM_CT)) return PLUGIN_CONTINUE;
message_begin(MSG_ALL,get_user_msgid("TeamScore"),{0,0,0});
write_string(iTeam == CS_TEAM_T ? "TERRORIST" : "CT");
write_short(iScore);
message_end();
return PLUGIN_HANDLED;
}
PHP Code:
write_byte(iScore);
to
write_short(iScore);
Its safe to use this method?
Thanks.
__________________