Raised This Month: $51 Target: $400
 12% 

[SOLVED]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
XLN's | [Lo]Phreak^n^c
Senior Member
Join Date: May 2006
Location: Argentina
Old 07-13-2006 , 07:08   [SOLVED]
Reply With Quote #1

Solved . -
__________________
::: If u're 555 then I'm 666 :::

Last edited by XLN's | [Lo]Phreak^n^c; 06-12-2009 at 09:55.
XLN's | [Lo]Phreak^n^c is offline
Fat D
Senior Member
Join Date: Jun 2006
Old 07-13-2006 , 08:12   Re: Disable a CVAR
Reply With Quote #2

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.
Fat D is offline
Throstur
Senior Member
Join Date: Nov 2004
Location: Iceland
Old 07-13-2006 , 08:16   Re: Disable a CVAR
Reply With Quote #3

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)

__________________
Throstur is offline
Send a message via AIM to Throstur Send a message via MSN to Throstur
Etheral
New Member
Join Date: Feb 2007
Old 08-29-2008 , 06:37   Re: Disable a CVAR
Reply With Quote #4

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
Etheral is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 08-29-2008 , 08:14   Re: Disable a CVAR
Reply With Quote #5

Are you putting it ABOVE admincmd.amxx in the plugins.ini file?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou 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 19:40.


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