From d2daf7909f3f346461e63c0825ac4b098b6b1365 Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Mon, 9 Apr 2018 12:13:54 +0200 Subject: [PATCH] Added manifest info, proper readme --- README.md | 12 +++++------- __resource.lua | 8 +++++++- client/esx_joblisting_cl.lua | 18 +++++++++--------- locales/sv.lua | 5 +++++ 4 files changed, 26 insertions(+), 17 deletions(-) create mode 100644 locales/sv.lua diff --git a/README.md b/README.md index 77128d47..916dcf00 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ -# fxserver-esx_joblisting -FR - Pôle Emploi +# esx_joblisting +Simple job listing script, you can specify what jobs you want to be whitelisted. -Update SQL database for job whitelist: - -ALTER TABLE jobs add whitelisted BOOLEAN NOT NULL DEFAULT FALSE; - -You can show (0) or hide (1) a job in the joblisting by changing the value in the DB of the field whitelisted +### Update +If you have an outdated version of ES Extended, you might need to run the following on your SQL server: +`ALTER TABLE jobs add whitelisted BOOLEAN NOT NULL DEFAULT FALSE;` diff --git a/__resource.lua b/__resource.lua index 6590296a..ad917bb0 100644 --- a/__resource.lua +++ b/__resource.lua @@ -1,4 +1,8 @@ -version '1.0.0' +resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' + +description 'ESX Job Listing' + +version '1.1.0' server_scripts { '@mysql-async/lib/MySQL.lua', @@ -9,6 +13,7 @@ server_scripts { 'locales/en.lua', 'locales/fr.lua', 'locales/es.lua', + 'locales/sv.lua', 'server/esx_joblisting_sv.lua' } @@ -20,5 +25,6 @@ client_scripts { 'locales/en.lua', 'locales/fr.lua', 'locales/es.lua', + 'locales/sv.lua', 'client/esx_joblisting_cl.lua' } diff --git a/client/esx_joblisting_cl.lua b/client/esx_joblisting_cl.lua index d4560005..c294fcd1 100644 --- a/client/esx_joblisting_cl.lua +++ b/client/esx_joblisting_cl.lua @@ -2,10 +2,10 @@ local Keys = { ["ESC"] = 322, ["BACKSPACE"] = 177, ["E"] = 38, ["ENTER"] = 18, ["LEFT"] = 174, ["RIGHT"] = 175, ["TOP"] = 27, ["DOWN"] = 173 } -local menuIsShowed = false -local hasAlreadyEnteredMarker = false -local lastZone = nil -local isInJoblistingMarker = false +local menuIsShowed = false +local hasAlreadyEnteredMarker = false +local lastZone = nil +local isInJoblistingMarker = false ESX = nil @@ -54,7 +54,7 @@ end) -- Display markers Citizen.CreateThread(function() while true do - Wait(0) + Citizen.Wait(10) local coords = GetEntityCoords(GetPlayerPed(-1)) for i=1, #Config.Zones, 1 do if(GetDistanceBetweenCoords(coords, Config.Zones[i].x, Config.Zones[i].y, Config.Zones[i].z, true) < Config.DrawDistance) then @@ -67,7 +67,7 @@ end) -- Activate menu when player is inside marker Citizen.CreateThread(function() while true do - Wait(0) + Citizen.Wait(10) local coords = GetEntityCoords(GetPlayerPed(-1)) isInJoblistingMarker = false local currentZone = nil @@ -75,8 +75,8 @@ Citizen.CreateThread(function() if(GetDistanceBetweenCoords(coords, Config.Zones[i].x, Config.Zones[i].y, Config.Zones[i].z, true) < Config.ZoneSize.x / 2) then isInJoblistingMarker = true SetTextComponentFormat('STRING') - AddTextComponentString(_U('access_job_center')) - DisplayHelpTextFromStringLabel(0, 0, 1, -1) + AddTextComponentString(_U('access_job_center')) + DisplayHelpTextFromStringLabel(0, 0, 1, -1) end end if isInJoblistingMarker and not hasAlreadyEnteredMarker then @@ -107,7 +107,7 @@ end) -- Menu Controls Citizen.CreateThread(function() while true do - Wait(0) + Citizen.Wait(10) if IsControlJustReleased(0, Keys['E']) and isInJoblistingMarker and not menuIsShowed then ShowJobListingMenu() end diff --git a/locales/sv.lua b/locales/sv.lua new file mode 100644 index 00000000..170a1b3c --- /dev/null +++ b/locales/sv.lua @@ -0,0 +1,5 @@ +Locales['sv'] = { + ['new_job'] = 'du har ett nytt jobb! ~y~Tips:~s~ kolla kartan för nya blips.', + ['access_job_center'] = 'tryck ~INPUT_PICKUP~ för att se ~b~arbetsförmedlingen~s~', + ['job_center'] = 'arbetsförmedlingen', +}