Raised This Month: $ Target: $400
 0% 

TeamScore Problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NiQu
Veteran Member
Join Date: Nov 2009
Old 05-17-2010 , 22:48   Re: TeamScore Problem
Reply With Quote #1

Agreed with Bugsy , i would use this with cstrike:

PHP Code:
stock cs_set_team_score(CsTeams:team , const score)
{     
    new 
buffer[10];     
    
    switch(
team)
    {    
        case 
CS_TEAM_Tcopy(buffer"TERRORIST");
        case 
CS_TEAM_CTcopy(buffer"CT");
        
        default: return 
0;     
    }     

    
message_begin(MSG_ALL get_user_msgid("TeamScore") , {0,0,0});
    
write_string(buffer);
    
write_byte(score);
    
message_end();
    
    return 
1;

Not sure if it works though.
__________________
My Projects
  • RoTAPI V0.0.1 ------- Private
    • Progress - [||||||||||]
  • CashMod V0.0.6 ----- Public
    • Progress - [||||||||||]
  • CashMod V0.0.7 ----- Public
    • Progress - [||||||||||]
NiQu is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-17-2010 , 23:01   Re: TeamScore Problem
Reply With Quote #2

Or you can try
PHP Code:
stock cs_set_team_scoreCsTeams:cstTeam iScore )
{     
    if ( !( 
CS_TEAM_T <= cstTeam <= CS_TEAM_CT ) )
        return 
0;

    
message_beginMSG_ALL get_user_msgid("TeamScore") , {0,0,0} );
    
write_stringcstTeam == CS_TEAM_T "TERRORIST" "CT" );
    
write_shortiScore );
    
message_end();
    
    return 
1;

__________________

Last edited by Bugsy; 04-27-2018 at 21:17. Reason: Fixed write_byte() to write_short()
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 03:38.


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