Bagh-Chal: exports, events & commands
Generated from the Lua in the release. Descriptions are the comments above each definition. Event names and export names are public contracts: they do not change between versions.
Events
- Client events are triggered on the player:
TriggerClientEvent(name, src, ...)from the server, orTriggerEvent(name, ...)on the client. - Server events are triggered with
TriggerServerEvent(name, ...). The server checks the player, distance and amounts itself; never rely on a client to do it.
Client
| Event | Arguments | Description |
|---|---|---|
lumo-baghchal:client:challengeReceived | fromSrc, fromName | |
lumo-baghchal:client:challengeTarget | data | ── Challenge a nearby player ─────────────────────────────────────────────── |
lumo-baghchal:client:close | reason | |
lumo-baghchal:client:seatSync | seats | |
lumo-baghchal:client:state | state | ── Server → NUI ──────────────────────────────────────────────────────────── |
lumo-baghchal:client:tables | list |
Server
| Event | Arguments | Description |
|---|---|---|
lumo-baghchal:server:action | payload | ── Action (place or move) ────────────────────────────────────────────────── payload = |
lumo-baghchal:server:challenge | targetSrc | |
lumo-baghchal:server:challengeRespond | accepted, expectedChallenger | |
lumo-baghchal:server:create | seat, tableIndex | |
lumo-baghchal:server:createSolo | seat, tableIndex | ── Create solo (vs AI) ───────────────────────────────────────────────────── |
lumo-baghchal:server:deleteTable | id | |
lumo-baghchal:server:join | id | |
lumo-baghchal:server:leave | ── Leave / disconnect ────────────────────────────────────────────────────── | |
lumo-baghchal:server:requestSeatSync | ||
lumo-baghchal:server:requestTables | ── Client sync ────────────────────────────────────────────────────────────── | |
lumo-baghchal:server:saveTable | raw, id | ── Admin edits ────────────────────────────────────────────────────────────── |
lumo-baghchal:server:spectate | id | ── Spectate ──────────────────────────────────────────────────────────────── |
Commands
| Command | Side | Description |
|---|---|---|
/baghchalfacenums | client | Dev: number all 25 points on the face (checks the orientation in game). |
/baghchalprop | client | /baghchalprop: the board 1 m in front of you with a tiger on point 0 and a goat on point 12. Run again to remove them. |
/baghchalseatz | client | /baghchalseatz 0.05 (or -0.05): nudge the seated height for this table's chair model live, re-seat you and the AI players, and show the value to paste into Config.Admin.chairModels (sitZ). Only changes your own client until saved. |