Skip to content

Commit

Permalink
add teamplay round active and setup time left events to round state t…
Browse files Browse the repository at this point in the history
…racking
  • Loading branch information
BrutalGoerge committed Apr 6, 2015
1 parent 91310c2 commit da8abba
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Binary file modified gscramble/addons/sourcemod/plugins/gscramble.smx
Binary file not shown.
14 changes: 14 additions & 0 deletions gscramble/addons/sourcemod/scripting/gscramble.sp
Expand Up @@ -1203,6 +1203,8 @@ hook()
HookEvent("teamplay_round_start", Event_RoundStart, EventHookMode_PostNoCopy);
HookEvent("player_disconnect", Event_PlayerDisconnect, EventHookMode_Post);
HookEvent("teamplay_round_win", Event_RoundWin, EventHookMode_Post);
HookEvent("teamplay_round_active", Event_RoundActive);
HookEvent("teamplay_pre_round_time_left", Event_SetupActive);
HookEvent("teamplay_setup_finished", hook_Setup, EventHookMode_PostNoCopy);
HookEvent("player_death", Event_PlayerDeath_Pre, EventHookMode_Pre);
HookEvent("game_start", hook_Event_GameStart);
Expand Down Expand Up @@ -1262,10 +1264,22 @@ unHook()
UnhookEvent("teamplay_pre_round_time_left", hookPreRound, EventHookMode_PostNoCopy);
UnhookEvent("teamplay_capture_blocked", Event_capture_blocked);
UnhookEvent("player_extinguished", Event_player_extinguished);
UnhookEvent("teamplay_round_active", Event_RoundActive);
UnhookEvent("teamplay_pre_round_time_left", Event_SetupActive);

g_bHooked = false;
}

public Event_SetupActive(Handle event, const char[] name, bool dontBroadcast)
{
g_RoundState = setup;
}

public Event_RoundActive(Handle event, const char[] name, bool dontBroadcast)
{
g_RoundState = normal;
}

public Event_player_extinguished(Handle event, const char[] name, bool dontBroadcast)
{
new healer = GetClientOfUserId(GetEventInt(event, "healer"));
Expand Down

0 comments on commit da8abba

Please sign in to comment.