Raised This Month: $ Target: $400
 0% 

Block Changing name.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
F.E.A.R.
Junior Member
Join Date: Nov 2007
Old 11-29-2007 , 15:38   Block Changing name.
Reply With Quote #1

Sorry for my English.
I'm from Russia

And I need help, because I can't get it with .Ru Internet.

I need a plugin which will block client changing name and kick him for that.

I have some examples:
Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "ANTI Change Name"
#define VERSION "0.1beta"
#define AUTHOR "F.E.A.R.&Many"


public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)

}

public client_infochanged(id) 
{ 
    new newname[32],oldname[32] 
    get_user_info(id, "name", newname,31) 
    get_user_name(id,oldname,31) 
    
    if(!equali(newname, oldname))
    {
        client_cmd(id, "disconnect");
        client_print(id , print_chat , "[AMXX] Sorry but you are only allowed to use one name here.");
        return PLUGIN_HANDLED;
    }
    return PLUGIN_CONTINUE;
}
This plugin works. -> Player change his name and then he's kicked.

But I need to block changing name. block absolutely.
I will answer to all your questions. Help me please.
Thanks. I suggest you understand me.
F.E.A.R. is offline
RaYden
Member
Join Date: Sep 2007
Old 11-30-2007 , 16:04   Re: Block Changing name.
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "ANTI Change Name"
#define VERSION "0.1beta"
#define AUTHOR "F.E.A.R.&Many"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)

}

public 
client_infochanged(id

    new 
newname[32],oldname[32
    
get_user_info(id"name"newname,31
    
get_user_name(id,oldname,31
    if(!
is_user_connected(id) || is_user_bot(id)) return PLUGIN_CONTINUE;
    if(!
equali(newnameoldname))
    {
        
//client_cmd(id, "name ^"%s^"",oldname);
        
set_user_info(id,"name",oldname)
        
client_print(id print_chat "[AMXX] Sorry but you are only allowed to use one name here.");
        return 
PLUGIN_HANDLED;
    }
    return 
PLUGIN_CONTINUE;

This will block it indefinitely however you might wana edit the amx source to stop showing the name change event msg
RaYden is offline
SubStream
Veteran Member
Join Date: Aug 2005
Location: USA
Old 12-01-2007 , 12:47   Re: Block Changing name.
Reply With Quote #3

Search for Brad's Restrict Name plugin and you'll be satisfied with that.
SubStream 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 23:59.


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