Merge branch 'main' into locale-convar

This commit is contained in:
Csoki
2022-09-17 15:06:21 +02:00
committed by GitHub
72 changed files with 345 additions and 382 deletions
+1 -1
View File
@@ -4,6 +4,6 @@ game 'gta5'
author 'ESX-Framework' author 'ESX-Framework'
description 'cron' description 'cron'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
server_script 'server/main.lua' server_script 'server/main.lua'
+27 -65
View File
@@ -84,15 +84,14 @@ function ESX.Progressbar(message, length, Options)
end end
function ESX.ShowNotification(message, type, length) function ESX.ShowNotification(message, type, length)
if Config.NativeNotify then if GetResourceState("esx_notify") ~= "missing" then
BeginTextCommandThefeedPost('STRING')
AddTextComponentSubstringPlayerName(message)
EndTextCommandThefeedPostTicker(0, 1)
else
exports["esx_notify"]:Notify(type, length, message) exports["esx_notify"]:Notify(type, length, message)
else
print("[ERROR] Missing esx_notify")
end
end end
end
function ESX.TextUI(message, type) function ESX.TextUI(message, type)
if GetResourceState("esx_textui") ~= "missing" then if GetResourceState("esx_textui") ~= "missing" then
exports["esx_textui"]:TextUI(message, type) exports["esx_textui"]:TextUI(message, type)
@@ -491,70 +490,33 @@ function ESX.Game.DeleteObject(object)
end end
function ESX.Game.SpawnVehicle(vehicle, coords, heading, cb, networked) function ESX.Game.SpawnVehicle(vehicle, coords, heading, cb, networked)
local model = (type(vehicle) == 'number' and vehicle or joaat(vehicle)) local model = type(vehicle) == 'number' and vehicle or joaat(vehicle)
local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z) local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
networked = networked == nil and true or networked networked = networked == nil and true or networked
if networked then CreateThread(function()
local isAutomobile = IsThisModelACar(model) ESX.Streaming.RequestModel(model)
if isAutomobile ~= false then isAutomobile = true end
ESX.TriggerServerCallback('esx:Onesync:SpawnVehicle',function(NetID)
if NetID then
local Tries = 0
SetNetworkIdCanMigrate(NetID, true)
local vehicle = NetworkGetEntityFromNetworkId(NetID)
while not DoesEntityExist(vehicle) do
Wait(0)
vehicle = NetworkGetEntityFromNetworkId(NetID)
Tries += 1
if Tries > 250 then
break
end
end
Tries = 0
NetworkRequestControlOfEntity(vehicle)
while not NetworkHasControlOfEntity(vehicle) do
Wait(0)
Tries += 1
if Tries > 250 then
break
end
end
SetEntityAsMissionEntity(vehicle, true, true)
SetVehicleHasBeenOwnedByPlayer(vehicle, true)
SetVehicleNeedsToBeHotwired(vehicle, false)
SetModelAsNoLongerNeeded(model)
SetVehRadioStation(vehicle, 'OFF')
if cb then
cb(vehicle)
end
end
end, model, vector, heading, isAutomobile)
else
CreateThread(function()
ESX.Streaming.RequestModel(model)
local vehicle = CreateVehicle(model, vector.xyz, heading, networked, false) local vehicle = CreateVehicle(model, vector.xyz, heading, networked, true)
if networked then if networked then
local id = NetworkGetNetworkIdFromEntity(vehicle) local id = NetworkGetNetworkIdFromEntity(vehicle)
SetNetworkIdCanMigrate(id, true) SetNetworkIdCanMigrate(id, true)
SetEntityAsMissionEntity(vehicle, true, false) SetEntityAsMissionEntity(vehicle, true, true)
end end
SetVehicleHasBeenOwnedByPlayer(vehicle, true) SetVehicleHasBeenOwnedByPlayer(vehicle, true)
SetVehicleNeedsToBeHotwired(vehicle, false) SetVehicleNeedsToBeHotwired(vehicle, false)
SetModelAsNoLongerNeeded(model) SetModelAsNoLongerNeeded(model)
SetVehRadioStation(vehicle, 'OFF') SetVehRadioStation(vehicle, 'OFF')
RequestCollisionAtCoord(vector.xyz) RequestCollisionAtCoord(vector.xyz)
while not HasCollisionLoadedAroundEntity(vehicle) do while not HasCollisionLoadedAroundEntity(vehicle) do
Wait(0) Wait(0)
end end
if cb then if cb then
cb(vehicle) cb(vehicle)
end end
end) end)
end
end end
function ESX.Game.SpawnLocalVehicle(vehicle, coords, heading, cb) function ESX.Game.SpawnLocalVehicle(vehicle, coords, heading, cb)
+12 -7
View File
@@ -193,18 +193,23 @@ AddEventHandler('esx:restoreLoadout', function()
end end
end) end)
AddStateBagChangeHandler('VehicleProperties', nil, function(bagName, key, value)
if value then
Wait(0)
local NetId = tonumber(bagName:gsub('entity:', ''), 10)
local Vehicle = NetworkGetEntityFromNetworkId(NetId)
if NetworkGetEntityOwner(Vehicle) == PlayerId() then
ESX.Game.SetVehicleProperties(Vehicle, value)
end
end
end)
RegisterNetEvent('esx:setAccountMoney') RegisterNetEvent('esx:setAccountMoney')
AddEventHandler('esx:setAccountMoney', function(account) AddEventHandler('esx:setAccountMoney', function(account)
for i=1, #(ESX.PlayerData.accounts) do for i=1, #(ESX.PlayerData.accounts) do
if ESX.PlayerData.accounts[i].name == account.name then if ESX.PlayerData.accounts[i].name == account.name then
ESX.PlayerData.accounts[i] = account ESX.PlayerData.accounts[i] = account
if ESX.PlayerData.accounts[i].name == "bank" then
PlayerBank = account.money
StatSetInt("BANK_BALANCE", PlayerBank, true)
elseif ESX.PlayerData.accounts[i].name == "money" then
PlayerMoney = account.money
StatSetInt("MP0_WALLET_BALANCE", PlayerMoney, true)
end
break break
end end
end end
+1 -3
View File
@@ -26,7 +26,6 @@ Config.EnableDebug = false -- Use Debug options?
Config.EnableDefaultInventory = true -- Display the default Inventory ( F2 ) Config.EnableDefaultInventory = true -- Display the default Inventory ( F2 )
Config.EnableWantedLevel = false -- Use Normal GTA wanted Level? Config.EnableWantedLevel = false -- Use Normal GTA wanted Level?
Config.EnablePVP = true -- Allow Player to player combat Config.EnablePVP = true -- Allow Player to player combat
Config.NativeNotify = false -- use old native notification?
Config.Multichar = true -- Enable support for esx_multicharacter Config.Multichar = true -- Enable support for esx_multicharacter
Config.Identity = true -- Select a characters identity data before they have loaded in (this happens by default with multichar) Config.Identity = true -- Select a characters identity data before they have loaded in (this happens by default with multichar)
@@ -61,6 +60,7 @@ Config.RemoveHudCommonents = {
[22] = false, --HUD_WEAPONS [22] = false, --HUD_WEAPONS
} }
Config.MaxAdminVehicles = true -- admin vehicles spawn with max vehcle settings
Config.CustomAIPlates = 'ESX.A111' -- Custom plates for AI vehicles Config.CustomAIPlates = 'ESX.A111' -- Custom plates for AI vehicles
-- Pattern string format -- Pattern string format
--1 will lead to a random number from 0-9. --1 will lead to a random number from 0-9.
@@ -70,5 +70,3 @@ Config.CustomAIPlates = 'ESX.A111' -- Custom plates for AI vehicles
--^A will lead to a literal A being emitted. --^A will lead to a literal A being emitted.
--Any other character will lead to said character being emitted. --Any other character will lead to said character being emitted.
-- A string shorter than 8 characters will be padded on the right. -- A string shorter than 8 characters will be padded on the right.
Config.MaxAdminVehicles = true -- admin vehicles spawn with max vehcle settings
+1 -1
View File
@@ -5,7 +5,7 @@ game 'gta5'
description 'ES Extended' description 'ES Extended'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
shared_scripts { shared_scripts {
'locale.lua', 'locale.lua',
+4
View File
@@ -253,6 +253,10 @@ function ESX.GetPlayerFromIdentifier(identifier)
end end
function ESX.GetIdentifier(playerId) function ESX.GetIdentifier(playerId)
local fxDk = GetConvarInt('sv_fxdkMode', 0)
if fxDk == 1 then
return "ESX-DEBUG-LICENCE"
end
for k, v in ipairs(GetPlayerIdentifiers(playerId)) do for k, v in ipairs(GetPlayerIdentifiers(playerId)) do
if string.match(v, 'license:') then if string.match(v, 'license:') then
local identifier = string.gsub(v, 'license:', '') local identifier = string.gsub(v, 'license:', '')
+11 -17
View File
@@ -59,18 +59,22 @@ end
---@param model number|string ---@param model number|string
---@param coords vector3|table ---@param coords vector3|table
---@param heading number ---@param heading number
---@param autoMobile boolean
---@param Properties table
---@param cb function ---@param cb function
function ESX.OneSync.SpawnVehicle(model, coords, heading, autoMobile, cb) function ESX.OneSync.SpawnVehicle(model, coords, heading, autoMobile, Properties, cb)
if type(model) == 'string' then model = joaat(model) end model = type(model) == 'string' and joaat(model) or model
local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z) Properties = Properties or {}
if type(autoMobile) ~= 'boolean' then local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
return if type(autoMobile) ~= 'boolean' then
end return
CreateThread(function() end
CreateThread(function()
local Entity = autoMobile and Citizen.InvokeNative(`CREATE_AUTOMOBILE`, model, coords.x, coords.y, coords.z, heading) or CreateVehicle(model, coords, heading, true, true) local Entity = autoMobile and Citizen.InvokeNative(`CREATE_AUTOMOBILE`, model, coords.x, coords.y, coords.z, heading) or CreateVehicle(model, coords, heading, true, true)
while not DoesEntityExist(Entity) do while not DoesEntityExist(Entity) do
Wait(0) Wait(0)
end end
Entity(Entity).state:set('VehicleProperties', Properties, true)
local netID = NetworkGetNetworkIdFromEntity(Entity) local netID = NetworkGetNetworkIdFromEntity(Entity)
cb(netID) cb(netID)
end) end)
@@ -197,16 +201,6 @@ function ESX.OneSync.GetClosestVehicle(coords, modelFilter)
return getClosestEntity(GetAllVehicles(), coords, modelFilter) return getClosestEntity(GetAllVehicles(), coords, modelFilter)
end end
ESX.RegisterServerCallback("esx:Onesync:SpawnVehicle", function(source, cb, model, coords, heading, autoMobile)
ESX.OneSync.SpawnVehicle(model, coords, heading, autoMobile, cb)
end)
ESX.RegisterServerCallback("esx:Onesync:SpawnObject", function(source, cb, model, coords, heading) ESX.RegisterServerCallback("esx:Onesync:SpawnObject", function(source, cb, model, coords, heading)
ESX.OneSync.SpawnObject(model, coords, heading, cb) ESX.OneSync.SpawnObject(model, coords, heading, cb)
end) end)
-- for k,v in pairs(ESX.OneSync) do
-- ESX.RegisterServerCallback("esx:Onesync:"..k, function(source, cb, ...)
-- cb(v(...))
-- end)
-- end
+1 -1
View File
@@ -1,5 +1,5 @@
{ {
"version": "legacy", "version": "legacy",
"commit" : "1.7.5", "commit" : "1.8.5",
"changelog": "\n- Add PlayerOveride System, ESX Notify, ESX Progressbar and ESX TextUI" "changelog": "\n- Add PlayerOveride System, ESX Notify, ESX Progressbar and ESX TextUI"
} }
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
author 'ESX-Framework & Brayden' author 'ESX-Framework & Brayden'
description 'Offical ESX Legacy Context Menu' description 'Offical ESX Legacy Context Menu'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
ui_page 'index.html' ui_page 'index.html'
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Identity' description 'ESX Identity'
lua54 'yes' lua54 'yes'
version '1.7.6' version '1.8.5'
shared_script '@es_extended/imports.lua' shared_script '@es_extended/imports.lua'
+1 -1
View File
@@ -1,5 +1,5 @@
game 'common' game 'common'
version '1.7.5' version '1.8.5'
fx_version 'cerulean' fx_version 'cerulean'
author 'ESX-Framework' author 'ESX-Framework'
lua54 'yes' lua54 'yes'
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Menu Default' description 'ESX Menu Default'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
client_scripts {'@es_extended/imports.lua', 'client/main.lua'} client_scripts {'@es_extended/imports.lua', 'client/main.lua'}
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Menu Dialog' description 'ESX Menu Dialog'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
client_scripts { client_scripts {
'@es_extended/imports.lua', '@es_extended/imports.lua',
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Menu List' description 'ESX Menu List'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
client_scripts { client_scripts {
'@es_extended/imports.lua', '@es_extended/imports.lua',
+79 -97
View File
@@ -8,7 +8,7 @@ if ESX.GetConfig().Multichar then
if NetworkIsPlayerActive(PlayerId()) then if NetworkIsPlayerActive(PlayerId()) then
exports.spawnmanager:setAutoSpawn(false) exports.spawnmanager:setAutoSpawn(false)
DoScreenFadeOut(0) DoScreenFadeOut(0)
while not GetResourceState('esx_menu_default') == 'started' do while not GetResourceState('esx_context') == 'started' do
Wait(0) Wait(0)
end end
TriggerEvent("esx_multicharacter:SetupCharacters") TriggerEvent("esx_multicharacter:SetupCharacters")
@@ -114,7 +114,7 @@ if ESX.GetConfig().Multichar then
end end
TriggerEvent('skinchanger:loadSkin', skin) TriggerEvent('skinchanger:loadSkin', skin)
end end
DoScreenFadeIn(400) DoScreenFadeIn(600)
end) end)
repeat Wait(200) until not IsScreenFadedOut() repeat Wait(200) until not IsScreenFadedOut()
@@ -141,16 +141,88 @@ if ESX.GetConfig().Multichar then
}) })
end end
function CharacterOptions(Characters, slots, SelectedCharacter)
local elements = {{title = "Character: ".. Characters[SelectedCharacter.value].firstname .. " ".. Characters[SelectedCharacter.value].lastname,icon = "fa-regular fa-user", unselectable = true},
{title = "Return", unselectable = false,icon = "fa-solid fa-arrow-left",description ="Return To Character Selection.", action = "return"}}
if not Characters[SelectedCharacter.value].disabled then
elements[3] = {title = _('char_play'), description ="Continue Into The City.", icon ="fa-solid fa-play",action = 'play', value = SelectedCharacter.value}
else
elements[3] = {title = _('char_disabled'), value = SelectedCharacter.value, icon ="fa-solid fa-xmark", description ="This Character Is Unusable.",}
end
if Config.CanDelete then elements[4] = {title = _('char_delete'),icon ="fa-solid fa-xmark",description ="Permanently Remove This Character.", action = 'delete', value = SelectedCharacter.value} end
ESX.OpenContext("left", elements, function(element, Action)
if Action.action == "play" then
SendNUIMessage({
action = "closeui"
})
ESX.CloseContext()
TriggerServerEvent('esx_multicharacter:CharacterChosen', Action.value, false)
elseif Action.action == "delete" then
ESX.CloseContext()
TriggerServerEvent('esx_multicharacter:DeleteCharacter', Action.value)
spawned = false
elseif Action.action == "return" then
SelectCharacterMenu(Characters, slots)
end
end, nil, true)
end
function SelectCharacterMenu(Characters, slots)
local Character = next(Characters)
local elements = {{title = "Select A Character." , icon = "fa-solid fa-users", description = "Select a character to play as." , unselectable = true}}
for k,v in pairs(Characters) do
if not v.model and v.skin then
if v.skin.model then v.model = v.skin.model elseif v.skin.sex == 1 then v.model = mp_f_freemode_01 else v.model = mp_m_freemode_01 end
end
if spawned == false then SetupCharacter(Character) end
local label = v.firstname..' '..v.lastname
if Characters[k].disabled then
elements[#elements+1] = {title = label,icon = "fa-regular fa-user", value = v.id}
else
elements[#elements+1] = {title = label,icon = "fa-regular fa-user", value = v.id}
end
end
if #elements < slots then
elements[#elements+1] = {title = _('create_char'), icon = "fa-solid fa-plus", value = (#elements+1), new = true}
end
ESX.OpenContext("left", elements, function(menu, SelectedCharacter)
if SelectedCharacter.new then
ESX.CloseContext()
local GetSlot = function()
for i = 1, slots do
if not Characters[i] then
return i
end
end
end
local slot = GetSlot()
TriggerServerEvent('esx_multicharacter:CharacterChosen', slot, true)
TriggerEvent('esx_identity:showRegisterIdentity')
local playerPed = PlayerPedId()
SetPedAoBlobRendering(playerPed, false)
SetEntityAlpha(playerPed, 0)
SendNUIMessage({
action = "closeui"
})
else
CharacterOptions(Characters,slots, SelectedCharacter)
SetupCharacter(SelectedCharacter.value)
local playerPed = PlayerPedId()
SetPedAoBlobRendering(playerPed, true)
ResetEntityAlpha(playerPed)
end
end, nil, true)
end
RegisterNetEvent('esx_multicharacter:SetupUI') RegisterNetEvent('esx_multicharacter:SetupUI')
AddEventHandler('esx_multicharacter:SetupUI', function(data, slots) AddEventHandler('esx_multicharacter:SetupUI', function(data, slots)
DoScreenFadeOut(0) DoScreenFadeOut(0)
Characters = data Characters = data
slots = slots slots = slots
local elements = {}
local Character = next(Characters) local Character = next(Characters)
exports.spawnmanager:forceRespawn() exports.spawnmanager:forceRespawn()
if Character == nil then if not Character then
SendNUIMessage({ SendNUIMessage({
action = "closeui" action = "closeui"
}) })
@@ -172,98 +244,7 @@ if ESX.GetConfig().Multichar then
TriggerEvent('esx_identity:showRegisterIdentity') TriggerEvent('esx_identity:showRegisterIdentity')
end) end)
else else
for k,v in pairs(Characters) do SelectCharacterMenu(Characters, slots)
if not v.model and v.skin then
if v.skin.model then v.model = v.skin.model elseif v.skin.sex == 1 then v.model = mp_f_freemode_01 else v.model = mp_m_freemode_01 end
end
if spawned == false then SetupCharacter(Character) end
local label = v.firstname..' '..v.lastname
if Characters[k].disabled then
elements[#elements+1] = {label = label, value = v.id}
else
elements[#elements+1] = {label = label, value = v.id}
end
end
if #elements < slots then
elements[#elements+1] = {label = _('create_char'), value = (#elements+1), new = true}
end
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'selectchar', {
title = _('select_char'),
align = 'top-left',
elements = elements
}, function(data, menu)
local elements = {}
if not data.current.new then
if not Characters[data.current.value].disabled then
elements[1] = {label = _('char_play'), action = 'play', value = data.current.value}
else
elements[1] = {label = _('char_disabled'), value = data.current.value}
end
if Config.CanDelete then elements[2] = {label = _('char_delete'), action = 'delete', value = data.current.value} end
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'choosechar', {
title = _('select_char'),
align = 'top-left',
elements = elements
}, function(data, menu)
if data.current.action == 'play' then
ESX.UI.Menu.CloseAll()
SendNUIMessage({
action = "closeui"
})
TriggerServerEvent('esx_multicharacter:CharacterChosen', data.current.value, false)
elseif data.current.action == 'delete' then
local elements2 = {}
elements2[1] = {label = _('cancel')}
elements2[2] = {label = _('confirm'), value = data.current.value}
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'deletechar', {
title = _('delete_label', Characters[data.current.value].firstname, Characters[data.current.value].lastname),
align = 'center',
elements = elements2
}, function(data, menu)
if data.current.value then
TriggerServerEvent('esx_multicharacter:DeleteCharacter', data.current.value)
spawned = false
ESX.UI.Menu.CloseAll()
else
menu.close()
end
end, function(data, menu)
menu.close()
end)
end
end, function(data, menu)
menu.close()
end)
else
ESX.UI.Menu.CloseAll()
local GetSlot = function()
for i = 1, slots do
if not Characters[i] then
return i
end
end
end
local slot = GetSlot()
TriggerServerEvent('esx_multicharacter:CharacterChosen', slot, true)
TriggerEvent('esx_identity:showRegisterIdentity')
end
end, function(data, menu)
menu.refresh()
end, function(data, menu)
if data.current.new then
local playerPed = PlayerPedId()
SetPedAoBlobRendering(playerPed, false)
SetEntityAlpha(playerPed, 0)
SendNUIMessage({
action = "closeui"
})
else
SetupCharacter(data.current.value)
local playerPed = PlayerPedId()
SetPedAoBlobRendering(playerPed, true)
ResetEntityAlpha(playerPed)
end
end)
end end
end) end)
@@ -314,7 +295,8 @@ if ESX.GetConfig().Multichar then
RegisterNetEvent('esx:onPlayerLogout') RegisterNetEvent('esx:onPlayerLogout')
AddEventHandler('esx:onPlayerLogout', function() AddEventHandler('esx:onPlayerLogout', function()
DoScreenFadeOut(0) DoScreenFadeOut(500)
Wait(1000)
spawned = false spawned = false
TriggerEvent("esx_multicharacter:SetupCharacters") TriggerEvent("esx_multicharacter:SetupCharacters")
TriggerEvent('esx_skin:resetFirstSpawn') TriggerEvent('esx_skin:resetFirstSpawn')
+1 -1
View File
@@ -16,7 +16,7 @@ if IsDuplicityVersion() then
else else
-- Sets the location for the character selection scene -- Sets the location for the character selection scene
-- To set the spawn location for new characters, modify the default value in the users SQL table -- To set the spawn location for new characters, modify the default value in the users SQL table
Config.Spawn = vector4(-113.7, 565.3, 195.2, 0) Config.Spawn = vector4(-284.2856, 562.4627, 172.9182, 19.9895)
-------------------- --------------------
-- Do not use unless you are prepared to adjust your resources to correctly reset data -- Do not use unless you are prepared to adjust your resources to correctly reset data
+1 -1
View File
@@ -2,7 +2,7 @@ fx_version 'cerulean'
game 'gta5' game 'gta5'
author 'ESX-Framework - Linden - KASH' author 'ESX-Framework - Linden - KASH'
description 'Official Multicharacter System For ESX Legacy' description 'Official Multicharacter System For ESX Legacy'
version '1.7.5' version '1.8.5'
lua54 'yes' lua54 'yes'
dependencies {'es_extended', 'esx_menu_default', 'esx_identity', 'esx_skin'} dependencies {'es_extended', 'esx_menu_default', 'esx_identity', 'esx_skin'}
+23 -17
View File
@@ -1,9 +1,11 @@
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;600&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Oswald&display=swap');
* { * {
margin: 0; margin: 0;
padding: 0; padding: 0;
user-select: none; user-select: none;
color: rgb(255, 255, 255); color: rgb(255, 255, 255);
border-radius: 15px;
font-weight: 300; font-weight: 300;
font-size: 1.6vh; font-size: 1.6vh;
font-family: Calibri, "Helvetica", san-serif; font-family: Calibri, "Helvetica", san-serif;
@@ -25,25 +27,30 @@ body {
display:none; display:none;
position: absolute; position: absolute;
top: 50%; top: 50%;
right: 25; right: 150;
transform: translate(0, -50%); transform: translate(0, -50%);
background: rgba(0,0,0,0.7); border-radius: 15px;
background: rgba(15,15,15, 0.9);
} }
.header { .header {
font-family: 'Oswald', sans-serif;
position: absolute; position: absolute;
top: 5%; background: rgba(10, 10, 10, 0.9);
border-radius: 15px 15px 0px 0px;
height: 10%;
width: 100%;
left: 50%; left: 50%;
text-align: center;
transform: translate(-50%); transform: translate(-50%);
font-size: 1.1rem; font-weight: 700;
padding-bottom: 5px;
font-size: 1.6rem;
} }
.footer { .footer {
position: absolute; position: absolute;
bottom: 5%; font-size: 0rem;
left: 50%;
transform: translate(-50%);
font-size: 1.1rem;
} }
.character-box { .character-box {
@@ -54,17 +61,16 @@ body {
align-items: center; align-items: center;
text-align: center; text-align: center;
line-height: 1.4rem; line-height: 1.4rem;
height: calc(100vh - 6rem); height: calc(30rem);
width: 20rem; width: 17rem;
padding: 1rem; border: 1px rgba(10,10,10,0.7) solid;
border: 1px rgba(12,12,12,200) solid; box-shadow: 2px 1px 9px 3px rgba(10,10,10,0.7);
box-shadow: 0px 0px 4px 1px rgba(12,12,12,20);
} }
h1 { h1 {
font-family: 'Raleway', sans-serif; font-family: 'Oswald', sans-serif;
padding-top: 2rem; font-size: 22px;
padding-top: 1.3rem;
display: block; display: block;
font-size: 1.3rem; font-weight: 0;
font-weight: 600;
} }
+1 -1
View File
@@ -9,7 +9,7 @@
</head> </head>
<body style="display: none;"> <body style="display: none;">
<div class="main-container"> <div class="main-container">
<div class='header'>ESX Legacy</div> <div class='header'>Character Info</div>
<div class="character-box" data-charid="1"> <div class="character-box" data-charid="1">
<h3 class="character-fullname"></h3> <h3 class="character-fullname"></h3>
<div class="character-info"></div> <div class="character-info"></div>
+4 -4
View File
@@ -3,10 +3,10 @@ Locales["en"] = {
["female"] = "Female", ["female"] = "Female",
["delete_label"] = "Delete %s %s?", ["delete_label"] = "Delete %s %s?",
["select_char"] = "Select Character", ["select_char"] = "Select Character",
["create_char"] = "Create new character", ["create_char"] = "New Character",
["char_play"] = "Play this character", ["char_play"] = "Play",
["char_disabled"] = "This character is disabled", ["char_disabled"] = "Disabled",
["char_delete"] = "Delete this character", ["char_delete"] = "Delete",
["cancel"] = "Cancel", ["cancel"] = "Cancel",
["confirm"] = "Confirm", ["confirm"] = "Confirm",
["command_setslots"] = "Set multicharacter slots number of a player", ["command_setslots"] = "Set multicharacter slots number of a player",
+1
View File
@@ -213,6 +213,7 @@ elseif ESX.GetConfig().Multichar == true then
end) end)
RegisterNetEvent('esx_multicharacter:relog', function() RegisterNetEvent('esx_multicharacter:relog', function()
local source = source
TriggerEvent('esx:playerLogout', source) TriggerEvent('esx:playerLogout', source)
end) end)
+1 -1
View File
@@ -1,7 +1,7 @@
fx_version 'adamant' fx_version 'adamant'
lua54 'yes' lua54 'yes'
game 'gta5' game 'gta5'
version '1.8.5'
author 'ESX-Framework' author 'ESX-Framework'
description 'Official NUI Notification system for ESX' description 'Official NUI Notification system for ESX'
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Skin' description 'ESX Skin'
version '1.7.5' version '1.8.5'
lua54 'yes' lua54 'yes'
shared_script '@es_extended/imports.lua' shared_script '@es_extended/imports.lua'
+1
View File
@@ -1,6 +1,7 @@
fx_version 'adamant' fx_version 'adamant'
game 'gta5' game 'gta5'
author 'ESX-Framework' author 'ESX-Framework'
version '1.8.5'
description 'ESX TextUI' description 'ESX TextUI'
lua54 'yes' lua54 'yes'
client_scripts { 'TextUI.lua' } client_scripts { 'TextUI.lua' }
+1 -1
View File
@@ -6,7 +6,7 @@ lua54 'yes'
description 'Official ESX-Legacy resource for handling the Player`s Skin' description 'Official ESX-Legacy resource for handling the Player`s Skin'
version '1.7.5' version '1.8.5'
client_scripts { client_scripts {
'@es_extended/locale.lua', '@es_extended/locale.lua',
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Accessories' description 'ESX Accessories'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
shared_scripts { shared_scripts {
'@es_extended/imports.lua', '@es_extended/imports.lua',
+1 -1
View File
@@ -5,7 +5,7 @@ game 'gta5'
author 'ESX-Framework' author 'ESX-Framework'
description 'ESX Addon Account' description 'ESX Addon Account'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
server_scripts { server_scripts {
'@es_extended/imports.lua', '@es_extended/imports.lua',
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Addon Inventory' description 'ESX Addon Inventory'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
server_scripts { server_scripts {
'@es_extended/imports.lua', '@es_extended/imports.lua',
+1 -1
View File
@@ -5,7 +5,7 @@ game 'gta5'
author 'ESX-Framework' author 'ESX-Framework'
description 'Offical AllowList script for ESX' description 'Offical AllowList script for ESX'
version '1.7.5' version '1.8.5'
lua54 'yes' lua54 'yes'
server_only 'yes' server_only 'yes'
+1 -1
View File
@@ -5,7 +5,7 @@ game 'gta5'
description 'ESX Ambulance Job' description 'ESX Ambulance Job'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
shared_scripts { shared_scripts {
'@es_extended/imports.lua', '@es_extended/imports.lua',
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Animations' description 'ESX Animations'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
client_scripts { client_scripts {
'@es_extended/imports.lua', '@es_extended/imports.lua',
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Banker job' description 'ESX Banker job'
version '1.7.5' version '1.8.5'
lua54 'yes' lua54 'yes'
shared_script '@es_extended/imports.lua' shared_script '@es_extended/imports.lua'
+7
View File
@@ -3,6 +3,13 @@
A beautiful and Easy-To-Use Banking & ATM system for ESX, with optional OX Target Support A beautiful and Easy-To-Use Banking & ATM system for ESX, with optional OX Target Support
## BANK UI
![esx_banking_pic1](https://user-images.githubusercontent.com/22717950/189738189-375101ac-c86b-4ce8-8df3-19d740c3809c.png)
## ATM UI
![esx_banking_pic2](https://user-images.githubusercontent.com/22717950/189738199-a325092b-5f1d-4c7f-8950-d660d053ed0f.png)
![esx_banking_pic3](https://user-images.githubusercontent.com/22717950/189738210-7af2c7d5-7fa1-4f70-8460-743ee9258f88.png)
## Special thanks: Gellipapa#9186,Rav3n95#2849,Csoki, csontvazharcos, Füsti, Pécé ## Special thanks: Gellipapa#9186,Rav3n95#2849,Csoki, csontvazharcos, Füsti, Pécé
## Download & Installation ## Download & Installation
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX banking' description 'ESX banking'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
shared_scripts { shared_scripts {
'@es_extended/imports.lua', '@es_extended/imports.lua',
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Barber Shop' description 'ESX Barber Shop'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
shared_script '@es_extended/imports.lua' shared_script '@es_extended/imports.lua'
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Basic Needs' description 'ESX Basic Needs'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
shared_script '@es_extended/imports.lua' shared_script '@es_extended/imports.lua'
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Billing' description 'ESX Billing'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
shared_script '@es_extended/imports.lua' shared_script '@es_extended/imports.lua'
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Boat' description 'ESX Boat'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
shared_script '@es_extended/imports.lua' shared_script '@es_extended/imports.lua'
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Clothes Shop' description 'ESX Clothes Shop'
version '1.7.5' version '1.8.5'
lua54 'yes' lua54 'yes'
shared_script '@es_extended/imports.lua' shared_script '@es_extended/imports.lua'
@@ -4,7 +4,7 @@ game 'gta5'
description 'CruiseControl System for ESX' description 'CruiseControl System for ESX'
version '1.7.5' version '1.8.5'
lua54 'yes' lua54 'yes'
dependencies { dependencies {
'es_extended' 'es_extended'
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Data Store' description 'ESX Data Store'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
server_scripts { server_scripts {
'@es_extended/imports.lua', '@es_extended/imports.lua',
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX DMV School' description 'ESX DMV School'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
shared_script '@es_extended/imports.lua' shared_script '@es_extended/imports.lua'
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
lua54 'yes' lua54 'yes'
description 'ESX Drugs' description 'ESX Drugs'
version '1.7.5' version '1.8.5'
shared_script '@es_extended/imports.lua' shared_script '@es_extended/imports.lua'
+1 -1
View File
@@ -3,7 +3,7 @@ game 'gta5'
author 'ESX-Framework' author 'ESX-Framework'
description 'Official ESX Garage System for ESX Legacy' description 'Official ESX Garage System for ESX Legacy'
version '1.0.0' version '1.8.5'
lua54 'yes' lua54 'yes'
shared_script '@es_extended/imports.lua' shared_script '@es_extended/imports.lua'
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Holdup' description 'ESX Holdup'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
shared_script '@es_extended/imports.lua' shared_script '@es_extended/imports.lua'
+1 -1
View File
@@ -6,7 +6,7 @@ This Simple resource lets you finally contribute to Society and make a differenc
esx_joblisting - virtual Job Center! esx_joblisting - virtual Job Center!
Copyright (C) 2015-2022 Jérémie N'gadi Copyright (C) 2015-2022 Jérémie N'gadi, ESX-Framework
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 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.
+62 -63
View File
@@ -1,82 +1,81 @@
local menuIsShowed = false local menuIsShowed, TextUIdrawing = false, false
function ShowJobListingMenu() function ShowJobListingMenu()
menuIsShowed = true menuIsShowed = true
ESX.TriggerServerCallback('esx_joblisting:getJobsList', function(jobs) ESX.TriggerServerCallback('esx_joblisting:getJobsList', function(jobs)
local elements = {} local elements = {{unselectable = "true", title = _U('job_center'), icon = "fas fa-briefcase"}}
for k,v in pairs(jobs) do for i = 1, #(jobs) do
table.insert(elements, { elements[#elements + 1] = {title = jobs[i].label, name = jobs[i].name}
label = v.label, end
job = k
})
end
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'joblisting', { ESX.OpenContext("right", elements, function(menu, SelectJob)
title = _U('job_center'), TriggerServerEvent('esx_joblisting:setJob', SelectJob.name)
align = 'top-left', ESX.CloseContext()
elements = elements ESX.ShowNotification(_U('new_job', SelectJob.title), "success")
}, function(data, menu) menuIsShowed = false
TriggerServerEvent('esx_joblisting:setJob', data.current.job) TextUIdrawing = false
ESX.ShowNotification(_U('new_job')) end, function()
menuIsShowed = false menuIsShowed = false
menu.close() TextUIdrawing = false
end, function(data, menu) end)
menuIsShowed = false end)
menu.close()
end)
end)
end end
-- Activate menu when player is inside marker, and draw markers -- Activate menu when player is inside marker, and draw markers
CreateThread(function() CreateThread(function()
while true do while true do
local Sleep = 1500 local Sleep = 1500
local coords = GetEntityCoords(PlayerPedId()) local coords = GetEntityCoords(ESX.PlayerData.ped)
local isInMarker = false local isInMarker = false
for i=1, #Config.Zones, 1 do for i = 1, #Config.Zones, 1 do
local distance = #(coords - Config.Zones[i]) local distance = #(coords - Config.Zones[i])
if distance < Config.DrawDistance then if distance < Config.DrawDistance then
Sleep = 0 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) 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,
end 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 if distance < (Config.ZoneSize.x / 2) then
isInMarker = true isInMarker = true
ESX.ShowHelpNotification(_U('access_job_center')) if not TextUIdrawing then
if IsControlJustReleased(0, 38) and not menuIsShowed then ESX.TextUI(_U("access_job_center"))
ESX.UI.Menu.CloseAll() TextUIdrawing = true
ShowJobListingMenu() end
end if IsControlJustReleased(0, 38) and not menuIsShowed then
end ShowJobListingMenu()
end ESX.HideUI()
end
end
end
if not isInMarker and menuIsShowed then if not isInMarker and TextUIdrawing then
ESX.UI.Menu.CloseAll() ESX.HideUI()
menuIsShowed = false TextUIdrawing = false
end end
Wait(Sleep) Wait(Sleep)
end end
end) end)
-- Create blips -- Create blips
CreateThread(function() if Config.Blip.Enabled then
for i=1, #Config.Zones, 1 do CreateThread(function()
local blip = AddBlipForCoord(Config.Zones[i]) for i = 1, #Config.Zones, 1 do
local blip = AddBlipForCoord(Config.Zones[i])
SetBlipSprite (blip, Config.Blip.Sprite) SetBlipSprite(blip, Config.Blip.Sprite)
SetBlipDisplay(blip, Config.Blip.Display) SetBlipDisplay(blip, Config.Blip.Display)
SetBlipScale (blip, Config.Blip.Scale) SetBlipScale(blip, Config.Blip.Scale)
SetBlipColour (blip, Config.Blip.Colour) SetBlipColour(blip, Config.Blip.Colour)
SetBlipAsShortRange(blip, Config.Blip.ShortRange) SetBlipAsShortRange(blip, Config.Blip.ShortRange)
BeginTextCommandSetBlipName("STRING") BeginTextCommandSetBlipName("STRING")
AddTextComponentSubstringPlayerName(_U('job_center')) AddTextComponentSubstringPlayerName(_U('blip_text'))
EndTextCommandSetBlipName(blip) EndTextCommandSetBlipName(blip)
end end
end) end)
end
+13 -13
View File
@@ -1,22 +1,22 @@
Config = {} Config = {}
Config.DrawDistance = 10.0 Config.DrawDistance = 15.0
Config.ZoneSize = {x = 2.7, y = 2.7, z = 0.5} Config.ZoneSize = {x = 2.7, y = 2.7, z = 0.5}
Config.MarkerColor = {r = 100, g = 200, b = 104} Config.MarkerColor = {r = 100, g = 200, b = 104}
Config.MarkerType = 27 Config.MarkerType = 27
Config.Debug = ESX.GetConfig().EnableDebug Config.Debug = ESX.GetConfig().EnableDebug
Config.Locale = GetConvar('esx:locale', 'en') Config.Locale = GetConvar('esx:locale', 'en')
Config.Zones = { Config.Zones = {
vector3(-265.08, -964.1, 30.3) vector3(-265.08, -964.1, 30.3)
} }
Config.Blip = { Config.Blip = {
Sprite = 407, Enabled = true,
Display = 4, Sprite = 407,
Scale = 0.9, Display = 4,
Colour = 27, Scale = 0.8,
ShortRange = true Colour = 27,
} ShortRange = true
}
@@ -1,3 +1 @@
ALTER TABLE jobs add whitelisted BOOLEAN NOT NULL DEFAULT FALSE; ALTER TABLE jobs add whitelisted BOOLEAN NOT NULL DEFAULT FALSE;
+1 -1
View File
@@ -3,7 +3,7 @@ game 'gta5'
description 'ESX Job Listing' description 'ESX Job Listing'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
shared_scripts { shared_scripts {
'@es_extended/imports.lua', '@es_extended/imports.lua',
+4 -3
View File
@@ -1,5 +1,6 @@
Locales['en'] = { Locales['en'] = {
['new_job'] = 'you have a new job!', ['new_job'] = 'New Job: ~b~%s~s~ !',
['access_job_center'] = 'press ~INPUT_PICKUP~ to access the job center.', ['access_job_center'] = 'Press ~b~[E]~s~ To Open Job Selector.',
['job_center'] = 'job Center', ['job_center'] = 'Select A Job.',
["blip_text"] = "Job Centre"
} }
+32 -27
View File
@@ -1,42 +1,47 @@
function getJobs() function getJobs()
local jobs = ESX.GetJobs() local jobs = ESX.GetJobs()
local availableJobs = {} local availableJobs = {}
for k,v in pairs(jobs) do for k, v in pairs(jobs) do
if v.whitelisted == false then if v.whitelisted == false then
availableJobs[k] = {label = v.label} availableJobs[#availableJobs + 1] = {label = v.label, name = k}
end end
end end
return availableJobs return availableJobs
end end
ESX.RegisterServerCallback('esx_joblisting:getJobsList', function(source, cb) ESX.RegisterServerCallback('esx_joblisting:getJobsList', function(source, cb)
local jobs = getJobs() local jobs = getJobs()
cb(jobs) cb(jobs)
end) end)
function IsNearCentre(player) function IsNearCentre(player)
local Ped = GetPlayerPed(player) local Ped = GetPlayerPed(player)
local PedCoords = GetEntityCoords(Ped) local PedCoords = GetEntityCoords(Ped)
local Zones = Config.Zones local Zones = Config.Zones
local Close = false
for i=1, #Config.Zones, 1 do for i = 1, #Config.Zones, 1 do
local distance = #(PedCoords - Config.Zones[i]) local distance = #(PedCoords - Config.Zones[i])
if distance < Config.DrawDistance then if distance < Config.DrawDistance then
return true Close = true
end end
end end
return Close
end end
RegisterServerEvent('esx_joblisting:setJob') RegisterServerEvent('esx_joblisting:setJob')
AddEventHandler('esx_joblisting:setJob', function(job) AddEventHandler('esx_joblisting:setJob', function(job)
local source = source local source = source
local xPlayer = ESX.GetPlayerFromId(source) local xPlayer = ESX.GetPlayerFromId(source)
local jobs = getJobs() local jobs = getJobs()
if xPlayer and IsNearCentre(source) then if xPlayer and IsNearCentre(source) then
if jobs[job] then if ESX.DoesJobExist(job, 0) then
xPlayer.setJob(job, 0) xPlayer.setJob(job, 0)
end else
end print("[^1ERROR^7] Tried Setting User To Invalid Job - ^5"..job .."^7!")
end
end
end) end)
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Jobs' description 'ESX Jobs'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
shared_scripts { shared_scripts {
'@es_extended/imports.lua', '@es_extended/imports.lua',
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX License' description 'ESX License'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
server_scripts { server_scripts {
'@es_extended/imports.lua', '@es_extended/imports.lua',
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX LS Customs' description 'ESX LS Customs'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
shared_script '@es_extended/imports.lua' shared_script '@es_extended/imports.lua'
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Mechanic Job' description 'ESX Mechanic Job'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
shared_script '@es_extended/imports.lua' shared_script '@es_extended/imports.lua'
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Optional Needs' description 'ESX Optional Needs'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
shared_script '@es_extended/imports.lua' shared_script '@es_extended/imports.lua'
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Phone' description 'ESX Phone'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
shared_script '@es_extended/imports.lua' shared_script '@es_extended/imports.lua'
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Police Job' description 'ESX Police Job'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
shared_script '@es_extended/imports.lua' shared_script '@es_extended/imports.lua'
+1 -2
View File
@@ -22,8 +22,7 @@ lua54 'yes'
author 'ESX-Framework' author 'ESX-Framework'
description 'Official ESX-Legacy Property System' description 'Official ESX-Legacy Property System'
version '1.8.5'
version '1.8.0'
shared_scripts {'@es_extended/imports.lua', '@es_extended/locale.lua', 'locales/*.lua'} shared_scripts {'@es_extended/imports.lua', '@es_extended/locale.lua', 'locales/*.lua'}
file "client/html/copy.html" file "client/html/copy.html"
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX RP Chat' description 'ESX RP Chat'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
shared_script '@es_extended/imports.lua' shared_script '@es_extended/imports.lua'
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
lua54 'yes' lua54 'yes'
description 'ESX Service' description 'ESX Service'
version '1.7.5' version '1.8.5'
shared_script '@es_extended/imports.lua' shared_script '@es_extended/imports.lua'
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Shops' description 'ESX Shops'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
shared_script '@es_extended/imports.lua' shared_script '@es_extended/imports.lua'
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Sit' description 'ESX Sit'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
shared_script '@es_extended/imports.lua' shared_script '@es_extended/imports.lua'
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Society' description 'ESX Society'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
shared_script '@es_extended/imports.lua' shared_script '@es_extended/imports.lua'
+4
View File
@@ -284,10 +284,13 @@ ESX.RegisterServerCallback('esx_society:setJob', function(source, cb, identifier
if type == 'hire' then if type == 'hire' then
xTarget.showNotification(_U('you_have_been_hired', job)) xTarget.showNotification(_U('you_have_been_hired', job))
xPlayer.showNotification(_U("you_have_hired", xTarget.getName()))
elseif type == 'promote' then elseif type == 'promote' then
xTarget.showNotification(_U('you_have_been_promoted')) xTarget.showNotification(_U('you_have_been_promoted'))
xPlayer.showNotification(_U("you_have_promoted", xTarget.getName()))
elseif type == 'fire' then elseif type == 'fire' then
xTarget.showNotification(_U('you_have_been_fired', xTarget.getJob().label)) xTarget.showNotification(_U('you_have_been_fired', xTarget.getJob().label))
xPlayer.showNotification(_U("you_have_fired", xTarget.getName()))
end end
cb() cb()
@@ -303,6 +306,7 @@ ESX.RegisterServerCallback('esx_society:setJob', function(source, cb, identifier
end end
end) end)
ESX.RegisterServerCallback('esx_society:setJobSalary', function(source, cb, job, grade, salary) ESX.RegisterServerCallback('esx_society:setJobSalary', function(source, cb, job, grade, salary)
local xPlayer = ESX.GetPlayerFromId(source) local xPlayer = ESX.GetPlayerFromId(source)
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Status' description 'ESX Status'
version '1.7.5' version '1.8.5'
lua54 'yes' lua54 'yes'
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Taxi Job' description 'ESX Taxi Job'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
shared_script '@es_extended/imports.lua' shared_script '@es_extended/imports.lua'
+3 -9
View File
@@ -228,18 +228,12 @@ function OpenShopMenu()
menu2.close() menu2.close()
menu.close() menu.close()
DeleteDisplayVehicleInsideShop() DeleteDisplayVehicleInsideShop()
FreezeEntityPosition(playerPed, false)
ESX.Game.SpawnVehicle(vehicleData.model, Config.Zones.ShopOutside.Pos, Config.Zones.ShopOutside.Heading, function(vehicle) SetEntityVisible(playerPed, true)
TaskWarpPedIntoVehicle(playerPed, vehicle, -1)
SetVehicleNumberPlateText(vehicle, generatedPlate)
FreezeEntityPosition(playerPed, false)
SetEntityVisible(playerPed, true)
end)
else else
ESX.ShowNotification(_U('not_enough_money')) ESX.ShowNotification(_U('not_enough_money'))
end end
end, vehicleData.model, generatedPlate) end, vehicleData.model, generatedPlate, IsThisModelACar(vehicleData.model))
end end
else else
menu2.close() menu2.close()
+1 -1
View File
@@ -6,7 +6,7 @@ lua54 'yes'
description 'ESX Vehicle Shop' description 'ESX Vehicle Shop'
version '1.7.5' version '1.8.5'
shared_script '@es_extended/imports.lua' shared_script '@es_extended/imports.lua'
+4 -1
View File
@@ -162,7 +162,7 @@ ESX.RegisterServerCallback('esx_vehicleshop:getVehicles', function(source, cb)
cb(vehicles) cb(vehicles)
end) end)
ESX.RegisterServerCallback('esx_vehicleshop:buyVehicle', function(source, cb, model, plate) ESX.RegisterServerCallback('esx_vehicleshop:buyVehicle', function(source, cb, model, plate, automobile)
local xPlayer = ESX.GetPlayerFromId(source) local xPlayer = ESX.GetPlayerFromId(source)
local modelPrice = getVehicleFromModel(model).price local modelPrice = getVehicleFromModel(model).price
@@ -172,6 +172,9 @@ ESX.RegisterServerCallback('esx_vehicleshop:buyVehicle', function(source, cb, mo
MySQL.insert('INSERT INTO owned_vehicles (owner, plate, vehicle) VALUES (?, ?, ?)', {xPlayer.identifier, plate, json.encode({model = joaat(model), plate = plate}) MySQL.insert('INSERT INTO owned_vehicles (owner, plate, vehicle) VALUES (?, ?, ?)', {xPlayer.identifier, plate, json.encode({model = joaat(model), plate = plate})
}, function(rowsChanged) }, function(rowsChanged)
xPlayer.showNotification(_U('vehicle_belongs', plate)) xPlayer.showNotification(_U('vehicle_belongs', plate))
ESX.OneSync.SpawnVehicle(joaat(model), Config.Zones.VehicleSpawnPoint.Pos, Config.Zones.VehicleSpawnPoint.Heading, automobile,{plate = plate}, function(vehicle)
TaskWarpPedIntoVehicle(GetPlayerPed(source), vehicle, -1)
end)
cb(true) cb(true)
end) end)
else else
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
description 'ESX Weapon Shop' description 'ESX Weapon Shop'
lua54 'yes' lua54 'yes'
version '1.7.5' version '1.8.5'
shared_scripts { shared_scripts {
'@es_extended/imports.lua', '@es_extended/imports.lua',