I have one that works for the command sm_ban, but you'll need to tweak the adminmenu so the admins cannot use the menu to ban for longer than n minutes.
Basically, something like this should do it - but like I said, I was still able to pull up my adminmenu (which I didn't alter) and use that ban menu:
PHP Code:
#pragma semicolon 1
#include <sourcemod>
public OnPluginStart()
{
AddCommandListener(Command_TempBan, "sm_ban");
}
public Action:Command_TempBan(client, const String:command[], argc)
{
if (!client || CheckCommandAccess(client, "allow_perm_bans", ADMFLAG_CUSTOM4))
{
return Plugin_Continue;
}
new String:time[5];
GetCmdArg(2, time, sizeof(time));
new itime = StringToInt(time);
if (itime == 0 || itime > 60)
{
PrintToChat(client, "You are not allowed to ban for [%i] minutes", itime);
return Plugin_Stop;
}
return Plugin_Continue;
}
__________________