From b65e643be4c3415bc8fb8c87bac003bfc5645912 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Thu, 31 Oct 2024 17:43:13 +0800 Subject: [PATCH] [saco] Implement/match `CRemotePlayer::ExitVehicle()` --- saco/net/remoteplayer.cpp | 9 +++++++++ saco/net/remoteplayer.h | 1 + 2 files changed, 10 insertions(+) diff --git a/saco/net/remoteplayer.cpp b/saco/net/remoteplayer.cpp index 4e91c88..b33d1ff 100644 --- a/saco/net/remoteplayer.cpp +++ b/saco/net/remoteplayer.cpp @@ -100,3 +100,12 @@ void CRemotePlayer::EnterVehicle(VEHICLEID VehicleID, BOOL bPassenger) //---------------------------------------------------- +void CRemotePlayer::ExitVehicle() +{ + if(m_pPlayerPed && m_pPlayerPed->IsInVehicle()) { + m_pPlayerPed->SetKeys(0,0,0); + m_pPlayerPed->ExitCurrentVehicle(); + } +} + +//---------------------------------------------------- diff --git a/saco/net/remoteplayer.h b/saco/net/remoteplayer.h index 9e9f9f8..16be238 100644 --- a/saco/net/remoteplayer.h +++ b/saco/net/remoteplayer.h @@ -62,6 +62,7 @@ public: DWORD GetPlayerColorAsARGB(); void EnterVehicle(VEHICLEID VehicleID, BOOL bPassenger); + void ExitVehicle(); }; //----------------------------------------------------