mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-04 00:23:27 +08:00
commit
29e2ca1197
@ -12,9 +12,13 @@ namespace big
|
|||||||
update_player_structs();
|
update_player_structs();
|
||||||
update_screen_sizes();
|
update_screen_sizes();
|
||||||
|
|
||||||
|
delete_gun();
|
||||||
disable_phone();
|
disable_phone();
|
||||||
god_mode();
|
god_mode();
|
||||||
|
gravity_gun();
|
||||||
|
money_gun();
|
||||||
never_wanted();
|
never_wanted();
|
||||||
|
noclip();
|
||||||
no_bike_fall();
|
no_bike_fall();
|
||||||
no_idle_kick();
|
no_idle_kick();
|
||||||
no_ragdoll();
|
no_ragdoll();
|
||||||
@ -26,6 +30,7 @@ namespace big
|
|||||||
spoof_rank();
|
spoof_rank();
|
||||||
sticky_tyres();
|
sticky_tyres();
|
||||||
super_sprint();
|
super_sprint();
|
||||||
|
vehicle_gun();
|
||||||
}
|
}
|
||||||
|
|
||||||
void features::script_func()
|
void features::script_func()
|
||||||
|
@ -29,10 +29,15 @@ namespace big
|
|||||||
void run_tick();
|
void run_tick();
|
||||||
void script_func();
|
void script_func();
|
||||||
|
|
||||||
|
void delete_gun();
|
||||||
|
void gravity_gun();
|
||||||
|
void money_gun();
|
||||||
|
void vehicle_gun();
|
||||||
|
|
||||||
void disable_phone();
|
void disable_phone();
|
||||||
void god_mode();
|
void god_mode();
|
||||||
void join_message(Player player);
|
|
||||||
void never_wanted();
|
void never_wanted();
|
||||||
|
void noclip();
|
||||||
void no_bike_fall();
|
void no_bike_fall();
|
||||||
void no_idle_kick();
|
void no_idle_kick();
|
||||||
void no_ragdoll();
|
void no_ragdoll();
|
||||||
|
@ -120,4 +120,127 @@ namespace big::features::functions
|
|||||||
|
|
||||||
g_settings.save();
|
g_settings.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool take_control_of_entity(Entity ent)
|
||||||
|
{
|
||||||
|
if (NETWORK::NETWORK_HAS_CONTROL_OF_ENTITY(ent)) return true;
|
||||||
|
for (uint8_t i = 0; !NETWORK::NETWORK_HAS_CONTROL_OF_ENTITY(ent) && i < 5; i++)
|
||||||
|
{
|
||||||
|
NETWORK::NETWORK_REQUEST_CONTROL_OF_ENTITY(ent);
|
||||||
|
|
||||||
|
script::get_current()->yield();
|
||||||
|
}
|
||||||
|
if (!NETWORK::NETWORK_HAS_CONTROL_OF_ENTITY(ent)) return false;
|
||||||
|
|
||||||
|
int netHandle = NETWORK::NETWORK_GET_NETWORK_ID_FROM_ENTITY(ent);
|
||||||
|
NETWORK::SET_NETWORK_ID_CAN_MIGRATE(netHandle, true);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL raycast_entity(Entity* ent)
|
||||||
|
{
|
||||||
|
BOOL hit;
|
||||||
|
Vector3 endCoords;
|
||||||
|
Vector3 surfaceNormal;
|
||||||
|
|
||||||
|
Vector3 camCoords = CAM::GET_GAMEPLAY_CAM_COORD();
|
||||||
|
Vector3 rot = CAM::GET_GAMEPLAY_CAM_ROT(2);
|
||||||
|
Vector3 dir = rotation_to_direction(rot);
|
||||||
|
Vector3 farCoords;
|
||||||
|
|
||||||
|
farCoords.x = camCoords.x + dir.x * 1000;
|
||||||
|
farCoords.y = camCoords.y + dir.y * 1000;
|
||||||
|
farCoords.z = camCoords.z + dir.z * 1000;
|
||||||
|
|
||||||
|
int ray = SHAPETEST::_START_SHAPE_TEST_RAY(camCoords.x, camCoords.y, camCoords.z, farCoords.x, farCoords.y, farCoords.z, -1, 0, 7);
|
||||||
|
SHAPETEST::GET_SHAPE_TEST_RESULT(ray, &hit, &endCoords, &surfaceNormal, ent);
|
||||||
|
|
||||||
|
return hit;
|
||||||
|
}
|
||||||
|
|
||||||
|
float deg_to_rad(float deg)
|
||||||
|
{
|
||||||
|
double radian = (3.14159265359 / 180) * deg;
|
||||||
|
return (float)radian;
|
||||||
|
}
|
||||||
|
|
||||||
|
Vector3 rotation_to_direction(Vector3 rotation)
|
||||||
|
{
|
||||||
|
float x = deg_to_rad(rotation.x);
|
||||||
|
float z = deg_to_rad(rotation.z);
|
||||||
|
|
||||||
|
float num = abs(cos(x));
|
||||||
|
|
||||||
|
return Vector3
|
||||||
|
{
|
||||||
|
-sin(z) * num,
|
||||||
|
cos(z) * num,
|
||||||
|
sin(x)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
double distance_between_vectors(Vector3 a, Vector3 b)
|
||||||
|
{
|
||||||
|
return sqrt(pow((a.x - b.x), 2) + pow((a.y - b.y), 2) + pow((a.z - b.z), 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
Entity spawn_vehicle(const char* model, Vector3 location, float heading)
|
||||||
|
{
|
||||||
|
Hash hash = MISC::GET_HASH_KEY(model);
|
||||||
|
|
||||||
|
if (hash)
|
||||||
|
{
|
||||||
|
for (uint8_t i = 0; !STREAMING::HAS_MODEL_LOADED(hash) && i < 100; i++)
|
||||||
|
{
|
||||||
|
STREAMING::REQUEST_MODEL(hash);
|
||||||
|
|
||||||
|
script::get_current()->yield();
|
||||||
|
}
|
||||||
|
if (!STREAMING::HAS_MODEL_LOADED(hash))
|
||||||
|
{
|
||||||
|
notify::above_map("~r~Failed to spawn model, did you give an incorrect model?");
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
*(unsigned short*)g_pointers->m_model_spawn_bypass = 0x9090;
|
||||||
|
Vehicle veh = VEHICLE::CREATE_VEHICLE(hash, location.x, location.y, location.z, heading, true, false, false);
|
||||||
|
*(unsigned short*)g_pointers->m_model_spawn_bypass = 0x0574;
|
||||||
|
|
||||||
|
script::get_current()->yield();
|
||||||
|
|
||||||
|
STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(hash);
|
||||||
|
|
||||||
|
if (*g_pointers->m_is_session_started)
|
||||||
|
{
|
||||||
|
DECORATOR::DECOR_SET_INT(veh, "MPBitset", 0);
|
||||||
|
ENTITY::_SET_ENTITY_SOMETHING(veh, true);
|
||||||
|
int networkId = NETWORK::VEH_TO_NET(veh);
|
||||||
|
if (NETWORK::NETWORK_GET_ENTITY_IS_NETWORKED(veh))
|
||||||
|
NETWORK::SET_NETWORK_ID_EXISTS_ON_ALL_MACHINES(networkId, true);
|
||||||
|
VEHICLE::SET_VEHICLE_IS_STOLEN(veh, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
return veh;
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void create_ambient_money(Vector3 location, int amount)
|
||||||
|
{
|
||||||
|
Hash hash = RAGE_JOAAT("PICKUP_MONEY_PAPER_BAG");
|
||||||
|
|
||||||
|
OBJECT::CREATE_AMBIENT_PICKUP(hash, location.x, location.y, location.z + 0.5f, 0, amount, hash, false, true);
|
||||||
|
STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(hash);
|
||||||
|
}
|
||||||
|
|
||||||
|
void cage_ped(Ped ped)
|
||||||
|
{
|
||||||
|
Hash hash = RAGE_JOAAT("prop_gold_cont_01");
|
||||||
|
|
||||||
|
Vector3 location = ENTITY::GET_ENTITY_COORDS(ped, true);
|
||||||
|
OBJECT::CREATE_OBJECT(hash, location.x, location.y, location.z - 1.f, true, false, false);
|
||||||
|
}
|
||||||
}
|
}
|
@ -12,4 +12,16 @@ namespace big::features::functions
|
|||||||
void set_player_level(int level);
|
void set_player_level(int level);
|
||||||
void spoof_rank(int rank);
|
void spoof_rank(int rank);
|
||||||
void toggle_protections(bool toggle);
|
void toggle_protections(bool toggle);
|
||||||
|
|
||||||
|
Entity spawn_vehicle(const char* model, Vector3 location, float heading);
|
||||||
|
|
||||||
|
void create_ambient_money(Vector3 location, int amount);
|
||||||
|
void cage_ped(Ped ped);
|
||||||
|
|
||||||
|
bool take_control_of_entity(Entity ent);
|
||||||
|
|
||||||
|
BOOL raycast_entity(Entity* ent);
|
||||||
|
float deg_to_rad(float deg);
|
||||||
|
Vector3 rotation_to_direction(Vector3 rotation);
|
||||||
|
double distance_between_vectors(Vector3 a, Vector3 b);
|
||||||
}
|
}
|
62
BigBaseV2/src/features/looped/delete_gun.cpp
Normal file
62
BigBaseV2/src/features/looped/delete_gun.cpp
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
#include "features.hpp"
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
static const int controls[] = { 14, 15, 24 };
|
||||||
|
|
||||||
|
void features::delete_gun()
|
||||||
|
{
|
||||||
|
bool bDeleteGun = g_settings.options["custom_gun"]["type"] == 1;
|
||||||
|
|
||||||
|
if (bDeleteGun)
|
||||||
|
{
|
||||||
|
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) && PED::IS_PED_A_PLAYER(entity))
|
||||||
|
{
|
||||||
|
notify::above_map("You can't delete player entities!");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Vector3 player = ENTITY::GET_ENTITY_COORDS(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId), true);
|
||||||
|
Vector3 entLoc = ENTITY::GET_ENTITY_COORDS(entity, true);
|
||||||
|
double dist = functions::distance_between_vectors(player, entLoc);
|
||||||
|
|
||||||
|
if (dist > 50)
|
||||||
|
{
|
||||||
|
notify::above_map("Entity is too far.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (functions::take_control_of_entity(entity))
|
||||||
|
{
|
||||||
|
ENTITY::DETACH_ENTITY(entity, 1, 1);
|
||||||
|
ENTITY::SET_ENTITY_COORDS_NO_OFFSET(entity, 0, 0, 0, 0, 0, 0);
|
||||||
|
ENTITY::SET_ENTITY_AS_MISSION_ENTITY(entity, 0, 1);
|
||||||
|
ENTITY::DELETE_ENTITY(&entity);
|
||||||
|
}
|
||||||
|
else notify::above_map("~r~Failed to take control of entity.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else features::notify::above_map("No entity found.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
115
BigBaseV2/src/features/looped/gravity_gun.cpp
Normal file
115
BigBaseV2/src/features/looped/gravity_gun.cpp
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
#include "features.hpp"
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
static Entity entity = 0;
|
||||||
|
static Vector3 location;
|
||||||
|
static Vector3 other;
|
||||||
|
static double dist;
|
||||||
|
|
||||||
|
static const int scroll = 2;
|
||||||
|
static const int controls[] = { 14, 15, 24 };
|
||||||
|
|
||||||
|
void features::gravity_gun()
|
||||||
|
{
|
||||||
|
bool bGravityGun = g_settings.options["custom_gun"]["type"] == 2;
|
||||||
|
double multiplier = g_settings.options["custom_gun"]["gravity_velocity_multiplier"];
|
||||||
|
|
||||||
|
if (bGravityGun)
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
|
||||||
|
// ZOOMED IN
|
||||||
|
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);
|
||||||
|
|
||||||
|
location = ENTITY::GET_ENTITY_COORDS(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId), true);
|
||||||
|
|
||||||
|
// Attack RELEASED
|
||||||
|
if (PAD::IS_DISABLED_CONTROL_PRESSED(0, 24) && entity == 0)
|
||||||
|
{
|
||||||
|
if (functions::raycast_entity(&entity))
|
||||||
|
{
|
||||||
|
if (ENTITY::IS_ENTITY_A_PED(entity) && PED::IS_PED_A_PLAYER(entity))
|
||||||
|
{
|
||||||
|
entity = 0;
|
||||||
|
|
||||||
|
notify::above_map("You can't move player entities!");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
other = ENTITY::GET_ENTITY_COORDS(entity, true);
|
||||||
|
dist = functions::distance_between_vectors(location, other);
|
||||||
|
|
||||||
|
if (dist > 50)
|
||||||
|
{
|
||||||
|
entity = 0;
|
||||||
|
|
||||||
|
notify::above_map("Entity is too far.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
functions::take_control_of_entity(entity);
|
||||||
|
|
||||||
|
features::notify::above_map("Selected entity at crosshair.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
entity = 0;
|
||||||
|
|
||||||
|
features::notify::above_map("No entity found.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ENTITY::DOES_ENTITY_EXIST(entity))
|
||||||
|
{
|
||||||
|
if (PAD::IS_DISABLED_CONTROL_PRESSED(0, 14))
|
||||||
|
dist -= 5;
|
||||||
|
if (PAD::IS_DISABLED_CONTROL_PRESSED(0, 15))
|
||||||
|
dist += 5;
|
||||||
|
|
||||||
|
functions::take_control_of_entity(entity);
|
||||||
|
|
||||||
|
ENTITY::SET_ENTITY_COLLISION(entity, false, false);
|
||||||
|
|
||||||
|
other = ENTITY::GET_ENTITY_COORDS(entity, true);
|
||||||
|
|
||||||
|
Vector3 rot = CAM::GET_GAMEPLAY_CAM_ROT(2);
|
||||||
|
float pitch = functions::deg_to_rad(rot.x); // vertical
|
||||||
|
// float roll = rot.y;
|
||||||
|
float yaw = functions::deg_to_rad(rot.z + 90); // horizontal
|
||||||
|
|
||||||
|
Vector3 velocity;
|
||||||
|
|
||||||
|
velocity.x = location.x + (dist * cos(pitch) * cos(yaw)) - other.x;
|
||||||
|
velocity.y = location.y + (dist * sin(yaw) * cos(pitch)) - other.y;
|
||||||
|
velocity.z = location.z + (dist * sin(pitch)) - other.z;
|
||||||
|
|
||||||
|
ENTITY::SET_ENTITY_VELOCITY(entity, velocity.x * multiplier, velocity.y * multiplier, velocity.z * multiplier);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (entity != 0)
|
||||||
|
{
|
||||||
|
ENTITY::SET_ENTITY_COLLISION(entity, true, true);
|
||||||
|
|
||||||
|
entity = 0;
|
||||||
|
|
||||||
|
features::notify::above_map("Released entity.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
float deg_to_rad(float deg)
|
||||||
|
{
|
||||||
|
double radian = (3.14159265359 / 180) * deg;
|
||||||
|
return (float)radian;
|
||||||
|
}
|
||||||
|
}
|
@ -1,22 +0,0 @@
|
|||||||
#include "features.hpp"
|
|
||||||
#include "pointers.hpp"
|
|
||||||
|
|
||||||
namespace big
|
|
||||||
{
|
|
||||||
void features::join_message(Player player)
|
|
||||||
{
|
|
||||||
if (player == g_playerId) return;
|
|
||||||
|
|
||||||
bool bJoinMessage = g_settings.options["join_message"].get<bool>();
|
|
||||||
|
|
||||||
if (bJoinMessage)
|
|
||||||
{
|
|
||||||
char joinMsg[64];
|
|
||||||
strcpy(joinMsg, "<C>");
|
|
||||||
strcat(joinMsg, g_pointers->m_get_player_name(player));
|
|
||||||
strcat(joinMsg, "</C> is joining.");
|
|
||||||
|
|
||||||
features::notify::above_map(joinMsg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
57
BigBaseV2/src/features/looped/money_gun.cpp
Normal file
57
BigBaseV2/src/features/looped/money_gun.cpp
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
#include "features.hpp"
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
static const int controls[] = { 14, 15, 24 };
|
||||||
|
|
||||||
|
static bool busy = false;
|
||||||
|
static Entity entity = 0;
|
||||||
|
|
||||||
|
void features::money_gun()
|
||||||
|
{
|
||||||
|
bool bMoneyGun = g_settings.options["custom_gun"]["type"] == 3;
|
||||||
|
|
||||||
|
if (bMoneyGun)
|
||||||
|
{
|
||||||
|
Ped player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId);
|
||||||
|
|
||||||
|
Hash currWeapon;
|
||||||
|
WEAPON::GET_CURRENT_PED_WEAPON(player, &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_PRESSED(0, 24) && !busy)
|
||||||
|
{
|
||||||
|
busy = true;
|
||||||
|
|
||||||
|
QUEUE_JOB_BEGIN_CLAUSE(&)
|
||||||
|
{
|
||||||
|
if (functions::raycast_entity(&entity))
|
||||||
|
{
|
||||||
|
if (!ENTITY::IS_ENTITY_A_PED(entity) || !PED::IS_PED_A_PLAYER(entity))
|
||||||
|
{
|
||||||
|
busy = false;
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Vector3 location = ENTITY::GET_ENTITY_COORDS(entity, true);
|
||||||
|
|
||||||
|
features::functions::create_ambient_money(location, rand() % 500 + 2000);
|
||||||
|
|
||||||
|
script::get_current()->yield(33ms);
|
||||||
|
|
||||||
|
busy = false;
|
||||||
|
}
|
||||||
|
}QUEUE_JOB_END_CLAUSE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
76
BigBaseV2/src/features/looped/noclip.cpp
Normal file
76
BigBaseV2/src/features/looped/noclip.cpp
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
#include "features.hpp"
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
static const int controls[] = { 21, 32, 33, 34, 35, 36 };
|
||||||
|
static const float speed = 20.f;
|
||||||
|
static const float headingSpeed = 3.f;
|
||||||
|
|
||||||
|
static bool bLastNoClip;
|
||||||
|
|
||||||
|
void features::noclip()
|
||||||
|
{
|
||||||
|
bool bNoclip = g_settings.options["noclip"]["enabled"];
|
||||||
|
float fHorizontal = g_settings.options["noclip"]["horizontal"];
|
||||||
|
float fVertical = g_settings.options["noclip"]["vertical"];
|
||||||
|
|
||||||
|
Entity ent = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId);
|
||||||
|
bool inVehicle = PED::IS_PED_IN_ANY_VEHICLE(ent, true);
|
||||||
|
if (inVehicle) ent = PED::GET_VEHICLE_PED_IS_IN(ent, false);
|
||||||
|
|
||||||
|
if (bNoclip)
|
||||||
|
{
|
||||||
|
functions::take_control_of_entity(ent);
|
||||||
|
|
||||||
|
ENTITY::SET_ENTITY_COLLISION(ent, false, false);
|
||||||
|
|
||||||
|
for (int control : controls)
|
||||||
|
PAD::DISABLE_CONTROL_ACTION(0, control, true);
|
||||||
|
|
||||||
|
Vector3 cur_pos = ENTITY::GET_ENTITY_COORDS(ent, true);
|
||||||
|
Vector3 vel = { 0.f, 0.f, 0.07f };
|
||||||
|
float heading = 0.f;
|
||||||
|
|
||||||
|
// Left Shift
|
||||||
|
if (PAD::IS_DISABLED_CONTROL_PRESSED(0, 21))
|
||||||
|
vel.z += speed;
|
||||||
|
// Left Control
|
||||||
|
if (PAD::IS_DISABLED_CONTROL_PRESSED(0, 36))
|
||||||
|
vel.z -= speed;
|
||||||
|
// Forward
|
||||||
|
if (PAD::IS_DISABLED_CONTROL_PRESSED(0, 32))
|
||||||
|
vel.y += speed;
|
||||||
|
// Backward
|
||||||
|
if (PAD::IS_DISABLED_CONTROL_PRESSED(0, 33))
|
||||||
|
vel.y -= speed;
|
||||||
|
// Left
|
||||||
|
if (PAD::IS_DISABLED_CONTROL_PRESSED(0, 34))
|
||||||
|
{
|
||||||
|
if (inVehicle) heading += headingSpeed;
|
||||||
|
vel.x -= speed;
|
||||||
|
}
|
||||||
|
// Right
|
||||||
|
if (PAD::IS_DISABLED_CONTROL_PRESSED(0, 35))
|
||||||
|
{
|
||||||
|
if (inVehicle) heading -= headingSpeed;
|
||||||
|
vel.x += speed;
|
||||||
|
}
|
||||||
|
|
||||||
|
Vector3 offset = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(ent, vel.x, vel.y, 0.f);
|
||||||
|
vel.x = offset.x - cur_pos.x;
|
||||||
|
vel.y = offset.y - cur_pos.y;
|
||||||
|
|
||||||
|
ENTITY::SET_ENTITY_ROTATION(ent, 0.f, 0.f, ENTITY::GET_ENTITY_HEADING(ent) + heading, 0, true);
|
||||||
|
|
||||||
|
ENTITY::SET_ENTITY_VELOCITY(ent, vel.x * fHorizontal, vel.y * fHorizontal, vel.z * fVertical);
|
||||||
|
}
|
||||||
|
else if (!bNoclip && bNoclip != bLastNoClip)
|
||||||
|
{
|
||||||
|
functions::take_control_of_entity(ent);
|
||||||
|
|
||||||
|
ENTITY::SET_ENTITY_COLLISION(ent, true, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
bLastNoClip = bNoclip;
|
||||||
|
}
|
||||||
|
}
|
@ -3,17 +3,25 @@
|
|||||||
|
|
||||||
namespace big
|
namespace big
|
||||||
{
|
{
|
||||||
|
static bool bReset = true;
|
||||||
void features::spectate_player()
|
void features::spectate_player()
|
||||||
{
|
{
|
||||||
if (g_selectedPlayerId == -1 || !g_selectedPlayer.is_online || !g_temp.spectate_player)
|
if (g_selectedPlayerId == -1 || !g_selectedPlayer.is_online || !g_temp.spectate_player)
|
||||||
{
|
{
|
||||||
if (g_temp.spectate_player) g_temp.spectate_player = false;
|
if (g_temp.spectate_player) g_temp.spectate_player = false;
|
||||||
|
|
||||||
g_pointers->m_spectate_player(false, -1);
|
if (!bReset)
|
||||||
|
{
|
||||||
|
bReset = true;
|
||||||
|
|
||||||
|
g_pointers->m_spectate_player(false, -1);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_pointers->m_spectate_player(true, PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_selectedPlayerId));
|
g_pointers->m_spectate_player(true, PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_selectedPlayerId));
|
||||||
|
|
||||||
|
bReset = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,55 +1,55 @@
|
|||||||
#include "features.hpp"
|
#include "features.hpp"
|
||||||
|
|
||||||
namespace big
|
namespace big
|
||||||
{
|
{
|
||||||
static bool bLastSuperSprint = false;
|
static bool bLastSuperSprint = false;
|
||||||
static bool bSkyDiving = false;
|
static bool bSkyDiving = false;
|
||||||
|
|
||||||
void features::super_sprint()
|
void features::super_sprint()
|
||||||
{
|
{
|
||||||
bool bSuperSprint = g_settings.options["super_sprint"].get<bool>();
|
Ped player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId);
|
||||||
|
|
||||||
if (bSuperSprint)
|
if (PED::IS_PED_IN_ANY_VEHICLE(player, true)) return;
|
||||||
{
|
|
||||||
QUEUE_JOB_BEGIN_CLAUSE(= )
|
bool bSuperSprint = g_settings.options["super_sprint"].get<bool>();
|
||||||
{
|
|
||||||
Ped player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId);
|
if (bSuperSprint)
|
||||||
Vector3 location = ENTITY::GET_ENTITY_COORDS(player, true);
|
{
|
||||||
float ground;
|
float height = ENTITY::GET_ENTITY_HEIGHT_ABOVE_GROUND(player);
|
||||||
MISC::GET_GROUND_Z_FOR_3D_COORD(location.x, location.y, location.z, &ground, 0, 0);
|
|
||||||
|
bool flying = height > 5;
|
||||||
bool flying = location.z - ground > 3;
|
if (flying && !bSkyDiving)
|
||||||
if (flying && !bSkyDiving)
|
{
|
||||||
{
|
TASK::TASK_SKY_DIVE(player, true);
|
||||||
TASK::TASK_SKY_DIVE(player, true);
|
|
||||||
|
bSkyDiving = true;
|
||||||
bSkyDiving = true;
|
}
|
||||||
}
|
else if (!flying && bSkyDiving)
|
||||||
else if (!flying && bSkyDiving)
|
{
|
||||||
bSkyDiving = false;
|
bSkyDiving = false;
|
||||||
|
flying = false;
|
||||||
if (TASK::IS_PED_SPRINTING(player) || flying)
|
|
||||||
{
|
TASK::TASK_SKY_DIVE(player, false);
|
||||||
Vector3 offset = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(player, 0, 0.6, 0);
|
}
|
||||||
ENTITY::APPLY_FORCE_TO_ENTITY(player, 1, 0.0f, 1.3, bSkyDiving ? 1.f : 0.f, 0.0f, 0.0f, 0.0f, 0, 1, 1, 1, 0, 1);
|
|
||||||
|
if (TASK::IS_PED_SPRINTING(player) || flying)
|
||||||
PLAYER::SET_PLAYER_SPRINT(g_playerId, 1);
|
{
|
||||||
PLAYER::SET_RUN_SPRINT_MULTIPLIER_FOR_PLAYER(g_playerId, 1.49);
|
Vector3 offset = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(player, 0, 0.6, 0);
|
||||||
}
|
ENTITY::APPLY_FORCE_TO_ENTITY(player, 1, 0.0f, 1.3, bSkyDiving ? 1.f : 0.f, 0.0f, 0.0f, 0.0f, 0, 1, 1, 1, 0, 1);
|
||||||
else
|
|
||||||
{
|
PLAYER::SET_PLAYER_SPRINT(g_playerId, 1);
|
||||||
PLAYER::SET_RUN_SPRINT_MULTIPLIER_FOR_PLAYER(g_playerId, 1.0);
|
PLAYER::SET_RUN_SPRINT_MULTIPLIER_FOR_PLAYER(g_playerId, 1.49);
|
||||||
}
|
}
|
||||||
}QUEUE_JOB_END_CLAUSE
|
else
|
||||||
}
|
{
|
||||||
else if (!bSuperSprint && bSuperSprint != bLastSuperSprint)
|
PLAYER::SET_RUN_SPRINT_MULTIPLIER_FOR_PLAYER(g_playerId, 1.0);
|
||||||
{
|
}
|
||||||
QUEUE_JOB_BEGIN_CLAUSE(= )
|
}
|
||||||
{
|
else if (!bSuperSprint && bSuperSprint != bLastSuperSprint)
|
||||||
PLAYER::SET_RUN_SPRINT_MULTIPLIER_FOR_PLAYER(g_playerId, 1.0);
|
{
|
||||||
}QUEUE_JOB_END_CLAUSE
|
PLAYER::SET_RUN_SPRINT_MULTIPLIER_FOR_PLAYER(g_playerId, 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
bLastSuperSprint = bSuperSprint;
|
bLastSuperSprint = bSuperSprint;
|
||||||
}
|
}
|
||||||
}
|
}
|
42
BigBaseV2/src/features/looped/vehicle_gun.cpp
Normal file
42
BigBaseV2/src/features/looped/vehicle_gun.cpp
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
#include "features.hpp"
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
static const int controls[] = { 14, 15, 24 };
|
||||||
|
|
||||||
|
void features::vehicle_gun()
|
||||||
|
{
|
||||||
|
bool bVehicleGun = g_settings.options["custom_gun"]["type"] == 4;
|
||||||
|
|
||||||
|
if (bVehicleGun)
|
||||||
|
{
|
||||||
|
Ped player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId);
|
||||||
|
|
||||||
|
Hash currWeapon;
|
||||||
|
WEAPON::GET_CURRENT_PED_WEAPON(player, &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))
|
||||||
|
{
|
||||||
|
Vector3 location = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(player, 0.f, 15.f, 0.f);
|
||||||
|
Vehicle veh = functions::spawn_vehicle(
|
||||||
|
"bus",
|
||||||
|
location,
|
||||||
|
ENTITY::GET_ENTITY_HEADING(player)
|
||||||
|
);
|
||||||
|
|
||||||
|
script::get_current()->yield();
|
||||||
|
|
||||||
|
ENTITY::APPLY_FORCE_TO_ENTITY(veh, 1, 0.f, 150.f, 0.f, 0.f, 0.f, 0.f, 0, 1, 1, 1, 0, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -9,7 +9,6 @@ namespace big::functions
|
|||||||
using get_native_handler_t = rage::scrNativeHandler(*)(rage::scrNativeRegistrationTable*, rage::scrNativeHash);
|
using get_native_handler_t = rage::scrNativeHandler(*)(rage::scrNativeRegistrationTable*, rage::scrNativeHash);
|
||||||
using fix_vectors_t = void(*)(rage::scrNativeCallContext*);
|
using fix_vectors_t = void(*)(rage::scrNativeCallContext*);
|
||||||
|
|
||||||
using censor_chat = int(int64_t chat_menu, const char* user_text, const char** output_text);
|
|
||||||
using error_screen = void(char* entryHeader, char* entryLine1, int instructionalKey, char* entryLine2, BOOL p4, Any p5, Any* p6, Any* p7, BOOL background);
|
using error_screen = void(char* entryHeader, char* entryLine1, int instructionalKey, char* entryLine2, BOOL p4, Any p5, Any* p6, Any* p7, BOOL background);
|
||||||
using increment_stat_event = bool(uint64_t net_event_struct, int64_t sender, int64_t a3);
|
using increment_stat_event = bool(uint64_t net_event_struct, int64_t sender, int64_t a3);
|
||||||
using get_event_data = bool(int32_t eventGroup, int32_t eventIndex, int64_t* args, uint32_t argCount);
|
using get_event_data = bool(int32_t eventGroup, int32_t eventIndex, int64_t* args, uint32_t argCount);
|
||||||
|
@ -1687,6 +1687,17 @@ enum PedBones : std::uint32_t
|
|||||||
FB_Tongue_001 = 0xB987
|
FB_Tongue_001 = 0xB987
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum FreemodePlayerEvents : int64_t
|
||||||
|
{
|
||||||
|
PlayerJoined = 1120313136, //args 2 JOINED = 1289518925
|
||||||
|
PlayerPaused = 2383153667,
|
||||||
|
PlayerUnpaused = 3717680613,
|
||||||
|
ChatOpened = 2965958374,
|
||||||
|
ChatClosed = 1841943281,
|
||||||
|
LsCustomsEntered = 2098987581,
|
||||||
|
LsCustomsExit = 465570678,
|
||||||
|
};
|
||||||
|
|
||||||
enum RemoteEvents : int64_t
|
enum RemoteEvents : int64_t
|
||||||
{
|
{
|
||||||
Bounty = -116602735,
|
Bounty = -116602735,
|
||||||
|
@ -70,3 +70,7 @@ class CNetGamePlayer;
|
|||||||
class CNetworkPlayerMgr;
|
class CNetworkPlayerMgr;
|
||||||
class CPlayerInfo;
|
class CPlayerInfo;
|
||||||
class CNetworkObjectMgr;
|
class CNetworkObjectMgr;
|
||||||
|
|
||||||
|
class CReplayInterface;
|
||||||
|
class CObjectInterface;
|
||||||
|
class CVehicleInterface;
|
||||||
|
@ -32,6 +32,42 @@ namespace rage
|
|||||||
scrVector(float x, float y, float z) :
|
scrVector(float x, float y, float z) :
|
||||||
x(x), y(y), z(z)
|
x(x), y(y), z(z)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
scrVector operator+(const scrVector& other)
|
||||||
|
{
|
||||||
|
scrVector vec;
|
||||||
|
vec.x = this->x + other.x;
|
||||||
|
vec.y = this->y + other.y;
|
||||||
|
vec.z = this->z + other.z;
|
||||||
|
return vec;
|
||||||
|
}
|
||||||
|
|
||||||
|
scrVector operator-(const scrVector& other)
|
||||||
|
{
|
||||||
|
scrVector vec;
|
||||||
|
vec.x = this->x - other.x;
|
||||||
|
vec.y = this->y - other.y;
|
||||||
|
vec.z = this->z - other.z;
|
||||||
|
return vec;
|
||||||
|
}
|
||||||
|
|
||||||
|
scrVector operator*(const scrVector& other)
|
||||||
|
{
|
||||||
|
scrVector vec;
|
||||||
|
vec.x = this->x * other.x;
|
||||||
|
vec.y = this->y * other.y;
|
||||||
|
vec.z = this->z * other.z;
|
||||||
|
return vec;
|
||||||
|
}
|
||||||
|
|
||||||
|
scrVector operator*(const float& other)
|
||||||
|
{
|
||||||
|
scrVector vec;
|
||||||
|
vec.x = this->x * other;
|
||||||
|
vec.y = this->y * other;
|
||||||
|
vec.z = this->z * other;
|
||||||
|
return vec;
|
||||||
|
}
|
||||||
public:
|
public:
|
||||||
float x{};
|
float x{};
|
||||||
private:
|
private:
|
||||||
|
@ -11,6 +11,7 @@ namespace big
|
|||||||
{
|
{
|
||||||
ImGui::BeginTabBar("tabbar");
|
ImGui::BeginTabBar("tabbar");
|
||||||
tabbar::render_self();
|
tabbar::render_self();
|
||||||
|
tabbar::render_weapons();
|
||||||
tabbar::render_tunables();
|
tabbar::render_tunables();
|
||||||
tabbar::render_teleport();
|
tabbar::render_teleport();
|
||||||
tabbar::render_vehicle();
|
tabbar::render_vehicle();
|
||||||
|
@ -155,8 +155,15 @@ namespace big
|
|||||||
{
|
{
|
||||||
Vector3 coords = ENTITY::GET_ENTITY_COORDS(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_selectedPlayer.id), true);
|
Vector3 coords = ENTITY::GET_ENTITY_COORDS(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_selectedPlayer.id), true);
|
||||||
|
|
||||||
OBJECT::CREATE_AMBIENT_PICKUP(0x1E9A99F8, coords.x, coords.y, coords.z + 0.5f, 0, rand() % 500 + 2000, (Hash)-1666779307, false, true);
|
features::functions::create_ambient_money(coords, rand() % 500 + 2000);
|
||||||
STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED((Hash)-1666779307);
|
}QUEUE_JOB_END_CLAUSE
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ImGui::Button("Cage"))
|
||||||
|
{
|
||||||
|
QUEUE_JOB_BEGIN_CLAUSE()
|
||||||
|
{
|
||||||
|
features::functions::cage_ped(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_selectedPlayer.id));
|
||||||
}QUEUE_JOB_END_CLAUSE
|
}QUEUE_JOB_END_CLAUSE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ namespace big
|
|||||||
public:
|
public:
|
||||||
// Order in the order that they are rendered/sorted in the UI
|
// Order in the order that they are rendered/sorted in the UI
|
||||||
static void render_self();
|
static void render_self();
|
||||||
|
static void render_weapons();
|
||||||
static void render_tunables();
|
static void render_tunables();
|
||||||
static void render_teleport();
|
static void render_teleport();
|
||||||
static void render_vehicle();
|
static void render_vehicle();
|
||||||
|
@ -46,25 +46,7 @@ namespace big
|
|||||||
|
|
||||||
if (ImGui::TreeNode("Money"))
|
if (ImGui::TreeNode("Money"))
|
||||||
{
|
{
|
||||||
ImGui::Text("Instructions:\n\nTake a vehicle from the street.\nGo in LSC and put a tracker on it.\nOpen the sell submenu but don't confirm it.\nOpen this menu and click one of the below buttons.");
|
ImGui::Text("Removed because is has been detected...");
|
||||||
|
|
||||||
if (ImGui::Button("Set Car Sell Value at 25 million"))
|
|
||||||
{
|
|
||||||
features::functions::set_car_sell_value((int)25e6);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImGui::Button("Set Car Sell Value at INT_MAX (2.1 billion)"))
|
|
||||||
{
|
|
||||||
features::functions::set_car_sell_value(INT_MAX);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImGui::Button("Reset Vehicle Sell Stats"))
|
|
||||||
{
|
|
||||||
QUEUE_JOB_BEGIN_CLAUSE()
|
|
||||||
{
|
|
||||||
features::functions::reset_vehicle_sell_stats();
|
|
||||||
}QUEUE_JOB_END_CLAUSE
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::TreePop();
|
ImGui::TreePop();
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,21 @@ namespace big
|
|||||||
|
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
|
if (ImGui::TreeNode("No Clip"))
|
||||||
|
{
|
||||||
|
if (ImGui::Checkbox("No Clip", g_settings.options["noclip"]["enabled"].get<bool*>()))
|
||||||
|
g_settings.save();
|
||||||
|
|
||||||
|
const double min = 0.0, max = 10.0;
|
||||||
|
if (ImGui::SliderScalar("Horizontal Multiplier", ImGuiDataType_Double, g_settings.options["noclip"]["horizontal"].get<double*>(), &min, &max))
|
||||||
|
g_settings.save();
|
||||||
|
if (ImGui::SliderScalar("Vertical Multiplier", ImGuiDataType_Double, g_settings.options["noclip"]["vertical"].get<double*>(), &min, &max))
|
||||||
|
g_settings.save();
|
||||||
|
|
||||||
|
ImGui::TreePop();
|
||||||
|
}
|
||||||
|
ImGui::Separator();
|
||||||
|
|
||||||
if (ImGui::Checkbox("God Mode", g_settings.options["god_mode"].get<bool*>()) || ImGui::Checkbox("No Ragdoll", g_settings.options["ragdoll"].get<bool*>()))
|
if (ImGui::Checkbox("God Mode", g_settings.options["god_mode"].get<bool*>()) || ImGui::Checkbox("No Ragdoll", g_settings.options["ragdoll"].get<bool*>()))
|
||||||
g_settings.save();
|
g_settings.save();
|
||||||
|
|
||||||
|
@ -9,54 +9,17 @@ namespace big
|
|||||||
{
|
{
|
||||||
if (ImGui::BeginTabItem("Spawn"))
|
if (ImGui::BeginTabItem("Spawn"))
|
||||||
{
|
{
|
||||||
ImGui::InputText("Model Name", model, sizeof(model));
|
if (
|
||||||
|
ImGui::InputText("Model Name", model, sizeof(model), ImGuiInputTextFlags_EnterReturnsTrue) ||
|
||||||
if (ImGui::Button("Spawn"))
|
ImGui::Button("Spawn")
|
||||||
|
)
|
||||||
{
|
{
|
||||||
QUEUE_JOB_BEGIN_CLAUSE(= )
|
QUEUE_JOB_BEGIN_CLAUSE(= )
|
||||||
{
|
{
|
||||||
Hash hash = MISC::GET_HASH_KEY((const char*)model);
|
Ped player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId);
|
||||||
|
Vector3 location = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(player, .0, 8.0, .5);
|
||||||
|
|
||||||
if (hash)
|
features::functions::spawn_vehicle((const char*)model, location, ENTITY::GET_ENTITY_HEADING(player) + 90.f);
|
||||||
{
|
|
||||||
int tries = 0;
|
|
||||||
const int max = 100;
|
|
||||||
while (!STREAMING::HAS_MODEL_LOADED(hash) && tries < max)
|
|
||||||
{
|
|
||||||
STREAMING::REQUEST_MODEL(hash);
|
|
||||||
|
|
||||||
tries++;
|
|
||||||
|
|
||||||
script::get_current()->yield();
|
|
||||||
}
|
|
||||||
if (tries >= max)
|
|
||||||
{
|
|
||||||
features::notify::above_map("~r~Failed to spawn model, did you give an incorrect model?");
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Ped player = PLAYER::PLAYER_PED_ID();
|
|
||||||
|
|
||||||
Vector3 location = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(player, .0, 8.0, .5);
|
|
||||||
*(unsigned short*)g_pointers->m_model_spawn_bypass = 0x9090;
|
|
||||||
Vehicle veh = VEHICLE::CREATE_VEHICLE(hash, location.x, location.y, location.z, ENTITY::GET_ENTITY_HEADING(PLAYER::PLAYER_PED_ID()) + 90.f, true, false, false);
|
|
||||||
*(unsigned short*)g_pointers->m_model_spawn_bypass = 0x0574;
|
|
||||||
|
|
||||||
script::get_current()->yield();
|
|
||||||
|
|
||||||
STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(hash);
|
|
||||||
|
|
||||||
if (*g_pointers->m_is_session_started)
|
|
||||||
{
|
|
||||||
DECORATOR::DECOR_SET_INT(veh, "MPBitset", 0);
|
|
||||||
ENTITY::_SET_ENTITY_SOMETHING(veh, true);
|
|
||||||
int networkId = NETWORK::VEH_TO_NET(veh);
|
|
||||||
if (NETWORK::NETWORK_GET_ENTITY_IS_NETWORKED(veh))
|
|
||||||
NETWORK::SET_NETWORK_ID_EXISTS_ON_ALL_MACHINES(networkId, true);
|
|
||||||
VEHICLE::SET_VEHICLE_IS_STOLEN(veh, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}QUEUE_JOB_END_CLAUSE
|
}QUEUE_JOB_END_CLAUSE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
59
BigBaseV2/src/gui/tab_bar/tab_weapons.cpp
Normal file
59
BigBaseV2/src/gui/tab_bar/tab_weapons.cpp
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
#include "tab_bar.hpp"
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
static const double min = 1, max = 5;
|
||||||
|
|
||||||
|
void tabbar::render_weapons()
|
||||||
|
{
|
||||||
|
if (ImGui::BeginTabItem("Weapons"))
|
||||||
|
{
|
||||||
|
if (ImGui::TreeNode("Custom Weapons"))
|
||||||
|
{
|
||||||
|
uint8_t selected = g_settings.options["custom_gun"]["type"];
|
||||||
|
|
||||||
|
if (ImGui::BeginCombo("Weapon", custom_guns[selected].name))
|
||||||
|
{
|
||||||
|
for (custom_gun gun : custom_guns)
|
||||||
|
{
|
||||||
|
if (ImGui::Selectable(gun.name, gun.id == selected))
|
||||||
|
{
|
||||||
|
g_settings.options["custom_gun"]["type"] = gun.id;
|
||||||
|
|
||||||
|
g_settings.save();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gun.id == selected)
|
||||||
|
ImGui::SetItemDefaultFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::EndCombo();
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (selected)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
ImGui::Text("No custom weapon selected.");
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
if (ImGui::SliderScalar("Multiplier", ImGuiDataType_Double, g_settings.options["custom_gun"]["gravity_velocity_multiplier"].get<double*>(), &min, &max))
|
||||||
|
g_settings.save();
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
ImGui::Text("Set the vehicle model to spawn.");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::TreePop();
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::EndTabItem();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -39,7 +39,6 @@ namespace big
|
|||||||
m_run_script_threads_hook("Script hook", g_pointers->m_run_script_threads, &hooks::run_script_threads),
|
m_run_script_threads_hook("Script hook", g_pointers->m_run_script_threads, &hooks::run_script_threads),
|
||||||
m_convert_thread_to_fiber_hook("ConvertThreadToFiber", memory::module("kernel32.dll").get_export("ConvertThreadToFiber").as<void*>(), &hooks::convert_thread_to_fiber),
|
m_convert_thread_to_fiber_hook("ConvertThreadToFiber", memory::module("kernel32.dll").get_export("ConvertThreadToFiber").as<void*>(), &hooks::convert_thread_to_fiber),
|
||||||
|
|
||||||
m_censor_chat("Censor Chat", g_pointers->m_censor_chat, &hooks::censor_chat),
|
|
||||||
m_get_event_data("Get Event Data", g_pointers->m_get_event_data, &hooks::get_event_data),
|
m_get_event_data("Get Event Data", g_pointers->m_get_event_data, &hooks::get_event_data),
|
||||||
m_error_screen_hook("Disable Warning/Error Screen", g_pointers->m_error_screen, &hooks::error_screen),
|
m_error_screen_hook("Disable Warning/Error Screen", g_pointers->m_error_screen, &hooks::error_screen),
|
||||||
m_increment_stat_hook("Increment Stat Event", g_pointers->m_increment_stat_event, &hooks::increment_stat_event),
|
m_increment_stat_hook("Increment Stat Event", g_pointers->m_increment_stat_event, &hooks::increment_stat_event),
|
||||||
@ -69,7 +68,6 @@ namespace big
|
|||||||
m_convert_thread_to_fiber_hook.enable();
|
m_convert_thread_to_fiber_hook.enable();
|
||||||
|
|
||||||
// New hooks enable
|
// New hooks enable
|
||||||
m_censor_chat.enable();
|
|
||||||
m_get_event_data.enable();
|
m_get_event_data.enable();
|
||||||
m_error_screen_hook.enable();
|
m_error_screen_hook.enable();
|
||||||
m_increment_stat_hook.enable();
|
m_increment_stat_hook.enable();
|
||||||
@ -90,7 +88,6 @@ namespace big
|
|||||||
m_swapchain_hook.disable();
|
m_swapchain_hook.disable();
|
||||||
|
|
||||||
// New hooks disable
|
// New hooks disable
|
||||||
m_censor_chat.disable();
|
|
||||||
m_get_event_data.disable();
|
m_get_event_data.disable();
|
||||||
m_error_screen_hook.disable();
|
m_error_screen_hook.disable();
|
||||||
m_increment_stat_hook.disable();
|
m_increment_stat_hook.disable();
|
||||||
|
@ -22,7 +22,6 @@ namespace big
|
|||||||
static BOOL set_cursor_pos(int x, int y);
|
static BOOL set_cursor_pos(int x, int y);
|
||||||
|
|
||||||
// New Hook Definitions
|
// New Hook Definitions
|
||||||
static int censor_chat(int64_t chat_menu, const char* user_text, const char** output_text);
|
|
||||||
static bool get_event_data(int32_t eventGroup, int32_t eventIndex, int64_t* args, uint32_t argCount);
|
static bool get_event_data(int32_t eventGroup, int32_t eventIndex, int64_t* args, uint32_t argCount);
|
||||||
static void error_screen(char* entryHeader, char* entryLine1, int instructionalKey, char* entryLine2, BOOL p4, Any p5, Any* p6, Any* p7, BOOL background);
|
static void error_screen(char* entryHeader, char* entryLine1, int instructionalKey, char* entryLine2, BOOL p4, Any p5, Any* p6, Any* p7, BOOL background);
|
||||||
static bool increment_stat_event(uint64_t net_event_struct, int64_t sender, int64_t a3);
|
static bool increment_stat_event(uint64_t net_event_struct, int64_t sender, int64_t a3);
|
||||||
@ -57,7 +56,6 @@ namespace big
|
|||||||
detour_hook m_convert_thread_to_fiber_hook;
|
detour_hook m_convert_thread_to_fiber_hook;
|
||||||
|
|
||||||
// New Detour Hook Definitions
|
// New Detour Hook Definitions
|
||||||
detour_hook m_censor_chat;
|
|
||||||
detour_hook m_get_event_data;
|
detour_hook m_get_event_data;
|
||||||
detour_hook m_error_screen_hook;
|
detour_hook m_error_screen_hook;
|
||||||
detour_hook m_increment_stat_hook;
|
detour_hook m_increment_stat_hook;
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
#include "hooking.hpp"
|
|
||||||
|
|
||||||
namespace big
|
|
||||||
{
|
|
||||||
int hooks::censor_chat(int64_t chat_menu, const char* user_text, const char** output_text)
|
|
||||||
{
|
|
||||||
if (g_settings.options["disable_chat_censoring"].get<bool>()) return -1;
|
|
||||||
|
|
||||||
return g_hooking->m_censor_chat.get_original<decltype(&hooks::censor_chat)>()(chat_menu, user_text, output_text);
|
|
||||||
}
|
|
||||||
}
|
|
59
BigBaseV2/src/hooks/read_session_response.cpp
Normal file
59
BigBaseV2/src/hooks/read_session_response.cpp
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
#include "hooking.hpp"
|
||||||
|
#include "features.hpp"
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
bool hooks::read_session_response(uint64_t rcx)
|
||||||
|
{
|
||||||
|
bool bReturn = true;
|
||||||
|
|
||||||
|
if (rcx && *(uint32_t*)(rcx + 0x23C4)) {
|
||||||
|
uint32_t i = 0;
|
||||||
|
do {
|
||||||
|
uint64_t address = rcx + 0x22C0 + (i * 8);
|
||||||
|
if (*(uint64_t*)(address)) {
|
||||||
|
const char* responseData = *(const char**)(address);
|
||||||
|
if (responseData) {
|
||||||
|
try {
|
||||||
|
nlohmann::json Json = nlohmann::json::parse(responseData);
|
||||||
|
if (Json.find("gsinfo") == Json.end()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint64_t rockstar_id = std::stoul(Json["_id"].get<std::string>().substr(3));
|
||||||
|
std::string gs_info_json = Json["gsinfo"].get<std::string>();
|
||||||
|
|
||||||
|
features::notify::above_map("HOOK GOT DRIP.");
|
||||||
|
|
||||||
|
LOG(INFO) << "Rockstar ID: " << rockstar_id;
|
||||||
|
LOG(INFO) << "Data: ";
|
||||||
|
LOG(INFO) << gs_info_json;
|
||||||
|
LOG(INFO) << rockstar_id << " == " << g_rid_joiner.rid;
|
||||||
|
|
||||||
|
if (rockstar_id == g_rid_joiner.rid) {
|
||||||
|
if (gs_info_json.empty())
|
||||||
|
{
|
||||||
|
// PendingTimeout = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_rid_joiner.gs_info = gs_info_json;
|
||||||
|
}
|
||||||
|
|
||||||
|
bReturn = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (...) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
i++;
|
||||||
|
} while (i < *(uint32_t*)(rcx + 0x23C4));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!bReturn) return false;
|
||||||
|
return g_hooking->m_read_session_response.get_original<decltype(&hooks::read_session_response)>()(rcx);
|
||||||
|
}
|
||||||
|
}
|
@ -1,17 +1,39 @@
|
|||||||
#include "hooking.hpp"
|
#include "hooking.hpp"
|
||||||
|
#include "features.hpp"
|
||||||
|
#include "pointers.hpp"
|
||||||
#include "natives.hpp"
|
#include "natives.hpp"
|
||||||
|
#include "gta/enums.hpp"
|
||||||
|
|
||||||
namespace big
|
namespace big
|
||||||
{
|
{
|
||||||
bool hooks::script_event_handler(std::int64_t NetEventStruct, std::int64_t CNetGamePlayer)
|
bool hooks::script_event_handler(std::int64_t NetEventStruct, std::int64_t CNetGamePlayer)
|
||||||
{
|
{
|
||||||
auto args = reinterpret_cast<std::int64_t*>(NetEventStruct + 0x70);
|
auto args = reinterpret_cast<std::int64_t*>(NetEventStruct + 0x70);
|
||||||
Player SenderID = *reinterpret_cast<std::int8_t*>(CNetGamePlayer + 0x2D);
|
Player player = *reinterpret_cast<std::int8_t*>(CNetGamePlayer + 0x2D);
|
||||||
|
|
||||||
const auto ScriptEventHash = args[0];
|
int64_t hash = args[0];
|
||||||
|
|
||||||
|
switch (hash)
|
||||||
|
{
|
||||||
|
case FreemodePlayerEvents::PlayerJoined:
|
||||||
|
if (g_settings.options["join_message"].get<bool>() && args[2] == 1289518925)
|
||||||
|
{
|
||||||
|
char join_msg[128];
|
||||||
|
sprintf(join_msg, "<C>%s</C> is joining...", g_pointers->m_get_player_name((Player)args[1]));
|
||||||
|
|
||||||
|
features::notify::above_map(join_msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (g_settings.options["settings"]["logging"]["script_events"])
|
if (g_settings.options["settings"]["logging"]["script_events"])
|
||||||
LOG(INFO) << "Received Script Event " << ScriptEventHash << " from Player " << PLAYER::GET_PLAYER_NAME(SenderID);
|
{
|
||||||
|
LOG(INFO) << "Received Script Event";
|
||||||
|
LOG(INFO) << "Player: " << PLAYER::GET_PLAYER_NAME(player);
|
||||||
|
LOG(INFO) << "Hash: " << hash;
|
||||||
|
|
||||||
|
for (int i = 1; i < sizeof(args); i++)
|
||||||
|
LOG(INFO) << "Arg #" << i << ": " << args[i];
|
||||||
|
}
|
||||||
|
|
||||||
return g_hooking->m_script_event_hook.get_original<decltype(&script_event_handler)>()(NetEventStruct, CNetGamePlayer);
|
return g_hooking->m_script_event_hook.get_original<decltype(&script_event_handler)>()(NetEventStruct, CNetGamePlayer);
|
||||||
}
|
}
|
||||||
|
@ -113,11 +113,6 @@ namespace big
|
|||||||
m_spectate_player = ptr.as<decltype(m_spectate_player)>();
|
m_spectate_player = ptr.as<decltype(m_spectate_player)>();
|
||||||
});
|
});
|
||||||
|
|
||||||
main_batch.add("Censor Chat", "E8 ? ? ? ? 83 F8 FF 75 B9", [this](memory::handle ptr)
|
|
||||||
{
|
|
||||||
m_censor_chat = ptr.as<decltype(m_censor_chat)>();
|
|
||||||
});
|
|
||||||
|
|
||||||
main_batch.add("Get Net player", "48 83 EC 28 33 C0 38 05 ? ? ? ? 74 0A", [this](memory::handle ptr)
|
main_batch.add("Get Net player", "48 83 EC 28 33 C0 38 05 ? ? ? ? 74 0A", [this](memory::handle ptr)
|
||||||
{
|
{
|
||||||
m_get_net_game_player = ptr.as<decltype(m_get_net_game_player)>();
|
m_get_net_game_player = ptr.as<decltype(m_get_net_game_player)>();
|
||||||
@ -127,6 +122,11 @@ namespace big
|
|||||||
{
|
{
|
||||||
m_get_event_data = ptr.sub(28).as<decltype(m_get_event_data)>();
|
m_get_event_data = ptr.sub(28).as<decltype(m_get_event_data)>();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
main_batch.add("Replay Interface", "48 8D 0D ? ? ? ? 48 8B D7 E8 ? ? ? ? 48 8D 0D ? ? ? ? 8A D8 E8 ? ? ? ? 84 DB 75 13 48 8D 0D", [this](memory::handle ptr)
|
||||||
|
{
|
||||||
|
m_replay_interface = ptr.add(3).rip().as<CReplayInterface**>();
|
||||||
|
});
|
||||||
|
|
||||||
main_batch.run(memory::module(nullptr));
|
main_batch.run(memory::module(nullptr));
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ namespace big
|
|||||||
|
|
||||||
CPedFactory **m_ped_factory{};
|
CPedFactory **m_ped_factory{};
|
||||||
CNetworkPlayerMgr **m_network_player_mgr{};
|
CNetworkPlayerMgr **m_network_player_mgr{};
|
||||||
|
CReplayInterface **m_replay_interface{};
|
||||||
|
|
||||||
rage::scrNativeRegistrationTable *m_native_registration_table{};
|
rage::scrNativeRegistrationTable *m_native_registration_table{};
|
||||||
functions::get_native_handler_t m_get_native_handler{};
|
functions::get_native_handler_t m_get_native_handler{};
|
||||||
@ -35,7 +36,6 @@ namespace big
|
|||||||
|
|
||||||
PVOID m_model_spawn_bypass;
|
PVOID m_model_spawn_bypass;
|
||||||
|
|
||||||
functions::censor_chat* m_censor_chat{};
|
|
||||||
functions::error_screen* m_error_screen{};
|
functions::error_screen* m_error_screen{};
|
||||||
functions::get_event_data* m_get_event_data{};
|
functions::get_event_data* m_get_event_data{};
|
||||||
functions::get_player_name* m_get_player_name{};
|
functions::get_player_name* m_get_player_name{};
|
||||||
|
@ -13,11 +13,21 @@ namespace big
|
|||||||
nlohmann::json options;
|
nlohmann::json options;
|
||||||
nlohmann::json default_options =
|
nlohmann::json default_options =
|
||||||
R"({
|
R"({
|
||||||
|
"custom_gun": {
|
||||||
|
"gravity_velocity_multiplier": 3.0,
|
||||||
|
"type": 0,
|
||||||
|
"vehicle_spawn_model": "bus"
|
||||||
|
},
|
||||||
"disable_phone": false,
|
"disable_phone": false,
|
||||||
"disable_chat_censoring": false,
|
"disable_chat_censoring": false,
|
||||||
"god_mode": false,
|
"god_mode": false,
|
||||||
"join_message": false,
|
"join_message": false,
|
||||||
"never_wanted": false,
|
"never_wanted": false,
|
||||||
|
"noclip": {
|
||||||
|
"enabled": false,
|
||||||
|
"horizontal": 5.0,
|
||||||
|
"vertical": 1.0
|
||||||
|
},
|
||||||
"no_bike_fall": false,
|
"no_bike_fall": false,
|
||||||
"no_idle_kick": false,
|
"no_idle_kick": false,
|
||||||
"off_radar": false,
|
"off_radar": false,
|
||||||
|
8
BigBaseV2/src/structs/custom_gun.hpp
Normal file
8
BigBaseV2/src/structs/custom_gun.hpp
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
struct custom_gun {
|
||||||
|
uint8_t id;
|
||||||
|
char name[64];
|
||||||
|
};
|
||||||
|
}
|
@ -1,9 +1,18 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#include "custom_gun.hpp"
|
||||||
#include "location.hpp"
|
#include "location.hpp"
|
||||||
#include "session_type.hpp"
|
#include "session_type.hpp"
|
||||||
|
|
||||||
namespace big
|
namespace big
|
||||||
{
|
{
|
||||||
|
inline custom_gun custom_guns[] = {
|
||||||
|
0, "None",
|
||||||
|
1, "Delete From Existence",
|
||||||
|
2, "Gravity Gun",
|
||||||
|
3, "Money Printer",
|
||||||
|
4, "Vehicle Yeeter"
|
||||||
|
};
|
||||||
|
|
||||||
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[]{ 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,
|
||||||
-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,
|
-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 };
|
11830075615, 9210190337, 97531341784, 96893296585, 98341941608, 97817687821, 96466936033, 97729421535, 95109536257, 97863584373, 96793954985, 97234617022, 96487905784, 95560214803, 97571415657, 97224492868, 95807148815, 97540793224 };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user