mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-02-23 07:31:47 +00:00
[saco] Implement/match CPlayerPed::ClearAllWeapons()
This commit is contained in:
parent
d4ea1ee91e
commit
7cda157fd9
@ -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)
|
||||
{
|
||||
if(!m_pPed) return;
|
||||
|
@ -47,6 +47,7 @@ public:
|
||||
|
||||
void GiveWeapon(int iWeaponID, int iAmmo);
|
||||
void SetArmedWeapon(int iWeaponType, bool bUnk);
|
||||
void ClearAllWeapons();
|
||||
WEAPON_SLOT_TYPE * GetCurrentWeaponSlot();
|
||||
WEAPON_SLOT_TYPE * FindWeaponSlot(DWORD dwWeapon);
|
||||
BOOL HasAmmoForCurrentWeapon();
|
||||
|
Loading…
x
Reference in New Issue
Block a user