From 0ba1db5e420fda91923ac1a6ad66300204cbba8c Mon Sep 17 00:00:00 2001 From: ghermans Date: Thu, 5 Apr 2018 21:03:57 +0200 Subject: [PATCH] Possible fix for #55 --- int/vehicles.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/int/vehicles.lua b/int/vehicles.lua index 01eb578..bccf95c 100644 --- a/int/vehicles.lua +++ b/int/vehicles.lua @@ -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) \ No newline at end of file