Raised This Month: $ Target: $400
 0% 

Setting player name


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 04-02-2009 , 07:16   Re: Setting player name
Reply With Quote #2

Try checking his name at client_infochanged(id). It is called whenever his name is set/he changes his name(it is called in other events too, but the name is the important thing here).

PHP Code:
#include <amxmodx>

#define NAME_TAG    "[NEW_NAME]"

public client_infochanged(id)
{
    static 
name[32];
    
get_user_info(id"name"name31);
    
    if(
containi(nameNAME_TAG) == -1)
    {
        
format(name31"%s %s"NAME_TAGname);
        
        
set_user_info(id"name"name);
    }

__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores is offline
 



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 02:16.


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