AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Forbid name changing (https://forums.alliedmods.net/showthread.php?t=117231)

Mevrael 01-30-2010 07:31

Forbid name changing
 
Is it possible to forbid name changing in game?

joropito 01-30-2010 09:20

Re: Forbid name changing
 
Quote:

Originally Posted by Mevrael (Post 1072683)
Is it possible to forbid name changing in game?

hook for clcmd name and return PLUGIN_HANDLED

ConnorMcLeod 01-30-2010 12:25

Re: Forbid name changing
 
Quote:

Originally Posted by joropito (Post 1072785)
hook for clcmd name and return PLUGIN_HANDLED

I'm not sure this commande is sent to the server (may be it's a cvar ?).
Anyway, this has been done many times, make a search through forums.

fysiks 01-30-2010 17:31

Re: Forbid name changing
 
fakemeta+infochanged+fmres_supercede or something like that.

Bugsy 01-30-2010 21:18

Re: Forbid name changing
 
Quote:

Originally Posted by fysiks (Post 1073438)
fakemeta+infochanged+fmres_supercede or something like that.

Quote:

Originally Posted by fysiks
PHP Code:

register_forward(FM_ClientUserInfoChanged"fwClientUserInfoChanged")
}
    
public 
fwClientUserInfoChanged(idbuffer)
{
    if( 
is_user_connected(id) )
    {
        static 
name[32]
        static 
val[32]
        
get_user_name(idname31)
        
engfunc(EngFunc_InfoKeyValuebuffer"name"val31)
        
        if (
equal(valname))
            return 
FMRES_IGNORED
        
        engfunc
(EngFunc_SetClientKeyValueidbuffer"name"name)
        
        return 
FMRES_SUPERCEDE
    
}
    
    return 
FMRES_IGNORED





All times are GMT -4. The time now is 07:19.

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