refactor(Functions): Renamed, moved under a class and ordered alphabetically
This commit is contained in:
parent
6930e6bd62
commit
ad61f0367b
@ -1,6 +1,7 @@
|
||||
#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"
|
||||
|
@ -1,17 +1,74 @@
|
||||
#include "functions.hpp"
|
||||
#include "gta/enums.hpp"
|
||||
#include "features.hpp"
|
||||
#include "gta/joaat.hpp"
|
||||
#include "gta/levels.hpp"
|
||||
#include "pointers.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "script.hpp"
|
||||
#include "script_global.hpp"
|
||||
|
||||
namespace big::features::functions
|
||||
namespace big
|
||||
{
|
||||
void get_active_character_slot(int* statSlot)
|
||||
void func::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);
|
||||
}
|
||||
|
||||
void func::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 func::create_ambient_rp(Vector3 location)
|
||||
{
|
||||
// vw_prop_vw_colle_imporage
|
||||
Hash hash = RAGE_JOAAT("vw_prop_vw_colle_alien");
|
||||
do {
|
||||
STREAMING::REQUEST_MODEL(hash);
|
||||
|
||||
script::get_current()->yield(1ms);
|
||||
} while (!STREAMING::HAS_MODEL_LOADED(hash));
|
||||
|
||||
OBJECT::CREATE_AMBIENT_PICKUP(0x2C014CA6, location.x, location.y, location.z + 0.5f, 0, 10, hash, false, true);
|
||||
STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(hash);
|
||||
}
|
||||
|
||||
float func::deg_to_rad(float deg)
|
||||
{
|
||||
double radian = (3.14159265359 / 180) * deg;
|
||||
return (float)radian;
|
||||
}
|
||||
|
||||
void func::delete_entity(Entity ent)
|
||||
{
|
||||
take_control_of_entity(ent);
|
||||
|
||||
ENTITY::DETACH_ENTITY(ent, 1, 1);
|
||||
ENTITY::SET_ENTITY_VISIBLE(ent, false, false);
|
||||
NETWORK::_NETWORK_SET_ENTITY_INVISIBLE_TO_NETWORK(ent, true);
|
||||
ENTITY::SET_ENTITY_COORDS_NO_OFFSET(ent, 0, 0, 0, 0, 0, 0);
|
||||
ENTITY::SET_ENTITY_AS_MISSION_ENTITY(ent, 1, 1);
|
||||
ENTITY::SET_ENTITY_AS_NO_LONGER_NEEDED(&ent);
|
||||
ENTITY::DELETE_ENTITY(&ent);
|
||||
}
|
||||
|
||||
double func::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));
|
||||
}
|
||||
|
||||
void func::get_active_character_slot(int* statSlot)
|
||||
{
|
||||
STATS::STAT_GET_INT(RAGE_JOAAT("MPPLY_LAST_MP_CHAR"), statSlot, true);
|
||||
}
|
||||
|
||||
void join_session_type(session_type session)
|
||||
void func::join_session_type(session_type session)
|
||||
{
|
||||
if (session.id == -1)
|
||||
*script_global(1312443).at(2).as<int*>() = -1;
|
||||
@ -23,7 +80,28 @@ namespace big::features::functions
|
||||
MISC::SET_BIT(&*script_global(1312443).as<int*>(), 0);
|
||||
}
|
||||
|
||||
void reset_vehicle_sell_stats()
|
||||
bool func::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 (bool)hit;
|
||||
}
|
||||
|
||||
void func::reset_vehicle_sell_stats()
|
||||
{
|
||||
get_active_character_slot(&g_temp.character_slot);
|
||||
|
||||
@ -34,12 +112,27 @@ namespace big::features::functions
|
||||
STATS::STAT_SET_INT(MISC::GET_HASH_KEY(stat_string), 50000, true);
|
||||
}
|
||||
|
||||
void set_car_sell_value(int value)
|
||||
Vector3 func::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)
|
||||
};
|
||||
}
|
||||
|
||||
void func::set_car_sell_value(int value)
|
||||
{
|
||||
*script_global(99007).at(970).as<int*>() = value;
|
||||
}
|
||||
|
||||
void set_player_bounty(Player player, bool anonymous)
|
||||
void func::set_player_bounty(Player player, int amount, bool anonymous)
|
||||
{
|
||||
int64_t args[22] =
|
||||
{
|
||||
@ -47,7 +140,7 @@ namespace big::features::functions
|
||||
0,
|
||||
player, // Player
|
||||
1,
|
||||
10000, // Bounty
|
||||
amount, // Bounty
|
||||
0,
|
||||
anonymous, // Anonymous (caused by NPC or Lester)
|
||||
0,
|
||||
@ -77,7 +170,7 @@ namespace big::features::functions
|
||||
}
|
||||
}
|
||||
|
||||
void set_player_level(int level)
|
||||
void func::set_player_level(int level)
|
||||
{
|
||||
get_active_character_slot(&g_temp.character_slot);
|
||||
|
||||
@ -87,121 +180,7 @@ namespace big::features::functions
|
||||
STATS::STAT_SET_INT(MISC::GET_HASH_KEY(level_string), levels[level - 1], 0);
|
||||
}
|
||||
|
||||
void spoof_rank(int rank)
|
||||
{
|
||||
*script_global(1590682).at(PLAYER::PLAYER_ID(), 883).at(211).at(6).as<int*>() = rank;
|
||||
}
|
||||
|
||||
void toggle_protections(bool toggle)
|
||||
{
|
||||
auto &protections = g_settings.options["settings"]["script_protections"];
|
||||
|
||||
protections["bounty"] = toggle;
|
||||
protections["ceo_ban"] = toggle;
|
||||
protections["ceo_kick"] = toggle;
|
||||
protections["ceo_money"] = toggle;
|
||||
protections["clear_wanted_level"] = toggle;
|
||||
protections["fake_deposit"] = toggle;
|
||||
protections["force_mission"] = toggle;
|
||||
protections["gta_banner"] = toggle;
|
||||
protections["kick"] = toggle;
|
||||
protections["personal_vehicle_destroyed"] = toggle;
|
||||
protections["remote_off_radar"] = toggle;
|
||||
protections["rotate_cam"] = toggle;
|
||||
protections["send_to_cutscene"] = toggle;
|
||||
protections["send_to_island"] = toggle;
|
||||
protections["sound_spam"] = toggle;
|
||||
protections["spectate"] = toggle;
|
||||
protections["force_teleport"] = toggle;
|
||||
protections["transaction_error"] = toggle;
|
||||
protections["vehicle_kick"] = toggle;
|
||||
|
||||
g_settings.save();
|
||||
}
|
||||
|
||||
void delete_entity(Entity ent)
|
||||
{
|
||||
take_control_of_entity(ent);
|
||||
|
||||
ENTITY::DETACH_ENTITY(ent, 1, 1);
|
||||
ENTITY::SET_ENTITY_VISIBLE(ent, false, false);
|
||||
NETWORK::_NETWORK_SET_ENTITY_INVISIBLE_TO_NETWORK(ent, true);
|
||||
ENTITY::SET_ENTITY_COORDS_NO_OFFSET(ent, 0, 0, 0, 0, 0, 0);
|
||||
ENTITY::SET_ENTITY_AS_MISSION_ENTITY(ent, 1, 1);
|
||||
ENTITY::SET_ENTITY_AS_NO_LONGER_NEEDED(&ent);
|
||||
ENTITY::DELETE_ENTITY(&ent);
|
||||
}
|
||||
|
||||
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++)
|
||||
{
|
||||
bool in_spectator = NETWORK::NETWORK_IS_IN_SPECTATOR_MODE();
|
||||
if (in_spectator) NETWORK::NETWORK_SET_IN_SPECTATOR_MODE(0, PLAYER::PLAYER_PED_ID());
|
||||
|
||||
NETWORK::NETWORK_REQUEST_CONTROL_OF_ENTITY(ent);
|
||||
|
||||
if (in_spectator) NETWORK::NETWORK_SET_IN_SPECTATOR_MODE(1, PLAYER::PLAYER_PED_ID());
|
||||
|
||||
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)
|
||||
Entity func::spawn_vehicle(const char* model, Vector3 location, float heading)
|
||||
{
|
||||
Hash hash = MISC::GET_HASH_KEY(model);
|
||||
|
||||
@ -215,7 +194,7 @@ namespace big::features::functions
|
||||
}
|
||||
if (!STREAMING::HAS_MODEL_LOADED(hash))
|
||||
{
|
||||
notify::above_map("~r~Failed to spawn model, did you give an incorrect model?");
|
||||
features::notify::above_map("~r~Failed to spawn model, did you give an incorrect model?");
|
||||
|
||||
return -1;
|
||||
}
|
||||
@ -244,33 +223,57 @@ namespace big::features::functions
|
||||
return -1;
|
||||
}
|
||||
|
||||
void create_ambient_money(Vector3 location, int amount)
|
||||
void func::spoof_rank(int rank)
|
||||
{
|
||||
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);
|
||||
*script_global(1590682).at(PLAYER::PLAYER_ID(), 883).at(211).at(6).as<int*>() = rank;
|
||||
}
|
||||
|
||||
void create_ambient_rp(Vector3 location)
|
||||
bool func::take_control_of_entity(Entity ent)
|
||||
{
|
||||
// vw_prop_vw_colle_imporage
|
||||
Hash hash = RAGE_JOAAT("vw_prop_vw_colle_alien");
|
||||
do {
|
||||
STREAMING::REQUEST_MODEL(hash);
|
||||
|
||||
script::get_current()->yield(1ms);
|
||||
} while (!STREAMING::HAS_MODEL_LOADED(hash));
|
||||
|
||||
OBJECT::CREATE_AMBIENT_PICKUP(0x2C014CA6, location.x, location.y, location.z + 0.5f, 0, 10, hash, false, true);
|
||||
STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(hash);
|
||||
}
|
||||
|
||||
void cage_ped(Ped ped)
|
||||
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++)
|
||||
{
|
||||
Hash hash = RAGE_JOAAT("prop_gold_cont_01");
|
||||
bool in_spectator = NETWORK::NETWORK_IS_IN_SPECTATOR_MODE();
|
||||
if (in_spectator) NETWORK::NETWORK_SET_IN_SPECTATOR_MODE(0, PLAYER::PLAYER_PED_ID());
|
||||
|
||||
Vector3 location = ENTITY::GET_ENTITY_COORDS(ped, true);
|
||||
OBJECT::CREATE_OBJECT(hash, location.x, location.y, location.z - 1.f, true, false, false);
|
||||
NETWORK::NETWORK_REQUEST_CONTROL_OF_ENTITY(ent);
|
||||
|
||||
if (in_spectator) NETWORK::NETWORK_SET_IN_SPECTATOR_MODE(1, PLAYER::PLAYER_PED_ID());
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
void func::toggle_protections(bool toggle)
|
||||
{
|
||||
auto& protections = g_settings.options["settings"]["script_protections"];
|
||||
|
||||
protections["bounty"] = toggle;
|
||||
protections["ceo_ban"] = toggle;
|
||||
protections["ceo_kick"] = toggle;
|
||||
protections["ceo_money"] = toggle;
|
||||
protections["clear_wanted_level"] = toggle;
|
||||
protections["fake_deposit"] = toggle;
|
||||
protections["force_mission"] = toggle;
|
||||
protections["gta_banner"] = toggle;
|
||||
protections["kick"] = toggle;
|
||||
protections["personal_vehicle_destroyed"] = toggle;
|
||||
protections["remote_off_radar"] = toggle;
|
||||
protections["rotate_cam"] = toggle;
|
||||
protections["send_to_cutscene"] = toggle;
|
||||
protections["send_to_island"] = toggle;
|
||||
protections["sound_spam"] = toggle;
|
||||
protections["spectate"] = toggle;
|
||||
protections["force_teleport"] = toggle;
|
||||
protections["transaction_error"] = toggle;
|
||||
protections["vehicle_kick"] = toggle;
|
||||
|
||||
g_settings.save();
|
||||
}
|
||||
}
|
@ -1,30 +1,31 @@
|
||||
#pragma once
|
||||
#include "features.hpp"
|
||||
#include "gta/joaat.hpp"
|
||||
#include "structs/session_type.hpp"
|
||||
|
||||
namespace big::features::functions
|
||||
namespace big
|
||||
{
|
||||
void get_active_character_slot(int* statSlot);
|
||||
void join_session_type(session_type session);
|
||||
void reset_vehicle_sell_stats();
|
||||
void set_car_sell_value(int value);
|
||||
void set_player_bounty(Player player, bool anonymous = false);
|
||||
void set_player_level(int level);
|
||||
void spoof_rank(int rank);
|
||||
void toggle_protections(bool toggle);
|
||||
class func
|
||||
{
|
||||
public:
|
||||
static void cage_ped(Ped ped);
|
||||
static void create_ambient_money(Vector3 location, int amount);
|
||||
static void create_ambient_rp(Vector3 location);
|
||||
static float deg_to_rad(float deg);
|
||||
static void delete_entity(Entity ent);
|
||||
static double distance_between_vectors(Vector3 a, Vector3 b);
|
||||
static void get_active_character_slot(int* statSlot);
|
||||
static void join_session_type(session_type session);
|
||||
static bool raycast_entity(Entity* ent);
|
||||
static void reset_vehicle_sell_stats();
|
||||
static Vector3 rotation_to_direction(Vector3 rotation);
|
||||
static void set_car_sell_value(int value);
|
||||
static void set_player_bounty(Player player, int amount = 1e4, bool anonymous = false);
|
||||
static void set_player_level(int level);
|
||||
static Entity spawn_vehicle(const char* model, Vector3 location, float heading);
|
||||
static void spoof_rank(int rank);
|
||||
static bool take_control_of_entity(Entity ent);
|
||||
static void toggle_protections(bool toggle);
|
||||
|
||||
void delete_entity(Entity ent);
|
||||
private:
|
||||
|
||||
Entity spawn_vehicle(const char* model, Vector3 location, float heading);
|
||||
|
||||
void create_ambient_money(Vector3 location, int amount);
|
||||
void create_ambient_rp(Vector3 location);
|
||||
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);
|
||||
};
|
||||
}
|
@ -25,11 +25,11 @@ namespace big
|
||||
{
|
||||
Entity entity;
|
||||
|
||||
if (functions::raycast_entity(&entity))
|
||||
if (func::raycast_entity(&entity))
|
||||
{
|
||||
if (ENTITY::IS_ENTITY_A_PED(entity))
|
||||
{
|
||||
functions::cage_ped(entity);
|
||||
func::cage_ped(entity);
|
||||
}
|
||||
}
|
||||
else features::notify::above_map("No entity found.");
|
||||
|
@ -25,7 +25,7 @@ namespace big
|
||||
{
|
||||
Entity entity;
|
||||
|
||||
if (functions::raycast_entity(&entity))
|
||||
if (func::raycast_entity(&entity))
|
||||
{
|
||||
if (ENTITY::IS_ENTITY_A_PED(entity) && PED::IS_PED_A_PLAYER(entity))
|
||||
{
|
||||
@ -35,7 +35,7 @@ namespace big
|
||||
{
|
||||
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);
|
||||
double dist = func::distance_between_vectors(player, entLoc);
|
||||
|
||||
if (dist > 500)
|
||||
{
|
||||
@ -43,9 +43,9 @@ namespace big
|
||||
}
|
||||
else
|
||||
{
|
||||
if (functions::take_control_of_entity(entity))
|
||||
if (func::take_control_of_entity(entity))
|
||||
{
|
||||
functions::delete_entity(entity);
|
||||
func::delete_entity(entity);
|
||||
}
|
||||
else notify::above_map("~r~Failed to take control of entity.");
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ namespace big
|
||||
// Attack RELEASED
|
||||
if (PAD::IS_DISABLED_CONTROL_PRESSED(0, 24) && entity == 0)
|
||||
{
|
||||
if (functions::raycast_entity(&entity))
|
||||
if (func::raycast_entity(&entity))
|
||||
{
|
||||
if (ENTITY::IS_ENTITY_A_PED(entity) && PED::IS_PED_A_PLAYER(entity))
|
||||
{
|
||||
@ -45,7 +45,7 @@ namespace big
|
||||
else
|
||||
{
|
||||
other = ENTITY::GET_ENTITY_COORDS(entity, true);
|
||||
dist = (float)functions::distance_between_vectors(location, other);
|
||||
dist = (float)func::distance_between_vectors(location, other);
|
||||
|
||||
if (dist > 500)
|
||||
{
|
||||
@ -55,7 +55,7 @@ namespace big
|
||||
}
|
||||
else
|
||||
{
|
||||
functions::take_control_of_entity(entity);
|
||||
func::take_control_of_entity(entity);
|
||||
|
||||
if (ENTITY::IS_ENTITY_A_PED(entity) && !PED::IS_PED_RAGDOLL(entity)) TASK::SET_HIGH_FALL_TASK(entity, 0, 0, 0);
|
||||
|
||||
@ -78,16 +78,16 @@ namespace big
|
||||
if (PAD::IS_DISABLED_CONTROL_PRESSED(0, 15))
|
||||
dist += 5;
|
||||
|
||||
functions::take_control_of_entity(entity);
|
||||
func::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 pitch = func::deg_to_rad(rot.x); // vertical
|
||||
// float roll = rot.y;
|
||||
float yaw = functions::deg_to_rad(rot.z + 90); // horizontal
|
||||
float yaw = func::deg_to_rad(rot.z + 90); // horizontal
|
||||
|
||||
Vector3 velocity;
|
||||
|
||||
@ -101,7 +101,7 @@ namespace big
|
||||
}
|
||||
else if (entity != 0)
|
||||
{
|
||||
functions::take_control_of_entity(entity);
|
||||
func::take_control_of_entity(entity);
|
||||
|
||||
ENTITY::SET_ENTITY_COLLISION(entity, true, true);
|
||||
ENTITY::SET_ENTITY_ALPHA(entity, 255, 0);
|
||||
@ -112,10 +112,4 @@ namespace big
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
float deg_to_rad(float deg)
|
||||
{
|
||||
double radian = (3.14159265359 / 180) * deg;
|
||||
return (float)radian;
|
||||
}
|
||||
}
|
@ -32,7 +32,7 @@ namespace big
|
||||
|
||||
QUEUE_JOB_BEGIN_CLAUSE(&)
|
||||
{
|
||||
if (functions::raycast_entity(&entity))
|
||||
if (func::raycast_entity(&entity))
|
||||
{
|
||||
if (!ENTITY::IS_ENTITY_A_PED(entity) || !PED::IS_PED_A_PLAYER(entity))
|
||||
{
|
||||
@ -43,7 +43,7 @@ namespace big
|
||||
|
||||
Vector3 location = ENTITY::GET_ENTITY_COORDS(entity, true);
|
||||
|
||||
features::functions::create_ambient_money(location, rand() % 500 + 2000);
|
||||
func::create_ambient_money(location, rand() % 500 + 2000);
|
||||
|
||||
script::get_current()->yield(33ms);
|
||||
|
||||
|
@ -25,7 +25,7 @@ namespace big
|
||||
{
|
||||
Entity entity;
|
||||
|
||||
if (functions::raycast_entity(&entity))
|
||||
if (func::raycast_entity(&entity))
|
||||
{
|
||||
if (ENTITY::IS_ENTITY_A_VEHICLE(entity))
|
||||
{
|
||||
@ -38,7 +38,7 @@ namespace big
|
||||
notify::above_map("Entity is not a vehicle.");
|
||||
}
|
||||
}
|
||||
else features::notify::above_map("No entity found.");
|
||||
else notify::above_map("No entity found.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,16 +26,16 @@ namespace big
|
||||
if (PAD::IS_DISABLED_CONTROL_JUST_RELEASED(0, 24))
|
||||
{
|
||||
Vector3 location = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(player, 0.f, 10.f, 0.f);
|
||||
Vehicle veh = functions::spawn_vehicle(
|
||||
Vehicle veh = func::spawn_vehicle(
|
||||
"bus",
|
||||
location,
|
||||
ENTITY::GET_ENTITY_HEADING(player)
|
||||
);
|
||||
|
||||
Vector3 rot = CAM::GET_GAMEPLAY_CAM_ROT(2);
|
||||
float pitch = functions::deg_to_rad(rot.x); // vertical
|
||||
float pitch = func::deg_to_rad(rot.x); // vertical
|
||||
//float roll = rot.y;
|
||||
float yaw = functions::deg_to_rad(rot.z + 90); // horizontal
|
||||
float yaw = func::deg_to_rad(rot.z + 90); // horizontal
|
||||
|
||||
Vector3 velocity;
|
||||
float dist = 150.f;
|
||||
|
@ -28,10 +28,10 @@ namespace big
|
||||
ENTITY::IS_ENTITY_ATTACHED_TO_ENTITY(PED::GET_VEHICLE_PED_IS_IN(player, true), ent)
|
||||
)
|
||||
)
|
||||
functions::delete_entity(ent);
|
||||
func::delete_entity(ent);
|
||||
|
||||
if (protections["cage"] && ENTITY::GET_ENTITY_MODEL(ent) == RAGE_JOAAT("prop_gold_cont_01"))
|
||||
functions::delete_entity(ent);
|
||||
func::delete_entity(ent);
|
||||
}
|
||||
}
|
||||
}
|
@ -20,7 +20,7 @@ namespace big
|
||||
|
||||
if (bNoclip)
|
||||
{
|
||||
functions::take_control_of_entity(ent);
|
||||
func::take_control_of_entity(ent);
|
||||
|
||||
ENTITY::SET_ENTITY_COLLISION(ent, false, false);
|
||||
|
||||
@ -66,7 +66,7 @@ namespace big
|
||||
}
|
||||
else if (!bNoclip && bNoclip != bLastNoClip)
|
||||
{
|
||||
functions::take_control_of_entity(ent);
|
||||
func::take_control_of_entity(ent);
|
||||
|
||||
ENTITY::SET_ENTITY_COLLISION(ent, true, true);
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ namespace big
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
features::functions::spoof_rank(g_settings.options["rank"].get<int>());
|
||||
func::spoof_rank(g_settings.options["rank"].get<int>());
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ namespace big
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
features::functions::set_player_level(g_temp.set_level);
|
||||
func::set_player_level(g_temp.set_level);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ namespace big
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
int character_index;
|
||||
features::functions::get_active_character_slot(&character_index);
|
||||
func::get_active_character_slot(&character_index);
|
||||
|
||||
features::stats::max_stats(character_index);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
|
@ -47,12 +47,12 @@ namespace big
|
||||
|
||||
if (ImGui::Button("Set Car Sell Value at 5 million"))
|
||||
{
|
||||
features::functions::set_car_sell_value((int)5e6);
|
||||
func::set_car_sell_value((int)5e6);
|
||||
}
|
||||
|
||||
if (ImGui::Button("Set Car Sell Value at 25 million"))
|
||||
{
|
||||
features::functions::set_car_sell_value((int)25e6);
|
||||
func::set_car_sell_value((int)25e6);
|
||||
}
|
||||
|
||||
ImGui::TreePop();
|
||||
|
@ -124,10 +124,10 @@ namespace big
|
||||
}
|
||||
|
||||
if (ImGui::Button("Enable All"))
|
||||
features::functions::toggle_protections(true);
|
||||
func::toggle_protections(true);
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Disable All"))
|
||||
features::functions::toggle_protections(false);
|
||||
func::toggle_protections(false);
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ namespace big
|
||||
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);
|
||||
|
||||
features::functions::spawn_vehicle((const char*)model, location, ENTITY::GET_ENTITY_HEADING(player) + 90.f);
|
||||
func::spawn_vehicle((const char*)model, location, ENTITY::GET_ENTITY_HEADING(player) + 90.f);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ namespace big
|
||||
{
|
||||
Vector3 coords = ENTITY::GET_ENTITY_COORDS(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_selectedPlayer.id), true);
|
||||
|
||||
features::functions::create_ambient_rp(coords);
|
||||
func::create_ambient_rp(coords);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ namespace big
|
||||
{
|
||||
Vector3 coords = ENTITY::GET_ENTITY_COORDS(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_selectedPlayer.id), true);
|
||||
|
||||
features::functions::create_ambient_money(coords, rand() % 500 + 2000);
|
||||
func::create_ambient_money(coords, rand() % 500 + 2000);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ namespace big
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
features::functions::cage_ped(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_selectedPlayer.id));
|
||||
func::cage_ped(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_selectedPlayer.id));
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ namespace big
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
features::functions::set_player_bounty(g_selectedPlayer.id);
|
||||
func::set_player_bounty(g_selectedPlayer.id);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "natives.hpp"
|
||||
#include "script.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "structs/lists.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
@ -68,9 +69,11 @@ namespace big
|
||||
{
|
||||
if (ImGui::MenuItem(sessions[i].descr))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE(= )
|
||||
auto session = sessions[i];
|
||||
|
||||
QUEUE_JOB_BEGIN_CLAUSE(&)
|
||||
{
|
||||
features::functions::join_session_type(sessions[i]);
|
||||
func::join_session_type(session);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
namespace big
|
||||
{
|
||||
struct custom_gun {
|
||||
|
@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
namespace big
|
||||
{
|
||||
struct session_type
|
||||
|
Reference in New Issue
Block a user