Skip to content

Commit 7e13ce5

Browse files
committed
Disable racing pause while on result screen.
1 parent b1ed505 commit 7e13ce5

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

client/PauseMenu.lua

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,35 +156,37 @@ function UpdatePlayerList()
156156
end
157157

158158
local function OpenPauseMenu()
159-
local isSpectate = false
159+
local allow = true
160160

161161
if GetResourceState("DarkRP_Racing") == "started" then
162162
if exports["DarkRP_Racing"]:IsPlayerOnSpectate() then
163-
isSpectate = true
163+
allow = false
164+
elseif exports["DarkRP_Racing"]:GetEndScreen().IsOnEndScreen then
165+
allow = false
164166
end
165167
end
166168
if GetResourceState("DarkRP_Bomb") == "started" then
167169
if exports["DarkRP_Bomb"]:IsPlayerOnSpectate() then
168-
isSpectate = true
170+
allow = false
169171
end
170172
end
171173
if GetResourceState("DarkRDarkRP_TeamdeathmacthP_Racing") == "started" then
172174
if exports["DarkRP_Teamdeathmacth"]:IsPlayerOnSpectate() then
173-
isSpectate = true
175+
allow = false
174176
end
175177
end
176178
if GetResourceState("DarkRP_CaptureTheFlag") == "started" then
177179
if exports["DarkRP_CaptureTheFlag"]:IsPlayerOnSpectate() then
178-
isSpectate = true
180+
allow = false
179181
end
180182
end
181183
if GetResourceState("DarkRP_ZombieSurvival") == "started" then
182184
if exports["DarkRP_ZombieSurvival"]:IsPlayerOnSpectate() then
183-
isSpectate = true
185+
allow = false
184186
end
185187
end
186188

187-
if ArenaAPI and ArenaAPI:IsPlayerInAnyArena() and not isSpectate then
189+
if ArenaAPI and ArenaAPI:IsPlayerInAnyArena() and allow then
188190
if not IsPauseMenuActive() and (IsGameplayCamRendering() or IsPlayerSwitchInProgress() or NetworkIsInSpectatorMode()) then
189191
UpdatePlayerState()
190192
UpdateInfos()

fxmanifest.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ lua54 'yes'
33
game 'gta5'
44
-- use_fxv2_oal 'yes'
55

6-
version '3.4.8.1'
6+
version '3.4.8.2'
77

88
server_scripts {
99
'@oxmysql/lib/MySQL.lua',

0 commit comments

Comments
 (0)