Raised This Month: $ Target: $400
 0% 

console cmd blocker


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
FPcokE
Member
Join Date: Aug 2011
Old 11-04-2011 , 21:07   Re: console cmd blocker
Reply With Quote #3

Quote:
Originally Posted by kramesa View Post
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;


well is it possible to make an exeption when i use amx_name "id" "newname" then?

PHP Code:
public cmdNick(idlevelcid)
{
    if (!
cmd_access(idlevelcid3))
        return 
PLUGIN_HANDLED

    
new arg1[32], arg2[32], authid[32], name[32], authid2[32], name2[32]

    
read_argv(1arg131)
    
read_argv(2arg231)

    new 
player cmd_target(idarg1CMDTARGET_OBEY_IMMUNITY CMDTARGET_ALLOW_SELF)
    
    if (!
player)
        return 
PLUGIN_HANDLED

    get_user_authid
(idauthid31)
    
get_user_name(idname31)
    
get_user_authid(playerauthid231)
    
get_user_name(playername231)

    
client_cmd(player"name ^"%s^""arg2)

    
show_activity_key("ADMIN_NICK_1""ADMIN_NICK_2"namename2arg2)

    return 
PLUGIN_HANDLED

this is my amx_name cmd so fare
FPcokE 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