Raised This Month: $ Target: $400
 0% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
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
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 05-05-2010 , 07:44   Re: Team Tags wont work when i change my team by M key
Reply With Quote #2

any1?
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 05-05-2010 , 14:08   Re: Team Tags wont work when i change my team by M key
Reply With Quote #3

Did you ever read the forum rules? I don't think so, don't bump till 2 weeks passed!
KadiR is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 05-05-2010 , 14:25   Re: Team Tags wont work when i change my team by M key
Reply With Quote #4

Hook the event when a person changes his team..?!
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 05-05-2010 , 14:54   Re: Team Tags wont work when i change my team by M key
Reply With Quote #5

@kadir - i need the fix now not after 2 weeks
@the other one - are u dumb? that is the event for team changing rofl
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-05-2010 , 18:27   Re: Team Tags wont work when i change my team by M key
Reply With Quote #6

Quote:
Originally Posted by tuty View Post
i need the fix now not after 2 weeks
And somehow that makes you exempt from the rules?????

I wrote this plugin once. Search for it. It works.
__________________
fysiks is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-06-2010 , 00:30   Re: Team Tags wont work when i change my team by M key
Reply With Quote #7

Quote:
Originally Posted by tuty View Post
@the other one - are u dumb? that is the event for team changing rofl
This is not.
This is event for Team Information that is also sent by player each time a player spawn, and is sent to player when player enter the server.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 05-05-2010 , 15:18   Re: Team Tags wont work when i change my team by M key
Reply With Quote #8

i believe using your method does the same sort of thing as get_user_team()
it gets their old team until they respawn or something
__________________
minimiller is offline
Send a message via MSN to minimiller
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 05-05-2010 , 16:36   Re: Team Tags wont work when i change my team by M key
Reply With Quote #9

Well i am sorry i didnt know that...
I was just try ing to help...
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
Zombiezzz
Veteran Member
Join Date: Nov 2009
Location: Nov 2009
Old 05-11-2010 , 16:51   Re: Team Tags wont work when i change my team by M key
Reply With Quote #10

oo he got banned! BURN!
__________________
Zombiezzz is offline
Reply


Thread Tools
Display Modes

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