Player::taskGoToCoordAnyMeansExtraParams

From RAGE Multiplayer Wiki

Client-Side
Function

 JavaScript



JavaScript Syntax


The `taskGoToCoordAnyMeansExtraParams` function instructs a player character to move to specified coordinates with various options for movement and vehicle handling. This is particularly useful for guiding NPCs or players to specific locations while considering movement styles and parameters for vehicle pathing.

Required Params

  • ped: Ped – The player or NPC character that will perform the action.
  • x: float – The x-coordinate to move to.
  • y: float – The y-coordinate to move to.
  • z: float – The z-coordinate to move to.
  • moveBlendRatio: float – The speed blend ratio for movement.
  • vehicle: Vehicle – Vehicle to use for movement, if any.
  • useLongRangeVehiclePathing: BOOL – Whether to use long-range pathing.
  • drivingFlags: int – Flags that affect driving behavior.
  • maxRangeToShootTargets: float – Maximum distance to shoot at targets.
  • extraVehToTargetDistToPreferVehicle: float – Distance to prefer vehicles when targeting.
  • driveStraightLineDistance: float – Distance for driving straight lines.
  • extraFlags: int – Additional flags for the action.
  • warpTimerMS: float – Timer in milliseconds for warping.

Return Value

  • Undefined – This function does not return a value.

Syntax

player.taskGoToCoordAnyMeansExtraParams(ped, x, y, z, moveBlendRatio, vehicle, useLongRangeVehiclePathing, drivingFlags, maxRangeToShootTargets, extraVehToTargetDistToPreferVehicle, driveStraightLineDistance, extraFlags, warpTimerMS);

Example

// Example usage of taskGoToCoordAnyMeansExtraParams

const destination = new mp.Vector3(100, 200, 300); // Example coordinates
mp.players.local.taskGoToCoordAnyMeansExtraParams(destination.x, destination.y, destination.z, 5.0, 0, true, 0, 0, 0, 0, 0); // Move to destination with specific parameters
mp.gui.chat.push("Moving local player to given coordinates");


See Also