-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSwitchTeamAPI.lua
More file actions
27 lines (25 loc) · 1.31 KB
/
SwitchTeamAPI.lua
File metadata and controls
27 lines (25 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
SwitchTeamCallback = nil
callbacks.Register("FireGameEvent", function(event)
if SwitchTeamCallback ~= nil then
if event:GetName() == "round_end" then SwitchTeamCallback() end
if event:GetName() == "round_start" then SwitchTeamCallback() end
if event:GetName() == "round_poststart" then SwitchTeamCallback() end
if event:GetName() == "round_prestart" then SwitchTeamCallback() end
if event:GetName() == "teamplay_round_start" then SwitchTeamCallback() end
if event:GetName() == "round_officially_ended" then SwitchTeamCallback() end
if event:GetName() == "teamchange_pending" then SwitchTeamCallback() end
if event:GetName() == "jointeam_failed" then SwitchTeamCallback() end
if event:GetName() == "player_death" then SwitchTeamCallback() end
if event:GetName() == "cs_win_panel_round" then SwitchTeamCallback() end
end
end)
client.AllowListener("cs_win_panel_round")
client.AllowListener("player_death")
client.AllowListener("jointeam_failed")
client.AllowListener("teamchange_pending")
client.AllowListener("round_officially_ended")
client.AllowListener("teamplay_round_start")
client.AllowListener("round_prestart")
client.AllowListener("round_poststart")
client.AllowListener("round_start")
client.AllowListener("round_end")