mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-28 23:01:26 +00:00
Merge branch 'main' into locale-convar
This commit is contained in:
@@ -4,6 +4,6 @@ game 'gta5'
|
||||
author 'ESX-Framework'
|
||||
description 'cron'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
server_script 'server/main.lua'
|
||||
|
||||
@@ -84,15 +84,14 @@ function ESX.Progressbar(message, length, Options)
|
||||
end
|
||||
|
||||
function ESX.ShowNotification(message, type, length)
|
||||
if Config.NativeNotify then
|
||||
BeginTextCommandThefeedPost('STRING')
|
||||
AddTextComponentSubstringPlayerName(message)
|
||||
EndTextCommandThefeedPostTicker(0, 1)
|
||||
else
|
||||
if GetResourceState("esx_notify") ~= "missing" then
|
||||
exports["esx_notify"]:Notify(type, length, message)
|
||||
else
|
||||
print("[ERROR] Missing esx_notify")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
function ESX.TextUI(message, type)
|
||||
if GetResourceState("esx_textui") ~= "missing" then
|
||||
exports["esx_textui"]:TextUI(message, type)
|
||||
@@ -491,70 +490,33 @@ function ESX.Game.DeleteObject(object)
|
||||
end
|
||||
|
||||
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)
|
||||
networked = networked == nil and true or networked
|
||||
if networked then
|
||||
local isAutomobile = IsThisModelACar(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)
|
||||
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
|
||||
local id = NetworkGetNetworkIdFromEntity(vehicle)
|
||||
SetNetworkIdCanMigrate(id, true)
|
||||
SetEntityAsMissionEntity(vehicle, true, false)
|
||||
end
|
||||
SetVehicleHasBeenOwnedByPlayer(vehicle, true)
|
||||
SetVehicleNeedsToBeHotwired(vehicle, false)
|
||||
SetModelAsNoLongerNeeded(model)
|
||||
SetVehRadioStation(vehicle, 'OFF')
|
||||
if networked then
|
||||
local id = NetworkGetNetworkIdFromEntity(vehicle)
|
||||
SetNetworkIdCanMigrate(id, true)
|
||||
SetEntityAsMissionEntity(vehicle, true, true)
|
||||
end
|
||||
SetVehicleHasBeenOwnedByPlayer(vehicle, true)
|
||||
SetVehicleNeedsToBeHotwired(vehicle, false)
|
||||
SetModelAsNoLongerNeeded(model)
|
||||
SetVehRadioStation(vehicle, 'OFF')
|
||||
|
||||
RequestCollisionAtCoord(vector.xyz)
|
||||
while not HasCollisionLoadedAroundEntity(vehicle) do
|
||||
Wait(0)
|
||||
end
|
||||
RequestCollisionAtCoord(vector.xyz)
|
||||
while not HasCollisionLoadedAroundEntity(vehicle) do
|
||||
Wait(0)
|
||||
end
|
||||
|
||||
if cb then
|
||||
cb(vehicle)
|
||||
end
|
||||
end)
|
||||
end
|
||||
if cb then
|
||||
cb(vehicle)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
function ESX.Game.SpawnLocalVehicle(vehicle, coords, heading, cb)
|
||||
|
||||
@@ -193,18 +193,23 @@ AddEventHandler('esx:restoreLoadout', function()
|
||||
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')
|
||||
AddEventHandler('esx:setAccountMoney', function(account)
|
||||
for i=1, #(ESX.PlayerData.accounts) do
|
||||
if ESX.PlayerData.accounts[i].name == account.name then
|
||||
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
|
||||
end
|
||||
end
|
||||
|
||||
@@ -26,7 +26,6 @@ Config.EnableDebug = false -- Use Debug options?
|
||||
Config.EnableDefaultInventory = true -- Display the default Inventory ( F2 )
|
||||
Config.EnableWantedLevel = false -- Use Normal GTA wanted Level?
|
||||
Config.EnablePVP = true -- Allow Player to player combat
|
||||
Config.NativeNotify = false -- use old native notification?
|
||||
|
||||
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)
|
||||
@@ -61,6 +60,7 @@ Config.RemoveHudCommonents = {
|
||||
[22] = false, --HUD_WEAPONS
|
||||
}
|
||||
|
||||
Config.MaxAdminVehicles = true -- admin vehicles spawn with max vehcle settings
|
||||
Config.CustomAIPlates = 'ESX.A111' -- Custom plates for AI vehicles
|
||||
-- Pattern string format
|
||||
--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.
|
||||
--Any other character will lead to said character being emitted.
|
||||
-- A string shorter than 8 characters will be padded on the right.
|
||||
|
||||
Config.MaxAdminVehicles = true -- admin vehicles spawn with max vehcle settings
|
||||
@@ -5,7 +5,7 @@ game 'gta5'
|
||||
description 'ES Extended'
|
||||
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_scripts {
|
||||
'locale.lua',
|
||||
|
||||
@@ -253,6 +253,10 @@ function ESX.GetPlayerFromIdentifier(identifier)
|
||||
end
|
||||
|
||||
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
|
||||
if string.match(v, 'license:') then
|
||||
local identifier = string.gsub(v, 'license:', '')
|
||||
|
||||
@@ -59,18 +59,22 @@ end
|
||||
---@param model number|string
|
||||
---@param coords vector3|table
|
||||
---@param heading number
|
||||
---@param autoMobile boolean
|
||||
---@param Properties table
|
||||
---@param cb function
|
||||
function ESX.OneSync.SpawnVehicle(model, coords, heading, autoMobile, cb)
|
||||
if type(model) == 'string' then model = joaat(model) end
|
||||
local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
|
||||
if type(autoMobile) ~= 'boolean' then
|
||||
return
|
||||
end
|
||||
CreateThread(function()
|
||||
function ESX.OneSync.SpawnVehicle(model, coords, heading, autoMobile, Properties, cb)
|
||||
model = type(model) == 'string' and joaat(model) or model
|
||||
Properties = Properties or {}
|
||||
local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
|
||||
if type(autoMobile) ~= 'boolean' then
|
||||
return
|
||||
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)
|
||||
while not DoesEntityExist(Entity) do
|
||||
Wait(0)
|
||||
end
|
||||
Entity(Entity).state:set('VehicleProperties', Properties, true)
|
||||
local netID = NetworkGetNetworkIdFromEntity(Entity)
|
||||
cb(netID)
|
||||
end)
|
||||
@@ -197,16 +201,6 @@ function ESX.OneSync.GetClosestVehicle(coords, modelFilter)
|
||||
return getClosestEntity(GetAllVehicles(), coords, modelFilter)
|
||||
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.OneSync.SpawnObject(model, coords, heading, cb)
|
||||
end)
|
||||
|
||||
-- for k,v in pairs(ESX.OneSync) do
|
||||
-- ESX.RegisterServerCallback("esx:Onesync:"..k, function(source, cb, ...)
|
||||
-- cb(v(...))
|
||||
-- end)
|
||||
-- end
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "legacy",
|
||||
"commit" : "1.7.5",
|
||||
"commit" : "1.8.5",
|
||||
"changelog": "\n- Add PlayerOveride System, ESX Notify, ESX Progressbar and ESX TextUI"
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
author 'ESX-Framework & Brayden'
|
||||
description 'Offical ESX Legacy Context Menu'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
ui_page 'index.html'
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Identity'
|
||||
lua54 'yes'
|
||||
version '1.7.6'
|
||||
version '1.8.5'
|
||||
|
||||
shared_script '@es_extended/imports.lua'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
game 'common'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
fx_version 'cerulean'
|
||||
author 'ESX-Framework'
|
||||
lua54 'yes'
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Menu Default'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
client_scripts {'@es_extended/imports.lua', 'client/main.lua'}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Menu Dialog'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
client_scripts {
|
||||
'@es_extended/imports.lua',
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Menu List'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
client_scripts {
|
||||
'@es_extended/imports.lua',
|
||||
|
||||
@@ -8,7 +8,7 @@ if ESX.GetConfig().Multichar then
|
||||
if NetworkIsPlayerActive(PlayerId()) then
|
||||
exports.spawnmanager:setAutoSpawn(false)
|
||||
DoScreenFadeOut(0)
|
||||
while not GetResourceState('esx_menu_default') == 'started' do
|
||||
while not GetResourceState('esx_context') == 'started' do
|
||||
Wait(0)
|
||||
end
|
||||
TriggerEvent("esx_multicharacter:SetupCharacters")
|
||||
@@ -114,7 +114,7 @@ if ESX.GetConfig().Multichar then
|
||||
end
|
||||
TriggerEvent('skinchanger:loadSkin', skin)
|
||||
end
|
||||
DoScreenFadeIn(400)
|
||||
DoScreenFadeIn(600)
|
||||
end)
|
||||
repeat Wait(200) until not IsScreenFadedOut()
|
||||
|
||||
@@ -141,16 +141,88 @@ if ESX.GetConfig().Multichar then
|
||||
})
|
||||
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')
|
||||
AddEventHandler('esx_multicharacter:SetupUI', function(data, slots)
|
||||
DoScreenFadeOut(0)
|
||||
Characters = data
|
||||
slots = slots
|
||||
local elements = {}
|
||||
local Character = next(Characters)
|
||||
exports.spawnmanager:forceRespawn()
|
||||
|
||||
if Character == nil then
|
||||
if not Character then
|
||||
SendNUIMessage({
|
||||
action = "closeui"
|
||||
})
|
||||
@@ -172,98 +244,7 @@ if ESX.GetConfig().Multichar then
|
||||
TriggerEvent('esx_identity:showRegisterIdentity')
|
||||
end)
|
||||
else
|
||||
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] = {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)
|
||||
SelectCharacterMenu(Characters, slots)
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -314,7 +295,8 @@ if ESX.GetConfig().Multichar then
|
||||
|
||||
RegisterNetEvent('esx:onPlayerLogout')
|
||||
AddEventHandler('esx:onPlayerLogout', function()
|
||||
DoScreenFadeOut(0)
|
||||
DoScreenFadeOut(500)
|
||||
Wait(1000)
|
||||
spawned = false
|
||||
TriggerEvent("esx_multicharacter:SetupCharacters")
|
||||
TriggerEvent('esx_skin:resetFirstSpawn')
|
||||
|
||||
@@ -16,7 +16,7 @@ if IsDuplicityVersion() then
|
||||
else
|
||||
-- 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
|
||||
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
|
||||
|
||||
@@ -2,7 +2,7 @@ fx_version 'cerulean'
|
||||
game 'gta5'
|
||||
author 'ESX-Framework - Linden - KASH'
|
||||
description 'Official Multicharacter System For ESX Legacy'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
lua54 'yes'
|
||||
|
||||
dependencies {'es_extended', 'esx_menu_default', 'esx_identity', 'esx_skin'}
|
||||
|
||||
@@ -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=Oswald&display=swap');
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
user-select: none;
|
||||
color: rgb(255, 255, 255);
|
||||
border-radius: 15px;
|
||||
font-weight: 300;
|
||||
font-size: 1.6vh;
|
||||
font-family: Calibri, "Helvetica", san-serif;
|
||||
@@ -25,25 +27,30 @@ body {
|
||||
display:none;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 25;
|
||||
right: 150;
|
||||
transform: translate(0, -50%);
|
||||
background: rgba(0,0,0,0.7);
|
||||
border-radius: 15px;
|
||||
background: rgba(15,15,15, 0.9);
|
||||
}
|
||||
|
||||
.header {
|
||||
font-family: 'Oswald', sans-serif;
|
||||
position: absolute;
|
||||
top: 5%;
|
||||
background: rgba(10, 10, 10, 0.9);
|
||||
border-radius: 15px 15px 0px 0px;
|
||||
height: 10%;
|
||||
width: 100%;
|
||||
left: 50%;
|
||||
text-align: center;
|
||||
transform: translate(-50%);
|
||||
font-size: 1.1rem;
|
||||
font-weight: 700;
|
||||
padding-bottom: 5px;
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: absolute;
|
||||
bottom: 5%;
|
||||
left: 50%;
|
||||
transform: translate(-50%);
|
||||
font-size: 1.1rem;
|
||||
font-size: 0rem;
|
||||
}
|
||||
|
||||
.character-box {
|
||||
@@ -54,17 +61,16 @@ body {
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
line-height: 1.4rem;
|
||||
height: calc(100vh - 6rem);
|
||||
width: 20rem;
|
||||
padding: 1rem;
|
||||
border: 1px rgba(12,12,12,200) solid;
|
||||
box-shadow: 0px 0px 4px 1px rgba(12,12,12,20);
|
||||
height: calc(30rem);
|
||||
width: 17rem;
|
||||
border: 1px rgba(10,10,10,0.7) solid;
|
||||
box-shadow: 2px 1px 9px 3px rgba(10,10,10,0.7);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-family: 'Raleway', sans-serif;
|
||||
padding-top: 2rem;
|
||||
font-family: 'Oswald', sans-serif;
|
||||
font-size: 22px;
|
||||
padding-top: 1.3rem;
|
||||
display: block;
|
||||
font-size: 1.3rem;
|
||||
font-weight: 600;
|
||||
font-weight: 0;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</head>
|
||||
<body style="display: none;">
|
||||
<div class="main-container">
|
||||
<div class='header'>ESX Legacy</div>
|
||||
<div class='header'>Character Info</div>
|
||||
<div class="character-box" data-charid="1">
|
||||
<h3 class="character-fullname"></h3>
|
||||
<div class="character-info"></div>
|
||||
|
||||
@@ -3,10 +3,10 @@ Locales["en"] = {
|
||||
["female"] = "Female",
|
||||
["delete_label"] = "Delete %s %s?",
|
||||
["select_char"] = "Select Character",
|
||||
["create_char"] = "Create new character",
|
||||
["char_play"] = "Play this character",
|
||||
["char_disabled"] = "This character is disabled",
|
||||
["char_delete"] = "Delete this character",
|
||||
["create_char"] = "New Character",
|
||||
["char_play"] = "Play",
|
||||
["char_disabled"] = "Disabled",
|
||||
["char_delete"] = "Delete",
|
||||
["cancel"] = "Cancel",
|
||||
["confirm"] = "Confirm",
|
||||
["command_setslots"] = "Set multicharacter slots number of a player",
|
||||
|
||||
@@ -213,6 +213,7 @@ elseif ESX.GetConfig().Multichar == true then
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx_multicharacter:relog', function()
|
||||
local source = source
|
||||
TriggerEvent('esx:playerLogout', source)
|
||||
end)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
fx_version 'adamant'
|
||||
lua54 'yes'
|
||||
game 'gta5'
|
||||
|
||||
version '1.8.5'
|
||||
author 'ESX-Framework'
|
||||
description 'Official NUI Notification system for ESX'
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Skin'
|
||||
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
lua54 'yes'
|
||||
shared_script '@es_extended/imports.lua'
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
fx_version 'adamant'
|
||||
game 'gta5'
|
||||
author 'ESX-Framework'
|
||||
version '1.8.5'
|
||||
description 'ESX TextUI'
|
||||
lua54 'yes'
|
||||
client_scripts { 'TextUI.lua' }
|
||||
|
||||
@@ -6,7 +6,7 @@ lua54 'yes'
|
||||
|
||||
description 'Official ESX-Legacy resource for handling the Player`s Skin'
|
||||
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
client_scripts {
|
||||
'@es_extended/locale.lua',
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Accessories'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_scripts {
|
||||
'@es_extended/imports.lua',
|
||||
|
||||
@@ -5,7 +5,7 @@ game 'gta5'
|
||||
author 'ESX-Framework'
|
||||
description 'ESX Addon Account'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
server_scripts {
|
||||
'@es_extended/imports.lua',
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Addon Inventory'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
server_scripts {
|
||||
'@es_extended/imports.lua',
|
||||
|
||||
@@ -5,7 +5,7 @@ game 'gta5'
|
||||
author 'ESX-Framework'
|
||||
description 'Offical AllowList script for ESX'
|
||||
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
lua54 'yes'
|
||||
server_only 'yes'
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ game 'gta5'
|
||||
description 'ESX Ambulance Job'
|
||||
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_scripts {
|
||||
'@es_extended/imports.lua',
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Animations'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
client_scripts {
|
||||
'@es_extended/imports.lua',
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Banker job'
|
||||
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
lua54 'yes'
|
||||
shared_script '@es_extended/imports.lua'
|
||||
|
||||
|
||||
@@ -3,6 +3,13 @@
|
||||
A beautiful and Easy-To-Use Banking & ATM system for ESX, with optional OX Target Support
|
||||
|
||||
|
||||
## BANK UI
|
||||

|
||||
## ATM UI
|
||||

|
||||

|
||||
|
||||
|
||||
## Special thanks: Gellipapa#9186,Rav3n95#2849,Csoki, csontvazharcos, Füsti, Pécé
|
||||
|
||||
## Download & Installation
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX banking'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_scripts {
|
||||
'@es_extended/imports.lua',
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Barber Shop'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_script '@es_extended/imports.lua'
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Basic Needs'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_script '@es_extended/imports.lua'
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Billing'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_script '@es_extended/imports.lua'
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Boat'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_script '@es_extended/imports.lua'
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Clothes Shop'
|
||||
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
lua54 'yes'
|
||||
shared_script '@es_extended/imports.lua'
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'CruiseControl System for ESX'
|
||||
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
lua54 'yes'
|
||||
dependencies {
|
||||
'es_extended'
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Data Store'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
server_scripts {
|
||||
'@es_extended/imports.lua',
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX DMV School'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_script '@es_extended/imports.lua'
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
lua54 'yes'
|
||||
description 'ESX Drugs'
|
||||
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_script '@es_extended/imports.lua'
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ game 'gta5'
|
||||
|
||||
author 'ESX-Framework'
|
||||
description 'Official ESX Garage System for ESX Legacy'
|
||||
version '1.0.0'
|
||||
version '1.8.5'
|
||||
lua54 'yes'
|
||||
|
||||
shared_script '@es_extended/imports.lua'
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Holdup'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_script '@es_extended/imports.lua'
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ This Simple resource lets you finally contribute to Society and make a differenc
|
||||
|
||||
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.
|
||||
|
||||
|
||||
@@ -1,82 +1,81 @@
|
||||
local menuIsShowed = false
|
||||
local menuIsShowed, TextUIdrawing = false, false
|
||||
|
||||
function ShowJobListingMenu()
|
||||
menuIsShowed = true
|
||||
ESX.TriggerServerCallback('esx_joblisting:getJobsList', function(jobs)
|
||||
local elements = {}
|
||||
menuIsShowed = true
|
||||
ESX.TriggerServerCallback('esx_joblisting:getJobsList', function(jobs)
|
||||
local elements = {{unselectable = "true", title = _U('job_center'), icon = "fas fa-briefcase"}}
|
||||
|
||||
for k,v in pairs(jobs) do
|
||||
table.insert(elements, {
|
||||
label = v.label,
|
||||
job = k
|
||||
})
|
||||
end
|
||||
for i = 1, #(jobs) do
|
||||
elements[#elements + 1] = {title = jobs[i].label, name = jobs[i].name}
|
||||
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)
|
||||
ESX.OpenContext("right", elements, function(menu, SelectJob)
|
||||
TriggerServerEvent('esx_joblisting:setJob', SelectJob.name)
|
||||
ESX.CloseContext()
|
||||
ESX.ShowNotification(_U('new_job', SelectJob.title), "success")
|
||||
menuIsShowed = false
|
||||
TextUIdrawing = false
|
||||
end, function()
|
||||
menuIsShowed = false
|
||||
TextUIdrawing = false
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
||||
-- Activate menu when player is inside marker, and draw markers
|
||||
CreateThread(function()
|
||||
while true do
|
||||
local Sleep = 1500
|
||||
while true do
|
||||
local Sleep = 1500
|
||||
|
||||
local coords = GetEntityCoords(PlayerPedId())
|
||||
local isInMarker = false
|
||||
local coords = GetEntityCoords(ESX.PlayerData.ped)
|
||||
local isInMarker = false
|
||||
|
||||
for i=1, #Config.Zones, 1 do
|
||||
local distance = #(coords - Config.Zones[i])
|
||||
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.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 distance < (Config.ZoneSize.x / 2) then
|
||||
isInMarker = true
|
||||
if not TextUIdrawing then
|
||||
ESX.TextUI(_U("access_job_center"))
|
||||
TextUIdrawing = true
|
||||
end
|
||||
if IsControlJustReleased(0, 38) and not menuIsShowed then
|
||||
ShowJobListingMenu()
|
||||
ESX.HideUI()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if not isInMarker and menuIsShowed then
|
||||
ESX.UI.Menu.CloseAll()
|
||||
menuIsShowed = false
|
||||
end
|
||||
if not isInMarker and TextUIdrawing then
|
||||
ESX.HideUI()
|
||||
TextUIdrawing = false
|
||||
end
|
||||
|
||||
Wait(Sleep)
|
||||
end
|
||||
Wait(Sleep)
|
||||
end
|
||||
end)
|
||||
|
||||
-- Create blips
|
||||
CreateThread(function()
|
||||
for i=1, #Config.Zones, 1 do
|
||||
local blip = AddBlipForCoord(Config.Zones[i])
|
||||
if Config.Blip.Enabled then
|
||||
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)
|
||||
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)
|
||||
BeginTextCommandSetBlipName("STRING")
|
||||
AddTextComponentSubstringPlayerName(_U('blip_text'))
|
||||
EndTextCommandSetBlipName(blip)
|
||||
end
|
||||
end)
|
||||
end
|
||||
@@ -1,22 +1,22 @@
|
||||
Config = {}
|
||||
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.DrawDistance = 15.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 = GetConvar('esx:locale', 'en')
|
||||
|
||||
Config.Zones = {
|
||||
vector3(-265.08, -964.1, 30.3)
|
||||
vector3(-265.08, -964.1, 30.3)
|
||||
}
|
||||
|
||||
Config.Blip = {
|
||||
Sprite = 407,
|
||||
Display = 4,
|
||||
Scale = 0.9,
|
||||
Colour = 27,
|
||||
ShortRange = true
|
||||
}
|
||||
Enabled = true,
|
||||
Sprite = 407,
|
||||
Display = 4,
|
||||
Scale = 0.8,
|
||||
Colour = 27,
|
||||
ShortRange = true
|
||||
}
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
|
||||
|
||||
ALTER TABLE jobs add whitelisted BOOLEAN NOT NULL DEFAULT FALSE;
|
||||
@@ -3,7 +3,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Job Listing'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_scripts {
|
||||
'@es_extended/imports.lua',
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Locales['en'] = {
|
||||
['new_job'] = 'you have a new job!',
|
||||
['access_job_center'] = 'press ~INPUT_PICKUP~ to access the job center.',
|
||||
['job_center'] = 'job Center',
|
||||
['new_job'] = 'New Job: ~b~%s~s~ !',
|
||||
['access_job_center'] = 'Press ~b~[E]~s~ To Open Job Selector.',
|
||||
['job_center'] = 'Select A Job.',
|
||||
["blip_text"] = "Job Centre"
|
||||
}
|
||||
|
||||
@@ -1,42 +1,47 @@
|
||||
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
|
||||
local jobs = ESX.GetJobs()
|
||||
local availableJobs = {}
|
||||
for k, v in pairs(jobs) do
|
||||
if v.whitelisted == false then
|
||||
availableJobs[#availableJobs + 1] = {label = v.label, name = k}
|
||||
end
|
||||
end
|
||||
return availableJobs
|
||||
end
|
||||
|
||||
ESX.RegisterServerCallback('esx_joblisting:getJobsList', function(source, cb)
|
||||
local jobs = getJobs()
|
||||
cb(jobs)
|
||||
local jobs = getJobs()
|
||||
cb(jobs)
|
||||
end)
|
||||
|
||||
function IsNearCentre(player)
|
||||
local Ped = GetPlayerPed(player)
|
||||
local PedCoords = GetEntityCoords(Ped)
|
||||
local Zones = Config.Zones
|
||||
local Ped = GetPlayerPed(player)
|
||||
local PedCoords = GetEntityCoords(Ped)
|
||||
local Zones = Config.Zones
|
||||
local Close = false
|
||||
|
||||
for i=1, #Config.Zones, 1 do
|
||||
local distance = #(PedCoords - Config.Zones[i])
|
||||
for i = 1, #Config.Zones, 1 do
|
||||
local distance = #(PedCoords - Config.Zones[i])
|
||||
|
||||
if distance < Config.DrawDistance then
|
||||
return true
|
||||
end
|
||||
end
|
||||
if distance < Config.DrawDistance then
|
||||
Close = true
|
||||
end
|
||||
end
|
||||
|
||||
return Close
|
||||
end
|
||||
|
||||
RegisterServerEvent('esx_joblisting:setJob')
|
||||
AddEventHandler('esx_joblisting:setJob', function(job)
|
||||
local source = source
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
local jobs = getJobs()
|
||||
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
|
||||
if xPlayer and IsNearCentre(source) then
|
||||
if ESX.DoesJobExist(job, 0) then
|
||||
xPlayer.setJob(job, 0)
|
||||
else
|
||||
print("[^1ERROR^7] Tried Setting User To Invalid Job - ^5"..job .."^7!")
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Jobs'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_scripts {
|
||||
'@es_extended/imports.lua',
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX License'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
server_scripts {
|
||||
'@es_extended/imports.lua',
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX LS Customs'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_script '@es_extended/imports.lua'
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Mechanic Job'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_script '@es_extended/imports.lua'
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Optional Needs'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_script '@es_extended/imports.lua'
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Phone'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_script '@es_extended/imports.lua'
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Police Job'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_script '@es_extended/imports.lua'
|
||||
|
||||
|
||||
@@ -22,8 +22,7 @@ lua54 'yes'
|
||||
|
||||
author 'ESX-Framework'
|
||||
description 'Official ESX-Legacy Property System'
|
||||
|
||||
version '1.8.0'
|
||||
version '1.8.5'
|
||||
|
||||
shared_scripts {'@es_extended/imports.lua', '@es_extended/locale.lua', 'locales/*.lua'}
|
||||
file "client/html/copy.html"
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX RP Chat'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_script '@es_extended/imports.lua'
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
lua54 'yes'
|
||||
description 'ESX Service'
|
||||
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_script '@es_extended/imports.lua'
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Shops'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_script '@es_extended/imports.lua'
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Sit'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_script '@es_extended/imports.lua'
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Society'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_script '@es_extended/imports.lua'
|
||||
|
||||
|
||||
@@ -284,10 +284,13 @@ ESX.RegisterServerCallback('esx_society:setJob', function(source, cb, identifier
|
||||
|
||||
if type == 'hire' then
|
||||
xTarget.showNotification(_U('you_have_been_hired', job))
|
||||
xPlayer.showNotification(_U("you_have_hired", xTarget.getName()))
|
||||
elseif type == 'promote' then
|
||||
xTarget.showNotification(_U('you_have_been_promoted'))
|
||||
xPlayer.showNotification(_U("you_have_promoted", xTarget.getName()))
|
||||
elseif type == 'fire' then
|
||||
xTarget.showNotification(_U('you_have_been_fired', xTarget.getJob().label))
|
||||
xPlayer.showNotification(_U("you_have_fired", xTarget.getName()))
|
||||
end
|
||||
|
||||
cb()
|
||||
@@ -303,6 +306,7 @@ ESX.RegisterServerCallback('esx_society:setJob', function(source, cb, identifier
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
ESX.RegisterServerCallback('esx_society:setJobSalary', function(source, cb, job, grade, salary)
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Status'
|
||||
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
lua54 'yes'
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Taxi Job'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_script '@es_extended/imports.lua'
|
||||
|
||||
|
||||
@@ -228,18 +228,12 @@ function OpenShopMenu()
|
||||
menu2.close()
|
||||
menu.close()
|
||||
DeleteDisplayVehicleInsideShop()
|
||||
|
||||
ESX.Game.SpawnVehicle(vehicleData.model, Config.Zones.ShopOutside.Pos, Config.Zones.ShopOutside.Heading, function(vehicle)
|
||||
TaskWarpPedIntoVehicle(playerPed, vehicle, -1)
|
||||
SetVehicleNumberPlateText(vehicle, generatedPlate)
|
||||
|
||||
FreezeEntityPosition(playerPed, false)
|
||||
SetEntityVisible(playerPed, true)
|
||||
end)
|
||||
FreezeEntityPosition(playerPed, false)
|
||||
SetEntityVisible(playerPed, true)
|
||||
else
|
||||
ESX.ShowNotification(_U('not_enough_money'))
|
||||
end
|
||||
end, vehicleData.model, generatedPlate)
|
||||
end, vehicleData.model, generatedPlate, IsThisModelACar(vehicleData.model))
|
||||
end
|
||||
else
|
||||
menu2.close()
|
||||
|
||||
@@ -6,7 +6,7 @@ lua54 'yes'
|
||||
|
||||
description 'ESX Vehicle Shop'
|
||||
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_script '@es_extended/imports.lua'
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ ESX.RegisterServerCallback('esx_vehicleshop:getVehicles', function(source, cb)
|
||||
cb(vehicles)
|
||||
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 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})
|
||||
}, function(rowsChanged)
|
||||
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)
|
||||
end)
|
||||
else
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX Weapon Shop'
|
||||
lua54 'yes'
|
||||
version '1.7.5'
|
||||
version '1.8.5'
|
||||
|
||||
shared_scripts {
|
||||
'@es_extended/imports.lua',
|
||||
|
||||
Reference in New Issue
Block a user