Raised This Month: $ Target: $400
 0% 

Change name points behind


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 08-17-2010 , 11:14   Re: Change name points behind
Reply With Quote #2

Quote:
Originally Posted by MrMaCEEE View Post
Change name points behind

Hi, i have one problem on my code, this function add points behind your name/nick
eg: MACE<100>

When someone player connect to the server the points works fine on the name/nick, but if i change the name, the new name dont have points
eg on console: name LOL
MACE<100> changed name to LOL
its supposed add the points behind the new name/nick
eg: LOL<100>
eg: MACE<100> changed name to LOL<100>

Thanks for help

PHP Code:
stock points_in_name(id)  
{   
    new 
szName[32]  
    
get_user_name(idszNamecharsmax(szName))  
    new 
iLen strlen(szName)  
      
    
/* Finds and removes "<####>" */  
    
new iPos iLen 1  
    
if( szName[iPos] == '>' )  
    {  
        for( new 
16i++)  
        {  
            if( 
szName[iPos i] == '<' )  
            {  
                
iLen iPos i  
                szName
[iLen] = '^0'  
                
break  
            }  
        }  
    }  
      
    
format(szName[iLen], charsmax(szName) - iLenszName[iLen-1] == ' ' "<%d>" "<%d>"points[id])  
    
//set_user_info(id, "name", szName)
    
server_cmd("amx_nick #%d ^"%s^""get_user_userid(id), szName);
    

If you can find the event for when the player changes their name, I'm sure you can hook the same event.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX 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 21:50.


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