Ok so after looking at l4d build enabler its like I would have to create a public action (the adminonly part anyway) for every single command.
Is there a way to just take the cheat flag off (for admins) of everything?
I tried taking it off of "boom" and "fire" and making them use the same action for adminonly, but that didn't work. (They still say need sv_cheats 1)
PHP Code:
RegConsoleCmd("boom", Command_cheats)
RegConsoleCmd("fire", Command_cheats)
PHP Code:
SetCommandFlags("boom",GetCommandFlags("boom")^FCVAR_CHEAT)
SetCommandFlags("fire",GetCommandFlags("fire")^FCVAR_CHEAT)
PHP Code:
public Action:Command_cheats(client, args)
{
if (onlyadmins)
{
if (!clientadminstate[client])
{
return Plugin_Handled
}
}
return Plugin_Continue
}
I wish it was as simple as
PHP Code:
RegConsoleCmd("*", Command_cheats)
SetCommandFlags("*",GetCommandFlags("*")^FCVAR_CHEAT)
to take the cheat flag off of everything.