Player::isFreeAiming: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
Line 1: Line 1:
Gets a value indicating whether the specified player is currently aiming freely.
Gets a value indicating whether the specified player is currently aiming freely.
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">player.isFreeAiming();</syntaxhighlight>
<pre>player.isFreeAiming();</pre>
=== Required Arguments ===
=== Required Arguments ===
===Return value===
===Return value===
Line 7: Line 7:
==Example==
==Example==
Outputs the current "FreeAiming" state into the chatbox
Outputs the current "FreeAiming" state into the chatbox
<syntaxhighlight lang="javascript">
<pre>
let freeAiming = mp.game.player.isFreeAiming();
let freeAiming = mp.game.player.isFreeAiming();
mp.gui.chat.push("Freeaiming is " + (freeAiming ? "active" : "inactive"))
mp.gui.chat.push("Freeaiming is " + (freeAiming ? "active" : "inactive"))
</syntaxhighlight>
</pre>


==See also==
==See also==

Revision as of 17:42, 16 August 2018

Gets a value indicating whether the specified player is currently aiming freely.

Syntax

player.isFreeAiming();

Required Arguments

Return value

  • Boolean

Example

Outputs the current "FreeAiming" state into the chatbox

let freeAiming = mp.game.player.isFreeAiming();
mp.gui.chat.push("Freeaiming is " + (freeAiming ? "active" : "inactive"))

See also