mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-10 03:08:57 +08:00
feat(LsCustoms): No need to set position and heading as the natives are hooked
This commit is contained in:
parent
c1fd7e4bd5
commit
1273b47ef2
@ -56,21 +56,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)
|
||||||
{
|
{
|
||||||
Vector3 loc = ENTITY::GET_ENTITY_COORDS(veh, 1);
|
|
||||||
Vector3 rot = ENTITY::GET_ENTITY_ROTATION(veh, 0);
|
|
||||||
float heading = ENTITY::GET_ENTITY_HEADING(veh);
|
|
||||||
|
|
||||||
*script_local(carmod_shop_thread, 726).at(406).as<int*>() = veh;
|
*script_local(carmod_shop_thread, 726).at(406).as<int*>() = veh;
|
||||||
*script_local(carmod_shop_thread, 2110).as<bool*>() = false; // skips cutscene that's invisible
|
*script_local(carmod_shop_thread, 2110).as<bool*>() = false; // skips cutscene that's invisible
|
||||||
|
|
||||||
*script_local(carmod_shop_thread, 726).at(11).as<int*>() = 4;
|
*script_local(carmod_shop_thread, 726).at(11).as<int*>() = 4;
|
||||||
|
|
||||||
for (int i = 0; math::distance_between_vectors(loc, ENTITY::GET_ENTITY_COORDS(veh, 1)) < 5.f && i < 300; i++)
|
|
||||||
script::get_current()->yield(10ms);
|
|
||||||
|
|
||||||
ENTITY::SET_ENTITY_COORDS(veh, loc.x, loc.y, loc.z, 0, 0, 0, 0);
|
|
||||||
ENTITY::SET_ENTITY_HEADING(veh, heading);
|
|
||||||
VEHICLE::SET_VEHICLE_ON_GROUND_PROPERLY(veh, 5.f);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user