You could make a command that runs sv_cheats as the server:
Code:
bool g_bEnabled;
public OnPluginStart() {
RegAdminCmd("sm_enablecheats", Command_EnableCheats, ADMFLAG_CHANGEMAP, "Sets sv_cheats to 1");
}
public Action Command_EnableCheats(int client, int args) {
if(MaxClients < client < 2)
return Plugin_Handled;
if(g_bEnabled) {
ServerCommand("sv_cheats 0");
PrintToChat(client, "You've disabled sv_cheats.");
g_bEnabled = false;
} else {
ServerCommand("sv_cheats 1");
PrintToChat(client, "You've enabled sv_cheats.");
g_bEnabled = true;
}
return Plugin_Handled;
}
Just change the ADMFLAG_ to any of these:
https://sm.alliedmods.net/new-api/admin/AdminFlag depending on who you want to have access.
https://sm.alliedmods.net/new-api/console/ServerCommand