Edit:
Ahh, never mind.
Apparently this never worked or something changed in the last ten years with csgo.
The number for first round is 16 not 15.
Working!
I have the following code and I thought it was working at some point but it no longer is.
What is the best way to detect the start of the Frist Round in csgo?
PHP Code:
#pragma semicolon 1
#include <sourcemod>
new bool:g_firstround = true;
public OnPluginStart()
{
HookEvent("round_end", RoundEndEvent);
}
public Action:RoundEndEvent(Handle:event, const String:name[], bool:dontBroadcast)
{
new reason = GetEventInt(event, "reason");
//#Game_Commencing, game begin
if( reason == 16) // had 15 for some reason! and thought 15 used to work ten years ago
{
PrintToChatAll("First round found! %n",reason);
g_firstround = true;
}
else
{
PrintToChatAll("First round NOT found! %n",reason);
g_firstround = false;
}
}