Ped::isProne

From RAGE Multiplayer Wiki
Revision as of 21:46, 29 November 2024 by Shr0x (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Function

 JavaScript



JavaScript Syntax


Summary

Checks if the specified ped is currently in a prone position.

Required Parameters

  • ped: number - The ped's handle or identifier.

Return Value

  • 'boolean' - Returns `true` if the ped is prone, otherwise `false`.

Syntax

mp.game.ped.isProne(ped);

Example

// Example: Check if the player's ped is prone
const playerPed = mp.players.local.handle;
const isPlayerProne = mp.game.ped.isProne(playerPed);

mp.gui.chat.push(`Player prone: ${isPlayerProne}`);


See Also