Skip to content
This repository has been archived by the owner on Apr 24, 2019. It is now read-only.

Commit

Permalink
Possible fix for #55
Browse files Browse the repository at this point in the history
  • Loading branch information
ghermans committed Apr 5, 2018
1 parent 91283ef commit 0ba1db5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions int/vehicles.lua
Original file line number Diff line number Diff line change
Expand Up @@ -410,15 +410,16 @@ AddEventHandler('vehshop:spawnVehicle', function(v)
end

local veh = CreateVehicle(car, playerCoords, true, false)
local id = NetworkGetNetworkIdFromEntity(veh)
SetNetworkIdCanMigrate(id, true)

TaskWarpPedIntoVehicle(playerPed, veh, -1)
--SetEntityAsMissionEntity(veh, true, true)
SetVehicleHasBeenOwnedByPlayer(veh, true)
SetVehRadioStation(veh, "OFF")

FreezeEntityPosition(PlayerPedId(), false)
SetEntityVisible(PlayerPedId(), true)

TaskWarpPedIntoVehicle(playerPed, veh, -1)

local netid = NetworkGetNetworkIdFromEntity(veh)
SetNetworkIdCanMigrate(netid, true)
NetworkRegisterEntityAsNetworked(VehToNet(veh))
end
end)

0 comments on commit 0ba1db5

Please sign in to comment.