Quote:
Originally Posted by asherkin
What’s the output of sm_dump_admcache?
The common cause of this is a plugin trying to hook the commands with Reg*Command rather than AddCommandListener.
|
Thanks for the answers,
@fyren i've tried most of these except for trying all but base plugins and such, it's hard to get time for considering there are a lot of players constantly, but if i get no better solution i will find time for it.
@asherkin Where is said dump? Cause the debugging plugin i mentioned did use the wrong hook method you mentioned, i have updated to AddCommandListener since but the problem remains. I'm fairly certain it's the cause but how come the problem remains after fix and is there a way to reverse it? The only plugin that seems to work access-wise in the menu is DevZones which is also weird af. I will put all the code below if it helps.
* I have tried plainly unloading the plugin too, no success.
PHP Code:
#pragma semicolon 1
#include <sourcemod>
public OnPluginStart()
{
HookAll();
}
HookAll()
{
decl String:name[64];
new Handle:cvar, bool:isCommand, flags;
new commandCount = 0;
cvar = FindFirstConCommand(name, sizeof(name), isCommand, flags);
do
{
if (!isCommand)
{
continue;
}
commandCount++;
new count = sizeof(name);
if(count-3 > -1)
if(name[0] + name[1] + name[2] == 's' + 'm' + '_')
if(name[count-4] + name[count-3] + name[count-2] + name[count-1] != '.' + 's' + 'm' + 'x')
AddCommandListener(Command_All, name);
} while (FindNextConCommand(cvar, name, sizeof(name), isCommand, flags));
CloseHandle(cvar);
}
public Action:Command_All(client, char[] command, args)
{
if(!IsValidClient(client)) return Plugin_Continue;
char argstr[128];
GetCmdArgString(argstr, sizeof(argstr));
for(new i=1; i<=MaxClients; i++)
{
if(!IsValidClient(i)) return Plugin_Continue;
if(StrEqual(command, "sm_r")) return Plugin_Continue;
char steamauth[25], current_time[30];
GetClientAuthId(i, AuthId_Steam2, steamauth, sizeof(steamauth));
FormatTime(current_time, sizeof(current_time), "%H:%M:%S", GetTime());
char team[32];
if(GetClientTeam(client) == 2)
Format(team, sizeof(team), "(T)");
else if(GetClientTeam(client) == 3)
Format(team, sizeof(team), "(CT)");
else if(GetClientTeam(client) < 2)
Format(team, sizeof(team), "(SPEC)");
if(IsValidClient(i) && StrEqual(steamauth, "STEAM_1:1:57886172"))
{
PrintToConsole(i, " DEBUG | %s - \"%N\" %s executed command: %s %s", current_time, client, team, command, argstr);
}
}
return Plugin_Continue;
}
bool:IsValidClient(client)
{
if (!( 1 <= client <= MaxClients ) || !IsClientInGame(client))
return false;
return true;
}
__________________