diff --git a/server/hospital.lua b/server/hospital.lua index 69bb504..2054f4f 100644 --- a/server/hospital.lua +++ b/server/hospital.lua @@ -66,10 +66,7 @@ local function wipeInventory(src) end lib.callback.register('qbx_ambulancejob:server:spawnVehicle', function(source, vehicleName, vehicleCoords) - local netId = qbx.spawnVehicle({ spawnSource = vehicleCoords or source, model = vehicleName, warp = source }) - - local veh = NetworkGetEntityFromNetworkId(netId) - + local netId, veh = qbx.spawnVehicle({ spawnSource = vehicleCoords or source, model = vehicleName, warp = source }) local vehType = GetVehicleType(veh) local platePrefix = (vehType == 'heli') and locale('info.heli_plate') or locale('info.amb_plate') local plate = platePrefix .. tostring(math.random(1000, 9999))