Add more spoofing options and added clang-format (#1020)

* feat(Spoofing): add spoofing
* feat(Spoofing): prepare code for player attach
* remove(PlayerAttach): isn't going to work due to netsync architecture
* fix(GUI): fix scaling
* feat(Project): add clang-format file
* feat(Classes): update classes
* fix(BlackHole): remove unnecessary cleanup
* fix(Formatting): fix formatting for initializer lists
* feat(clang-format): Set tab width and 1 space before comment

Co-authored-by: Yimura <24669514+Yimura@users.noreply.github.com>
This commit is contained in:
maybegreat48
2023-03-01 21:27:15 +00:00
committed by GitHub
parent 6a2cd866c0
commit 9ccb77e8eb
467 changed files with 55742 additions and 36204 deletions

View File

@ -7,28 +7,26 @@
namespace big
{
static bool state = false;
static bool busy = false;
static bool busy = false;
constexpr auto CARMOD_SHOP_STRUCT = 730; // move_m@generic_idles@std -- one function below -- first local
constexpr auto CARMOD_SHOP_CUTSCENE = 2208; // "carmod_fam1" -- first boolean local below it
constexpr auto CARMOD_SHOP_STRUCT = 730; // move_m@generic_idles@std -- one function below -- first local
constexpr auto CARMOD_SHOP_CUTSCENE = 2208;// "carmod_fam1" -- first boolean local below it
void looped::vehicle_ls_customs()
{
if (busy) return;
if (busy)
return;
busy = true;
constexpr int hash = RAGE_JOAAT("carmod_shop");
if (g.vehicle.ls_customs && g.vehicle.ls_customs == state)
{
if (
auto carmod_shop_thread = gta_util::find_script_thread(hash);
carmod_shop_thread &&
*script_local(carmod_shop_thread, CARMOD_SHOP_STRUCT).at(11).as<int*>() != 4
)
if (auto carmod_shop_thread = gta_util::find_script_thread(hash);
carmod_shop_thread && *script_local(carmod_shop_thread, CARMOD_SHOP_STRUCT).at(11).as<int*>() != 4)
{
g.vehicle.ls_customs = false;
*script_local(carmod_shop_thread, CARMOD_SHOP_STRUCT).as<int*>() = 1; // cleanup
*script_local(carmod_shop_thread, CARMOD_SHOP_STRUCT).as<int*>() = 1;// cleanup
}
}
@ -37,7 +35,7 @@ namespace big
Vehicle veh = self::veh;
if (!ENTITY::DOES_ENTITY_EXIST(veh) || ENTITY::IS_ENTITY_DEAD(veh, false))
{
busy = false;
busy = false;
g.vehicle.ls_customs = false;
g_notification_service->push_warning("LS Customs", "You aren't in a vehicle.");
@ -48,7 +46,7 @@ namespace big
scripts::request_script(hash);
if (scripts::wait_till_loaded(hash))
{
int args[] = { 45, 0, 9 };
int args[] = {45, 0, 9};
scripts::start_script_with_args(hash, args, 3, 3600);
scripts::wait_till_running(hash);
@ -58,15 +56,15 @@ namespace big
{
if (auto carmod_shop_thread = gta_util::find_script_thread(hash); carmod_shop_thread)
{
*script_local(carmod_shop_thread, CARMOD_SHOP_STRUCT).at(409).as<int*>() = veh; // "HIDDEN_RADIO_09_HIPHOP_OLD"
*script_local(carmod_shop_thread, CARMOD_SHOP_CUTSCENE).as<bool*>() = false; // skips cutscene that's invisible
*script_local(carmod_shop_thread, CARMOD_SHOP_STRUCT).at(409).as<int*>() = veh;// "HIDDEN_RADIO_09_HIPHOP_OLD"
*script_local(carmod_shop_thread, CARMOD_SHOP_CUTSCENE).as<bool*>() = false;// skips cutscene that's invisible
*script_local(carmod_shop_thread, CARMOD_SHOP_STRUCT).at(11).as<int*>() = 4;
}
}
}
busy = false;
busy = false;
state = g.vehicle.ls_customs;
}
}