Indeks API
Semua yang bisa dipanggil di Knight, dikelompokkan per jenis.
Halaman ini mencantumkan semua yang bisa dipanggil dari gamemode. Setiap bagian menuju referensi lengkap dengan signature dan deskripsi.
| Jenis | Jumlah | Referensi |
|---|---|---|
| Native (fungsi engine) | 559 | Native Functions |
| Builtin (fungsi bahasa) | 69 | Built-in Functions |
| Callback (event) | 41 | Callbacks |
| Field & method objek | 90 | Fields & Methods |
| Field config server | 16 | Configuration |
| Method server | 5 | Configuration |
| Konstanta | 18 | Konstanta |
Cara nama diselesaikan
| Urutan | Pencarian |
|---|---|
| 1 | Variabel lokal atau parameter di scope |
| 2 | function level atas di gamemode atau modul yang di-import |
| 3 | Builtin bahasa (len, push, sort, ...) |
| 4 | Native plugin Go yang didaftarkan saat start |
| 5 | Native engine (SetPlayerHealth, CreateVehicle, ...) |
| 6 | Konstanta (MAX_PLAYERS, BONE_HEAD, ...) |
Note
Fungsi pengguna tidak bisa menimpa builtin: builtin menang. Nama native dipesan, jadi
function dengan nama native ditolak saat kompilasi.Native per grup
| Group | Cakupan |
|---|---|
| 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 |