AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   TeamScore Problem (https://forums.alliedmods.net/showthread.php?t=127158)

#8 SickneSS 05-17-2010 15:00

TeamScore Problem
 
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


Hx7r 05-17-2010 15:52

Re: TeamScore Problem
 
cs_set_team_score(1 ,TotalCT)

1 = team TR
2 = team CT

#8 SickneSS 05-17-2010 15:58

Re: TeamScore Problem
 
xD! ... THANKS ;D

Bugsy 05-17-2010 17:21

Re: TeamScore Problem
 
Better off using these

CS_TEAM_T
CS_TEAM_CT

NiQu 05-17-2010 22:48

Re: TeamScore Problem
 
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.

Bugsy 05-17-2010 23:01

Re: TeamScore Problem
 
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;



#8 SickneSS 05-19-2010 02:54

Re: TeamScore Problem
 
Thanks!

K.K.Lv 05-20-2010 00:43

Re: TeamScore Problem
 
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); 


#8 SickneSS 05-20-2010 17:19

Re: TeamScore Problem
 
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?

lazarev 05-21-2010 02:51

Re: TeamScore Problem
 
http://forums.alliedmods.net/showpos...&postcount=397


All times are GMT -4. The time now is 03:38.

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