Player::taskCrawlToCoords

From RAGE Multiplayer Wiki
Revision as of 18:30, 25 December 2024 by Shr0x (talk | contribs) (Created page with "{{ClientsideJsFunction}} {{JSContainer| === Summary === Directs the player to crawl to specified coordinates. === Syntax === <syntaxhighlight lang="javascript"> player.taskCrawlToCoords(pos, isOnBack, timeout); </syntaxhighlight> === Required Parameters === * '''pos:''' {{RageType|mp.Vector3}} - The target coordinates. * '''isOnBack:''' {{RageType|bool}} - Set to `true` to crawl on the back, or `false` to crawl face-down. * '''timeout:''' {{RageType|number}} - The tim...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Function

 JavaScript



JavaScript Syntax


Summary

Directs the player to crawl to specified coordinates.

Syntax

player.taskCrawlToCoords(pos, isOnBack, timeout);

Required Parameters

  • pos: mp.Vector3 - The target coordinates.
  • isOnBack: bool - Set to `true` to crawl on the back, or `false` to crawl face-down.
  • timeout: number - The time (in milliseconds) after which the task will stop.

Return Value

  • undefined

Example

// Make the local player crawl to a specific location
const targetPos = new mp.Vector3(100, 100, 72);
mp.players.local.taskCrawlToCoords(targetPos, false, 5000);
mp.gui.chat.push("The player is crawling to the specified location.");


See Also