Raised This Month: $51 Target: $400
 12% 

tag mismatch get_user_team


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
rx1983
Senior Member
Join Date: Jan 2009
Location: BRASIL
Old 11-23-2011 , 12:15   tag mismatch get_user_team
Reply With Quote #1

tag mismatch fail ...
PHP Code:
public logevent_RoundEnd()
{
      new 
equipe get_user_team(id);
//   new CsTeams:equipe = cs_get_user_team(id);
//   get_user_team(id, equipe, 19)

    
if(equipe == CS_TEAM_CT)
        {
        
equipe "terrorista"
        
}
    if(
equipe == CS_TEAM_T)
        {
        
equipe "contra-terrorista"
        
}
    new 
frase_formatada[228] ;
    
formatex(frase_formatada227"team: %s ",  equipe);

fail..
PHP Code:
public logevent_RoundEnd()
{
      new 
equipe get_user_team(id);
//   new CsTeams:equipe = cs_get_user_team(id);
//   get_user_team(id, equipe, 19)

    
if(get_user_team(id) == CS_TEAM_CT)
        {
        
equipe "terrorista"
        
}
    if(
get_user_team(id) == CS_TEAM_T)
        {
        
equipe "contra-terrorista"
        
}
    new 
frase_formatada[228] ;
    
formatex(frase_formatada227"team: %s ",  equipe);

__________________

Last edited by rx1983; 11-23-2011 at 12:15. Reason: edit ...
rx1983 is offline
Send a message via MSN to rx1983
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 11-23-2011 , 12:19   Re: tag mismatch get_user_team
Reply With Quote #2

CS_TEAM_T and CS_TEAM_CT is a part of the CsTeams enum - and is therefore tagged with the CsTeams tag. You can either de-tag the variable, tag get_user_team with CsTeams or use cs_get_user_team.

Code:
if( get_user_team( id ) == _:CS_TEAM_T ) // CS_TEAM_T = 1 { } if( CsTeams:get_user_team( id ) == CS_TEAM_T ) { } if( cs_get_user_team( id ) == CS_TEAM_T ) { }
__________________
Achievements API - a simple way for you to create your OWN custom achievements!

Last edited by Xellath; 11-23-2011 at 12:22.
Xellath is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-23-2011 , 12:19   Re: tag mismatch get_user_team
Reply With Quote #3

CS_TEAM_* are tagged constants with CsTeams.

So you need to do : new CsTeams:equipe = CsTeams:get_user_team(id);

Or using cs_get_user_team.
__________________
Arkshine is offline
rx1983
Senior Member
Join Date: Jan 2009
Location: BRASIL
Old 11-23-2011 , 12:33   Re: tag mismatch get_user_team
Reply With Quote #4

xxx
__________________

Last edited by rx1983; 11-23-2011 at 12:37. Reason: ?
rx1983 is offline
Send a message via MSN to rx1983
rx1983
Senior Member
Join Date: Jan 2009
Location: BRASIL
Old 11-23-2011 , 12:37   Re: tag mismatch get_user_team
Reply With Quote #5

grateful for the help. solved



PHP Code:
new equipe[28];  

    if(
cs_get_user_team(id) == CS_TEAM_CT)
    {
    
equipe "terrorista"
    
}
    if( 
cs_get_user_teamid ) == CS_TEAM_T )
    {
    
equipe "contra-terrorista"
    

__________________
rx1983 is offline
Send a message via MSN to rx1983
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:39.


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