From 26b4d070421d450ae0f41dc240cb44c0409453a0 Mon Sep 17 00:00:00 2001 From: Federico De Bona Date: Mon, 25 May 2020 20:38:24 +0200 Subject: [PATCH] Hope it fix the problem of Lof --- client.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client.lua b/client.lua index 5b349e5b..46f7b23a 100644 --- a/client.lua +++ b/client.lua @@ -102,7 +102,6 @@ function wakeup() local playerPed = PlayerPedId() local pos = GetEntityCoords(GetPlayerPed(-1)) - -- non serve specificare x, y, z perchè si alza? TaskStartScenarioAtPosition(playerPed, currentScenario, 0.0, 0.0, 0.0, 180.0, 2, true, false) while IsPedUsingScenario(GetPlayerPed(-1), currentScenario) do Wait(100) @@ -120,7 +119,7 @@ end function sit(object, modelName, data) -- Fix for sit on chairs behind walls - if not HasEntityClearLosToEntity(GetPlayerPed(-1), object, 126) then + if not HasEntityClearLosToEntity(GetPlayerPed(-1), object, 17) then return end disableControls = true @@ -130,7 +129,7 @@ function sit(object, modelName, data) PlaceObjectOnGroundProperly(object) local pos = GetEntityCoords(object) local playerPos = GetEntityCoords(GetPlayerPed(-1)) - local objectCoords = string.sub(pos.x, 1, 7) .. string.sub(pos.y, 1, 7) .. string.sub(pos.z, 1, 7) + local objectCoords = pos.x .. pos.y .. pos.z ESX.TriggerServerCallback('esx_sit:getPlace', function(occupied) if occupied then