Skip to content

Crashing players when parachuting into a vehicle #2926

@zNexTHN

Description

@zNexTHN

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

  1. I tested creating the vehicle normally, nothing happened!
  2. After that, I set the parachute to the vehicle and everyone around the vehicle that was created crashed.
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcrashtriageNeeds a preliminary assessment to determine the urgency and required action

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions