mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-16 14:27:44 +08:00
feat(CustomGuns): Added repair gun
This commit is contained in:
parent
edbe348a46
commit
dd6406e31c
46
BigBaseV2/src/features/looped/custom_guns/repair_vehicle.cpp
Normal file
46
BigBaseV2/src/features/looped/custom_guns/repair_vehicle.cpp
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
#include "features.hpp"
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
static const int controls[] = { 14, 15, 24 };
|
||||||
|
|
||||||
|
void features::repair_gun()
|
||||||
|
{
|
||||||
|
bool bRepairGun = g_settings.options["custom_gun"]["type"] == 6;
|
||||||
|
|
||||||
|
if (bRepairGun)
|
||||||
|
{
|
||||||
|
Hash currWeapon;
|
||||||
|
WEAPON::GET_CURRENT_PED_WEAPON(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId), &currWeapon, 1);
|
||||||
|
|
||||||
|
if (currWeapon != RAGE_JOAAT("weapon_pistol") && currWeapon != RAGE_JOAAT("weapon_pistol_mk2")) return;
|
||||||
|
|
||||||
|
if (PAD::IS_DISABLED_CONTROL_PRESSED(0, 25))
|
||||||
|
{
|
||||||
|
PLAYER::DISABLE_PLAYER_FIRING(g_playerId, true);
|
||||||
|
for (int control : controls)
|
||||||
|
PAD::DISABLE_CONTROL_ACTION(0, control, true);
|
||||||
|
|
||||||
|
if (PAD::IS_DISABLED_CONTROL_JUST_RELEASED(0, 24))
|
||||||
|
{
|
||||||
|
Entity entity;
|
||||||
|
|
||||||
|
if (functions::raycast_entity(&entity))
|
||||||
|
{
|
||||||
|
if (ENTITY::IS_ENTITY_A_VEHICLE(entity))
|
||||||
|
{
|
||||||
|
VEHICLE::SET_VEHICLE_FIXED(entity);
|
||||||
|
VEHICLE::SET_VEHICLE_DEFORMATION_FIXED(entity);
|
||||||
|
VEHICLE::SET_VEHICLE_DIRT_LEVEL(entity, 0.f);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
notify::above_map("Entity is not a vehicle.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else features::notify::above_map("No entity found.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -11,7 +11,8 @@ namespace big
|
|||||||
2, "Gravity Gun",
|
2, "Gravity Gun",
|
||||||
3, "J. Pow's Money Printer",
|
3, "J. Pow's Money Printer",
|
||||||
4, "Vehicle Yeeter",
|
4, "Vehicle Yeeter",
|
||||||
5, "Slave Caging"
|
5, "Slave Caging",
|
||||||
|
6, "Repair Gun"
|
||||||
};
|
};
|
||||||
|
|
||||||
inline const int64_t kick_hashes[]{ -1243454584,-1212832151,-1252906024,-1890951223,-442306200,-966559987,1977655521,1998625272,1070934291,764638896,-345371965,-1559754940,1347850743,495824472,1240585650,1129105265,1192658057,3042061272,2735212356, 3852661096,123310597000,122994296644, -1549630786, -1990292823, 1352706024, 12442595688, 11325146948, 11631995864, 96893296585, 98341941608, 97224492868, 97540793224, 1317868303,-1243454584,-1212832151,-1252906024,-1890951223,-442306200,-966559987,1977655521,1998625272,1070934291,764638896,-345371965,-1559754940,1347850743,495824472,1240585650,1129105265,1192658057,3042061272,2735212356, 3852661096,123310597000,122994296644, -1549630786, -1990292823, 1352706024,
|
inline const int64_t kick_hashes[]{ -1243454584,-1212832151,-1252906024,-1890951223,-442306200,-966559987,1977655521,1998625272,1070934291,764638896,-345371965,-1559754940,1347850743,495824472,1240585650,1129105265,1192658057,3042061272,2735212356, 3852661096,123310597000,122994296644, -1549630786, -1990292823, 1352706024, 12442595688, 11325146948, 11631995864, 96893296585, 98341941608, 97224492868, 97540793224, 1317868303,-1243454584,-1212832151,-1252906024,-1890951223,-442306200,-966559987,1977655521,1998625272,1070934291,764638896,-345371965,-1559754940,1347850743,495824472,1240585650,1129105265,1192658057,3042061272,2735212356, 3852661096,123310597000,122994296644, -1549630786, -1990292823, 1352706024,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user