Raised This Month: $ Target: $400
 0% 

Solved allow/Block changing nick


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 07-13-2017 , 08:13   allow/Block changing nick
Reply With Quote #1

how to do server will able to change his nick but player will not able to change his nick
server change his nick in client_putinserver after that block his nick so that he will not able to change his nick
PHP Code:
#include <amxmodx>
#include <fakemeta>

#define VERSION "0.1.0"

public plugin_init()
{
    
register_plugin("One Name"VERSION"ConnorMcLeod"
    
register_forward(FM_ClientUserInfoChanged"ClientUserInfoChanged"
}

public 
client_putinserver(id)
{
//suppose here i am changing nick to indra after this nick changing should be block from clientUserInfoCHhanged
set_user_info(id"name""indra");  
}

public 
ClientUserInfoChanged(id

    static const 
name[] = "name" 
    
static szOldName[32], szNewName[32
    
pev(idpev_netnameszOldNamecharsmax(szOldName)) 
    if( 
szOldName[0] ) 
    { 
        
get_user_info(idnameszNewNamecharsmax(szNewName)) 
        if( !
equal(szOldNameszNewName) ) 
        { 
            
set_user_info(idnameszOldName
            return 
FMRES_HANDLED 
        

    } 
    return 
FMRES_IGNORED 

__________________
Thanks everyone. #miss_you_all

Last edited by indraraj striker; 07-14-2017 at 00:15.
indraraj striker 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 22:45.


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