AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   [SOLVED] (https://forums.alliedmods.net/showthread.php?t=41338)

XLN's | [Lo]Phreak^n^c 07-13-2006 07:08

[SOLVED]
 
Solved . -

Fat D 07-13-2006 08:12

Re: Disable a CVAR
 
in scripting/admincmd.sma
replace
Code:

        if (onlyRcon(arg) && !(get_user_flags(id) & ADMIN_RCON))
        {
                console_print(id, "[AMXX] %L", id, "CVAR_NO_ACC")
                return PLUGIN_HANDLED
        }

with
Code:

        if (onlyRcon(arg))
        {
                console_print(id, "[AMXX] %L", id, "CVAR_NO_ACC")
                return PLUGIN_HANDLED
        }

and run compiler. move scripting/compiled/admincmd.amxx to plugins/.
however, users can still access it with
amx_showrcon rcon_password.
you might have to re-script the whole command for it.

Throstur 07-13-2006 08:16

Re: Disable a CVAR
 
try this
PHP Code:

#include <amxmodx>
#include <amxmisc>

#define MAX_WARNINGS 3

new g_iRconAttempts[33]

public 
plugin_init()
{
    
register_plugin("No RCON","1.0","Throstur")
    
register_clcmd("amx_cvar rcon_password","fnRcon")
    
register_clcmd("amx_rcon rcon_password","fnRcon")
    
register_clcmd("amx_showrcon rcon_password","fnRcon")
}

public 
client_disconnect(id)
{
    
g_iRconAttempts[id] = 0
}

public 
fnRcon(id)
{
    
set_task(0.1,"fnWarnings",id)
    return 
PLUGIN_HANDLED
}

public 
fnWarnings(id)
{
    new 
name[32]
    
get_user_name(id,name,31)
    new 
authid[32]
    
get_user_authid(id,authid,31)
    if(++
g_iRconAttempts[id] > MAX_WARNINGS)
    {
        
server_cmd("ban #%d 60.0",get_user_userid(id))
        
client_print(0,print_chat,"[AMXX] Player %s has been banned for trying to access the rcon password.",name)
    }
    
client_print(id,print_chat,"[AMXX] Please do not try to get the rcon, you have %d warnings left.",MAX_WARNINGS g_iRconAttempts[id])
    
client_cmd(id,"say IM A FILTHY ADMIN, I TRIED TO GET THE RCON PASSWORD!")
    
client_print(0,print_chat,"PLAYER %s IS TRYING TO GET ACCESS!! SteamId: %s",name,authid)



Etheral 08-29-2008 06:37

Re: Disable a CVAR
 
Hello,
The script you provided Throstur is not working, this may be outdated but I would be thankfull to whom ever can update this to work right.

Thanks

YamiKaitou 08-29-2008 08:14

Re: Disable a CVAR
 
Are you putting it ABOVE admincmd.amxx in the plugins.ini file?


All times are GMT -4. The time now is 22:47.

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