This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
YimMenu/src/backend/looped/weapons/infinite_ammo.cpp

26 lines
572 B
C++
Raw Normal View History

#include "backend/looped_command.hpp"
#include "natives.hpp"
2022-02-08 23:06:33 -05:00
namespace big
{
class infinite_ammo : looped_command
2022-02-08 23:06:33 -05:00
{
using looped_command::looped_command;
CWeaponInfo* p_modified_weapon = nullptr;
float og_recoil_value = 0.0f;
virtual void on_tick() override
{
WEAPON::SET_PED_INFINITE_AMMO(self::ped, TRUE, NULL);
}
2022-02-08 23:06:33 -05:00
virtual void on_disable() override
{
WEAPON::SET_PED_INFINITE_AMMO(self::ped, FALSE, NULL);
2022-02-08 23:06:33 -05:00
}
};
infinite_ammo g_infinite_ammo("infammo", "Infinite Ammo", "Never run out of ammo again", g.weapons.infinite_ammo);
}