mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 10:18:54 +00:00
Load property IPLs when spawning in property
This commit is contained in:
@@ -752,6 +752,16 @@ AddEventHandler('playerSpawned', function()
|
||||
ESX.TriggerServerCallback('esx_property:getLastProperty', function(propertyName)
|
||||
if propertyName ~= nil then
|
||||
if propertyName ~= '' then
|
||||
local property = GetProperty(propertyName)
|
||||
|
||||
for i=1, #property.ipls, 1 do
|
||||
RequestIpl(property.ipls[i])
|
||||
|
||||
while not IsIplActive(property.ipls[i]) do
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
end
|
||||
|
||||
TriggerEvent('instance:create', 'property', {property = propertyName, owner = ESX.GetPlayerData().identifier})
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user