Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Commit

Permalink
extract lööps
Browse files Browse the repository at this point in the history
  • Loading branch information
lfuelling committed Aug 24, 2019
1 parent 13acd35 commit b77bb70
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,24 @@ Citizen.CreateThread(function()
end)

--- Tutorial logic
Citizen.CreateThread(_tutorialLoop)

--- first mission logic
Citizen.CreateThread(_firstMissionLoop)

--- Marker logic
Citizen.CreateThread(function()
while not tutorialFinished do
while true do
Citizen.Wait(0)
if isHacking or isHacker() then
drawPcMarkers()
end
end
end)

--- Loop for the tutorial
function _tutorialLoop()
while true do
Citizen.Wait(0)
if isHacking then
if phoneReady and not tutorialDone and not numberAdded then
Expand Down Expand Up @@ -161,10 +177,10 @@ Citizen.CreateThread(function()
tutorialFinished = true
end
end
end)
end

--- first mission logic
Citizen.CreateThread(function()
--- Loop for the first mission
function _firstMissionLoop()
while true do
Citizen.Wait(0)
if (not numberAdded and not firstMissionDone) then
Expand All @@ -183,18 +199,5 @@ Citizen.CreateThread(function()
"CHAR_BLOCKED", 1) -- contact photo, symbol
firstMissionIntroDone = true
end
if isInSecondMission() then
break
end
end
end)

--- Marker logic
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if isHacking or isHacker() then
drawPcMarkers()
end
end
end)
end

0 comments on commit b77bb70

Please sign in to comment.