From e14306304e3895ec45fe5804d99cdb32c1f3c901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Wed, 23 Aug 2017 12:57:42 +0200 Subject: [PATCH] Use ZDiff everywhere --- client/main.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/client/main.lua b/client/main.lua index 3caf6ded..eda27bcb 100644 --- a/client/main.lua +++ b/client/main.lua @@ -56,6 +56,8 @@ AddEventHandler('esx_property:hasEnteredMarker', function(name, part, parking) ESX.TriggerServerCallback('esx_vehicleshop:getVehiclesInGarage', function(vehicles) + print('') + for i=1, #garage.Parkings, 1 do for j=1, #vehicles, 1 do @@ -66,7 +68,7 @@ AddEventHandler('esx_property:hasEnteredMarker', function(name, part, parking) ESX.Game.SpawnLocalVehicle(vehicles[j].vehicle.model, { x = garage.Parkings[i].Pos.x, y = garage.Parkings[i].Pos.y, - z = garage.Parkings[i].Pos.z + z = garage.Parkings[i].Pos.z + Config.ZDiff }, garage.Parkings[i].Heading, function(vehicle) ESX.Game.SetVehicleProperties(vehicle, vehicles[j].vehicle) end) @@ -89,7 +91,7 @@ AddEventHandler('esx_property:hasEnteredMarker', function(name, part, parking) ESX.Game.Teleport(playerPed, { x = garage.InteriorSpawnPoint.Pos.x, y = garage.InteriorSpawnPoint.Pos.y, - z = garage.InteriorSpawnPoint.Pos.z + z = garage.InteriorSpawnPoint.Pos.z + Config.ZDiff }, function() TriggerEvent('instance:create', 'garage') @@ -106,7 +108,7 @@ AddEventHandler('esx_property:hasEnteredMarker', function(name, part, parking) ESX.Game.SpawnLocalVehicle(vehicles[j].vehicle.model, { x = garage.Parkings[i].Pos.x, y = garage.Parkings[i].Pos.y, - z = garage.Parkings[i].Pos.z + z = garage.Parkings[i].Pos.z + Config.ZDiff }, garage.Parkings[i].Heading, function(vehicle) ESX.Game.SetVehicleProperties(vehicle, vehicles[j].vehicle) end) @@ -132,7 +134,7 @@ AddEventHandler('esx_property:hasEnteredMarker', function(name, part, parking) ESX.Game.Teleport(playerPed, { x = garage.InteriorSpawnPoint.Pos.x, y = garage.InteriorSpawnPoint.Pos.y, - z = garage.InteriorSpawnPoint.Pos.z + z = garage.InteriorSpawnPoint.Pos.z + Config.ZDiff }, function() TriggerEvent('instance:create', 'garage') @@ -149,7 +151,7 @@ AddEventHandler('esx_property:hasEnteredMarker', function(name, part, parking) ESX.Game.SpawnLocalVehicle(vehicles[j].vehicle.model, { x = garage.Parkings[i].Pos.x, y = garage.Parkings[i].Pos.y, - z = garage.Parkings[i].Pos.z + z = garage.Parkings[i].Pos.z + Config.ZDiff }, garage.Parkings[i].Heading, function(vehicle) ESX.Game.SetVehicleProperties(vehicle, vehicles[j].vehicle) end)