This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

[HELP] Block Changing Name


Post New Thread Reply   
 
Thread Tools Display Modes
guven5
Senior Member
Join Date: Jul 2010
Location: counter strike 1.6 downl
Old 10-16-2014 , 11:02   Re: [HELP] Block Changing Name
Reply With Quote #11

i am not just coder, so how does this possible
guven5 is offline
flaxo
Member
Join Date: Nov 2013
Old 02-19-2015 , 14:06   Re: [HELP] Block Changing Name
Reply With Quote #12

Quote:
Originally Posted by HamletEagle View Post

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

#define VERSION "0.1.0" 

public plugin_init() 

    
register_plugin("One Name"VERSION"ConnorMcLeod"
    
register_forward(FM_ClientUserInfoChanged"ClientUserInfoChanged"
}

public 
ClientUserInfoChanged(id

    if( 
is_user_adminid ) )
    {
        return 
FMRES_IGNORED
    
}
    
    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

The plugin works perfectly, thank you, but I really need your help. I control my server via an IRC bot which sends rcon commands to the server in order to manage the game. Is it possible to allow amx_nick usage via rcon? The command is like "rcon amx_nick oldname newname" but the plugin fails to work, since rcon is not considered as normal admin. Please guys, its urgent.

Thanks in advance
__________________
FastDL hosting for FREE. Just drop me a PM ;)

Last edited by flaxo; 02-19-2015 at 14:10.
flaxo is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 02-20-2015 , 04:57   Re: [HELP] Block Changing Name
Reply With Quote #13

this is a shot in the dark with the rcon thing, I just woke up so it might not work
PHP Code:
#include <amxmodx> 
#include <fakemeta> 
#include <amxmisc>

#define VERSION "0.1.0" 

new g_allowed[33]

public 
plugin_init() 

    
register_plugin("One Name"VERSION"ConnorMcLeod"
    
register_forward(FM_ClientUserInfoChanged"ClientUserInfoChanged"
}

public 
client_connect(id)
{
    
g_allowed[id] = 0
}

public 
client_command(id)  
{    
    static 
szCommand33 ] , name[33]
    
read_argv0szCommand32 
    
read_argv1name32 

    if( 
containszCommand"rcon amx_nick" )) 
    { 
        new 
player cmd_target(idname8)
        
g_allowed[player] = 1
    
}          
     
    return 
PLUGIN_CONTINUE
}  

public 
ClientUserInfoChanged(id

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

    } 
    return 
FMRES_IGNORED

__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.
aron9forever 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 16:53.


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