It is better to share the full .sp file as attachment instead of pasting the plugin code, I tried to compile your code and wasn't able because it still has missing code parts in the snippet you shared.
Anyway, try doing the following steps.
Change the part below
PHP Code:
public Action zmobfix(int args)
{
...
}
to:
PHP Code:
void zmobfix(int args)
{
char name[] = "mob";
char command[] = "z_spawn";
char iflags = GetCommandFlags(command);
SetCommandFlags(command, iflags & ~FCVAR_CHEAT);
for (int i = 1; i <= MaxClients; i++)
{
if (IsClientInGame(i))
{
FakeClientCommand(i, "z_spawn %s", name);
break;
}
}
SetCommandFlags(command, iflags);
ShowActivity2(activatortmp, "ZB", "Spawned a %s", name);
PrintToChatAll("\x04[test]trigger:%N",activatortmp);
}
__________________