Move/configure a player
player_setModify a Garry's Mod player's position, view angles, noclip, or god mode, changing only the fields you provide and returning the updated player state.
Instructions
Changes a player in the server realm: pos teleports it (velocity reset to zero), ang sets its eye angles, noclip switches MOVETYPE_NOCLIP/WALK, god toggles god mode. Only the given fields change. Default player: the first one (the local player in singleplayer). Result: {id, class, model, nick, pos, ang, eye_ang, noclip, god} read right after. The client sees it on a later frame: check with lua_exec {realm: "client", code: "return LocalPlayer():GetPos()"}. Example: {"pos": [0, 0, 64], "ang": [0, 90, 0], "noclip": true}. Needs a loaded map (map_load): the server and client realms do not exist at the main menu.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "player_set"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Player entity index (players_list `id`, not userid). Default: the first player. | |
| ang | No | Eye angles [pitch, yaw, roll] in degrees. | |
| god | No | true = god mode on. | |
| pos | No | New position, [x, y, z] in Hammer units. | |
| noclip | No | true = noclip, false = walk. | |
| instance | No | Optional. Instance identifier (see instances_list). If present and different from the local instance, the call is relayed by the coordinator to that instance. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| ang | No | ||
| bot | No | ||
| god | No | ||
| pos | No | ||
| next | No | ||
| nick | No | ||
| note | No | ||
| alive | No | ||
| class | No | ||
| model | No | ||
| health | No | ||
| noclip | No | ||
| userid | No | ||
| eye_ang | No | ||
| eye_pos | No | ||
| steamid | No | ||
| warning | No | ||
| next_call | No | ||
| answered_by | No | ||
| truncated_note | No | ||
| version_warning | No |