Crashing players when parachuting into a vehicle
What happened?
Crashing players when parachuting into a vehicle
Code:
CreateThread(function() local ruiner2_model = GetHashKey("ruiner2") local freemode_model = GetEntityModel(PlayerPedId())
while not HasModelLoaded(ruiner2_model) or not HasModelLoaded(freemode_model) do
RequestModel(ruiner2_model)
RequestModel(freemode_model)
Wait(0)
end
local x, y, z = table.unpack(GetEntityCoords(PlayerPedId()))
local veh = CreateVehicle(ruiner2_model, x, y, z + 250.0, 0.0, true, true)
NetworkRegisterEntityAsNetworked(veh)
SetVehRadioStation(veh, "OFF")
SetModelAsNoLongerNeeded(ruiner2_model)
local ped = CreatePed(26, GetEntityModel(PlayerPedId()), 0.0, 0.0, 0.0, 0, false, false)
SetEntityVisible(ped, false)
SetEntityVisible(veh, false, 0)
SetEntityCollision(veh, false)
SetPedIntoVehicle(ped, veh, -1)
Wait(200)
NetworkRequestControlOfEntity(veh)
NetworkRegisterEntityAsNetworked(veh)
SetVehicleParachuteActive(veh, true)
SetVehicleParachuteModel(veh, GetHashKey("proc_brittlebush_01"))
Wait(3500)
DeleteEntity(veh)
DeleteEntity(ped)
end)
Expected result
Only show the parachute if it is supported by the vehicle and if it is not supported just cancel or ignore it instead of crashing surrounding players.
Reproduction steps
- I tested creating the vehicle normally, nothing happened!
- After that, I set the parachute to the vehicle and everyone around the vehicle that was created crashed.
- I redid the tests and it only occurred when using the parachute in the native SetVehicleParachuteModel and SetVehicleParachuteActive
Importancy
Crash
Area(s)
FiveM, Natives
Specific version(s)
FiveM
Additional information
Crashing players when parachuting into a vehicle
This crash should already get handled by: https://github.com/citizenfx/fivem/blob/4f7d5faba4a7dd1e4c24c6b0d8eb0974fa9cfb96/code/components/gta-core-five/src/CrashFixes.FakeParachuteProp.cpp
On what gamebuild are you running?
i have the same problem with gamebuild 3095
Please provide a crashdump, trying to replicate this crash with the provided example code above wasn't successful.
This crash should already get handled by: https://github.com/citizenfx/fivem/blob/4f7d5faba4a7dd1e4c24c6b0d8eb0974fa9cfb96/code/components/gta-core-five/src/CrashFixes.FakeParachuteProp.cpp
On what gamebuild are you running?
IIRC there is another crash related to that but for vehicles, i think i have a repro and fixing steps, just haven't been able to report it yet
CfxCrashDump_2024_11_25_16_43_11.zip Here is an example of a customer crash
This crash should already get handled by: https://github.com/citizenfx/fivem/blob/4f7d5faba4a7dd1e4c24c6b0d8eb0974fa9cfb96/code/components/gta-core-five/src/CrashFixes.FakeParachuteProp.cpp
On what gamebuild are you running?
Update: I think the fix only applies to car entities, but the exploit uses car object entities (spawn an object with the hash of a vehicle).
See #2961