From 8bad01ccf40c24c6d4528044ffdfc9c1aaa857e6 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Sun, 14 Jul 2024 22:51:45 +0800 Subject: [PATCH] [saco] Implement/match `CPlayerPed::SetMoney(...)` --- saco/game/playerped.cpp | 8 ++++++++ saco/game/playerped.h | 2 ++ saco/game/scripting.h | 2 ++ 3 files changed, 12 insertions(+) diff --git a/saco/game/playerped.cpp b/saco/game/playerped.cpp index 0ccb4c6..27ed163 100644 --- a/saco/game/playerped.cpp +++ b/saco/game/playerped.cpp @@ -405,6 +405,14 @@ void CPlayerPed::SetAnimationSet(PCHAR szAnim) //----------------------------------------------------------- +void CPlayerPed::SetMoney(int iAmount) +{ + ScriptCommand(&set_actor_money,m_dwGTAId,0); + ScriptCommand(&set_actor_money,m_dwGTAId,iAmount); +} + +//----------------------------------------------------------- + void CPlayerPed::StartGoggles() { if (HasGoggles()) return; diff --git a/saco/game/playerped.h b/saco/game/playerped.h index 9152a86..e4268c5 100644 --- a/saco/game/playerped.h +++ b/saco/game/playerped.h @@ -54,6 +54,8 @@ public: BOOL HasGoggles(); void SetAnimationSet(PCHAR szAnim); + void SetMoney(int iAmount); + CPlayerPed(); //char _gap0[813]; diff --git a/saco/game/scripting.h b/saco/game/scripting.h index a0dce49..9d27ee6 100644 --- a/saco/game/scripting.h +++ b/saco/game/scripting.h @@ -75,6 +75,8 @@ const SCRIPT_COMMAND is_animation_loaded = { 0x04EE, "s" }; const SCRIPT_COMMAND release_animation = { 0x04EF, "s" }; const SCRIPT_COMMAND set_actor_weapon_droppable = { 0x087e, "ii" }; +const SCRIPT_COMMAND set_actor_money = { 0x03fe, "ii" }; + const SCRIPT_COMMAND text_clear_all = { 0x00be, "" }; const SCRIPT_COMMAND create_radar_marker_icon = { 0x0570, "fffiv" };