First 15 seconds of map?
PHP Code:
#include <amxmodx>
new bool:CommandCanBeExecuted;
new bool:CommandRequested;
public plugin_init()
{
register_clcmd("amx_command", "AttemptToExecuteCommand");
register_event("HLTV", "NewRound", "a", "1=0", "2=0");
}
public DisallowExecutingCommand()
CommandCanBeExecuted = false;
public AttemptToExecuteCommand(Client)
{
if (CommandCanBeExecuted)
CommandAccepted();
else
CommandRequested = true;
return PLUGIN_HANDLED;
}
public NewRound()
{
set_task(15.0, "DisallowExecutingCommand");
if (CommandRequested)
CommandAccepted();
}
CommandAccepted()
{
CommandRequested = false;
// Stuff
}
__________________