Discord - Website - Documentation - -This Simple resource lets you finally contribute to Society and make a difference in the Word! How? it adds an amazing Menu where you can pick what you want to be in life - want to be a police officier? No-problem! Or maybe you want to stalk people and be a creepy reporter? We got you covered! - -## Legal - -esx_joblisting - virtual Job Center! - -Copyright (C) 2015-2022 Jérémie N'gadi - -This program Is free software: you can redistribute it And/Or modify it under the terms Of the GNU General Public License As published by the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. - -This program Is distributed In the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty Of MERCHANTABILITY Or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License For more details. - -You should have received a copy Of the GNU General Public License along with this program. If Not, see http://www.gnu.org/licenses/. diff --git a/[esx_addons]/esx_joblisting/client/main.lua b/[esx_addons]/esx_joblisting/client/main.lua deleted file mode 100644 index 94e7a053..00000000 --- a/[esx_addons]/esx_joblisting/client/main.lua +++ /dev/null @@ -1,82 +0,0 @@ -local menuIsShowed = false - -function ShowJobListingMenu() - menuIsShowed = true - ESX.TriggerServerCallback('esx_joblisting:getJobsList', function(jobs) - local elements = {} - - for k,v in pairs(jobs) do - table.insert(elements, { - label = v.label, - job = k - }) - end - - ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'joblisting', { - title = _U('job_center'), - align = 'top-left', - elements = elements - }, function(data, menu) - TriggerServerEvent('esx_joblisting:setJob', data.current.job) - ESX.ShowNotification(_U('new_job')) - menuIsShowed = false - menu.close() - end, function(data, menu) - menuIsShowed = false - menu.close() - end) - - end) -end - --- Activate menu when player is inside marker, and draw markers -CreateThread(function() - while true do - local Sleep = 1500 - - local coords = GetEntityCoords(PlayerPedId()) - local isInMarker = false - - for i=1, #Config.Zones, 1 do - local distance = #(coords - Config.Zones[i]) - - if distance < Config.DrawDistance then - Sleep = 0 - DrawMarker(Config.MarkerType, Config.Zones[i], 0.0, 0.0, 0.0, 0, 0.0, 0.0, Config.ZoneSize.x, Config.ZoneSize.y, Config.ZoneSize.z, Config.MarkerColor.r, Config.MarkerColor.g, Config.MarkerColor.b, 100, false, true, 2, false, false, false, false) - end - - if distance < (Config.ZoneSize.x / 2) then - isInMarker = true - ESX.ShowHelpNotification(_U('access_job_center')) - if IsControlJustReleased(0, 38) and not menuIsShowed then - ESX.UI.Menu.CloseAll() - ShowJobListingMenu() - end - end - end - - if not isInMarker and menuIsShowed then - ESX.UI.Menu.CloseAll() - menuIsShowed = false - end - - Wait(Sleep) - end -end) - --- Create blips -CreateThread(function() - for i=1, #Config.Zones, 1 do - local blip = AddBlipForCoord(Config.Zones[i]) - - SetBlipSprite (blip, Config.Blip.Sprite) - SetBlipDisplay(blip, Config.Blip.Display) - SetBlipScale (blip, Config.Blip.Scale) - SetBlipColour (blip, Config.Blip.Colour) - SetBlipAsShortRange(blip, Config.Blip.ShortRange) - - BeginTextCommandSetBlipName("STRING") - AddTextComponentSubstringPlayerName(_U('job_center')) - EndTextCommandSetBlipName(blip) - end -end) diff --git a/[esx_addons]/esx_joblisting/config.lua b/[esx_addons]/esx_joblisting/config.lua deleted file mode 100644 index 6e41cba7..00000000 --- a/[esx_addons]/esx_joblisting/config.lua +++ /dev/null @@ -1,22 +0,0 @@ -Config = {} - -Config.DrawDistance = 10.0 -Config.ZoneSize = {x = 2.7, y = 2.7, z = 0.5} -Config.MarkerColor = {r = 100, g = 200, b = 104} -Config.MarkerType = 27 -Config.Debug = ESX.GetConfig().EnableDebug - - -Config.Locale = 'en' - -Config.Zones = { - vector3(-265.08, -964.1, 30.3) -} - -Config.Blip = { - Sprite = 407, - Display = 4, - Scale = 0.9, - Colour = 27, - ShortRange = true -} \ No newline at end of file diff --git a/[esx_addons]/esx_joblisting/esx_joblisting.sql b/[esx_addons]/esx_joblisting/esx_joblisting.sql deleted file mode 100644 index 21e24f6b..00000000 --- a/[esx_addons]/esx_joblisting/esx_joblisting.sql +++ /dev/null @@ -1,3 +0,0 @@ - - -ALTER TABLE jobs add whitelisted BOOLEAN NOT NULL DEFAULT FALSE; \ No newline at end of file diff --git a/[esx_addons]/esx_joblisting/fxmanifest.lua b/[esx_addons]/esx_joblisting/fxmanifest.lua deleted file mode 100644 index 57f547dc..00000000 --- a/[esx_addons]/esx_joblisting/fxmanifest.lua +++ /dev/null @@ -1,19 +0,0 @@ -fx_version 'bodacious' -game 'gta5' - -description 'ESX Job Listing' -lua54 'yes' -version '1.7.5' - -shared_scripts { - '@es_extended/imports.lua', - '@es_extended/locale.lua', - 'locales/*.lua', - 'config.lua' -} - -server_script 'server/main.lua' - -client_script 'client/main.lua' - -dependency 'es_extended' diff --git a/[esx_addons]/esx_joblisting/locales/br.lua b/[esx_addons]/esx_joblisting/locales/br.lua deleted file mode 100644 index 26f317fb..00000000 --- a/[esx_addons]/esx_joblisting/locales/br.lua +++ /dev/null @@ -1,5 +0,0 @@ -Locales['br'] = { - ['new_job'] = 'Você agora tem um novo emprego!', - ['access_job_center'] = 'Pressione ~INPUT_PICKUP~ para acessar a Lista de Empregos.', - ['job_center'] = 'Agência de Empregos', -} diff --git a/[esx_addons]/esx_joblisting/locales/cs.lua b/[esx_addons]/esx_joblisting/locales/cs.lua deleted file mode 100644 index 8c934176..00000000 --- a/[esx_addons]/esx_joblisting/locales/cs.lua +++ /dev/null @@ -1,5 +0,0 @@ -Locales['cs'] = { - ['new_job'] = 'mate novou praci!', - ['access_job_center'] = 'stiskni ~INPUT_PICKUP~ pro pristup na Urad prace.', - ['job_center'] = 'Urad prace', -} diff --git a/[esx_addons]/esx_joblisting/locales/de.lua b/[esx_addons]/esx_joblisting/locales/de.lua deleted file mode 100644 index 63098cdb..00000000 --- a/[esx_addons]/esx_joblisting/locales/de.lua +++ /dev/null @@ -1,5 +0,0 @@ -Locales['de'] = { - ['new_job'] = 'Du hast einen neuen Job!', - ['access_job_center'] = 'Drücke ~INPUT_PICKUP~ um das Arbeitsamt zu öffnen.', - ['job_center'] = 'Arbeitsamt', -} diff --git a/[esx_addons]/esx_joblisting/locales/en.lua b/[esx_addons]/esx_joblisting/locales/en.lua deleted file mode 100644 index 0ca5861a..00000000 --- a/[esx_addons]/esx_joblisting/locales/en.lua +++ /dev/null @@ -1,5 +0,0 @@ -Locales['en'] = { - ['new_job'] = 'you have a new job!', - ['access_job_center'] = 'press ~INPUT_PICKUP~ to access the job center.', - ['job_center'] = 'job Center', -} diff --git a/[esx_addons]/esx_joblisting/locales/es.lua b/[esx_addons]/esx_joblisting/locales/es.lua deleted file mode 100644 index 95afec8a..00000000 --- a/[esx_addons]/esx_joblisting/locales/es.lua +++ /dev/null @@ -1,5 +0,0 @@ -Locales['es'] = { - ['new_job'] = '¡Tienes un trabajo nuevo!', - ['access_job_center'] = 'Pulsa ~INPUT_PICKUP~ para entrar a la Oficina de Empleo.', - ['job_center'] = 'Oficina de Empleo', -} diff --git a/[esx_addons]/esx_joblisting/locales/fi.lua b/[esx_addons]/esx_joblisting/locales/fi.lua deleted file mode 100644 index 1e37abdd..00000000 --- a/[esx_addons]/esx_joblisting/locales/fi.lua +++ /dev/null @@ -1,5 +0,0 @@ -Locales['fi'] = { - ['new_job'] = 'Sinulla on nyt uusi työ !', - ['access_job_center'] = 'paina ~INPUT_PICKUP~ vaihtaaksesi työtä työkeskuksessa.', - ['job_center'] = 'työkeskus', -} diff --git a/[esx_addons]/esx_joblisting/locales/fr.lua b/[esx_addons]/esx_joblisting/locales/fr.lua deleted file mode 100644 index 7ac0a78b..00000000 --- a/[esx_addons]/esx_joblisting/locales/fr.lua +++ /dev/null @@ -1,5 +0,0 @@ -Locales['fr'] = { - ['new_job'] = 'vous avez un nouveau job !', - ['access_job_center'] = 'appuyez sur ~INPUT_PICKUP~ pour \naccéder au Pôle Emploi.', - ['job_center'] = 'pôle-Emploi', -} diff --git a/[esx_addons]/esx_joblisting/locales/hu.lua b/[esx_addons]/esx_joblisting/locales/hu.lua deleted file mode 100644 index 0c23eecd..00000000 --- a/[esx_addons]/esx_joblisting/locales/hu.lua +++ /dev/null @@ -1,5 +0,0 @@ -Locales['hu'] = { - ['new_job'] = 'Felvetted a munkát!', - ['access_job_center'] = 'Nyomj ~INPUT_PICKUP~ hogy megnézd a munkákat', - ['job_center'] = 'Munkaügyi központ', -} diff --git a/[esx_addons]/esx_joblisting/locales/pl.lua b/[esx_addons]/esx_joblisting/locales/pl.lua deleted file mode 100644 index 9f22e657..00000000 --- a/[esx_addons]/esx_joblisting/locales/pl.lua +++ /dev/null @@ -1,5 +0,0 @@ -Locales['pl'] = { - ['new_job'] = 'masz nową pracę!', - ['access_job_center'] = 'wciśnij ~INPUT_PICKUP~ aby otworzyć urząd pracy.', - ['job_center'] = 'urząd Pracy', -} diff --git a/[esx_addons]/esx_joblisting/locales/si.lua b/[esx_addons]/esx_joblisting/locales/si.lua deleted file mode 100644 index 76c5b6dd..00000000 --- a/[esx_addons]/esx_joblisting/locales/si.lua +++ /dev/null @@ -1,5 +0,0 @@ -Locales['si'] = { - ['new_job'] = 'imaš novo službo!', - ['access_job_center'] = 'pritisnite ~INPUT_PICKUP~ za dostop do job center.', - ['job_center'] = 'center za delovna mesta', -} diff --git a/[esx_addons]/esx_joblisting/locales/sv.lua b/[esx_addons]/esx_joblisting/locales/sv.lua deleted file mode 100644 index b718af6c..00000000 --- a/[esx_addons]/esx_joblisting/locales/sv.lua +++ /dev/null @@ -1,5 +0,0 @@ -Locales['sv'] = { - ['new_job'] = 'du har ett nytt jobb! Tips: kolla kartan för nya blips.', - ['access_job_center'] = 'tryck ~INPUT_PICKUP~ för att öppna arbetsförmedlingen', - ['job_center'] = 'arbetsförmedlingen', -} diff --git a/[esx_addons]/esx_joblisting/server/main.lua b/[esx_addons]/esx_joblisting/server/main.lua deleted file mode 100644 index 83c5e330..00000000 --- a/[esx_addons]/esx_joblisting/server/main.lua +++ /dev/null @@ -1,42 +0,0 @@ -function getJobs() - local jobs = ESX.GetJobs() - local availableJobs = {} - for k,v in pairs(jobs) do - if v.whitelisted == false then - availableJobs[k] = {label = v.label} - end - end - return availableJobs -end - -ESX.RegisterServerCallback('esx_joblisting:getJobsList', function(source, cb) - local jobs = getJobs() - cb(jobs) -end) - -function IsNearCentre(player) - local Ped = GetPlayerPed(player) - local PedCoords = GetEntityCoords(Ped) - local Zones = Config.Zones - - for i=1, #Config.Zones, 1 do - local distance = #(PedCoords - Config.Zones[i]) - - if distance < Config.DrawDistance then - return true - end - end -end - -RegisterServerEvent('esx_joblisting:setJob') -AddEventHandler('esx_joblisting:setJob', function(job) - local source = source - local xPlayer = ESX.GetPlayerFromId(source) - local jobs = getJobs() - - if xPlayer and IsNearCentre(source) then - if jobs[job] then - xPlayer.setJob(job, 0) - end - end -end)