Can someone tell me why some of the PrintToServer commands aren't working?
No errors on console, no errors in logs.
Game: TF2
Sourcemod version: 1.11.0.6927
PHP Code:
#pragma semicolon 1
#pragma newdecls required
public Plugin myinfo =
{
name = "[TF2] Test PrintToServer at Round Start",
author = "PC Gamer",
description = "Prints to Server after round start",
version = "PLUGIN_VERSION 1.0",
}
public void OnPluginStart()
{
HookEvent("teamplay_round_start", OnRoundStart);
}
public void OnRoundStart(Event hEvent, const char[] strName, bool bDontBroadcast)
{
PrintToServer("Round Test: Starting Round"); //This line prints
PrintToChatAll("Round Test: Starting Round"); //This line prints
int realplayers = 6;
PrintToServer("Round Test: There are %i Human Players", realplayers); //This line does not print
PrintToChatAll("Round Test: There are %i Human Players", realplayers); //This line prints
int hcount = 0;
for (int i = 1; i<= MaxClients; i++)
{
if(IsClientInGame(i) && !IsFakeClient(i))
{
hcount++;
}
}
PrintToServer("Round Test: Just kidding. There are really only %i Human Players", hcount); //This line does not print
PrintToChatAll("Round Test: Just kidding. There are really only %i Human Players", hcount); //This line prints
PrintToServer("Round Test: Done testing PrintToServer commands"); //This line prints
PrintToChatAll("Round Test: Done testing PrintToServer commands");//This line prints
}