mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-11-27 00:10:39 +00:00
[saco] Implement/match CPlayerPed::IsFighting()
This commit is contained in:
parent
a7ffe33721
commit
975fdd589e
@ -70,11 +70,19 @@ typedef struct _WEAPON_SLOT_TYPE
|
||||
|
||||
} WEAPON_SLOT_TYPE; // MUST BE EXACTLY ALIGNED TO 28 bytes
|
||||
|
||||
//-----------------------------------------------------------
|
||||
#pragma pack(1)
|
||||
typedef struct _PED_TASKS_TYPE
|
||||
{
|
||||
char _gap0[16];
|
||||
|
||||
DWORD * pdwJumpJetPack;
|
||||
|
||||
char _gap14[4];
|
||||
|
||||
// Extended Tasks
|
||||
DWORD * pdwFighting;
|
||||
|
||||
} PED_TASKS_TYPE;
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
@ -968,6 +968,17 @@ BOOL CPlayerPed::IsJumping()
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
BOOL CPlayerPed::IsFighting()
|
||||
{
|
||||
if(m_pPed && !IN_VEHICLE(m_pPed) && m_pPed->Tasks->pdwFighting)
|
||||
{
|
||||
return GetTaskTypeFromTask(m_pPed->Tasks->pdwFighting) == 1016;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
void CPlayerPed::StartJetpack()
|
||||
{
|
||||
if(!m_pPed) return;
|
||||
|
@ -109,6 +109,7 @@ public:
|
||||
void HoldItem(int iObject);
|
||||
|
||||
BOOL IsJumping();
|
||||
BOOL IsFighting();
|
||||
|
||||
float GetAimZ();
|
||||
void SetAimZ(float fAimZ);
|
||||
|
Loading…
Reference in New Issue
Block a user