diff --git a/saco/game/playerped.cpp b/saco/game/playerped.cpp index 6e81aa1..7f0438f 100644 --- a/saco/game/playerped.cpp +++ b/saco/game/playerped.cpp @@ -39,7 +39,7 @@ CPlayerPed::CPlayerPed() m_iDanceState = 0; field_2DE = 0; field_2E2 = 0; - field_48 = 0; + m_iCellPhoneEnabled = 0; m_bGoggleState = FALSE; field_2C1 = 0; field_2C5 = 0; @@ -1301,6 +1301,15 @@ void CPlayerPed::DestroyFollowPedTask() //----------------------------------------------------------- +void CPlayerPed::ToggleCellphone(int iOn) +{ + if(!m_pPed) return; + m_iCellPhoneEnabled = iOn; + ScriptCommand(&toggle_actor_cellphone,m_dwGTAId,iOn); +} + +//----------------------------------------------------------- + void CPlayerPed::ProcessVehicleHorn() { if(!m_pPed) return; diff --git a/saco/game/playerped.h b/saco/game/playerped.h index 638b0e9..33c384e 100644 --- a/saco/game/playerped.h +++ b/saco/game/playerped.h @@ -114,6 +114,7 @@ public: VECTOR *p4, int p5, float p6, int p7, int p8, int p9); void DestroyFollowPedTask(); + void ToggleCellphone(int iOn); BOOL IsJumping(); BOOL IsFighting(); @@ -133,9 +134,7 @@ public: VECTOR* GetBonePosition(int iBone, VECTOR *vecPos); VECTOR* GetTransformedBonePosition(int iBone, VECTOR *vecOffset); - //char _gap0[813]; - //char _gap0[741]; - int field_48; + int m_iCellPhoneEnabled; int field_4C[10]; struc_97 field_74[10]; int field_27C[10]; diff --git a/saco/game/scripting.h b/saco/game/scripting.h index 6a18937..6798d28 100644 --- a/saco/game/scripting.h +++ b/saco/game/scripting.h @@ -110,6 +110,8 @@ const SCRIPT_COMMAND create_pickup_with_ammo = { 0x032b, "iiifffv" }; const SCRIPT_COMMAND destroy_pickup = { 0x0215, "i" }; +const SCRIPT_COMMAND toggle_actor_cellphone = { 0x0729, "ii" }; + const SCRIPT_COMMAND actor_task_handsup = { 0x5c4, "ii" }; const SCRIPT_COMMAND link_vehicle_to_interior = { 0x0840, "ii" };