Raised This Month: $32 Target: $400
 8% 

Name change block plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
12114
Senior Member
Join Date: Jan 2006
Old 06-09-2013 , 11:03   Name change block plugin
Reply With Quote #1

Hey guys, is there a plugin out there for cs 1.6 that simply removes the possibility of players changing their names? If they really wanted to do it then they would have to disconnect, do it, and then go back into the server. Thanks.
12114 is offline
akcaliberg
Senior Member
Join Date: Nov 2011
Location: Istanbul
Old 06-09-2013 , 11:06   Re: Name change block plugin
Reply With Quote #2

yes, there is. Just search it
akcaliberg is offline
12114
Senior Member
Join Date: Jan 2006
Old 06-09-2013 , 11:11   Re: Name change block plugin
Reply With Quote #3

i searched all new submissions and approved plugins, no luck

edit: i pulled some code from another plugin and now it works as i want it to. So nevermind. ty.

Last edited by 12114; 06-09-2013 at 12:30.
12114 is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 06-09-2013 , 11:56   Re: Name change block plugin
Reply With Quote #4

Try using HLGuard, it has such a feature.
__________________
Kia is offline
vikassharma
BANNED
Join Date: Dec 2011
Location: INDIA
Old 06-10-2013 , 00:37   Re: Name change block plugin
Reply With Quote #5

Quote:
Originally Posted by Kia View Post
Try using HLGuard, it has such a feature.
He is asking plugin, Not a module
vikassharma is offline
vikassharma
BANNED
Join Date: Dec 2011
Location: INDIA
Old 06-10-2013 , 00:39   Re: Name change block plugin
Reply With Quote #6

Here You go

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 ClientUserInfoChanged(id) 
{ 
    static const name[] = "name" 
    static szOldName[32], szNewName[32] 
    pev(id, pev_netname, szOldName, charsmax(szOldName)) 
    if( szOldName[0] ) 
    { 
        get_user_info(id, name, szNewName, charsmax(szNewName)) 
        if( !equal(szOldName, szNewName) ) 
        { 
            set_user_info(id, name, szOldName) 
            return FMRES_HANDLED 
        } 
    } 
    return FMRES_IGNORED
vikassharma is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 06-11-2013 , 17:01   Re: Name change block plugin
Reply With Quote #7

Quote:
Originally Posted by 12114 View Post
i pulled some code from another plugin and now it works as i want it to. So nevermind. ty.
you don't want to share ?
__________________
ANTICHRISTUS is offline
Mikado
Senior Member
Join Date: Nov 2012
Location: don't know where :/
Old 06-11-2013 , 17:35   Re: Name change block plugin
Reply With Quote #8

http://forums.alliedmods.net/showthread.php?p=154865
Mikado is offline
12114
Senior Member
Join Date: Jan 2006
Old 06-12-2013 , 00:01   Re: Name change block plugin
Reply With Quote #9

Quote:
Originally Posted by ANTICHRISTUS View Post
you don't want to share ?
well sure, but it's basically confusing because it's already a part of a plugin.

You can try the plugin that the person posted before you. If it doesn't work then here's my thing....


public ClientInfoChanged(id)
{
if(!get_pcvar_num(g_on) || !is_user_connected(id))
return FMRES_IGNORED

new oldname[32], newname[32];

get_user_name(id, oldname, charsmax(oldname))
get_user_info(id, "name", newname, charsmax(newname))

if(!equal(oldname, newname))
{
replace_all(newname, charsmax(newname), "%", " ")

changing_name[id] = false

if(!is_user_alive(id))
{
changing_name[id] = true
}
else
{

set_user_info(id, "name", oldname)
client_printcolor(id, "%L", LANG_SERVER, "bla bla bla, put the name of .txt file here if u want a msg", prefix)
}
}
}

You would have to define some things first obviously and do some other basic stuff but yea, that's the code basically. Credits to m0skvi4a.
12114 is offline
Reply



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 17:08.


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