# PLAYER::IS_PLAYER_RIDING_TRAIN

- **Hash:** `0x2FB0ACADA6A238DD`
- **Namespace:** PLAYER
- **Runtime name (Lua/JS):** `IsPlayerRidingTrain`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/PLAYER/IS_PLAYER_RIDING_TRAIN

## Signature

```c
BOOL IS_PLAYER_RIDING_TRAIN(Player player);
```

## Parameters

- `player` (`Player`)

## Returns

`BOOL`

## Description

Returns true if the player is riding a train.

## Usage

### Lua

```lua
local retval = IsPlayerRidingTrain(player)

-- always available, by hash
local retval = Citizen.InvokeNative(0x2FB0ACADA6A238DD, player, Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const retval = IsPlayerRidingTrain(player);

// by hash
const retval = Citizen.invokeNative('0x2FB0ACADA6A238DD', player, Citizen.returnResultAnyway());
```

### C#

```csharp
bool retval = Function.Call<bool>((Hash)0x2FB0ACADA6A238DD, player);
```

*Sources: alloc8or RDR3 NativeDB.*
