Raised This Month: $ Target: $400
 0% 

Team Tags wont work when i change my team by M key


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 05-03-2010 , 11:39   Team Tags wont work when i change my team by M key
Reply With Quote #1

ok i made this code

PHP Code:

#include < amxmodx >
#include < amxmisc >

#pragma semicolon 1

#define PLUGIN_VERSION    "1.0.0"

new gTagNameTE[ ] = "[T]";
new 
gTagNameCT[ ] = "[CT]";

new 
gLastTag[ ] = "-.-";

public 
plugin_init()
{
    
register_plugin"TAG"PLUGIN_VERSION"tuty" );
    
    
register_event"TeamInfo""Hook_TeamInfo""a" );
}

public 
Hook_TeamInfo()
{
    new 
id read_data);
        
    new 
szTeam];
    
read_data2szTeamcharsmaxszTeam ) ); 
    
    new 
szName32 ];
    
get_user_nameidszNamecharsmaxszName ) );
    
    new 
szFormatName50 ];

    switch( 
szTeam] )
    {    
        case 
'T':
        {
            if( 
equalszNamegTagNameTEcharsmaxgTagNameTE ) ) )
            {
                return;
            }
            
            else if( !
replaceszNamecharsmaxszName ), gTagNameCTgTagNameTE ) )
            {
                
formatszFormatNamecharsmaxszFormatName ), "%s. %s%s"gTagNameTEszNamegLastTag );
            }

            
set_user_infoid"name"szFormatName );
        }

        case 
'C':
        {
            if( 
equalszNamegTagNameCTcharsmaxgTagNameCT ) ) )
            {
                return;
            }
            
            else if( !
replaceszNamecharsmaxszName ), gTagNameTEgTagNameCT ) )
            {
                
formatszFormatNamecharsmaxszFormatName ), "%s. %s%s"gTagNameCTszNamegLastTag );
            }
            
            
set_user_infoid"name"szFormatName );
        }
    }

    return;

everything works fine when i enter the server and when i choose a team, but when i want to change my team again with M key ("jointeam") my name isn't changed with my tags, is changed to unnamed. Why?
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
 



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:33.


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