API Index
Every callable surface in Knight, grouped by kind.
This page lists everything you can call from a gamemode. Each section links to the full reference with signatures and descriptions.
| Kind | Count | Reference |
|---|---|---|
| Natives (engine functions) | 559 | Native Functions |
| Built-ins (language functions) | 69 | Built-in Functions |
| Callbacks (events) | 41 | Callbacks |
| Object fields & methods | 90 | Fields & Methods |
| Server config fields | 16 | Configuration |
| Server methods | 5 | Configuration |
| Constants | 18 | Constants |
How names resolve
| Order | Lookup |
|---|---|
| 1 | Local variable or parameter in scope |
| 2 | Top-level function in the gamemode or any imported module |
| 3 | Language built-in (len, push, sort, ...) |
| 4 | Go plugin native registered at startup |
| 5 | Engine native (SetPlayerHealth, CreateVehicle, ...) |
| 6 | Constant (MAX_PLAYERS, BONE_HEAD, ...) |
Note
A user function cannot shadow a built-in: built-ins win. Native names are reserved, so a
function with a native name is rejected at compile time.Natives by group
| Group | What it covers |
|---|---|
| Players | state, position, health, weapons, money, camera, spectating, teams |
| Vehicles | create/destroy, position, damage, colours, components, parameters |
| Objects | static/dynamic objects, materials, movement, attachments, editing |
| Player Objects | per-player objects and their materials/movement |
| Pickups | pickup creation and removal |
| Actors | scripted NPC peds: position, animation, health, streaming |
| Labels | 3D text labels, attached to players/vehicles |
| Player Labels | per-player 3D text labels |
| Gang Zones | radar territory zones: show, hide, flash |
| Checkpoints | checkpoints and race checkpoints |
| Dialogs | ShowPlayerDialog and related |
| TextDraw | global text draws: fonts, colours, boxes, previews |
| Player TextDraw | per-player text draws |
| Messages | client messages, chat, game text, death messages, chat bubbles |
| Server | world time/weather, gravity, name tags, team count, exit |
| Server Variables | SetSVar*/GetSVar* persistent server variables |
| Player Variables | SetPVar*/GetPVar* per-player variables |
| Camera | player camera position, look-at, interpolation, attached cameras |
| Spectate | spectating players and vehicles |
| Explosions | create explosions and crime reports |
| Timers | SetTimer/SetTimerEx/KillTimer |
| Network Stats | per-player packet, byte and connection statistics |
| Security | IP blocking, RCON commands, client checks |
| Script | calling functions by name, menus, recording playback |
| Crypto | password hashing and verification, tokens, GPCI |
| String | str* helpers, sscanf, format |
| Math | trigonometry, rounding, power, logs |
| Utility | logging, distance, vector size |
| Custom Models | 0.3.DL skins and objects, model lookup, downloads |
| Custom Vehicles | vehicles built from a base model plus a custom object |
| SQLite | sqlite_open/query/exec and async variants |
| MySQL | mysql_open/tquery/pquery/format/errno |
| Database Cache | cache_* result readers |
| Streamer | streamer tuning and item counting |
| Getters | remaining Get* helpers (console vars, server vars) |
| Setters | remaining Set* helpers |
| Checks | remaining Is* predicates |
| Misc | everything else |