Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Solved] Problems with Vehicle DriveToPosition

Featured Replies

Hi all..

 

i´m facing some serious problems within my callouts.

I spawn 2 additional units somewhere on the map... mostly far away from the callout scene.

When i set the parameter for letting them drive to a specific vector 3 they just don´t drive. When i teleport myself to their spawnpoint, then they start driving to the correct vector3...

I tried with following lines:

//THIS
_ped_cop_help01.Tasks.DriveToPosition(_veh_cop_help01, _areas[1]._wait_position, 20, VehicleDrivingFlags.Emergency, 2f);
//OR
NativeFunction.CallByName<uint>("TASK_VEHICLE_DRIVE_TO_COORD", _ped_cop_help01, _veh_cop_help01, _areas[1]._wait_position.X, _areas[1]._wait_position.Y, _areas[1]._wait_position.Z , 20f, 1, _veh_cop_help01.Model.Hash, 1074528293, 2f, -1);

i have absolutely no clue where the problem is... on both lines the do the same...

Ped and Vehicle is spawned on OnCallAccepted with:

_veh_cop_help01 = new Vehicle(_cops[0]._backup_veh_model, _cops[0]._backup_position, _cops[0]._backup_heading);
_veh_cop_help01.IsPersistent = true;
_veh_cop_help01.IsEngineOn = true;
_veh_cop_help01.IsVisible = true;

_ped_cop_help01 = new Ped(_cops[0]._backup_ped_model, _veh_cop_help01.Position, 0f);
_ped_cop_help01.IsPersistent = true;
_ped_cop_help01.IsVisible = true;
_ped_cop_help01.WarpIntoVehicle(_veh_cop_help01, -1);

BR

Edited by LowRid3R

  • Author

alex, you saved my ass :)..

 

you were right with the longrange stuff.. but there was a additional twist...

Before i run that command i needed to be sure that all properties of the vehicle and ped are written.. therefore a simple GameFiber.Wait(2000) solved everything else...

 

thx, i owe you one

You can also call for backup directly with Functions.RequestBackup and send them to a desired location. 

[REL] Coastal Callouts: An action-packed mod with new vehicles, maps, capabilities, and callouts in and around the waters of Los Santos

[REL] Police Tape: Make your scenes more realistic while stopping peds and traffic

[REL] Better EMS: Realistic and dynamic EMS response

Join the Parks Benefactor Program to support my work and get early beta access!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.