mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-28 17:01:14 +00:00
fix: society race conditions
This commit is contained in:
@@ -29,5 +29,6 @@ client_scripts {
|
||||
dependencies {
|
||||
'es_extended',
|
||||
'esx_skin',
|
||||
'esx_society',
|
||||
'esx_vehicleshop'
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@ if GetResourceState("esx_phone") ~= 'missing' then
|
||||
TriggerEvent('esx_phone:registerNumber', 'ambulance', TranslateCap('alert_ambulance'), true, true)
|
||||
end
|
||||
|
||||
if GetResourceState("esx_society") ~= 'missing' then
|
||||
TriggerEvent('esx_society:registerSociety', 'ambulance', 'Ambulance', 'society_ambulance', 'society_ambulance', 'society_ambulance', {type = 'public'})
|
||||
end
|
||||
CreateThread(function()
|
||||
exports["esx_society"]:registerSociety('ambulance', 'Ambulance', 'society_ambulance', 'society_ambulance', 'society_ambulance', {type = 'public'})
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx_ambulancejob:revive')
|
||||
AddEventHandler('esx_ambulancejob:revive', function(playerId)
|
||||
|
||||
@@ -24,4 +24,7 @@ client_scripts {
|
||||
'client/main.lua'
|
||||
}
|
||||
|
||||
dependency 'es_extended'
|
||||
dependencies {
|
||||
'es_extended',
|
||||
'esx_society'
|
||||
}
|
||||
|
||||
@@ -5,7 +5,10 @@ if Config.MaxInService ~= -1 then
|
||||
end
|
||||
|
||||
TriggerEvent('esx_phone:registerNumber', 'mechanic', TranslateCap('mechanic_customer'), true, true)
|
||||
TriggerEvent('esx_society:registerSociety', 'mechanic', 'mechanic', 'society_mechanic', 'society_mechanic', 'society_mechanic', {type = 'private'})
|
||||
|
||||
CreateThread(function()
|
||||
exports["esx_society"]:registerSociety('mechanic', 'mechanic', 'society_mechanic', 'society_mechanic', 'society_mechanic', {type = 'private'})
|
||||
end)
|
||||
|
||||
local function Harvest(source)
|
||||
SetTimeout(4000, function()
|
||||
|
||||
@@ -27,5 +27,6 @@ client_scripts {
|
||||
dependencies {
|
||||
'es_extended',
|
||||
'esx_billing',
|
||||
'esx_society',
|
||||
'esx_vehicleshop'
|
||||
}
|
||||
|
||||
@@ -5,7 +5,9 @@ if Config.EnableESXService then
|
||||
end
|
||||
|
||||
TriggerEvent('esx_phone:registerNumber', 'police', TranslateCap('alert_police'), true, true)
|
||||
TriggerEvent('esx_society:registerSociety', 'police', 'Police', 'society_police', 'society_police', 'society_police', {type = 'public'})
|
||||
CreateThread(function()
|
||||
exports["esx_society"]:registerSociety('police', 'Police', 'society_police', 'society_police', 'society_police', {type = 'public'})
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx_policejob:confiscatePlayerItem')
|
||||
AddEventHandler('esx_policejob:confiscatePlayerItem', function(target, itemType, itemName, amount)
|
||||
|
||||
@@ -42,5 +42,6 @@ client_scripts {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
'es_extended'
|
||||
'es_extended',
|
||||
'esx_society'
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ CreateThread(function()
|
||||
|
||||
Wait(10)
|
||||
ESX.RefreshJobs()
|
||||
TriggerEvent('esx_society:registerSociety', 'realestateagent', 'realestateagent', 'society_realestateagent', 'society_realestateagent', 'society_realestateagent', {type = 'private'})
|
||||
exports["esx_society"]:registerSociety('realestateagent', 'realestateagent', 'society_realestateagent', 'society_realestateagent', 'society_realestateagent', {type = 'private'})
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
@@ -22,4 +22,7 @@ server_scripts {
|
||||
'server/main.lua'
|
||||
}
|
||||
|
||||
dependency 'es_extended'
|
||||
dependencies {
|
||||
'es_extended',
|
||||
'esx_society'
|
||||
}
|
||||
|
||||
@@ -5,9 +5,11 @@ if Config.MaxInService ~= -1 then
|
||||
end
|
||||
|
||||
TriggerEvent('esx_phone:registerNumber', 'taxi', TranslateCap('taxi_client'), true, true)
|
||||
TriggerEvent('esx_society:registerSociety', 'taxi', 'Taxi', 'society_taxi', 'society_taxi', 'society_taxi', {
|
||||
type = 'public'
|
||||
})
|
||||
CreateThread(function()
|
||||
exports["esx_society"]:registerSociety('taxi', 'Taxi', 'society_taxi', 'society_taxi', 'society_taxi', {
|
||||
type = 'public'
|
||||
})
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx_taxijob:success')
|
||||
AddEventHandler('esx_taxijob:success', function()
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
local categories, vehicles = {}, {}
|
||||
|
||||
TriggerEvent('esx_phone:registerNumber', 'cardealer', TranslateCap('dealer_customers'), false, false)
|
||||
TriggerEvent('esx_society:registerSociety', 'cardealer', TranslateCap('car_dealer'), 'society_cardealer', 'society_cardealer', 'society_cardealer', {type = 'private'})
|
||||
CreateThread(function()
|
||||
exports["esx_society"]:registerSociety('cardealer', TranslateCap('car_dealer'), 'society_cardealer', 'society_cardealer', 'society_cardealer', {type = 'private'})
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
local char = Config.PlateLetters
|
||||
|
||||
Reference in New Issue
Block a user