how would I check when a clanmatch has started?
For our game half-life deathmatch: adrenaline gamer a clanmatch has started when the global event 'Countdown' has passed.
so this should be fairly easy but I cant get it working.
PHP Code:
#include <amxmodx>
#include <fakemeta>
new g_Matchstart[33];
public plugin_init()
{
register_plugin("clanmatchstart","1.2","test")
register_event( "Countdown", "StartMatch", "a", "1=9")
register_clcmd("say /matchstart", "hasmatchstarted");
}
public StartMatch(id)
{
g_Matchstart[id] = true
}
bool:is_matchstart(id)
return g_Matchstart[id];
public hasmatchstarted(id)
{
client_print(id, print_chat, "* clan match has %s started.", is_matchstart(id) ? "" : " not");
return PLUGIN_HANDLED;
}
I know within global events u cant use (id) so this was a failed attempt.
with my next attempt I am thinking off replacing the g_Matchstart with a new server cvar.
but this must be possible to achieve on a more efficient way, not?