[saco] Implement and match CPlayerPed::GetCurrentWeapon()

This commit is contained in:
RD42 committed 2024-05-05 18:52:08 +08:00
1 parent 1ff732c35c
commit f7ff8d45df
3 files changed
+16

No files matched your search

+13
View File
@@ -123,6 +123,19 @@ void CPlayerPed::SetCurrentAim(CAMERA_AIM *pAim)
GameStoreRemotePlayerAim(m_bytePlayerNumber, pAim);
}
//-----------------------------------------------------------
BYTE CPlayerPed::GetCurrentWeapon()
{
if(!m_pPed) return 0;
if(GamePool_Ped_GetAt(m_dwGTAId) == 0) return 0;
DWORD dwRetVal;
ScriptCommand(&get_actor_armed_weapon,m_dwGTAId,&dwRetVal);
return (BYTE)dwRetVal;
}
//-----------------------------------------------------------
void CPlayerPed::GiveWeapon(int iWeaponID, int iAmmo)
{
if(!m_pPed) return;