block cmds
Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com
Forum rules
Accesează link-ul pentru a putea vedea regulile forumului
Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Accesează link-ul pentru a putea vedea regulile forumului
Daca doriti sa vi se modifice un plugin, va rugam postati aici .
-
- Membru, skill +1
- Posts: 132
- Joined: 17 Dec 2017, 22:41
- Detinator Steam: Da
- CS Status: Citesc forumul eXtreamCS.com...!
- Detinator server CS: bromybro1
- SteamID: bromybro1
- Fond eXtream: 0
- Has thanked: 4 times
- Been thanked: 3 times
- Contact:
I'm looking for a plugin that blocks some admin commands in a specific time like at the night "11-9" at this time admins can't change the map for example
-
- Scripter eXtreamCS
- Posts: 917
- Joined: 02 Nov 2020, 01:57
- Detinator Steam: Da
- Fond eXtream: 0
- Discord: lexzor#0630
- Has thanked: 71 times
- Been thanked: 136 times
this should work
cvar to set the start hour: blockcmd_start
end hour: blockcmd_end
you have just to put the commands here
not tested, i don t know if it s working
Code: Select all
#include <amxmodx>
#include <amxmisc>
#pragma semicolon 1
new const g_szCommands[][] =
{
"amx_map",
"amx_slay",
"another_command"
};
new g_Cvar[2];
public plugin_init()
{
register_plugin("Block admin commands", "1.0", "lexzor");
for(new i = 0; i<sizeof(g_szCommands); i++)
register_clcmd(g_szCommands[i], "block_commands", -1, "", -1);
g_Cvar[0] = register_cvar("blockcmd_start", "20");
g_Cvar[1] = register_cvar("blockcmd_end", "05");
}
public block_commands(id)
{
new iHour;
time(iHour, _, _);
if ( iHour >= get_pcvar_num(g_Cvar[0]) || iHour < get_pcvar_num(g_Cvar[1]))
{
client_print(id, print_console, "[BLOCK COMMMAND] This command is blocked by server founder!");
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
end hour: blockcmd_end
you have just to put the commands here
Code: Select all
new const g_szCommands[][] =
{
"amx_map",
"amx_slay",
"another_command"
};
-
- Membru, skill +1
- Posts: 132
- Joined: 17 Dec 2017, 22:41
- Detinator Steam: Da
- CS Status: Citesc forumul eXtreamCS.com...!
- Detinator server CS: bromybro1
- SteamID: bromybro1
- Fond eXtream: 0
- Has thanked: 4 times
- Been thanked: 3 times
- Contact:
It works fine but can you add permissions
I mean, this plugin is applied to everyone except for have immunity
I mean, this plugin is applied to everyone except for have immunity
-
- Membru, skill +1
- Posts: 162
- Joined: 28 Dec 2019, 01:39
- Detinator Steam: Da
- CS Status: Citesc forumul eXtreamCS.com...!
- Fond eXtream: 0
- Has thanked: 1 time
- Been thanked: 7 times
1. Create server_cmds_block.ini file in configs folder.
2. Add your commands after this example:
Plugin is untested, but it should work fine.
2. Add your commands after this example:
Code: Select all
"23:59" "amx_help"