isPlayerRidingTrain
IS_PLAYER_RIDING_TRAIN0x4EC12697209F2196The GTA V native IS_PLAYER_RIDING_TRAIN of the PLAYER namespace, as LS:MP client scripts call it: the global function isPlayerRidingTrain, in JavaScript and in Lua.
isPlayerRidingTrain(player: Player): booleanisPlayerRidingTrain(player: Player): booleanUsage
JavaScript
const result = isPlayerRidingTrain(player);Lua
local result = isPlayerRidingTrain(player)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
player | Player | number | integer |
Returns
BOOL JavaScript boolean, Lua booleanNotes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Returns true if the player is riding a train.
Reference
- Namespace
- Player PLAYER
- In the game
BOOL IS_PLAYER_RIDING_TRAIN(Player player)- Hash
0x4EC12697209F2196