Raised This Month: $32 Target: $400
 8% 

TeamScore Problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 05-17-2010 , 15:00   TeamScore Problem
Reply With Quote #1

I'm ussing this stock...

PHP Code:
stock cs_set_team_score(const team , const score) {     
    new 
buffer[10];     
    
    switch(
team)
    {         
        case 
1copy(buffer "TERRORIST");
        case 
2copy(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;

The errors are...
Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Undefined symbol "TERRORIST" on line 174
Warning: Expression has no effect on line 174
Error: Expected token: ";", but found ")" on line 174
Error: Invalid expression, assumed zero on line 174
Error: Too many error messages on one line on line 174

Compilation aborted.
4 Errors.
Could not locate output file C:\Documents and Settings\Administrador\Escritorio\Vale.amx (compile failed).
I am using this way...

PHP Code:
cs_set_team_score(TERRORIST,TotalCT
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
Hx7r
Member
Join Date: Mar 2009
Old 05-17-2010 , 15:52   Re: TeamScore Problem
Reply With Quote #2

cs_set_team_score(1 ,TotalCT)

1 = team TR
2 = team CT
Hx7r is offline
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 05-17-2010 , 15:58   Re: TeamScore Problem
Reply With Quote #3

xD! ... THANKS ;D
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-17-2010 , 17:21   Re: TeamScore Problem
Reply With Quote #4

Better off using these

CS_TEAM_T
CS_TEAM_CT
__________________
Bugsy is offline
NiQu
Veteran Member
Join Date: Nov 2009
Old 05-17-2010 , 22:48   Re: TeamScore Problem
Reply With Quote #5

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 #6

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
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 05-19-2010 , 02:54   Re: TeamScore Problem
Reply With Quote #7

Thanks!
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
Old 05-20-2010, 00:36
#8 SickneSS
This message has been deleted by #8 SickneSS. Reason: fixed
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 05-20-2010 , 00:43   Re: TeamScore Problem
Reply With Quote #8

http://forums.alliedmods.net/showthr...ghlight=cshack
use this module !
I think it can help you !
PHP Code:
/* Sets the score of the specified team.
   Note: Terrorists or CTs only. */
native cs_set_team_score(teamscore); 
__________________
QQ:116268742

Last edited by K.K.Lv; 05-20-2010 at 00:48.
K.K.Lv is offline
Send a message via MSN to K.K.Lv
Old 05-20-2010, 11:27
#8 SickneSS
This message has been deleted by #8 SickneSS. Reason: Fixed
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 05-20-2010 , 17:19   Re: TeamScore Problem
Reply With Quote #9

I have fixed all errors of the plugin,ecept 1

with the cs_set_team_score...
I use this stock in HLTV event checking if is the 1St Half set team scores,but when starts a new round all scores sets to -1 and a sec later sets to original scores...

Some help?
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
lazarev
Veteran Member
Join Date: Sep 2008
Old 05-21-2010 , 02:51   Re: TeamScore Problem
Reply With Quote #10

http://forums.alliedmods.net/showpos...&postcount=397
lazarev 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 13:00.


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