mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-07 18:03:34 +08:00
docs: Add comment to find script locals (#596)
This commit is contained in:
parent
f636c7c17f
commit
d8fb6a049c
@ -9,6 +9,9 @@ namespace big
|
|||||||
static bool state = false;
|
static bool state = false;
|
||||||
static bool busy = false;
|
static bool busy = false;
|
||||||
|
|
||||||
|
constexpr auto CARMOD_SHOP_STRUCT = 728; // struct<688> Local_
|
||||||
|
constexpr auto CARMOD_SHOP_CUTSCENE = 2149; // "carmod_fam1" -- first boolean local below it
|
||||||
|
|
||||||
void looped::vehicle_ls_customs()
|
void looped::vehicle_ls_customs()
|
||||||
{
|
{
|
||||||
if (busy) return;
|
if (busy) return;
|
||||||
@ -20,12 +23,12 @@ namespace big
|
|||||||
if (
|
if (
|
||||||
auto carmod_shop_thread = gta_util::find_script_thread(hash);
|
auto carmod_shop_thread = gta_util::find_script_thread(hash);
|
||||||
carmod_shop_thread &&
|
carmod_shop_thread &&
|
||||||
*script_local(carmod_shop_thread, 728).at(11).as<int*>() != 4
|
*script_local(carmod_shop_thread, CARMOD_SHOP_STRUCT).at(11).as<int*>() != 4
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
g->vehicle.ls_customs = false;
|
g->vehicle.ls_customs = false;
|
||||||
|
|
||||||
*script_local(carmod_shop_thread, 728).as<int*>() = 1; // cleanup
|
*script_local(carmod_shop_thread, CARMOD_SHOP_STRUCT).as<int*>() = 1; // cleanup
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,10 +58,10 @@ namespace big
|
|||||||
{
|
{
|
||||||
if (auto carmod_shop_thread = gta_util::find_script_thread(hash); carmod_shop_thread)
|
if (auto carmod_shop_thread = gta_util::find_script_thread(hash); carmod_shop_thread)
|
||||||
{
|
{
|
||||||
*script_local(carmod_shop_thread, 728).at(406).as<int*>() = veh;
|
*script_local(carmod_shop_thread, CARMOD_SHOP_STRUCT).at(406).as<int*>() = veh; // "HIDDEN_RADIO_09_HIPHOP_OLD"
|
||||||
*script_local(carmod_shop_thread, 2149).as<bool*>() = false; // skips cutscene that's invisible
|
*script_local(carmod_shop_thread, CARMOD_SHOP_CUTSCENE).as<bool*>() = false; // skips cutscene that's invisible
|
||||||
|
|
||||||
*script_local(carmod_shop_thread, 728).at(11).as<int*>() = 4;
|
*script_local(carmod_shop_thread, CARMOD_SHOP_STRUCT).at(11).as<int*>() = 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user