From 31a5ac4013c3633647178e695474da6632eb38b8 Mon Sep 17 00:00:00 2001 From: Nico <122193236+Nico8340@users.noreply.github.com> Date: Fri, 10 May 2024 04:47:21 +0200 Subject: [PATCH] Display speedometer at resource start (#478) Update client.lua --- [gameplay]/speedometer/client.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/[gameplay]/speedometer/client.lua b/[gameplay]/speedometer/client.lua index 724200048..433af8e61 100644 --- a/[gameplay]/speedometer/client.lua +++ b/[gameplay]/speedometer/client.lua @@ -80,3 +80,11 @@ function integrityCheck() end end addEventHandler("onClientPlayerWasted", localPlayer, integrityCheck) + +addEventHandler("onClientResourceStart", resourceRoot, + function() + if isPedInVehicle(localPlayer) then + enterHandler(getPedOccupiedVehicle(localPlayer)) + end + end +) \ No newline at end of file