From 138c70caf233ab17426323e91fd1228defc86f15 Mon Sep 17 00:00:00 2001 From: iSentrie Date: Sun, 19 Feb 2023 19:22:29 +0200 Subject: [PATCH 1/3] Don't push forward if vehicle is locked If locked / handbraked don't perform push forward, but allow animation. --- client/main.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/client/main.lua b/client/main.lua index bd4c02e..9667c7a 100644 --- a/client/main.lua +++ b/client/main.lua @@ -119,6 +119,7 @@ local function startMove(netid, direction, pedid) remotepush = true while remotepush do Wait(0) + if GetVehicleDoorLockStatus(vehicle) > 1 then return end if IsEntityInAir(vehicle) or IsEntityUpsidedown(vehicle) or IsEntityAttachedToAnyVehicle(remoteped) == false then remotepush = false return TriggerServerEvent('OT_pushvehicle:detach', netid) From 4407f17f570dc4fa79e2f010837348c17d32bcc4 Mon Sep 17 00:00:00 2001 From: iSentrie Date: Sun, 19 Feb 2023 19:45:02 +0200 Subject: [PATCH 2/3] don't push if driver seat is not empty in most scenarios we won't want to allow that, people pushing your car over the cliffs and so on, i think it's a good idea to have this disabled too --- client/main.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/client/main.lua b/client/main.lua index 9667c7a..bc1ca79 100644 --- a/client/main.lua +++ b/client/main.lua @@ -120,6 +120,7 @@ local function startMove(netid, direction, pedid) while remotepush do Wait(0) if GetVehicleDoorLockStatus(vehicle) > 1 then return end + if GetPedInVehicleSeat(vehicle, -1) > 0 then return end if IsEntityInAir(vehicle) or IsEntityUpsidedown(vehicle) or IsEntityAttachedToAnyVehicle(remoteped) == false then remotepush = false return TriggerServerEvent('OT_pushvehicle:detach', netid) From fea1db53e03954a270f4ed22bcfa201eea81a3f8 Mon Sep 17 00:00:00 2001 From: iSentrie Date: Sun, 19 Feb 2023 19:45:34 +0200 Subject: [PATCH 3/3] indentation --- client/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/main.lua b/client/main.lua index bc1ca79..d0c17d6 100644 --- a/client/main.lua +++ b/client/main.lua @@ -120,7 +120,7 @@ local function startMove(netid, direction, pedid) while remotepush do Wait(0) if GetVehicleDoorLockStatus(vehicle) > 1 then return end - if GetPedInVehicleSeat(vehicle, -1) > 0 then return end + if GetPedInVehicleSeat(vehicle, -1) > 0 then return end if IsEntityInAir(vehicle) or IsEntityUpsidedown(vehicle) or IsEntityAttachedToAnyVehicle(remoteped) == false then remotepush = false return TriggerServerEvent('OT_pushvehicle:detach', netid)