Skip to content

Commit

Permalink
fix(rem): recreate prompts every time (#872)
Browse files Browse the repository at this point in the history
* fix(noclip): dynamically create prompt title

* fix(spectate): dynamically create prompt title

* chore: move code
  • Loading branch information
ChatDisabled committed Dec 30, 2023
1 parent 2caa4d3 commit 71aa41e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions resource/menu/client/cl_spectate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,7 @@ local keysTable = {
{'Previous Player', CONTROLS.prev},
{'Next Player', CONTROLS.next},
}

local redmInstructionGroup, redmPromptTitle
if IS_REDM then
redmPromptTitle = CreateVarString(10, 'LITERAL_STRING', 'Spectate')
redmInstructionGroup = makeRedmInstructionalGroup(keysTable)
end

--- Key press checking (fivem)
local function fivemCheckControls()
Expand Down Expand Up @@ -269,6 +264,11 @@ end)

-- Client-side event handler for an authorized spectate request
RegisterNetEvent('txcl:spectate:start', function(targetServerId, targetCoords)
if IS_REDM then
redmPromptTitle = CreateVarString(10, 'LITERAL_STRING', 'Spectate')
redmInstructionGroup = makeRedmInstructionalGroup(keysTable)
end

if isInTransitionState then
stopSpectating()
error('Spectate request received while in transition state')
Expand Down
8 changes: 4 additions & 4 deletions resource/menu/vendor/freecam/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ local keysTable = {
{'Fwd/Back', CONTROLS.MOVE_Y},
}
local redmInstructionGroup, redmPromptTitle
if IS_REDM then
redmPromptTitle = CreateVarString(10, 'LITERAL_STRING', 'NoClip')
redmInstructionGroup = makeRedmInstructionalGroup(keysTable)
end


function StartFreecamThread()
if IS_REDM then
redmPromptTitle = CreateVarString(10, 'LITERAL_STRING', 'NoClip')
redmInstructionGroup = makeRedmInstructionalGroup(keysTable)
end
-- Camera/Pos updating thread
Citizen.CreateThread(function()
local ped = PlayerPedId()
Expand Down

0 comments on commit 71aa41e

Please sign in to comment.