Player::vehicle

From RAGE Multiplayer Wiki

Shared
Function

 JavaScript


Returns the vehicle object the player is currently sitting in.

Getter

  • Object - Vehicle


JavaScript Syntax

Syntax

player.vehicle

Example

Server-Side
if (player.vehicle)
  player.outputChatBox('You are in the vehicle right now!');
else
  player.outputChatBox('You are not in the vehicle right now!');


See Also