refactor(Restructure): Moved everything to their own class/struct to improve compile times and cleanup the code.
This commit is contained in:
parent
8c9a829ef4
commit
c6c7fbd90f
@ -49,9 +49,13 @@
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include "logger.hpp"
|
||||
|
||||
#include "settings.h"
|
||||
|
||||
#include "gta/ped_factory.hpp"
|
||||
#include "structs/lists.hpp"
|
||||
#include "structs/player.hpp"
|
||||
#include "structs/temp.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
using namespace std::chrono_literals;
|
||||
@ -63,4 +67,16 @@ namespace big
|
||||
inline HANDLE g_main_thread{};
|
||||
inline DWORD g_main_thread_id{};
|
||||
inline std::atomic_bool g_running{ true };
|
||||
|
||||
// Global Variables
|
||||
inline player g_player;
|
||||
inline player g_selectedPlayer;
|
||||
inline std::unordered_map<Player, player> g_players;
|
||||
|
||||
inline CAutomobile* g_vehicle;
|
||||
|
||||
inline temp g_temp = temp{};
|
||||
|
||||
// screen width and height
|
||||
inline int x, y;
|
||||
}
|
||||
|
@ -1,54 +1,41 @@
|
||||
#include "features.hpp"
|
||||
#include "logger.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "features/custom_guns.hpp"
|
||||
#include "features/protections.hpp"
|
||||
#include "features/self.hpp"
|
||||
#include "features/sys.hpp"
|
||||
#include "features/tunables.hpp"
|
||||
#include "features/util.hpp"
|
||||
#include "features/vehicle.hpp"
|
||||
#include "features/world.hpp"
|
||||
#include "script.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void features::run_tick()
|
||||
{
|
||||
g_playerId = PLAYER::PLAYER_ID();
|
||||
|
||||
// System
|
||||
update_player_structs();
|
||||
update_screen_sizes();
|
||||
sys::loop();
|
||||
|
||||
// Custom Guns
|
||||
cage_gun();
|
||||
delete_gun();
|
||||
gravity_gun();
|
||||
money_gun();
|
||||
repair_gun();
|
||||
vehicle_gun();
|
||||
|
||||
// Tunable
|
||||
disable_phone();
|
||||
no_idle_kick();
|
||||
|
||||
// Self
|
||||
god_mode();
|
||||
never_wanted();
|
||||
noclip();
|
||||
no_ragdoll();
|
||||
off_radar();
|
||||
super_sprint();
|
||||
spoof_rank();
|
||||
|
||||
// Vehicle
|
||||
handling();
|
||||
no_bike_fall();
|
||||
speedo_meter();
|
||||
sticky_tyres();
|
||||
|
||||
// World
|
||||
population_modifiers();
|
||||
|
||||
// Util
|
||||
spectate_player();
|
||||
custom_guns::loop();
|
||||
|
||||
// Protections
|
||||
replay_interface();
|
||||
//version_mismatch();
|
||||
protections::loop();
|
||||
|
||||
// Self
|
||||
self::loop();
|
||||
|
||||
// Tunable
|
||||
tunables::loop();
|
||||
|
||||
// Util
|
||||
util::loop();
|
||||
|
||||
// Vehicle
|
||||
vehicle::loop();
|
||||
|
||||
// World
|
||||
world::loop();
|
||||
}
|
||||
|
||||
void features::script_func()
|
||||
|
@ -1,69 +1,11 @@
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "gta/joaat.hpp"
|
||||
#include "structs/lists.hpp"
|
||||
#include "structs/player.hpp"
|
||||
#include "structs/temp.hpp"
|
||||
#include "features/functions.hpp"
|
||||
#include "features/notify.hpp"
|
||||
#include "features/stats.hpp"
|
||||
#include "features/teleport.hpp"
|
||||
#include "gta/ped_factory.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
inline Player g_playerId;
|
||||
inline Player g_selectedPlayerId;
|
||||
|
||||
inline player g_currentPlayer;
|
||||
inline player g_selectedPlayer;
|
||||
inline player g_players[32];
|
||||
|
||||
// Temporary Variable struct
|
||||
inline temp g_temp = temp{};
|
||||
|
||||
inline CAutomobile* g_vehicle;
|
||||
inline bool g_in_vehicle = false;
|
||||
|
||||
inline bool g_handling_window = false;
|
||||
|
||||
// Screen Width & Height
|
||||
inline int x, y;
|
||||
|
||||
namespace features
|
||||
{
|
||||
void run_tick();
|
||||
void script_func();
|
||||
|
||||
void cage_gun();
|
||||
void delete_gun();
|
||||
void gravity_gun();
|
||||
void money_gun();
|
||||
void repair_gun();
|
||||
void vehicle_gun();
|
||||
|
||||
void replay_interface();
|
||||
void version_mismatch();
|
||||
|
||||
void disable_phone();
|
||||
void god_mode();
|
||||
void never_wanted();
|
||||
void noclip();
|
||||
void no_bike_fall();
|
||||
void no_idle_kick();
|
||||
void no_ragdoll();
|
||||
void off_radar();
|
||||
void population_modifiers();
|
||||
void spectate_player();
|
||||
void speedo_meter();
|
||||
void spoof_rank();
|
||||
void sticky_tyres();
|
||||
void super_sprint();
|
||||
|
||||
void handling();
|
||||
|
||||
void update_screen_sizes();
|
||||
void update_player_structs();
|
||||
}
|
||||
}
|
||||
|
26
BigBaseV2/src/features/custom_guns.cpp
Normal file
26
BigBaseV2/src/features/custom_guns.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
#include "custom_guns.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "script.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
static bool busy = false;
|
||||
|
||||
void custom_guns::loop()
|
||||
{
|
||||
if (busy) return;
|
||||
busy = true;
|
||||
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
cage_gun();
|
||||
delete_gun();
|
||||
gravity_gun();
|
||||
money_gun();
|
||||
repair_gun();
|
||||
vehicle_gun();
|
||||
|
||||
busy = false;
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
}
|
25
BigBaseV2/src/features/custom_guns.hpp
Normal file
25
BigBaseV2/src/features/custom_guns.hpp
Normal file
@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
#include "functions.hpp"
|
||||
#include "gta/joaat.hpp"
|
||||
#include "natives.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
class custom_guns
|
||||
{
|
||||
public:
|
||||
|
||||
static void loop();
|
||||
|
||||
private:
|
||||
|
||||
static void cage_gun();
|
||||
static void delete_gun();
|
||||
static void gravity_gun();
|
||||
static void money_gun();
|
||||
static void repair_gun();
|
||||
static void vehicle_gun();
|
||||
|
||||
};
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
#include "functions.hpp"
|
||||
#include "features.hpp"
|
||||
#include "gta/joaat.hpp"
|
||||
#include "gta/levels.hpp"
|
||||
#include "pointers.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "notify.hpp"
|
||||
#include "script.hpp"
|
||||
#include "script_global.hpp"
|
||||
|
||||
@ -194,7 +194,7 @@ namespace big
|
||||
}
|
||||
if (!STREAMING::HAS_MODEL_LOADED(hash))
|
||||
{
|
||||
features::notify::above_map("~r~Failed to spawn model, did you give an incorrect model?");
|
||||
notify::above_map("~r~Failed to spawn model, did you give an incorrect model?");
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
#include "structs/session_type.hpp"
|
||||
|
||||
namespace big
|
||||
|
@ -1,23 +1,24 @@
|
||||
#include "features.hpp"
|
||||
#include "features/custom_guns.hpp"
|
||||
#include "features/notify.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
static const int controls[] = { 14, 15, 24 };
|
||||
|
||||
void features::cage_gun()
|
||||
void custom_guns::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);
|
||||
WEAPON::GET_CURRENT_PED_WEAPON(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player.id), &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);
|
||||
PLAYER::DISABLE_PLAYER_FIRING(g_player.id, true);
|
||||
for (int control : controls)
|
||||
PAD::DISABLE_CONTROL_ACTION(0, control, true);
|
||||
|
||||
@ -32,7 +33,7 @@ namespace big
|
||||
func::cage_ped(entity);
|
||||
}
|
||||
}
|
||||
else features::notify::above_map("No entity found.");
|
||||
else notify::above_map("No entity found.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,23 +1,24 @@
|
||||
#include "features.hpp"
|
||||
#include "features/custom_guns.hpp"
|
||||
#include "features/notify.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
static const int controls[] = { 14, 15, 24 };
|
||||
|
||||
void features::delete_gun()
|
||||
void custom_guns::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);
|
||||
WEAPON::GET_CURRENT_PED_WEAPON(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player.id), &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);
|
||||
PLAYER::DISABLE_PLAYER_FIRING(g_player.id, true);
|
||||
for (int control : controls)
|
||||
PAD::DISABLE_CONTROL_ACTION(0, control, true);
|
||||
|
||||
@ -33,7 +34,7 @@ namespace big
|
||||
}
|
||||
else
|
||||
{
|
||||
Vector3 player = ENTITY::GET_ENTITY_COORDS(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId), true);
|
||||
Vector3 player = ENTITY::GET_ENTITY_COORDS(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player.id), true);
|
||||
Vector3 entLoc = ENTITY::GET_ENTITY_COORDS(entity, true);
|
||||
double dist = func::distance_between_vectors(player, entLoc);
|
||||
|
||||
@ -51,7 +52,7 @@ namespace big
|
||||
}
|
||||
}
|
||||
}
|
||||
else features::notify::above_map("No entity found.");
|
||||
else notify::above_map("No entity found.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "features.hpp"
|
||||
#include "features/custom_guns.hpp"
|
||||
#include "features/notify.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
@ -10,7 +11,7 @@ namespace big
|
||||
static const int scroll = 2;
|
||||
static const int controls[] = { 14, 15, 24 };
|
||||
|
||||
void features::gravity_gun()
|
||||
void custom_guns::gravity_gun()
|
||||
{
|
||||
bool bGravityGun = g_settings.options["custom_gun"]["type"] == 2;
|
||||
double multiplier = g_settings.options["custom_gun"]["gravity_velocity_multiplier"];
|
||||
@ -18,18 +19,18 @@ namespace big
|
||||
if (bGravityGun)
|
||||
{
|
||||
Hash currWeapon;
|
||||
WEAPON::GET_CURRENT_PED_WEAPON(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId), &currWeapon, 1);
|
||||
WEAPON::GET_CURRENT_PED_WEAPON(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player.id), &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);
|
||||
PLAYER::DISABLE_PLAYER_FIRING(g_player.id, 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);
|
||||
location = ENTITY::GET_ENTITY_COORDS(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player.id), true);
|
||||
|
||||
// Attack RELEASED
|
||||
if (PAD::IS_DISABLED_CONTROL_PRESSED(0, 24) && entity == 0)
|
||||
@ -59,7 +60,7 @@ namespace big
|
||||
|
||||
if (ENTITY::IS_ENTITY_A_PED(entity) && !PED::IS_PED_RAGDOLL(entity)) TASK::SET_HIGH_FALL_TASK(entity, 0, 0, 0);
|
||||
|
||||
features::notify::above_map("Selected entity at crosshair.");
|
||||
notify::above_map("Selected entity at crosshair.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -67,7 +68,7 @@ namespace big
|
||||
{
|
||||
entity = 0;
|
||||
|
||||
features::notify::above_map("No entity found.");
|
||||
notify::above_map("No entity found.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -108,7 +109,7 @@ namespace big
|
||||
|
||||
entity = 0;
|
||||
|
||||
features::notify::above_map("Released entity.");
|
||||
notify::above_map("Released entity.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
#include "features.hpp"
|
||||
#include "features/custom_guns.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "script.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
@ -7,13 +9,13 @@ namespace big
|
||||
static bool busy = false;
|
||||
static Entity entity = 0;
|
||||
|
||||
void features::money_gun()
|
||||
void custom_guns::money_gun()
|
||||
{
|
||||
bool bMoneyGun = g_settings.options["custom_gun"]["type"] == 3;
|
||||
|
||||
if (bMoneyGun)
|
||||
{
|
||||
Ped player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId);
|
||||
Ped player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player.id);
|
||||
|
||||
Hash currWeapon;
|
||||
WEAPON::GET_CURRENT_PED_WEAPON(player, &currWeapon, 1);
|
||||
@ -22,7 +24,7 @@ namespace big
|
||||
|
||||
if (PAD::IS_DISABLED_CONTROL_PRESSED(0, 25))
|
||||
{
|
||||
PLAYER::DISABLE_PLAYER_FIRING(g_playerId, true);
|
||||
PLAYER::DISABLE_PLAYER_FIRING(g_player.id, true);
|
||||
for (int control : controls)
|
||||
PAD::DISABLE_CONTROL_ACTION(0, control, true);
|
||||
|
||||
@ -30,7 +32,7 @@ namespace big
|
||||
{
|
||||
busy = true;
|
||||
|
||||
QUEUE_JOB_BEGIN_CLAUSE(&)
|
||||
g_fiber_pool->queue_job([&]
|
||||
{
|
||||
if (func::raycast_entity(&entity))
|
||||
{
|
||||
@ -49,7 +51,7 @@ namespace big
|
||||
|
||||
busy = false;
|
||||
}
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,46 +1,47 @@
|
||||
#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 (func::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 notify::above_map("No entity found.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#include "features/custom_guns.hpp"
|
||||
#include "features/notify.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
static const int controls[] = { 14, 15, 24 };
|
||||
|
||||
void custom_guns::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_player.id), &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_player.id, true);
|
||||
for (int control : controls)
|
||||
PAD::DISABLE_CONTROL_ACTION(0, control, true);
|
||||
|
||||
if (PAD::IS_DISABLED_CONTROL_JUST_RELEASED(0, 24))
|
||||
{
|
||||
Entity entity;
|
||||
|
||||
if (func::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 notify::above_map("No entity found.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,16 +1,16 @@
|
||||
#include "features.hpp"
|
||||
#include "features/custom_guns.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
static const int controls[] = { 14, 15, 24 };
|
||||
|
||||
void features::vehicle_gun()
|
||||
void custom_guns::vehicle_gun()
|
||||
{
|
||||
bool bVehicleGun = g_settings.options["custom_gun"]["type"] == 4;
|
||||
|
||||
if (bVehicleGun)
|
||||
{
|
||||
Ped player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId);
|
||||
Ped player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player.id);
|
||||
|
||||
Hash currWeapon;
|
||||
WEAPON::GET_CURRENT_PED_WEAPON(player, &currWeapon, 1);
|
||||
@ -19,7 +19,7 @@ namespace big
|
||||
|
||||
if (PAD::IS_DISABLED_CONTROL_PRESSED(0, 25))
|
||||
{
|
||||
PLAYER::DISABLE_PLAYER_FIRING(g_playerId, true);
|
||||
PLAYER::DISABLE_PLAYER_FIRING(g_player.id, true);
|
||||
for (int control : controls)
|
||||
PAD::DISABLE_CONTROL_ACTION(0, control, true);
|
||||
|
||||
@ -44,8 +44,6 @@ namespace big
|
||||
velocity.y = dist * sin(yaw) * cos(pitch);
|
||||
velocity.z = dist * sin(pitch);
|
||||
|
||||
script::get_current()->yield();
|
||||
|
||||
ENTITY::SET_ENTITY_ROTATION(veh, rot.x, rot.y, rot.z, 2, 1);
|
||||
ENTITY::SET_ENTITY_VELOCITY(veh, velocity.x, velocity.y, velocity.z);
|
||||
}
|
||||
|
@ -1,10 +1,14 @@
|
||||
#include "features.hpp"
|
||||
#include "features/protections.hpp"
|
||||
#include "features/functions.hpp"
|
||||
#include "gta/joaat.hpp"
|
||||
#include "gta/replay.hpp"
|
||||
#include "pointers.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "script.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void features::replay_interface()
|
||||
void protections::replay_interface()
|
||||
{
|
||||
Ped player = PLAYER::PLAYER_PED_ID();
|
||||
|
||||
@ -32,6 +36,8 @@ namespace big
|
||||
|
||||
if (protections["cage"] && ENTITY::GET_ENTITY_MODEL(ent) == RAGE_JOAAT("prop_gold_cont_01"))
|
||||
func::delete_entity(ent);
|
||||
|
||||
script::get_current()->yield();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
#include "features.hpp"
|
||||
#include "features/self.hpp"
|
||||
#include "gta_util.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
static bool bLastGodMode = false;
|
||||
|
||||
void features::god_mode()
|
||||
void self::god_mode()
|
||||
{
|
||||
bool bGodMode = g_settings.options["god_mode"].get<bool>();
|
||||
|
||||
@ -15,7 +15,7 @@ namespace big
|
||||
|
||||
ped->m_godmode = bGodMode ? 0x1 : 0x0;
|
||||
|
||||
//ENTITY::SET_ENTITY_INVINCIBLE(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId), bGodMode);
|
||||
//ENTITY::SET_ENTITY_INVINCIBLE(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player.id), bGodMode);
|
||||
|
||||
bLastGodMode = bGodMode;
|
||||
}
|
||||
|
@ -1,26 +1,24 @@
|
||||
#include "features.hpp"
|
||||
#include "features/self.hpp"
|
||||
#include "natives.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
static bool bLastNeverWanted = false;
|
||||
|
||||
void features::never_wanted()
|
||||
void self::never_wanted()
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
bool bNeverWanted = g_settings.options["never_wanted"].get<bool>();
|
||||
|
||||
if (bNeverWanted && PLAYER::GET_PLAYER_WANTED_LEVEL(g_player.id) > 0)
|
||||
{
|
||||
bool bNeverWanted = g_settings.options["never_wanted"].get<bool>();
|
||||
PLAYER::SET_PLAYER_WANTED_LEVEL(g_player.id, 0, true);
|
||||
PLAYER::SET_MAX_WANTED_LEVEL(0);
|
||||
}
|
||||
else if (!bNeverWanted && bNeverWanted != bLastNeverWanted)
|
||||
{
|
||||
PLAYER::SET_MAX_WANTED_LEVEL(5);
|
||||
}
|
||||
|
||||
if (bNeverWanted && PLAYER::GET_PLAYER_WANTED_LEVEL(g_playerId) > 0)
|
||||
{
|
||||
PLAYER::SET_PLAYER_WANTED_LEVEL(g_playerId, 0, true);
|
||||
PLAYER::SET_MAX_WANTED_LEVEL(0);
|
||||
}
|
||||
else if (!bNeverWanted && bNeverWanted != bLastNeverWanted)
|
||||
{
|
||||
PLAYER::SET_MAX_WANTED_LEVEL(5);
|
||||
}
|
||||
|
||||
bLastNeverWanted = bNeverWanted;
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
bLastNeverWanted = bNeverWanted;
|
||||
}
|
||||
}
|
@ -1,25 +1,23 @@
|
||||
#include "features.hpp"
|
||||
#include "features/self.hpp"
|
||||
#include "natives.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
static bool bLastNoRagdoll = false;
|
||||
|
||||
void features::no_ragdoll()
|
||||
void self::no_ragdoll()
|
||||
{
|
||||
bool bNoRagdoll = g_settings.options["ragdoll"].get<bool>();
|
||||
|
||||
if (bNoRagdoll || (!bNoRagdoll && bNoRagdoll != bLastNoRagdoll))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE(= )
|
||||
{
|
||||
Ped player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId);
|
||||
Ped player = PLAYER::PLAYER_PED_ID();
|
||||
|
||||
PED::SET_PED_CAN_RAGDOLL(player, !bNoRagdoll);
|
||||
PED::SET_PED_CAN_RAGDOLL_FROM_PLAYER_IMPACT(player, !bNoRagdoll);
|
||||
PED::SET_PED_RAGDOLL_ON_COLLISION(player, !bNoRagdoll);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
PED::SET_PED_CAN_RAGDOLL(player, !bNoRagdoll);
|
||||
PED::SET_PED_CAN_RAGDOLL_FROM_PLAYER_IMPACT(player, !bNoRagdoll);
|
||||
PED::SET_PED_RAGDOLL_ON_COLLISION(player, !bNoRagdoll);
|
||||
|
||||
bLastNoRagdoll = bNoRagdoll;
|
||||
bLastNoRagdoll = bNoRagdoll;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,6 @@
|
||||
#include "features.hpp"
|
||||
#include "features/self.hpp"
|
||||
#include "features/functions.hpp"
|
||||
#include "natives.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
@ -8,13 +10,13 @@ namespace big
|
||||
|
||||
static bool bLastNoClip;
|
||||
|
||||
void features::noclip()
|
||||
void self::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);
|
||||
Entity ent = PLAYER::PLAYER_PED_ID();
|
||||
bool inVehicle = PED::IS_PED_IN_ANY_VEHICLE(ent, true);
|
||||
if (inVehicle) ent = PED::GET_VEHICLE_PED_IS_IN(ent, false);
|
||||
|
||||
|
@ -1,20 +1,18 @@
|
||||
#include "features.hpp"
|
||||
#include "features/self.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "script_global.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void features::off_radar()
|
||||
void self::off_radar()
|
||||
{
|
||||
if (g_settings.options["off_radar"].get<bool>())
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
if (PLAYER::IS_PLAYER_ONLINE())
|
||||
{
|
||||
if (PLAYER::IS_PLAYER_ONLINE())
|
||||
{
|
||||
*script_global(2425869).at(1 + (g_playerId * 443)).at(204).as<int*>() = 1;
|
||||
*script_global(2440049).at(70).as<int*>() = NETWORK::GET_NETWORK_TIME() + 999;
|
||||
}
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
*script_global(2425869).at(g_player.id, 443).at(204).as<int*>() = 1;
|
||||
*script_global(2440049).at(70).as<int*>() = NETWORK::GET_NETWORK_TIME() + 999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,18 +1,14 @@
|
||||
#include "features.hpp"
|
||||
#include "features/self.hpp"
|
||||
#include "features/functions.hpp"
|
||||
#include "script_global.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void features::spoof_rank()
|
||||
void self::spoof_rank()
|
||||
{
|
||||
bool bSpoofRank = g_settings.options["spoof_rank"].get<bool>();
|
||||
|
||||
if (bSpoofRank)
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
func::spoof_rank(g_settings.options["rank"].get<int>());
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
func::spoof_rank(g_settings.options["rank"].get<int>());
|
||||
}
|
||||
}
|
@ -1,13 +1,14 @@
|
||||
#include "features.hpp"
|
||||
#include "features/self.hpp"
|
||||
#include "natives.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
static bool bLastSuperSprint = false;
|
||||
static bool bSkyDiving = false;
|
||||
|
||||
void features::super_sprint()
|
||||
void self::super_sprint()
|
||||
{
|
||||
Ped player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId);
|
||||
Ped player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player.id);
|
||||
|
||||
if (PED::IS_PED_IN_ANY_VEHICLE(player, true)) return;
|
||||
|
||||
@ -15,39 +16,22 @@ namespace big
|
||||
|
||||
if (bSuperSprint)
|
||||
{
|
||||
float height = ENTITY::GET_ENTITY_HEIGHT_ABOVE_GROUND(player);
|
||||
|
||||
bool flying = height > 5;
|
||||
if (flying && !bSkyDiving)
|
||||
{
|
||||
TASK::TASK_SKY_DIVE(player, true);
|
||||
|
||||
bSkyDiving = true;
|
||||
}
|
||||
else if (!flying && bSkyDiving)
|
||||
{
|
||||
bSkyDiving = false;
|
||||
flying = false;
|
||||
|
||||
TASK::TASK_SKY_DIVE(player, false);
|
||||
}
|
||||
|
||||
if (TASK::IS_PED_SPRINTING(player) || flying)
|
||||
if (TASK::IS_PED_SPRINTING(player))
|
||||
{
|
||||
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);
|
||||
|
||||
PLAYER::SET_PLAYER_SPRINT(g_playerId, 1);
|
||||
PLAYER::SET_RUN_SPRINT_MULTIPLIER_FOR_PLAYER(g_playerId, 1.49);
|
||||
PLAYER::SET_PLAYER_SPRINT(g_player.id, 1);
|
||||
PLAYER::SET_RUN_SPRINT_MULTIPLIER_FOR_PLAYER(g_player.id, 1.49);
|
||||
}
|
||||
else
|
||||
{
|
||||
PLAYER::SET_RUN_SPRINT_MULTIPLIER_FOR_PLAYER(g_playerId, 1.0);
|
||||
PLAYER::SET_RUN_SPRINT_MULTIPLIER_FOR_PLAYER(g_player.id, 1.0);
|
||||
}
|
||||
}
|
||||
else if (!bSuperSprint && bSuperSprint != bLastSuperSprint)
|
||||
{
|
||||
PLAYER::SET_RUN_SPRINT_MULTIPLIER_FOR_PLAYER(g_playerId, 1.0);
|
||||
PLAYER::SET_RUN_SPRINT_MULTIPLIER_FOR_PLAYER(g_player.id, 1.0);
|
||||
}
|
||||
|
||||
bLastSuperSprint = bSuperSprint;
|
||||
|
@ -1,51 +1,50 @@
|
||||
#include "features/sys.hpp"
|
||||
#include <algorithm>
|
||||
#include "features.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "script.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
static bool busy = false;
|
||||
|
||||
void features::update_player_structs()
|
||||
void sys::update_player_structs()
|
||||
{
|
||||
if (busy) return;
|
||||
player players[32];
|
||||
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
for (uint8_t i = 0; i < 32; i++)
|
||||
{
|
||||
busy = true;
|
||||
player players[32];
|
||||
|
||||
for (uint8_t i = 0; i < 32; i++)
|
||||
if (NETWORK::NETWORK_IS_PLAYER_CONNECTED(i))
|
||||
{
|
||||
if (NETWORK::NETWORK_IS_PLAYER_CONNECTED(i))
|
||||
{
|
||||
// if (!g_players[i].is_online) features::join_message((Player)i);
|
||||
// if (!g_players[i].is_online) features::join_message((Player)i);
|
||||
|
||||
players[i].id = i;
|
||||
players[i].is_online = true;
|
||||
players[i].id = i;
|
||||
players[i].is_online = true;
|
||||
|
||||
int iNetworkHandle[26];
|
||||
NETWORK::NETWORK_HANDLE_FROM_PLAYER(i, &iNetworkHandle[0], 13);
|
||||
NETWORK::NETWORK_IS_HANDLE_VALID(&iNetworkHandle[0], 13) && NETWORK::NETWORK_IS_FRIEND(&iNetworkHandle[0]);
|
||||
int iNetworkHandle[26];
|
||||
NETWORK::NETWORK_HANDLE_FROM_PLAYER(i, &iNetworkHandle[0], 13);
|
||||
NETWORK::NETWORK_IS_HANDLE_VALID(&iNetworkHandle[0], 13) && NETWORK::NETWORK_IS_FRIEND(&iNetworkHandle[0]);
|
||||
|
||||
players[i].is_friend = NETWORK::NETWORK_IS_HANDLE_VALID(iNetworkHandle, 13) && NETWORK::NETWORK_IS_FRIEND(iNetworkHandle);
|
||||
players[i].is_friend = NETWORK::NETWORK_IS_HANDLE_VALID(iNetworkHandle, 13) && NETWORK::NETWORK_IS_FRIEND(iNetworkHandle);
|
||||
|
||||
strcpy(players[i].name, PLAYER::GET_PLAYER_NAME(i));
|
||||
}
|
||||
else
|
||||
{
|
||||
players[i].is_online = false;
|
||||
players[i].is_friend = false;
|
||||
}
|
||||
|
||||
script::get_current()->yield();
|
||||
strcpy(players[i].name, PLAYER::GET_PLAYER_NAME(i));
|
||||
}
|
||||
else
|
||||
{
|
||||
players[i].is_online = false;
|
||||
players[i].is_friend = false;
|
||||
}
|
||||
|
||||
std::sort(std::begin(players), std::end(players));
|
||||
script::get_current()->yield();
|
||||
}
|
||||
|
||||
for (uint8_t i = 0; i < 32; i++)
|
||||
g_players[i] = players[i];
|
||||
std::sort(std::begin(players), std::end(players));
|
||||
|
||||
busy = false;
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
g_players.clear();
|
||||
for (uint8_t i = 0; i < 32; i++)
|
||||
{
|
||||
player player = players[i];
|
||||
|
||||
if (player.id == PLAYER::PLAYER_ID()) g_player = player;
|
||||
|
||||
g_players.emplace(player.id, player);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,12 +1,13 @@
|
||||
#include "features.hpp"
|
||||
#include "features/sys.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void features::update_screen_sizes()
|
||||
void sys::update_screen_sizes()
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
g_fiber_pool->queue_job([]
|
||||
{
|
||||
GRAPHICS::_GET_ACTIVE_SCREEN_RESOLUTION(&x, &y);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
});
|
||||
}
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
#include "features.hpp"
|
||||
#include "features/tunables.hpp"
|
||||
#include "script_global.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void features::disable_phone()
|
||||
void tunables::disable_phone()
|
||||
{
|
||||
if (g_settings.options["disable_phone"])
|
||||
*script_global(19664).as<int*>() = 1;
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include "features.hpp"
|
||||
#include "features/tunables.hpp"
|
||||
#include "script_global.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void features::no_idle_kick()
|
||||
void tunables::no_idle_kick()
|
||||
{
|
||||
bool bNoIdleKick = g_settings.options["no_idle_kick"].get<bool>();
|
||||
|
||||
|
@ -1,14 +1,16 @@
|
||||
#include "features.hpp"
|
||||
#include "features/util.hpp"
|
||||
#include "pointers.hpp"
|
||||
#include "natives.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
static bool bReset = true;
|
||||
void features::spectate_player()
|
||||
|
||||
void util::spectate_player()
|
||||
{
|
||||
if (g_selectedPlayerId == -1 || !g_selectedPlayer.is_online || !g_temp.spectate_player)
|
||||
if (g_selectedPlayer.id == -1 || !g_selectedPlayer.is_online || !g_temp.is_spectating)
|
||||
{
|
||||
if (g_temp.spectate_player) g_temp.spectate_player = false;
|
||||
if (g_temp.is_spectating) g_temp.is_spectating = false;
|
||||
|
||||
if (!bReset)
|
||||
{
|
||||
@ -20,7 +22,7 @@ namespace big
|
||||
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_selectedPlayer.id));
|
||||
|
||||
bReset = false;
|
||||
}
|
||||
|
@ -1,17 +1,18 @@
|
||||
#include "features.hpp"
|
||||
#include "features/vehicle.hpp"
|
||||
#include "gta_util.hpp"
|
||||
#include "natives.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
static Vehicle veh = -1;
|
||||
|
||||
void features::handling()
|
||||
void vehicle::handling()
|
||||
{
|
||||
CPed* ped = gta_util::get_local_ped();
|
||||
|
||||
g_in_vehicle = ped->m_in_vehicle == 0;
|
||||
g_temp.in_vehicle = ped->m_in_vehicle == 0;
|
||||
|
||||
if (g_in_vehicle)
|
||||
if (g_temp.in_vehicle)
|
||||
{
|
||||
Vehicle currVeh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
|
||||
if (veh != currVeh && ped->m_vehicle != nullptr)
|
||||
|
@ -1,14 +1,17 @@
|
||||
#include "features.hpp"
|
||||
#include "features/vehicle.hpp"
|
||||
#include "natives.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void features::no_bike_fall()
|
||||
static bool bLastNoBikeFall = false;
|
||||
|
||||
void vehicle::no_bike_fall()
|
||||
{
|
||||
bool bNoBikeFall = g_settings.options["no_bike_fall"].get<bool>();
|
||||
|
||||
QUEUE_JOB_BEGIN_CLAUSE(= )
|
||||
{
|
||||
if (bNoBikeFall || bLastNoBikeFall != bNoBikeFall)
|
||||
PED::SET_PED_CAN_BE_KNOCKED_OFF_VEHICLE(PLAYER::PLAYER_PED_ID(), bNoBikeFall);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
|
||||
bLastNoBikeFall = bNoBikeFall;
|
||||
}
|
||||
}
|
@ -1,8 +1,9 @@
|
||||
#include "features.hpp"
|
||||
#include "features/vehicle.hpp"
|
||||
#include "natives.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void features::speedo_meter()
|
||||
void vehicle::speedo_meter()
|
||||
{
|
||||
static const float x = .9f;
|
||||
static const float y = .72f;
|
||||
@ -11,7 +12,7 @@ namespace big
|
||||
|
||||
if (speedo_type == 0 || HUD::IS_PAUSE_MENU_ACTIVE()) return;
|
||||
|
||||
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId), false);
|
||||
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player.id), false);
|
||||
|
||||
if (veh == 0) return;
|
||||
|
||||
|
@ -1,28 +1,22 @@
|
||||
#include "features.hpp"
|
||||
#include "features/vehicle.hpp"
|
||||
#include "features/functions.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "script.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void features::sticky_tyres()
|
||||
void vehicle::sticky_tyres()
|
||||
{
|
||||
if (g_settings.options["sticky_tyres"].get<bool>())
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
|
||||
|
||||
if (veh)
|
||||
{
|
||||
func::take_control_of_entity(veh);
|
||||
|
||||
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
|
||||
|
||||
if (veh)
|
||||
{
|
||||
while (!NETWORK::NETWORK_HAS_CONTROL_OF_ENTITY(veh))
|
||||
{
|
||||
NETWORK::NETWORK_REQUEST_CONTROL_OF_ENTITY(veh);
|
||||
|
||||
script::get_current()->yield();
|
||||
}
|
||||
|
||||
VEHICLE::SET_VEHICLE_ON_GROUND_PROPERLY(veh, 5.f);
|
||||
}
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
VEHICLE::SET_VEHICLE_ON_GROUND_PROPERLY(veh, 5.f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,8 +1,9 @@
|
||||
#include "features.hpp"
|
||||
#include "features/world.hpp"
|
||||
#include "natives.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void features::population_modifiers()
|
||||
void world::population_modifiers()
|
||||
{
|
||||
auto& population = g_settings.options["world"]["population"];
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
#include "notify.hpp"
|
||||
#include "natives.hpp"
|
||||
|
||||
namespace big::features::notify
|
||||
namespace big
|
||||
{
|
||||
void above_map(const char* text)
|
||||
void notify::above_map(const char* text)
|
||||
{
|
||||
HUD::SET_TEXT_OUTLINE();
|
||||
HUD::BEGIN_TEXT_COMMAND_THEFEED_POST("STRING");
|
||||
|
@ -1,7 +1,14 @@
|
||||
#pragma once
|
||||
#include "natives.hpp"
|
||||
#include "common.hpp"
|
||||
|
||||
namespace big::features::notify
|
||||
namespace big
|
||||
{
|
||||
void above_map(const char* text);
|
||||
class notify
|
||||
{
|
||||
public:
|
||||
static void above_map(const char* text);
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
}
|
21
BigBaseV2/src/features/protections.cpp
Normal file
21
BigBaseV2/src/features/protections.cpp
Normal file
@ -0,0 +1,21 @@
|
||||
#include "protections.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "script.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
static bool busy = false;
|
||||
|
||||
void protections::loop()
|
||||
{
|
||||
if (busy) return;
|
||||
busy = true;
|
||||
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
replay_interface();
|
||||
|
||||
busy = false;
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
}
|
15
BigBaseV2/src/features/protections.hpp
Normal file
15
BigBaseV2/src/features/protections.hpp
Normal file
@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
class protections
|
||||
{
|
||||
public:
|
||||
static void loop();
|
||||
|
||||
private:
|
||||
static void replay_interface();
|
||||
|
||||
};
|
||||
}
|
27
BigBaseV2/src/features/self.cpp
Normal file
27
BigBaseV2/src/features/self.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
#include "self.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "script.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
static bool busy = false;
|
||||
|
||||
void self::loop()
|
||||
{
|
||||
if (busy) return;
|
||||
busy = true;
|
||||
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
god_mode();
|
||||
never_wanted();
|
||||
no_ragdoll();
|
||||
noclip();
|
||||
off_radar();
|
||||
spoof_rank();
|
||||
super_sprint();
|
||||
|
||||
busy = false;
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
}
|
21
BigBaseV2/src/features/self.hpp
Normal file
21
BigBaseV2/src/features/self.hpp
Normal file
@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
class self
|
||||
{
|
||||
public:
|
||||
static void loop();
|
||||
|
||||
private:
|
||||
static void god_mode();
|
||||
static void never_wanted();
|
||||
static void no_ragdoll();
|
||||
static void noclip();
|
||||
static void off_radar();
|
||||
static void spoof_rank();
|
||||
static void super_sprint();
|
||||
|
||||
};
|
||||
}
|
@ -1,8 +1,9 @@
|
||||
#include "stats.hpp"
|
||||
#include "script.hpp"
|
||||
#include "gta/joaat.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "script.hpp"
|
||||
|
||||
namespace big::features
|
||||
namespace big
|
||||
{
|
||||
static const char character_stats[][64] = {
|
||||
"MP%d_SCRIPT_INCREASE_STAM",
|
||||
|
@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
#include "natives.hpp"
|
||||
#include "script.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "common.hpp"
|
||||
|
||||
namespace big::features
|
||||
namespace big
|
||||
{
|
||||
class stats
|
||||
{
|
||||
|
22
BigBaseV2/src/features/sys.cpp
Normal file
22
BigBaseV2/src/features/sys.cpp
Normal file
@ -0,0 +1,22 @@
|
||||
#include "sys.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "script.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
static bool busy = false;
|
||||
|
||||
void sys::loop()
|
||||
{
|
||||
if (busy) return;
|
||||
busy = true;
|
||||
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
update_player_structs();
|
||||
update_screen_sizes();
|
||||
|
||||
busy = false;
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
}
|
17
BigBaseV2/src/features/sys.hpp
Normal file
17
BigBaseV2/src/features/sys.hpp
Normal file
@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
#include "natives.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
class sys
|
||||
{
|
||||
public:
|
||||
static void loop();
|
||||
|
||||
private:
|
||||
static void update_player_structs();
|
||||
static void update_screen_sizes();
|
||||
|
||||
};
|
||||
}
|
@ -1,8 +1,11 @@
|
||||
#include "teleport.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "notify.hpp"
|
||||
#include "script.hpp"
|
||||
|
||||
namespace big::features::teleport
|
||||
namespace big
|
||||
{
|
||||
bool load_ground_at_3dcoord(Vector3 location)
|
||||
bool teleport::load_ground_at_3dcoord(Vector3 location)
|
||||
{
|
||||
float groundZ;
|
||||
uint8_t attempts = 10;
|
||||
@ -25,7 +28,7 @@ namespace big::features::teleport
|
||||
return false;
|
||||
}
|
||||
|
||||
Vector3 get_ground_at_3dcoord(Vector3 location)
|
||||
Vector3 teleport::get_ground_at_3dcoord(Vector3 location)
|
||||
{
|
||||
float groundZ;
|
||||
uint8_t attempts = 10;
|
||||
@ -54,7 +57,7 @@ namespace big::features::teleport
|
||||
return location;
|
||||
}
|
||||
|
||||
bool bring_blip(int blipSprite, int blipColor, int flag)
|
||||
bool teleport::bring_blip(int blipSprite, int blipColor, int flag)
|
||||
{
|
||||
Blip blipHandle = HUD::GET_FIRST_BLIP_INFO_ID(blipSprite);
|
||||
while (HUD::DOES_BLIP_EXIST(blipHandle) && (blipColor != -1 && HUD::GET_BLIP_COLOUR(blipHandle) != blipColor))
|
||||
@ -78,14 +81,14 @@ namespace big::features::teleport
|
||||
script::get_current()->yield();
|
||||
}
|
||||
|
||||
Ped player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId);
|
||||
Ped player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player.id);
|
||||
location = ENTITY::GET_ENTITY_COORDS(player, true);
|
||||
|
||||
ENTITY::SET_ENTITY_COORDS(veh, location.x, location.y, location.z + 1.f, 0, 0, 0, true);
|
||||
|
||||
if (!VEHICLE::ARE_ANY_VEHICLE_SEATS_FREE(veh))
|
||||
{
|
||||
features::notify::above_map("The vehicle is full.");
|
||||
notify::above_map("The vehicle is full.");
|
||||
ENTITY::SET_ENTITY_COORDS(player, location.x, location.y, location.z + 3.f, 0, 0, 0, true);
|
||||
}
|
||||
else
|
||||
@ -96,9 +99,9 @@ namespace big::features::teleport
|
||||
return true;
|
||||
}
|
||||
|
||||
bool teleport_to_blip(int blipSprite, int blipColor)
|
||||
bool teleport::teleport_to_blip(int blipSprite, int blipColor)
|
||||
{
|
||||
Ped player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId);
|
||||
Ped player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player.id);
|
||||
|
||||
Blip blipHandle = HUD::GET_FIRST_BLIP_INFO_ID(blipSprite);
|
||||
while (HUD::DOES_BLIP_EXIST(blipHandle) && (blipColor != -1 && HUD::GET_BLIP_COLOUR(blipHandle) != blipColor))
|
||||
@ -117,13 +120,13 @@ namespace big::features::teleport
|
||||
return true;
|
||||
}
|
||||
|
||||
void teleport_into_player_vehicle(Player player)
|
||||
void teleport::teleport_into_player_vehicle(Player player)
|
||||
{
|
||||
Ped target = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(player);
|
||||
|
||||
if (!PED::IS_PED_IN_ANY_VEHICLE(target, true))
|
||||
{
|
||||
features::notify::above_map("This player is not in a vehicle right now.");
|
||||
notify::above_map("This player is not in a vehicle right now.");
|
||||
|
||||
return;
|
||||
}
|
||||
@ -133,14 +136,14 @@ namespace big::features::teleport
|
||||
for (uint8_t i = 0; !load_ground_at_3dcoord(location); i++)
|
||||
if (i == 5) break;
|
||||
|
||||
Ped current = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId);
|
||||
Ped current = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player.id);
|
||||
|
||||
Vehicle veh;
|
||||
for (veh = 0; !veh; veh = PED::GET_VEHICLE_PED_IS_IN(target, false))
|
||||
{
|
||||
if (!PED::IS_PED_IN_ANY_VEHICLE(target, true))
|
||||
{
|
||||
features::notify::above_map("Player is no longer in a vehicle.");
|
||||
notify::above_map("Player is no longer in a vehicle.");
|
||||
|
||||
return;
|
||||
}
|
||||
@ -161,20 +164,20 @@ namespace big::features::teleport
|
||||
PED::SET_PED_INTO_VEHICLE(current, veh, seatIndex);
|
||||
}
|
||||
|
||||
void teleport_to_player(Player player)
|
||||
void teleport::teleport_to_player(Player player)
|
||||
{
|
||||
Ped target = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(player);
|
||||
|
||||
Vector3 location = ENTITY::GET_ENTITY_COORDS(target, true);
|
||||
load_ground_at_3dcoord(location);
|
||||
|
||||
PED::SET_PED_COORDS_KEEP_VEHICLE(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId), location.x, location.y, location.z);
|
||||
PED::SET_PED_COORDS_KEEP_VEHICLE(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player.id), location.x, location.y, location.z);
|
||||
}
|
||||
|
||||
// Teleport the player (with/without car to a waypoint)
|
||||
bool waypoint()
|
||||
bool teleport::waypoint()
|
||||
{
|
||||
Ped player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId);
|
||||
Ped player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player.id);
|
||||
|
||||
Blip blipHandle = HUD::GET_FIRST_BLIP_INFO_ID(8);
|
||||
if (!HUD::DOES_BLIP_EXIST(blipHandle)) return false;
|
||||
|
@ -1,15 +1,20 @@
|
||||
#pragma once
|
||||
#include "features.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "script.hpp"
|
||||
#include "common.hpp"
|
||||
|
||||
namespace big::features::teleport
|
||||
namespace big
|
||||
{
|
||||
bool bring_blip(int blipSprite, int blipColor, int flag = 70);
|
||||
bool load_ground_at_3dcoord(Vector3 location);
|
||||
Vector3 get_ground_at_3dcoord(Vector3 location);
|
||||
bool teleport_to_blip(int blipSprite, int blipColor = -1);
|
||||
void teleport_into_player_vehicle(Player player);
|
||||
void teleport_to_player(Player player);
|
||||
bool waypoint();
|
||||
class teleport
|
||||
{
|
||||
public:
|
||||
static bool bring_blip(int blipSprite, int blipColor, int flag = 70);
|
||||
static bool load_ground_at_3dcoord(Vector3 location);
|
||||
static Vector3 get_ground_at_3dcoord(Vector3 location);
|
||||
static bool teleport_to_blip(int blipSprite, int blipColor = -1);
|
||||
static void teleport_into_player_vehicle(Player player);
|
||||
static void teleport_to_player(Player player);
|
||||
static bool waypoint();
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
}
|
10
BigBaseV2/src/features/tunables.cpp
Normal file
10
BigBaseV2/src/features/tunables.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
#include "tunables.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void tunables::loop()
|
||||
{
|
||||
disable_phone();
|
||||
no_idle_kick();
|
||||
}
|
||||
}
|
16
BigBaseV2/src/features/tunables.hpp
Normal file
16
BigBaseV2/src/features/tunables.hpp
Normal file
@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
class tunables
|
||||
{
|
||||
public:
|
||||
static void loop();
|
||||
|
||||
private:
|
||||
static void disable_phone();
|
||||
static void no_idle_kick();
|
||||
|
||||
};
|
||||
}
|
21
BigBaseV2/src/features/util.cpp
Normal file
21
BigBaseV2/src/features/util.cpp
Normal file
@ -0,0 +1,21 @@
|
||||
#include "util.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "script.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
static bool busy = false;
|
||||
|
||||
void util::loop()
|
||||
{
|
||||
if (busy) return;
|
||||
busy = true;
|
||||
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
spectate_player();
|
||||
|
||||
busy = false;
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
}
|
14
BigBaseV2/src/features/util.hpp
Normal file
14
BigBaseV2/src/features/util.hpp
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
namespace big
|
||||
{
|
||||
class util
|
||||
{
|
||||
public:
|
||||
static void loop();
|
||||
|
||||
private:
|
||||
static void spectate_player();
|
||||
|
||||
};
|
||||
}
|
24
BigBaseV2/src/features/vehicle.cpp
Normal file
24
BigBaseV2/src/features/vehicle.cpp
Normal file
@ -0,0 +1,24 @@
|
||||
#include "vehicle.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "script.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
static bool busy = false;
|
||||
|
||||
void vehicle::loop()
|
||||
{
|
||||
if (busy) return;
|
||||
busy = true;
|
||||
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
handling();
|
||||
no_bike_fall();
|
||||
speedo_meter();
|
||||
sticky_tyres();
|
||||
|
||||
busy = false;
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
}
|
18
BigBaseV2/src/features/vehicle.hpp
Normal file
18
BigBaseV2/src/features/vehicle.hpp
Normal file
@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
class vehicle
|
||||
{
|
||||
public:
|
||||
static void loop();
|
||||
|
||||
private:
|
||||
static void handling();
|
||||
static void no_bike_fall();
|
||||
static void speedo_meter();
|
||||
static void sticky_tyres();
|
||||
|
||||
};
|
||||
}
|
21
BigBaseV2/src/features/world.cpp
Normal file
21
BigBaseV2/src/features/world.cpp
Normal file
@ -0,0 +1,21 @@
|
||||
#include "world.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "script.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
static bool busy = false;
|
||||
|
||||
void world::loop()
|
||||
{
|
||||
if (busy) return;
|
||||
busy = true;
|
||||
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
population_modifiers();
|
||||
|
||||
busy = false;
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
}
|
15
BigBaseV2/src/features/world.hpp
Normal file
15
BigBaseV2/src/features/world.hpp
Normal file
@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
class world
|
||||
{
|
||||
public:
|
||||
static void loop();
|
||||
|
||||
private:
|
||||
static void population_modifiers();
|
||||
|
||||
};
|
||||
}
|
@ -135,7 +135,7 @@ namespace big
|
||||
|
||||
g_custom_text->add_text(RAGE_JOAAT("HUD_SAVDNWARN"), "Rockstar crashed their toaster again...");
|
||||
|
||||
features::notify::above_map("Yim's Menu is ready.");
|
||||
notify::above_map("Yim's Menu is ready.");
|
||||
}
|
||||
|
||||
void gui::script_on_tick()
|
||||
|
@ -1,4 +1,6 @@
|
||||
#include "gui/tab_bar.hpp"
|
||||
#include "features/functions.hpp"
|
||||
#include "features/stats.hpp"
|
||||
#include "natives.hpp"
|
||||
|
||||
namespace big
|
||||
@ -21,7 +23,7 @@ namespace big
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
features::stats::unlock_achievements();
|
||||
stats::unlock_achievements();
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
@ -32,7 +34,7 @@ namespace big
|
||||
int character_index;
|
||||
func::get_active_character_slot(&character_index);
|
||||
|
||||
features::stats::max_stats(character_index);
|
||||
stats::max_stats(character_index);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
@ -40,7 +42,7 @@ namespace big
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
features::stats::unlock_all();
|
||||
stats::unlock_all();
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "gui/tab_bar.hpp"
|
||||
#include "features/functions.hpp"
|
||||
#include "pointers.hpp"
|
||||
#include "script_global.hpp"
|
||||
|
||||
|
@ -10,7 +10,7 @@ namespace big
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
Entity player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId);
|
||||
Entity player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player.id);
|
||||
|
||||
ENTITY::SET_ENTITY_HEALTH(player, ENTITY::GET_ENTITY_MAX_HEALTH(player), 0);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
@ -20,7 +20,7 @@ namespace big
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
ENTITY::SET_ENTITY_HEALTH(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId), 0, 0);
|
||||
ENTITY::SET_ENTITY_HEALTH(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player.id), 0, 0);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
@ -79,18 +79,18 @@ namespace big
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
PLAYER::CLEAR_PLAYER_WANTED_LEVEL(g_playerId);
|
||||
PLAYER::CLEAR_PLAYER_WANTED_LEVEL(g_player.id);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
if (ImGui::Button("Cops Ignore"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
if (PLAYER::GET_PLAYER_WANTED_LEVEL(g_playerId) > 0)
|
||||
if (PLAYER::GET_PLAYER_WANTED_LEVEL(g_player.id) > 0)
|
||||
{
|
||||
PLAYER::CLEAR_PLAYER_WANTED_LEVEL(g_playerId);
|
||||
PLAYER::CLEAR_PLAYER_WANTED_LEVEL(g_player.id);
|
||||
}
|
||||
PLAYER::SET_POLICE_IGNORE_PLAYER(g_playerId, true);
|
||||
PLAYER::SET_POLICE_IGNORE_PLAYER(g_player.id, true);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
@ -103,8 +103,8 @@ namespace big
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE(= )
|
||||
{
|
||||
PLAYER::SET_PLAYER_WANTED_LEVEL(g_playerId, g_temp.wanted_level, true);
|
||||
PLAYER::SET_PLAYER_WANTED_LEVEL_NOW(g_playerId, true);
|
||||
PLAYER::SET_PLAYER_WANTED_LEVEL(g_player.id, g_temp.wanted_level, true);
|
||||
PLAYER::SET_PLAYER_WANTED_LEVEL_NOW(g_player.id, true);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "gui/tab_bar.hpp"
|
||||
#include "features/functions.hpp"
|
||||
#include "pointers.hpp"
|
||||
|
||||
namespace big
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "gui/tab_bar.hpp"
|
||||
#include "features/functions.hpp"
|
||||
#include "pointers.hpp"
|
||||
|
||||
namespace big
|
||||
@ -21,7 +22,7 @@ namespace big
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE(= )
|
||||
{
|
||||
Ped player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId);
|
||||
Ped player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player.id);
|
||||
Vector3 location = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(player, .0, 8.0, .5);
|
||||
|
||||
func::spawn_vehicle((const char*)model, location, ENTITY::GET_ENTITY_HEADING(player) + 90.f);
|
||||
|
@ -1,4 +1,6 @@
|
||||
#include "gui/tab_bar.hpp"
|
||||
#include "features/notify.hpp"
|
||||
#include "features/teleport.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
@ -10,13 +12,13 @@ namespace big
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
if (features::teleport::waypoint())
|
||||
if (teleport::waypoint())
|
||||
{
|
||||
features::notify::above_map("You've been teleported.");
|
||||
notify::above_map("You've been teleported.");
|
||||
}
|
||||
else
|
||||
{
|
||||
features::notify::above_map("No waypoint set.");
|
||||
notify::above_map("No waypoint set.");
|
||||
}
|
||||
} QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
@ -25,7 +27,7 @@ namespace big
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
features::teleport::teleport_to_blip(1, 5);
|
||||
teleport::teleport_to_blip(1, 5);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
@ -35,7 +37,7 @@ namespace big
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
features::teleport::teleport_to_blip(225);
|
||||
teleport::teleport_to_blip(225);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
ImGui::SameLine();
|
||||
@ -43,7 +45,7 @@ namespace big
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
features::teleport::bring_blip(225, 0);
|
||||
teleport::bring_blip(225, 0);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
#include "gui/tab_bar.hpp"
|
||||
#include "features/notify.hpp"
|
||||
#include "features/teleport.hpp"
|
||||
#include "gta_util.hpp"
|
||||
|
||||
namespace big
|
||||
@ -41,7 +43,7 @@ namespace big
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::Checkbox("Handling", &g_handling_window);
|
||||
ImGui::Checkbox("Handling", &g_temp.windows.handling);
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
@ -53,14 +55,14 @@ namespace big
|
||||
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
|
||||
|
||||
if (!veh)
|
||||
features::notify::above_map("~r~Make sure you are in a vehicle.");
|
||||
notify::above_map("~r~Make sure you are in a vehicle.");
|
||||
else if (!HUD::DOES_BLIP_EXIST(blipHandle))
|
||||
features::notify::above_map("~r~Waypoint needs to be set.");
|
||||
notify::above_map("~r~Waypoint needs to be set.");
|
||||
else
|
||||
{
|
||||
Vector3 location = HUD::GET_BLIP_COORDS(blipHandle);
|
||||
// Make sure the AI can reach this
|
||||
location = features::teleport::get_ground_at_3dcoord(location);
|
||||
location = teleport::get_ground_at_3dcoord(location);
|
||||
|
||||
TASK::TASK_VEHICLE_DRIVE_TO_COORD(PLAYER::PLAYER_PED_ID(), veh, location.x, location.y, location.z, 35.f, 0, veh, 2883620, 10.f, true);
|
||||
}
|
||||
@ -89,13 +91,13 @@ namespace big
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId), false);
|
||||
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player.id), false);
|
||||
|
||||
if (veh)
|
||||
{
|
||||
VEHICLE::SET_VEHICLE_FIXED(veh);
|
||||
|
||||
features::notify::above_map("Vehicle has been repaired.");
|
||||
notify::above_map("Vehicle has been repaired.");
|
||||
}
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
@ -104,13 +106,13 @@ namespace big
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId), false);
|
||||
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player.id), false);
|
||||
|
||||
if (veh)
|
||||
{
|
||||
VEHICLE::SET_VEHICLE_DIRT_LEVEL(veh, 0.0);
|
||||
|
||||
features::notify::above_map("Vehicle has been cleaned.");
|
||||
notify::above_map("Vehicle has been cleaned.");
|
||||
}
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
@ -119,7 +121,7 @@ namespace big
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId), false);
|
||||
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player.id), false);
|
||||
|
||||
if (veh)
|
||||
{
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "gui/tab_bar.hpp"
|
||||
#include "features/functions.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
|
@ -1,4 +1,6 @@
|
||||
#include "gui/tab_bar.hpp"
|
||||
#include "features/functions.hpp"
|
||||
#include "features/notify.hpp"
|
||||
#include "pointers.hpp"
|
||||
#include "script_global.hpp"
|
||||
|
||||
@ -41,7 +43,7 @@ namespace big
|
||||
}
|
||||
else
|
||||
{
|
||||
features::notify::above_map("You aren't the host");
|
||||
notify::above_map("You aren't the host");
|
||||
}
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ namespace big
|
||||
{
|
||||
if (ImGui::BeginTabItem("Info"))
|
||||
{
|
||||
ImGui::Checkbox("Spectate Player", &g_temp.spectate_player);
|
||||
ImGui::Checkbox("Spectate Player", &g_temp.is_spectating);
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "gui/tab_bar.hpp"
|
||||
#include "features/teleport.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
@ -10,7 +11,7 @@ namespace big
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
features::teleport::teleport_to_player(g_selectedPlayer.id);
|
||||
teleport::teleport_to_player(g_selectedPlayer.id);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
@ -18,7 +19,7 @@ namespace big
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
features::teleport::teleport_into_player_vehicle(g_selectedPlayer.id);
|
||||
teleport::teleport_into_player_vehicle(g_selectedPlayer.id);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
#include "imgui.h"
|
||||
|
||||
namespace big
|
||||
|
@ -7,9 +7,9 @@ namespace big
|
||||
void window::render_handling_window()
|
||||
{
|
||||
ImGui::SetNextWindowSize({ 500, 780 }, ImGuiCond_FirstUseEver);
|
||||
if (g_handling_window && ImGui::Begin("Handling", &g_handling_window))
|
||||
if (g_temp.windows.handling && ImGui::Begin("Handling", &g_temp.windows.handling))
|
||||
{
|
||||
if (g_in_vehicle && g_vehicle != nullptr)
|
||||
if (g_temp.in_vehicle && g_vehicle != nullptr)
|
||||
{
|
||||
ImGui::BeginTabBar("handling_tabbar");
|
||||
tabbar::handling_physics();
|
||||
|
@ -5,7 +5,7 @@ namespace big
|
||||
{
|
||||
void window::render_player_window()
|
||||
{
|
||||
if (g_selectedPlayer.id != g_selectedPlayerId || !g_selectedPlayer.is_online) return;
|
||||
if (g_selectedPlayer.id != g_selectedPlayer.id || !g_selectedPlayer.is_online) return;
|
||||
|
||||
char title[64];
|
||||
strcpy(title, "Player Options: ");
|
||||
@ -13,13 +13,8 @@ namespace big
|
||||
strcat(title, "###player_options");
|
||||
|
||||
ImGui::SetNextWindowSize({ 350.f, 300.f }, ImGuiCond_FirstUseEver);
|
||||
if (ImGui::Begin(title))
|
||||
if (g_temp.windows.player && ImGui::Begin(title, &g_temp.windows.player))
|
||||
{
|
||||
if (ImGui::Button("Close"))
|
||||
{
|
||||
g_selectedPlayerId = -2;
|
||||
}
|
||||
|
||||
ImGui::BeginTabBar("tabbar_player");
|
||||
tabbar::player_info();
|
||||
tabbar::player_griefing();
|
||||
|
@ -1,34 +1,26 @@
|
||||
#include "gui/window.hpp"
|
||||
#include "features.hpp"
|
||||
#include "features/functions.hpp"
|
||||
#include "features/notify.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "script.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "structs/lists.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
static char* player_name = "";
|
||||
|
||||
void window::render_top_bar()
|
||||
{
|
||||
if (ImGui::BeginMainMenuBar())
|
||||
{
|
||||
if (ImGui::BeginMenu("Info"))
|
||||
{
|
||||
if (strlen(player_name) == 0)
|
||||
QUEUE_JOB_BEGIN_CLAUSE(&)
|
||||
{
|
||||
player_name = (char*)PLAYER::GET_PLAYER_NAME(g_playerId);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
|
||||
ImGui::MenuItem("Logged in as:", NULL, false, false);
|
||||
ImGui::MenuItem(player_name, NULL, false, false);
|
||||
ImGui::MenuItem("Logged in as:", NULL, false, false);
|
||||
ImGui::MenuItem(g_player.name, NULL, false, false);
|
||||
|
||||
if (ImGui::MenuItem("Am I lobby host?"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
features::notify::above_map(NETWORK::NETWORK_IS_HOST() ? "~g~Yes you are the host." : "You aren't the host.");
|
||||
notify::above_map(NETWORK::NETWORK_IS_HOST() ? "~g~Yes you are the host." : "You aren't the host.");
|
||||
}
|
||||
QUEUE_JOB_END_CLAUSE
|
||||
|
||||
@ -38,7 +30,7 @@ namespace big
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
features::notify::above_map(NETWORK::NETWORK_PLAYER_IS_BADSPORT() ? "You have been ~r~reported multiple times!" : "Your account is in good standing.");
|
||||
notify::above_map(NETWORK::NETWORK_PLAYER_IS_BADSPORT() ? "You have been ~r~reported multiple times!" : "Your account is in good standing.");
|
||||
}
|
||||
QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
@ -55,7 +47,7 @@ namespace big
|
||||
if (CUTSCENE::IS_CUTSCENE_ACTIVE())
|
||||
CUTSCENE::STOP_CUTSCENE_IMMEDIATELY();
|
||||
else
|
||||
features::notify::above_map("There's no cutscene active at the moment.");
|
||||
notify::above_map("There's no cutscene active at the moment.");
|
||||
}
|
||||
QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
@ -16,16 +16,10 @@ namespace big
|
||||
|
||||
ImGui::TextColored({ 255,255,255,255 }, "YOU:");
|
||||
|
||||
for (uint8_t i = 0; i < 32; i++)
|
||||
if (ImGui::Button(g_player.name, vecButtonWidth))
|
||||
{
|
||||
player player = g_players[i];
|
||||
|
||||
if (player.id == g_playerId) g_currentPlayer = player;
|
||||
}
|
||||
if (ImGui::Button(g_currentPlayer.name, vecButtonWidth))
|
||||
{
|
||||
g_selectedPlayer = g_currentPlayer;
|
||||
g_selectedPlayerId = g_currentPlayer.id;
|
||||
g_selectedPlayer = g_player;
|
||||
g_temp.windows.player = true;
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
@ -36,9 +30,9 @@ namespace big
|
||||
|
||||
bool friendInLobby = false;
|
||||
|
||||
for (int i = 0; i < 32; i++)
|
||||
for (auto& pair : g_players)
|
||||
{
|
||||
player player = g_players[i];
|
||||
player player = pair.second;
|
||||
|
||||
if (player.is_friend && player.is_online)
|
||||
{
|
||||
@ -47,7 +41,7 @@ namespace big
|
||||
if (ImGui::Button(player.name, vecButtonWidth))
|
||||
{
|
||||
g_selectedPlayer = player;
|
||||
g_selectedPlayerId = player.id;
|
||||
g_temp.windows.player = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -66,16 +60,16 @@ namespace big
|
||||
{
|
||||
ImGui::Unindent();
|
||||
|
||||
for (int i = 0; i < 32; i++)
|
||||
for (auto& pair : g_players)
|
||||
{
|
||||
player player = g_players[i];
|
||||
player player = pair.second;
|
||||
|
||||
if (!player.is_friend && player.is_online && player.id != g_playerId)
|
||||
if (!player.is_friend && player.is_online && player.id != g_player.id)
|
||||
{
|
||||
if (ImGui::Button(player.name, vecButtonWidth))
|
||||
{
|
||||
g_selectedPlayer = player;
|
||||
g_selectedPlayerId = player.id;
|
||||
g_temp.windows.player = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "features.hpp"
|
||||
#include "features/notify.hpp"
|
||||
#include "hooking.hpp"
|
||||
#include "pointers.hpp"
|
||||
#include "natives.hpp"
|
||||
@ -140,7 +141,7 @@ namespace big
|
||||
strcat(msg, "</C>\nEvent Type: ~b~");
|
||||
strcat(msg, type);
|
||||
|
||||
features::notify::above_map(msg);
|
||||
notify::above_map(msg);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ namespace big
|
||||
strcat(report, PLAYER::GET_PLAYER_NAME(sender_id));
|
||||
strcat(report, "</C>");
|
||||
|
||||
features::notify::above_map(report);
|
||||
notify::above_map(report);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
#include "hooking.hpp"
|
||||
#include "features.hpp"
|
||||
#include "features/notify.hpp"
|
||||
#include "gta/enums.hpp"
|
||||
#include "pointers.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "gta/enums.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
@ -21,7 +22,7 @@ namespace big
|
||||
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);
|
||||
notify::above_map(join_msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,21 +2,32 @@
|
||||
|
||||
namespace big
|
||||
{
|
||||
struct game_time
|
||||
{
|
||||
int hour = 0;
|
||||
int minutes = 0;
|
||||
};
|
||||
|
||||
struct temp
|
||||
{
|
||||
struct game_time
|
||||
{
|
||||
int hour = 0;
|
||||
int minutes = 0;
|
||||
};
|
||||
|
||||
struct window
|
||||
{
|
||||
bool handling = false;
|
||||
bool player = false;
|
||||
};
|
||||
|
||||
bool in_vehicle = false;
|
||||
bool is_spectating = false;
|
||||
|
||||
int character_slot = 0;
|
||||
|
||||
int set_level = 0;
|
||||
int spoofed_rank = 0;
|
||||
game_time time = game_time{};
|
||||
bool spectate_player = false;
|
||||
int teleport_location = 0;
|
||||
int wanted_level = 0;
|
||||
int weather_type = 0;
|
||||
|
||||
game_time time = game_time{};
|
||||
window windows = window{};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user