Insurgency game_start / game_newmap event fix (bug 3497, +dvander)
This commit is contained in:
parent
747ed1e59a
commit
29b357a2f6
@ -82,9 +82,20 @@ public OnPluginStart()
|
|||||||
RegConsoleCmd("nextmap", Command_Nextmap);
|
RegConsoleCmd("nextmap", Command_Nextmap);
|
||||||
|
|
||||||
HookConVarChange(g_Cvar_TimeleftInterval, ConVarChange_TimeleftInterval);
|
HookConVarChange(g_Cvar_TimeleftInterval, ConVarChange_TimeleftInterval);
|
||||||
|
|
||||||
|
decl String:folder[64];
|
||||||
|
GetGameFolderName(folder, sizeof(folder));
|
||||||
|
|
||||||
|
if (strcmp(folder, "insurgency") == 0)
|
||||||
|
{
|
||||||
|
HookEvent("game_newmap", Event_GameStart);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
HookEvent("game_start", Event_GameStart);
|
||||||
|
}
|
||||||
|
|
||||||
HookEvent("round_end", Event_RoundEnd);
|
HookEvent("round_end", Event_RoundEnd);
|
||||||
HookEvent("game_start", Event_GameStart);
|
|
||||||
HookEventEx("teamplay_win_panel", Event_TeamPlayWinPanel);
|
HookEventEx("teamplay_win_panel", Event_TeamPlayWinPanel);
|
||||||
HookEventEx("teamplay_restart_round", Event_TFRestartRound);
|
HookEventEx("teamplay_restart_round", Event_TFRestartRound);
|
||||||
HookEventEx("arena_win_panel", Event_TeamPlayWinPanel);
|
HookEventEx("arena_win_panel", Event_TeamPlayWinPanel);
|
||||||
@ -480,4 +491,4 @@ ShowTimeLeft(client, who)
|
|||||||
{
|
{
|
||||||
PrintToServer("[SM] %s", finalOutput);
|
PrintToServer("[SM] %s", finalOutput);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user