From 5acce16261606f06e39e09d0bd6ec0d95787ae38 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Thu, 25 Jul 2019 23:34:29 +0300 Subject: Running script part 3 --- src/core/PlayerInfo.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/core/PlayerInfo.cpp') diff --git a/src/core/PlayerInfo.cpp b/src/core/PlayerInfo.cpp index 81c7a199..d9a4c0b0 100644 --- a/src/core/PlayerInfo.cpp +++ b/src/core/PlayerInfo.cpp @@ -1,7 +1,9 @@ #include "common.h" #include "patcher.h" +#include "PlayerPed.h" #include "PlayerInfo.h" #include "Frontend.h" +#include "Vehicle.h" WRAPPER void CPlayerInfo::MakePlayerSafe(bool) { EAXJMP(0x4A1400); } WRAPPER void CPlayerInfo::LoadPlayerSkin() { EAXJMP(0x4A1700); } @@ -12,3 +14,10 @@ void CPlayerInfo::SetPlayerSkin(char *skin) strncpy(m_aSkinName, skin, 32); LoadPlayerSkin(); } + +CVector& CPlayerInfo::GetPos() +{ + if (m_pPed->bInVehicle && m_pPed->m_pMyVehicle) + return m_pPed->m_pMyVehicle->GetPosition(); + return m_pPed->GetPosition(); +} -- cgit v1.2.3