Raised This Month: $ Target: $400
 0% 

show CT player as a spectator in scoreboard


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 01-21-2009 , 10:57   Re: show CT player as a spectator in scoreboard
Reply With Quote #2

The "yourFunction()" function is just an example:
PHP Code:
new const g_szTeams[4] =
{
    
"UNASSIGNED",
    
"TERRORIST",
    
"CT",
    
"SPECTATOR"
}

new 
g_Msg_TeamInfo;

public 
plugin_init()
{
    
g_Msg_TeamInfo get_user_msgid("TeamInfo");
}

public 
yourFunction(id)
{
    if(
get_user_team(id) == 2)
    {
        
setScoreTeam(id3); // As you should know, 1 = T, 2 = CT and 3 = SPECTATOR(0 = UNASSIGNED).
    
}
}

setScoreTeam(indexteam)
{
    
message_begin(MSG_BROADCASTg_Msg_TeamInfo);
    
write_byte(index);
    
write_string(g_szTeams[team]);
    
message_end();

__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores is offline
 



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 01:51.


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