# PLAYER::SET_PLAYER_TEAM

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

## Signature

```c
void SET_PLAYER_TEAM(Player player, int team, BOOL bRestrictToThisScript);
```

## Parameters

- `player` (`Player`)
- `team` (`int`)
- `bRestrictToThisScript` (`BOOL`)

## Returns

`void`

## Description

Sets the player's team.

## Usage

### Lua

```lua
SetPlayerTeam(player, team, bRestrictToThisScript)

-- always available, by hash
Citizen.InvokeNative(0xE8DD8536F01DE600, player, team, bRestrictToThisScript)
```

### JavaScript

```js
SetPlayerTeam(player, team, bRestrictToThisScript);

// by hash
Citizen.invokeNative('0xE8DD8536F01DE600', player, team, bRestrictToThisScript);
```

### C#

```csharp
Function.Call((Hash)0xE8DD8536F01DE600, player, team, bRestrictToThisScript);
```

## See also

- [PLAYER::GET_PLAYER_TEAM](https://natives.borderlinerp.com/natives/PLAYER/GET_PLAYER_TEAM.md) — Gets the player's team.

*Sources: alloc8or RDR3 NativeDB.*
