# PED::SET_PED_AS_GROUP_MEMBER

- **Hash:** `0x9F3480FE65DB31B5`
- **Namespace:** PED
- **Runtime name (Lua/JS):** `SetPedAsGroupMember`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described with examples
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/PED/SET_PED_AS_GROUP_MEMBER

## Signature

```c
void SET_PED_AS_GROUP_MEMBER(Ped ped, int groupId);
```

## Parameters

- `ped` (`Ped`) — Ped to add.
- `groupId` (`int`) — Target group, e.g. GET_PLAYER_GROUP(PlayerId()).

## Returns

`void`

## Verified notes

### Two players on one horse

A player who climbs onto another player's horse as passenger is dismounted after about 3 seconds, with a clean dismount animation (no ragdoll, no buck, no change of network owner). Spawn flags, mount ownership (`SET_PLAYER_OWNS_MOUNT`), `SET_ANIMAL_IS_WILD` and PLAYER↔PLAYER relationships make no difference.

The cause is RDR's companion rule: the passenger must be in the rider's ped group. Ped groups are local, so add each other on **both** clients:

```lua
-- on every client, for the other player's ped that shares your mount
SetPedAsGroupMember(otherPed, GetPlayerGroup(PlayerId()))

-- when they get off
RemovePedFromGroup(otherPed)
```

Wagons and carts do not need this. There is no `SET_PED_NEVER_LEAVES_GROUP` in RDR3.

Verified in game on the Borderline RP server, September 2026.

## Usage

### Lua

```lua
SetPedAsGroupMember(ped, groupId)

-- always available, by hash
Citizen.InvokeNative(0x9F3480FE65DB31B5, ped, groupId)
```

### JavaScript

```js
SetPedAsGroupMember(ped, groupId);

// by hash
Citizen.invokeNative('0x9F3480FE65DB31B5', ped, groupId);
```

### C#

```csharp
Function.Call((Hash)0x9F3480FE65DB31B5, ped, groupId);
```

## See also

- [PED::REMOVE_PED_FROM_GROUP](https://natives.borderlinerp.com/natives/PED/REMOVE_PED_FROM_GROUP.md)
- [PLAYER::GET_PLAYER_GROUP](https://natives.borderlinerp.com/natives/PLAYER/GET_PLAYER_GROUP.md) — Returns the group ID the player is member of.
- [PED::GET_PED_AS_GROUP_MEMBER](https://natives.borderlinerp.com/natives/PED/GET_PED_AS_GROUP_MEMBER.md)

*Sources: alloc8or RDR3 NativeDB, RedM Natives (verified notes).*
