Ped::isProne: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with " {{ClientsideJsFunction}} {{JSContainer| ===Required Params=== *'''ped:''' {{RageType|number}} ===Return value=== *''' {{RageType|boolean}} ''' ==Syntax== <syntaxhighlight lang="javascript"> mp.game.ped.isProne(ped) </syntaxhighlight> ==Example== <syntaxhighlight lang="javascript"> //todo </syntaxhighlight> }} ==See also== {{Ped_s_function_c}} Category:Clientside API Category:TODO: Example")
 
No edit summary
 
Line 1: Line 1:
{{ClientsideJsFunction}}
{{ClientsideJsFunction}}
{{JSContainer|
{{JSContainer|


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


===Required Params===
=== Required Parameters ===
*'''ped:''' {{RageType|number}}
* '''ped:''' {{RageType|number}} - The ped's handle or identifier.


===Return value===
=== Return Value ===
*''' {{RageType|boolean}} '''
* '''{{RageType|boolean}}''' - Returns `true` if the ped is prone, otherwise `false`.


==Syntax==
== Syntax ==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
mp.game.ped.isProne(ped)
mp.game.ped.isProne(ped);
</syntaxhighlight>
</syntaxhighlight>


==Example==
== Example ==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
//todo
// 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}`);
</syntaxhighlight>
</syntaxhighlight>
}}
}}
==See also==
 
== See Also ==
{{Ped_s_function_c}}
{{Ped_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Latest revision as of 21:46, 29 November 2024

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