feat(Util/Vehicle): Set vehicle heading and don't continue if we can't get control of vehicle.

This commit is contained in:
Yimura 2022-01-18 02:03:20 +01:00
parent d6929d4efc
commit c09df14671
No known key found for this signature in database
GPG Key ID: 3D8FF4397E768682

View File

@ -16,8 +16,9 @@ namespace big::vehicle
teleport::load_ground_at_3dcoord(vecVehicleLocation);
if (!entity::take_control_of(veh))
notify::above_map("Failed to take control of remote vehicle.");
return notify::above_map("Failed to take control of remote vehicle.");
ENTITY::SET_ENTITY_COORDS(veh, location.x, location.y, location.z + 1.f, 0, 0, 0, 0);
ENTITY::SET_ENTITY_HEADING(veh, ENTITY::GET_ENTITY_HEADING(PLAYER::PLAYER_PED_ID()));
if (put_in)
{