3
This commit is contained in:
1 parent
2969bae43e
commit
6c4e5cf095
3 files changed
+28
No files matched your search
BIN
Binary file not shown.
@@ -15,6 +15,7 @@ local player = Players.LocalPlayer
|
|||||||
local playerGui = player:WaitForChild("PlayerGui")
|
local playerGui = player:WaitForChild("PlayerGui")
|
||||||
local state = ReplicatedStorage:WaitForChild("ArenaRound")
|
local state = ReplicatedStorage:WaitForChild("ArenaRound")
|
||||||
local results = state:WaitForChild("RoundResults") :: RemoteEvent
|
local results = state:WaitForChild("RoundResults") :: RemoteEvent
|
||||||
|
local leaveArena = state:WaitForChild("LeaveArena") :: RemoteEvent
|
||||||
local limit = state:GetAttribute("TeamLimit") :: number
|
local limit = state:GetAttribute("TeamLimit") :: number
|
||||||
local modeIds = {Modes.Procedural}
|
local modeIds = {Modes.Procedural}
|
||||||
local function currentMode(): string
|
local function currentMode(): string
|
||||||
@@ -483,6 +484,23 @@ resultWinner.TextXAlignment = Enum.TextXAlignment.Left
|
|||||||
local resultMode = UI.label(resultsPanel, "Mode", "", UDim2.fromOffset(566, 30), UDim2.fromOffset(368, 31), 15, muted)
|
local resultMode = UI.label(resultsPanel, "Mode", "", UDim2.fromOffset(566, 30), UDim2.fromOffset(368, 31), 15, muted)
|
||||||
resultMode.TextXAlignment = Enum.TextXAlignment.Right
|
resultMode.TextXAlignment = Enum.TextXAlignment.Right
|
||||||
|
|
||||||
|
local lobbyButton = Instance.new("TextButton")
|
||||||
|
lobbyButton.Name = "LeaveArena"
|
||||||
|
lobbyButton.Position = UDim2.fromOffset(752, 63)
|
||||||
|
lobbyButton.Size = UDim2.fromOffset(182, 28)
|
||||||
|
lobbyButton.BackgroundColor3 = blueDark
|
||||||
|
lobbyButton.BorderSizePixel = 0
|
||||||
|
lobbyButton.FontFace = UI.Display
|
||||||
|
lobbyButton.TextSize = 14
|
||||||
|
lobbyButton.TextColor3 = ink
|
||||||
|
lobbyButton.Text = "ВЫЙТИ В ЛОББИ"
|
||||||
|
lobbyButton.Visible = false
|
||||||
|
corners(lobbyButton, 5)
|
||||||
|
lobbyButton.Parent = resultsPanel
|
||||||
|
lobbyButton.Activated:Connect(function()
|
||||||
|
if lobbyButton.Visible then leaveArena:FireServer() end
|
||||||
|
end)
|
||||||
|
|
||||||
local outcomeShade = frame("CitadelOutcome", resultsShade, UDim2.fromScale(0, 0), UDim2.fromScale(1, 1), Color3.fromRGB(5, 9, 18))
|
local outcomeShade = frame("CitadelOutcome", resultsShade, UDim2.fromScale(0, 0), UDim2.fromScale(1, 1), Color3.fromRGB(5, 9, 18))
|
||||||
outcomeShade.ZIndex = 20
|
outcomeShade.ZIndex = 20
|
||||||
outcomeShade.Visible = false
|
outcomeShade.Visible = false
|
||||||
@@ -618,6 +636,7 @@ end
|
|||||||
|
|
||||||
local function startSummary(view: SummaryView, ruleId: unknown)
|
local function startSummary(view: SummaryView, ruleId: unknown)
|
||||||
summaryView = view
|
summaryView = view
|
||||||
|
lobbyButton.Visible = view == "Live" and player:GetAttribute("InArena") == true
|
||||||
resultsGui:SetAttribute("LiveScoreboardOpen", view == "Live")
|
resultsGui:SetAttribute("LiveScoreboardOpen", view == "Live")
|
||||||
resultTitle.Text = if view == "Live" then "СТАТИСТИКА МАТЧА" else "ИТОГИ РАУНДА"
|
resultTitle.Text = if view == "Live" then "СТАТИСТИКА МАТЧА" else "ИТОГИ РАУНДА"
|
||||||
local rule = Rules.get(ruleId)
|
local rule = Rules.get(ruleId)
|
||||||
@@ -639,6 +658,7 @@ end
|
|||||||
local function hideResults()
|
local function hideResults()
|
||||||
clearOutcome()
|
clearOutcome()
|
||||||
summaryView = nil
|
summaryView = nil
|
||||||
|
lobbyButton.Visible = false
|
||||||
resultsGui:SetAttribute("LiveScoreboardOpen", false)
|
resultsGui:SetAttribute("LiveScoreboardOpen", false)
|
||||||
resultsShade.Visible = false
|
resultsShade.Visible = false
|
||||||
if resultSlide then resultSlide:Cancel() end
|
if resultSlide then resultSlide:Cancel() end
|
||||||
|
|||||||
@@ -64,6 +64,9 @@ local matches: {[string]: Match} = {
|
|||||||
local join = Instance.new("RemoteEvent")
|
local join = Instance.new("RemoteEvent")
|
||||||
join.Name = "JoinTeam"
|
join.Name = "JoinTeam"
|
||||||
join.Parent = state
|
join.Parent = state
|
||||||
|
local leave = Instance.new("RemoteEvent")
|
||||||
|
leave.Name = "LeaveArena"
|
||||||
|
leave.Parent = state
|
||||||
local cycleSkin = Instance.new("RemoteEvent")
|
local cycleSkin = Instance.new("RemoteEvent")
|
||||||
cycleSkin.Name = "CycleRifleSkin"
|
cycleSkin.Name = "CycleRifleSkin"
|
||||||
cycleSkin.Parent = state
|
cycleSkin.Parent = state
|
||||||
@@ -376,6 +379,11 @@ local function joinError(player: Player, match: Match, side: Side, now: number):
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
leave.OnServerEvent:Connect(function(player: Player)
|
||||||
|
if not roster[player] or player:GetAttribute("InArena") ~= true then return end
|
||||||
|
sendToLobby(player)
|
||||||
|
end)
|
||||||
|
|
||||||
local function tryJoin(player: Player, match: Match, side: Side, now: number): string
|
local function tryJoin(player: Player, match: Match, side: Side, now: number): string
|
||||||
local issue = joinError(player, match, side, now)
|
local issue = joinError(player, match, side, now)
|
||||||
if issue then return issue end
|
if issue then return issue end
|
||||||
|
|||||||
Reference in new issue
Block a user