Raised This Month: $ Target: $400
 0% 

Change name points behind


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
MrMaCEEE
Senior Member
Join Date: Apr 2010
Location: PortugaL
Old 08-17-2010 , 10:36   Change name points behind
Reply With Quote #1

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);
    

__________________

#include ++ by MACE
MrMaCEEE is offline
Send a message via MSN to MrMaCEEE
 



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