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