mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-17 23:07:26 +08:00
21 lines
618 B
C++
21 lines
618 B
C++
![]() |
#include "backend/looped_command.hpp"
|
||
|
#include "natives.hpp"
|
||
|
|
||
|
namespace big
|
||
|
{
|
||
|
class always_full_ammo : looped_command
|
||
|
{
|
||
|
using looped_command::looped_command;
|
||
|
|
||
|
virtual void on_tick() override
|
||
|
{
|
||
|
int max_ammo;
|
||
|
Hash weapon_hash;
|
||
|
WEAPON::GET_CURRENT_PED_WEAPON(self::ped, &weapon_hash, NULL);
|
||
|
if (WEAPON::IS_WEAPON_VALID(weapon_hash) && WEAPON::GET_MAX_AMMO(self::ped, weapon_hash, &max_ammo))
|
||
|
WEAPON::SET_PED_AMMO(self::ped, weapon_hash, max_ammo, 0);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
always_full_ammo g_always_full_ammo("alwaysfullammo", "Always Full Ammo", "Refills your ammo every tick", g.weapons.always_full_ammo);
|
||
|
}
|