feat(CustomGuns): Added cage gun
This commit is contained in:
parent
9f925a13ab
commit
7df7ad65be
@ -14,6 +14,7 @@ namespace big
|
||||
update_screen_sizes();
|
||||
|
||||
// Custom Guns
|
||||
cage_gun();
|
||||
delete_gun();
|
||||
gravity_gun();
|
||||
money_gun();
|
||||
@ -43,6 +44,9 @@ namespace big
|
||||
// Util
|
||||
spectate_player();
|
||||
|
||||
// Protections
|
||||
replay_interface();
|
||||
//version_mismatch();
|
||||
}
|
||||
|
||||
void features::script_func()
|
||||
|
@ -29,11 +29,15 @@ namespace big
|
||||
void run_tick();
|
||||
void script_func();
|
||||
|
||||
void cage_gun();
|
||||
void delete_gun();
|
||||
void gravity_gun();
|
||||
void money_gun();
|
||||
void vehicle_gun();
|
||||
|
||||
void replay_interface();
|
||||
void version_mismatch();
|
||||
|
||||
void disable_phone();
|
||||
void god_mode();
|
||||
void never_wanted();
|
||||
|
40
BigBaseV2/src/features/looped/custom_guns/cage_gun.cpp
Normal file
40
BigBaseV2/src/features/looped/custom_guns/cage_gun.cpp
Normal file
@ -0,0 +1,40 @@
|
||||
#include "features.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
static const int controls[] = { 14, 15, 24 };
|
||||
|
||||
void features::cage_gun()
|
||||
{
|
||||
bool bCageGun = g_settings.options["custom_gun"]["type"] == 5;
|
||||
|
||||
if (bCageGun)
|
||||
{
|
||||
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_PED(entity))
|
||||
{
|
||||
functions::cage_ped(entity);
|
||||
}
|
||||
}
|
||||
else features::notify::above_map("No entity found.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -9,11 +9,12 @@ namespace big
|
||||
0, "None",
|
||||
1, "Delete From Existence",
|
||||
2, "Gravity Gun",
|
||||
3, "Money Printer",
|
||||
4, "Vehicle Yeeter"
|
||||
3, "J. Pow's Money Printer",
|
||||
4, "Vehicle Yeeter",
|
||||
5, "Slave Caging"
|
||||
};
|
||||
|
||||
inline const int64_t kick_hashes[]{ 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, 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,
|
||||
-1549630786, -1990292823, -920663435, -891346918, -1729804184, -966559987, -1890951223, -1252906024, 665709549, -2065346036, 823645419, 1881968783, 2565163112, 2404016073, 3328407309, -977515445, 767605081, -1054826273, 1620254541, 1401831542, 1428412924, 10993950665, 11672069737, 12442595688, 11325146948, 11918341901, 10567590113,
|
||||
11830075615, 9210190337, 97531341784, 96893296585, 98341941608, 97817687821, 96466936033, 97729421535, 95109536257, 97863584373, 96793954985, 97234617022, 96487905784, 95560214803, 97571415657, 97224492868, 95807148815, 97540793224 };
|
||||
|
||||
|
Reference in New Issue
Block a user