Removed keys table, minor improvements, final commit v1.0.0

This commit is contained in:
ElPumpo
2019-08-03 10:41:30 +02:00
parent 28a275a30a
commit 8bd77249d5
7 changed files with 25 additions and 68 deletions
+3 -11
View File
@@ -10,14 +10,11 @@ Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if CurrentAction ~= nil then
if CurrentAction then
ESX.ShowHelpNotification(CurrentActionMsg)
if IsControlJustReleased(0, Keys['E']) then
if IsControlJustReleased(0, 38) then
if CurrentAction == 'boat_shop' then
if not Config.LicenseEnable then
OpenBoatShop(Config.Zones.BoatShops[CurrentActionData.zoneNum])
else -- check for license
@@ -29,9 +26,7 @@ Citizen.CreateThread(function()
OpenLicenceMenu(Config.Zones.BoatShops[CurrentActionData.zoneNum])
end
end, GetPlayerServerId(PlayerId()), 'boat')
end
elseif CurrentAction == 'garage_out' then
OpenBoatGarage(Config.Zones.Garages[CurrentActionData.zoneNum])
elseif CurrentAction == 'garage_in' then
@@ -156,13 +151,11 @@ Citizen.CreateThread(function()
if letSleep then
Citizen.Wait(500)
end
end
end)
-- Blips
Citizen.CreateThread(function()
local blipList = {}
for i=1, #Config.Zones.Garages, 1 do
@@ -188,7 +181,6 @@ Citizen.CreateThread(function()
for i=1, #blipList, 1 do
CreateBlip(blipList[i].coords, blipList[i].text, blipList[i].sprite, blipList[i].color, blipList[i].scale)
end
end)
function CreateBlip(coords, text, sprite, color, scale)
@@ -203,4 +195,4 @@ function CreateBlip(coords, text, sprite, color, scale)
BeginTextCommandSetBlipName('STRING')
AddTextComponentSubstringPlayerName(text)
EndTextCommandSetBlipName(blip)
end
end