Security HUD
System Watchdog
×
Threads Scanned
-- / --
SYS. LOAD --%
AI SHIELD ACTIVE
DMCA Policy
×

📋 DMCA Compliance

This platform and community fully complies with the Digital Millennium Copyright Act (DMCA) and international copyright laws. We take all copyright protection seriously.

🛡️ Copyright Protection

If you believe a posted item belongs to you or violates your copyright, you may file a DMCA takedown request through our official channels. Upon receiving a valid claim, the infringing content will be removed within 24 hours.

What's new
×
Fiveguard

Question Esx Gold Heist

Angelcloud

Member
Joined
Jan 11, 2022
Messages
5
Reaction score
1
Points
146
Location
France
Hi,

I have set up the ESX GOLD HEIST script, unfortunately I have a problem, when I launch the mission and arrive at the location to pick up the vehicle, the vehicle does not appear!

Could someone please help me?

Thank you
 

snitchers

Developer
Joined
Oct 12, 2021
Messages
72
Solutions
4
Reaction score
1,657
Points
306
Location
Netherlands
Hi,

I have set up the ESX GOLD HEIST script, unfortunately I have a problem, when I launch the mission and arrive at the location to pick up the vehicle, the vehicle does not appear!

Could someone please help me?

Thank you
You should get an error either on your cmd (server side) or at your F8 screen (client side).
Send us the error and we can help.
 

Angelcloud

Member
Joined
Jan 11, 2022
Messages
5
Reaction score
1
Points
146
Location
France

snitchers

Developer
Joined
Oct 12, 2021
Messages
72
Solutions
4
Reaction score
1,657
Points
306
Location
Netherlands
Hi proportions,

Thank you for your reply, I'll send you the error. Thanks for your help ;).


Have a nice day

Best regards
Try this:

ESX.Game.SpawnVehicle = function(modelName, coords, heading, cb) local model = (type(modelName) == 'number' and modelName or GetHashKey(modelName)) Citizen.CreateThread(function() ESX.Streaming.RequestModel(model) local vehicle = CreateVehicle(model, coords.x, coords.y, coords.z, heading, true, false) local id = NetworkGetNetworkIdFromEntity(vehicle) SetNetworkIdCanMigrate(id, true) SetEntityAsMissionEntity(vehicle, true, false) SetVehicleHasBeenOwnedByPlayer(vehicle, true) SetVehicleNeedsToBeHotwired(vehicle, false) SetModelAsNoLongerNeeded(model) RequestCollisionAtCoord(coords.x, coords.y, coords.z) while not HasCollisionLoadedAroundEntity(vehicle) do RequestCollisionAtCoord(coords.x, coords.y, coords.z) Citizen.Wait(0) end SetVehRadioStation(vehicle, 'OFF') if cb ~= nil then cb(vehicle) end end) end
 

Angelcloud

Member
Joined
Jan 11, 2022
Messages
5
Reaction score
1
Points
146
Location
France
Try this:

ESX.Game.SpawnVehicle = function(modelName, coords, heading, cb) local model = (type(modelName) == 'number' and modelName or GetHashKey(modelName)) Citizen.CreateThread(function() ESX.Streaming.RequestModel(model) local vehicle = CreateVehicle(model, coords.x, coords.y, coords.z, heading, true, false) local id = NetworkGetNetworkIdFromEntity(vehicle) SetNetworkIdCanMigrate(id, true) SetEntityAsMissionEntity(vehicle, true, false) SetVehicleHasBeenOwnedByPlayer(vehicle, true) SetVehicleNeedsToBeHotwired(vehicle, false) SetModelAsNoLongerNeeded(model) RequestCollisionAtCoord(coords.x, coords.y, coords.z) while not HasCollisionLoadedAroundEntity(vehicle) do RequestCollisionAtCoord(coords.x, coords.y, coords.z) Citizen.Wait(0) end SetVehRadioStation(vehicle, 'OFF') if cb ~= nil then cb(vehicle) end end) end
Thanks ! It's worked :love:. Amazing
 
Top