diff --git a/server/events.lua b/server/events.lua index 151d40a..fff48ff 100644 --- a/server/events.lua +++ b/server/events.lua @@ -249,9 +249,10 @@ end) -- use the netid on the client with the NetworkGetEntityFromNetworkId native -- convert it to a vehicle via the NetToVeh native QBCore.Functions.CreateCallback('QBCore:Server:SpawnVehicle', function(source, cb, model, coords, warp) + model = type(model) == 'string' and GetHashKey(model) or model if not coords then coords = GetEntityCoords(GetPlayerPed(source)) end local veh = CreateVehicle(model, coords.x, coords.y, coords.z, coords.w, true, true) while not DoesEntityExist(veh) do Wait(0) end if warp then TaskWarpPedIntoVehicle(GetPlayerPed(source), veh, -1) end cb(NetworkGetNetworkIdFromEntity(veh)) -end) \ No newline at end of file +end)