Raised This Month: $ Target: $400
 0% 

I Need Block Name Change Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
naXe
BANNED
Join Date: May 2009
Location: Poland/Kwidzyn
Old 01-26-2012 , 17:47   Re: I Need Block Name Change Plugin
Reply With Quote #1

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

public plugin_init() {
    
register_plugin("Block name change","1.0","grankee")
    
register_message(get_user_msgid("SayText"), "message")
}
public 
message()
{
    new 
arg[32]
    
get_msg_arg_string(2arg31)
    if(
containi(arg,"name")!=-1)
    {
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE
}
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))
    {
        
set_user_info(id,"name",oldname)
        
client_print(id print_chat "[AMXX] Prohibition of nick change!")
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE

naXe is offline
Send a message via AIM to naXe
Reply


Thread Tools
Display Modes

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 09:51.


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