Raised This Month: $ Target: $400
 0% 

Name change problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-16-2011 , 01:57   Re: Name change problem
Reply With Quote #4

Then you need to express yourself better.

SetUserName(index, "ConnorMcLeod") will change player name even if he is dead, unassigned, spec.

PHP Code:
SetUserName(idszNewName[], bool:bSilent falsebool:bDeadInstantChange true)
{
    new 
szOldName[32]
    
get_user_info(id"name"szOldNamecharsmax(szOldName))
    if( !
equal(szOldNameszNewName) )
    {
        
set_user_info(id"name"szNewName)

        if( 
is_user_connected(id) )
        {
            new 
iDeadFlag pev(idpev_deadflag)
            if( 
iDeadFlag != DEAD_NO )
            {
                if( 
bDeadInstantChange )
                {
                    
set_pev(idpev_netnameszNewName)
                    if( !
bSilent )
                    {
                        
set_pev(idpev_deadflagDEAD_NO)
                        
dllfunc(DLLFunc_ClientUserInfoChangedidengfunc(EngFunc_GetInfoKeyBufferid))
                        
set_pev(idpev_deadflagiDeadFlag)
                    }
                }
            }
            else if( 
bSilent )
            {
                
set_pev(idpev_netnameszNewName)
            }
        }
    }

__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 11:53.


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