From 9c4d7692a6de415185473035f6d1e9095d0340df Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Sun, 5 May 2024 22:16:50 +0800 Subject: [PATCH] [saco] Implement and match `CPlayerPed::SetActionTrigger(...)` --- saco/game/playerped.cpp | 9 +++++++++ saco/game/playerped.h | 1 + 2 files changed, 10 insertions(+) diff --git a/saco/game/playerped.cpp b/saco/game/playerped.cpp index be19b7b..03c254d 100644 --- a/saco/game/playerped.cpp +++ b/saco/game/playerped.cpp @@ -235,6 +235,15 @@ BYTE CPlayerPed::GetActionTrigger() return (BYTE)m_pPed->dwAction; } +//----------------------------------------------------------- + +void CPlayerPed::SetActionTrigger(BYTE byteTrigger) +{ + if(!m_pPed) return; + + m_pPed->dwAction = byteTrigger; +} + //----------------------------------------------------------- void CPlayerPed::GiveWeapon(int iWeaponID, int iAmmo) diff --git a/saco/game/playerped.h b/saco/game/playerped.h index 16ddbff..62ec1cf 100644 --- a/saco/game/playerped.h +++ b/saco/game/playerped.h @@ -36,6 +36,7 @@ public: void SetStateFlags(DWORD dwStateFlags); BOOL IsDead(); BYTE GetActionTrigger(); + void SetActionTrigger(BYTE byteTrigger); WORD GetAmmo();