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

Solved Limited Acces in server


Post New Thread Reply   
 
Thread Tools Display Modes
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 05-07-2020 , 05:21   Re: Some cvar blocked
Reply With Quote #11

Quote:
Originally Posted by 4ever16 View Post
Blocks amx_cvar for all admins.

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

new const BlockCmds[][] = {
"amx_cvar"
}

public 
plugin_init()
{
    
register_plugin("BLOCK AMX_CVAR""1.0""WHOCARES")
    new 
szFmt[64]
    for(new 
0sizeof(BlockCmds); i++) {
        
register_concmd(BlockCmds[i], "BlockConsole");
}

Jake take Cvar flag from all admins? + He just want for clients, not console probably clcmd?

Quote:
Originally Posted by lantimilan View Post
Just i want, because if somebody any admin have acces cvar or if any admin make mistake this form some cvar he cant change for this reason i need to block, some cvar change just from FTP
He want some cvars and probably for some admins.

Last edited by Alber9091; 05-07-2020 at 05:24.
Alber9091 is offline
Mikaeel123
Senior Member
Join Date: Oct 2018
Old 05-07-2020 , 08:04   Re: Some cvar blocked
Reply With Quote #12

Quote:
Originally Posted by 4ever16 View Post
Blocks amx_cvar for all admins.

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

new const BlockCmds[][] = {
"amx_cvar"
}

public 
plugin_init()
{
    
register_plugin("BLOCK AMX_CVAR""1.0""WHOCARES")
    new 
szFmt[64]
    for(new 
0sizeof(BlockCmds); i++) {
        
register_concmd(BlockCmds[i], "BlockConsole");
}

He can change the amx_cvar flag from cmdaccess.ini
its really easy why use this
Mikaeel123 is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 05-07-2020 , 10:33   Re: Some cvar blocked
Reply With Quote #13

Quote:
Originally Posted by Mikaeel123 View Post
He can change the amx_cvar flag from cmdaccess.ini
its really easy why use this
Exactly. Don't understand why you need anything external when its built in with amxmodx.
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-07-2020 , 13:59   Re: Some cvar blocked
Reply With Quote #14

Place it above admincmd.

Code:
#include <amxmodx> new const BLOCKED_CVARS[][] = {     "sv_timeout",     "mp_freezetime",     "pausable" } new Trie:g_tBlockedCvars public plugin_init() {     register_plugin("amx_cvar block", "1.0", "OciXCrom")     register_concmd("amx_cvar", "Cmd_Cvar")     g_tBlockedCvars = TrieCreate()     for(new i; i < sizeof(BLOCKED_CVARS); i++)     {         TrieSetCell(g_tBlockedCvars, BLOCKED_CVARS[i], 1)     } } public plugin_end() {     TrieDestroy(g_tBlockedCvars) } public Cmd_Cvar(id) {     new szArg[32]     read_argv(1, szArg, charsmax(szArg))     if(TrieKeyExists(g_tBlockedCvars, szArg))     {         console_print(id, "You cannot change the ^"%s^" cvar.", szArg)         return PLUGIN_HANDLED     }     return PLUGIN_CONTINUE }
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
lantimilan
Senior Member
Join Date: May 2016
Old 05-08-2020 , 09:44   Re: Some cvar blocked
Reply With Quote #15

Quote:
Originally Posted by OciXCrom View Post
Place it above admincmd.

Code:
#include <amxmodx> new const BLOCKED_CVARS[][] = {     "sv_timeout",     "mp_freezetime",     "pausable" } new Trie:g_tBlockedCvars public plugin_init() {     register_plugin("amx_cvar block", "1.0", "OciXCrom")     register_concmd("amx_cvar", "Cmd_Cvar")     g_tBlockedCvars = TrieCreate()     for(new i; i < sizeof(BLOCKED_CVARS); i++)     {         TrieSetCell(g_tBlockedCvars, BLOCKED_CVARS[i], 1)     } } public plugin_end() {     TrieDestroy(g_tBlockedCvars) } public Cmd_Cvar(id) {     new szArg[32]     read_argv(1, szArg, charsmax(szArg))     if(TrieKeyExists(g_tBlockedCvars, szArg))     {         console_print(id, "You cannot change the ^"%s^" cvar.", szArg)         return PLUGIN_HANDLED     }     return PLUGIN_CONTINUE }
Thanks my friend for your help
lantimilan is offline
Send a message via MSN to lantimilan
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 07:35.


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