diff --git a/saco/game/actorped.cpp b/saco/game/actorped.cpp index 560e731..84016ce 100644 --- a/saco/game/actorped.cpp +++ b/saco/game/actorped.cpp @@ -214,3 +214,16 @@ BOOL CActorPed::IsInVehicle() //----------------------------------------------------------- +void CActorPed::ToggleImmunity(BYTE byteEnable) +{ + if(!m_pPed) return; + + m_byteImmune = byteEnable; + + if(byteEnable) + ScriptCommand(&set_actor_immunities,m_dwGTAId,1,1,1,1,1); + else + ScriptCommand(&set_actor_immunities,m_dwGTAId,0,0,0,1,0); +} + +//----------------------------------------------------------- diff --git a/saco/game/actorped.h b/saco/game/actorped.h index 2c8167b..2322471 100644 --- a/saco/game/actorped.h +++ b/saco/game/actorped.h @@ -29,6 +29,7 @@ public: int opt1, int opt2, int opt3, int opt4, int iUnk); void ClearAnimations(); + void ToggleImmunity(BYTE byteEnable); PED_TYPE *m_pPed; DWORD m_dwMarkerID;