Knight docs
EN ID
GitHub

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.

KindCountReference
Natives (engine functions)559Native Functions
Built-ins (language functions)69Built-in Functions
Callbacks (events)41Callbacks
Object fields & methods90Fields & Methods
Server config fields16Configuration
Server methods5Configuration
Constants18Constants

How names resolve

OrderLookup
1Local variable or parameter in scope
2Top-level function in the gamemode or any imported module
3Language built-in (len, push, sort, ...)
4Go plugin native registered at startup
5Engine native (SetPlayerHealth, CreateVehicle, ...)
6Constant (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

GroupWhat it covers
Playersstate, position, health, weapons, money, camera, spectating, teams
Vehiclescreate/destroy, position, damage, colours, components, parameters
Objectsstatic/dynamic objects, materials, movement, attachments, editing
Player Objectsper-player objects and their materials/movement
Pickupspickup creation and removal
Actorsscripted NPC peds: position, animation, health, streaming
Labels3D text labels, attached to players/vehicles
Player Labelsper-player 3D text labels
Gang Zonesradar territory zones: show, hide, flash
Checkpointscheckpoints and race checkpoints
DialogsShowPlayerDialog and related
TextDrawglobal text draws: fonts, colours, boxes, previews
Player TextDrawper-player text draws
Messagesclient messages, chat, game text, death messages, chat bubbles
Serverworld time/weather, gravity, name tags, team count, exit
Server VariablesSetSVar*/GetSVar* persistent server variables
Player VariablesSetPVar*/GetPVar* per-player variables
Cameraplayer camera position, look-at, interpolation, attached cameras
Spectatespectating players and vehicles
Explosionscreate explosions and crime reports
TimersSetTimer/SetTimerEx/KillTimer
Network Statsper-player packet, byte and connection statistics
SecurityIP blocking, RCON commands, client checks
Scriptcalling functions by name, menus, recording playback
Cryptopassword hashing and verification, tokens, GPCI
Stringstr* helpers, sscanf, format
Mathtrigonometry, rounding, power, logs
Utilitylogging, distance, vector size
Custom Models0.3.DL skins and objects, model lookup, downloads
Custom Vehiclesvehicles built from a base model plus a custom object
SQLitesqlite_open/query/exec and async variants
MySQLmysql_open/tquery/pquery/format/errno
Database Cachecache_* result readers
Streamerstreamer tuning and item counting
Gettersremaining Get* helpers (console vars, server vars)
Settersremaining Set* helpers
Checksremaining Is* predicates
Misceverything else