Player::isInCover: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 4: Line 4:
== Example ==
== Example ==
<source lang="javascript">
<source lang="javascript">
let playerIsCovering = player.isJumping
let playerIsInCover = player.isInCover
if (playerIsCovering)
if (playerIsInCover)
   player.outputChatBox('You are in the cover right now!');
   player.outputChatBox('You are in the cover right now!');
else
else
   player.outputChatBox('You are not in the cover right now!');
   player.outputChatBox('You are not in the cover right now!');
</source>
</source>
==See Also==
{{Player_block}}

Latest revision as of 13:47, 17 April 2017

This property returns true or false of player cover state.

Note: this property is read-only.

Example

let playerIsInCover = player.isInCover
if (playerIsInCover)
  player.outputChatBox('You are in the cover right now!');
else
  player.outputChatBox('You are not in the cover right now!');

See Also