Raised This Month: $ Target: $400
 0% 

Solved team name


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-06-2020 , 15:26   Re: team name
Reply With Quote #1

Quote:
Originally Posted by tepegoz View Post
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(lFirstSaid63"%s - %i: %i: %i - %i -",anameg_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 
szTeamsCsTeams ][] = { "UNASSIGNED" "T" "CT" "SPEC" };

formatex(lFirstSaidcharsmax(lFirstSaid), "%s - %i: %i: %i - %s -",anameg_s[z][TIME_MINUTES], g_s[z][TIME_SECONDS], g_s[z][TIME_MSECONDS],szTeamsteam ] ) 
__________________
Bugsy is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:52.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode