I coded a plugin showing that players are using hooks. I want this message to be written to the ct team and server administrators console. How can I do that?
Note: I'm sorry for my bad english.
Code:
#include <sourcemod>
#include <sdktools>
#include <cstrike>
#include <sdkhooks>
#include <hgr>
bool godRound = false;
public OnPluginStart()
{
HookEvent("round_end", Round_END);
}
public Action:OnClientSayCommand(client, const char[] command, const char[] sArgs)
{
if (StrEqual(sArgs, "!godct",true)) {
godRound = true;
}
else
{
godRound = false;
}
}
public Action:HGR_OnClientHook(int client)
{
for(int i = 1; i <= MaxClients; i++)
{
if(!godRound) {
PrintToConsole(i, "%N player pressed the hook.", client);
}
}
return Plugin_Continue;
}
public Action:Round_END(Event event, const char[] name, bool dontBroadcast)
{
godRound = false;
}