mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-09-20 20:56:07 +08:00
[saco] Implement/match CPlayerPed::ClearAllWeapons()
This commit is contained in:
@ -352,6 +352,23 @@ void CPlayerPed::GiveWeapon(int iWeaponID, int iAmmo)
|
|||||||
|
|
||||||
//-----------------------------------------------------------
|
//-----------------------------------------------------------
|
||||||
|
|
||||||
|
void CPlayerPed::ClearAllWeapons()
|
||||||
|
{
|
||||||
|
DWORD dwPedPtr = (DWORD)m_pPed;
|
||||||
|
|
||||||
|
*pbyteCurrentPlayer = m_bytePlayerNumber;
|
||||||
|
|
||||||
|
if(dwPedPtr) {
|
||||||
|
_asm mov ecx, dwPedPtr
|
||||||
|
_asm mov eax, 0x5E6320
|
||||||
|
_asm call eax
|
||||||
|
}
|
||||||
|
|
||||||
|
*pbyteCurrentPlayer = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------
|
||||||
|
|
||||||
void CPlayerPed::SetArmedWeapon(int iWeaponType, bool bUnk)
|
void CPlayerPed::SetArmedWeapon(int iWeaponType, bool bUnk)
|
||||||
{
|
{
|
||||||
if(!m_pPed) return;
|
if(!m_pPed) return;
|
||||||
|
@ -47,6 +47,7 @@ public:
|
|||||||
|
|
||||||
void GiveWeapon(int iWeaponID, int iAmmo);
|
void GiveWeapon(int iWeaponID, int iAmmo);
|
||||||
void SetArmedWeapon(int iWeaponType, bool bUnk);
|
void SetArmedWeapon(int iWeaponType, bool bUnk);
|
||||||
|
void ClearAllWeapons();
|
||||||
WEAPON_SLOT_TYPE * GetCurrentWeaponSlot();
|
WEAPON_SLOT_TYPE * GetCurrentWeaponSlot();
|
||||||
WEAPON_SLOT_TYPE * FindWeaponSlot(DWORD dwWeapon);
|
WEAPON_SLOT_TYPE * FindWeaponSlot(DWORD dwWeapon);
|
||||||
BOOL HasAmmoForCurrentWeapon();
|
BOOL HasAmmoForCurrentWeapon();
|
||||||
|
Reference in New Issue
Block a user