Raised This Month: $ Target: $400
 0% 

console cmd blocker


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 11-03-2011 , 20:03   Re: console cmd blocker
Reply With Quote #2

Test is:

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

public plugin_init() 

    
register_plugin("Block change name and vote""1.0""kramesa"
    
register_forward(FM_ClientUserInfoChanged"ClientUserInfoChanged"
    
register_clcmd("vote""CmdBlock")



public 
ClientUserInfoChanged(id

    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 
}  

public 
CmdBlock(id)
{
    
console_print(id"Ikke tilladt!")
    return 
PLUGIN_HANDLED_MAIN;

__________________

Last edited by kramesa; 11-03-2011 at 20:04.
kramesa is offline
 



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 14:19.


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