Quote:
Originally Posted by tepegoz
I want to show team names as T,CT,SPEC but it is showing 1,2,3. How to change 1,2,3 to T,CT,SPEC ?
PHP Code:
new team = get_user_team(z)
new lFirstSaid[64];
format(lFirstSaid, 63, "%s - %i: %i: %i - %i -",aname, g_s[z][TIME_MINUTES], g_s[z][TIME_SECONDS], g_s[z][TIME_MSECONDS],team)
|
In your code, 'team' is the integer representation/index of the team.
0 = unassigned
1 = T
2 = CT
3 = Spec
You also need to use %s, not %i to format a string value
Add #include <cstrike>
PHP Code:
new CsTeams:team = cs_get_user_team(z)
new lFirstSaid[64];
new const szTeams[ CsTeams ][] = { "UNASSIGNED" , "T" , "CT" , "SPEC" };
formatex(lFirstSaid, charsmax(lFirstSaid), "%s - %i: %i: %i - %s -",aname, g_s[z][TIME_MINUTES], g_s[z][TIME_SECONDS], g_s[z][TIME_MSECONDS],szTeams[ team ] )
__________________