mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-01 10:48:52 +00:00
Added manifest info, proper readme
This commit is contained in:
@@ -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;`
|
||||
|
||||
+7
-1
@@ -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'
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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',
|
||||
}
|
||||
Reference in New Issue
Block a user