Knight docs
EN ID
GitHub

Native Functions

The native-first API: call engine functions directly by name.

Natives are global functions. There is no namespace prefix. Call SetPlayerHealth(playerid, 100.0), not sa.SetPlayerHealth(...).

knight
player::spawn(int playerid) {
    SetPlayerHealth(playerid, 100.0);
    SetPlayerArmour(playerid, 50.0);
    GivePlayerMoney(playerid, 500);
    SendClientMessage(playerid, "HP {GetPlayerHealth(playerid)} | money {GetPlayerMoney(playerid)}");
};

Common groups

AreaExamples
PlayerSetPlayerPos, GivePlayerWeapon, SetPlayerSkin, KickPlayer
VehicleCreateVehicle, SetVehicleHealth, PutPlayerInVehicle, DestroyVehicle
ObjectCreateObject, MoveObject, SetObjectMaterial, DestroyObject
Pickup / labelCreatePickup, Create3DTextLabel, Update3DTextLabelText
Dialog / textdrawShowPlayerDialog, TextDrawCreate, TextDrawShowForPlayer
Databasesqlite_open, sqlite_query, mysql_open, cache_get_value_name
Custom modelsAddCharModel, AddSimpleModel, RedirectDownload
Custom vehiclesCreateCustomVehicle, DestroyCustomVehicle

Value getters

Getters return values directly, unlike C-style out-parameters.

knight
let money = GetPlayerMoney(playerid);
let health = GetPlayerHealth(playerid);
let name = PlayerName(playerid);

// Position is available both ways:
let pos = GetPlayerPos(playerid);   // array [x, y, z]
let x = GetPlayerPosX(playerid);
let y = GetPlayerPosY(playerid);
let z = GetPlayerPosZ(playerid);
Tip
Every native below includes its full signature: parameter types and return value, ready to use when you write a gamemode.

Complete native index

Every callable function in this build (559 natives), grouped by area, with its full signature. Go plugins can add more natives at startup; they appear here only if they are part of the stock server.

Players 140

SignatureDescription
ApplyPlayerAnimation(int playerID, string animLib, string animName, float delta, bool loop, bool lockX, bool lockY, bool freeze, int timeMS) -> boolPlay an animation on a player.
Ban(int playerID, string reason) -> boolBan a player by id.
BanEx()Ban a player with a reason.
BanPlayer(int playerID, string reason) -> boolBan a player with an optional reason.
ClearPlayerAnimation(int playerID) -> boolStop a player's animation.
ForceClassSelection(int playerID) -> boolForce the class-selection screen.
GetMyFacingAngle(int playerid) -> floatReturn the player's facing angle (degrees).
GetMyPos(int playerid) -> array (multiple values)Return the player's position as an array [x, y, z].
GetPlayerAmmo(int playerID) -> intGet a player's ammo.
GetPlayerAnimationIndex(int playerID) -> intGet the current animation index.
GetPlayerArmedWeapon(int playerid) -> intReturn the weapon the player has armed (currently selected).
GetPlayerArmour(int playerID) -> floatGet a player's armour.
GetPlayerCameraAspectRatio(int playerID) -> floatGet the camera aspect ratio.
GetPlayerCameraFrontVector(int playerID) -> array (multiple values)Get the camera forward vector.
GetPlayerCameraMode(int playerID) -> intGet the camera mode.
GetPlayerCameraPos(int playerID) -> array (multiple values)Get the camera position.
GetPlayerCameraTargetActor(int playerID) -> intGet the actor the camera targets.
GetPlayerCameraTargetObject(int playerID) -> intGet the object the camera targets.
GetPlayerCameraTargetPlayer(int playerID) -> array (multiple values)Get the player the camera targets.
GetPlayerCameraTargetVehicle(int playerID) -> intGet the vehicle the camera targets.
GetPlayerCameraZoom(int playerID) -> floatGet the camera zoom.
GetPlayerColor(int playerID) -> intGet a player's colour.
GetPlayerDistanceFromPoint(int playerID, float x, float y, float z) -> floatDistance from a player to a point.
GetPlayerDrunkLevel(int playerID) -> intGet a player's drunk level.
GetPlayerFacingAngle(int playerID) -> floatGet a player's facing angle.
GetPlayerFightingStyle(int playerID) -> intGet a player's fighting style.
GetPlayerHealth(int playerID) -> floatGet a player's health.
GetPlayerInterior(int playerID) -> intGet a player's interior.
GetPlayerIp(int playerID) -> stringGet a player's IP address.
GetPlayerKeys(int playerID) -> array (multiple values)Get a player's keys, up/down and left/right state.
GetPlayerLastShotVectors(int playerID) -> array (multiple values)Get the last shot origin and hit vectors.
GetPlayerMenu(int playerid) -> intReturn the player's open menu id; always 0 because Knight uses dialogs instead of menus.
GetPlayerMoney(int playerID) -> intGet a player's money.
GetPlayerName(int playerid) -> stringReturn the player's name. Alias for PlayerName; the 3-argument Pawn form is accepted and returns the name.
GetPlayerNetworkStats(int playerID) -> stringGet a player's network statistics.
GetPlayerObjectModel(int playerID, int id) -> intGet a player object's model.
GetPlayerObjectPos(int playerID, int id) -> array (multiple values)Get a player object's position.
GetPlayerObjectRot(int playerID, int id) -> array (multiple values)Get a player object's rotation.
GetPlayerPing(int playerID) -> intGet a player's ping.
GetPlayerPoolSize() -> intHighest allocated player id.
GetPlayerPos(int playerID) -> array (multiple values)Get a player's position.
GetPlayerPosX(int playerid) -> floatGet a player's X coordinate.
GetPlayerPosY(int playerid) -> floatGet a player's Y coordinate.
GetPlayerPosZ(int playerid) -> floatGet a player's Z coordinate.
GetPlayerScore(int playerID) -> intGet a player's score.
GetPlayerSkin(int playerID) -> intGet a player's skin.
GetPlayerSpecialAction(int playerID) -> intGet a player's special action.
GetPlayerState(int playerID) -> intGet a player's state.
GetPlayerSurfingObjectID(int playerID) -> intGet the object the player is surfing.
GetPlayerSurfingVehicleID(int playerID) -> intGet the vehicle the player is surfing.
GetPlayerTargetActor(int playerID) -> intGet the actor a player is targeting.
GetPlayerTargetPlayer(int playerID) -> intGet the player a player is targeting.
GetPlayerTeam(int playerID) -> intGet a player's team.
GetPlayerTime(int playerID) -> array (multiple values)Get a player's local time.
GetPlayerVehicleCount(int playerid) -> intNumber of live vehicles owned by a player.
GetPlayerVehicleID(int playerID) -> intGet the vehicle id a player is in.
GetPlayerVehicleSeat(int playerID) -> intGet the seat a player occupies.
GetPlayerVehicles(int playerid) -> array (multiple values)Array of live vehicle ids owned by a player.
GetPlayerVelocity(int playerID) -> array (multiple values)Get a player's velocity.
GetPlayerVersion(int playerID) -> stringGet a player's client version string.
GetPlayerVirtualWorld(int playerID) -> intGet a player's virtual world.
GetPlayerWantedLevel(int playerID) -> intGet a player's wanted level.
GetPlayerWeapon(int playerID) -> intGet a player's current weapon.
GetPlayerWeaponData(int playerID, int slot) -> array (multiple values)Get weapon/ammo for a weapon slot.
GetPlayerWeaponState(int playerID) -> intGet the weapon state.
GivePlayerMoney(int playerID, int amount) -> boolGive (or take) money.
GivePlayerWeapon(int playerID, int weaponID, int ammo) -> boolGive a weapon with ammo.
IsPlayerAdmin(int playerID) -> boolWhether a player is an admin.
IsPlayerAttachedObjectSlotUsed(int playerID, int index) -> boolWhether an attached-object slot is used.
IsPlayerCamFrozen(int playerid) -> boolReport whether the player's camera is frozen. Always false in Knight.
IsPlayerConnected(int playerID) -> boolWhether a player id is connected.
IsPlayerInAnyVehicle(int playerID) -> boolWhether a player is in any vehicle.
IsPlayerInCheckpoint(int playerID) -> boolWhether a player is in their checkpoint.
IsPlayerInDynamicArea(int playerID, int id) -> boolWhether a player is in a dynamic area.
IsPlayerInDynamicCP(int playerID, int id) -> boolWhether a player is in a dynamic checkpoint.
IsPlayerInDynamicRaceCP(int playerID, int id) -> boolWhether a player is in a dynamic race checkpoint.
IsPlayerInRaceCheckpoint(int playerID) -> boolWhether a player is in a race checkpoint.
IsPlayerInRangeOfPoint(int playerID, float radius, float x, float y, float z) -> boolWhether a player is within range of a point.
IsPlayerInVehicle(int playerID, int vehicleID) -> boolWhether a player is in a specific vehicle.
IsPlayerNPC(int playerID) -> boolWhether a player is an NPC.
IsPlayerObjectMoving(int playerID, int id) -> boolWhether a player object is moving.
IsPlayerStreamedIn(int playerID, int forPlayerID) -> boolWhether a player is streamed to another.
Kick(int playerID, string reason) -> boolKick a player.
KickPlayer(int playerID, string reason) -> boolKick a player with an optional reason.
PlayerCount() -> intNumber of connected players.
PlayerName(int playerID) -> stringGet a player's name.
PlayerPlaySound(int playerID, int soundID, float x, float y, float z) -> boolPlay a sound for a player.
PlayerSpectatePlayer(int playerID, int targetID, int mode) -> boolMake a player spectate another player.
PlayerSpectateVehicle(int playerID, int vehicleID, int mode) -> boolMake a player spectate a vehicle.
RemovePlayerAttachedObject(int playerID, int index) -> boolRemove an attached object from a player.
RemovePlayerFromVehicle(int playerID) -> boolRemove a player from their vehicle.
RemovePlayerMapIcon(int playerID, int iconID) -> boolRemove a radar map icon.
ResetPlayerMoney(int playerID) -> boolReset a player's money to zero.
ResetPlayerWeapons(int playerID) -> boolRemove all of a player's weapons.
SetMyFacingAngle(int playerid, float angle) -> boolSet the player's facing angle (degrees).
SetMyPos(int playerid, float x, float y, float z) -> boolTeleport the player to x, y, z.
SetPlayerAdmin(int playerID, bool admin) -> boolGrant or revoke admin rights.
SetPlayerAmmo(int playerID, int weaponID, int ammo) -> boolSet ammo for a weapon.
SetPlayerArmedWeapon(int playerID, int weaponID) -> boolSet the armed weapon.
SetPlayerArmour(int playerID, float armour) -> boolSet a player's armour.
SetPlayerAttachedObject(int playerID, int index, int modelID, int bone, float offsetX, float offsetY, float offsetZ, float rotX, float rotY, float rotZ, float scaleX, float scaleY, float scaleZ, int colour1, int colour2) -> boolAttach an object model to a player bone.
SetPlayerCameraBehindPlayer(int playerID) -> boolRestore the camera behind the player.
SetPlayerCameraLookAt(int playerID, float x, float y, float z, int cutType) -> boolPoint the camera at a position.
SetPlayerCameraPos(int playerID, float x, float y, float z) -> boolSet the camera position.
SetPlayerChatBubble(int playerID, string text, int color, float drawDistance, int expireMS) -> boolShow a chat bubble above a player.
SetPlayerCheckpoint(int playerID, float x, float y, float z, float radius) -> boolCreate a checkpoint for a player.
SetPlayerColor(int playerID, int colour) -> boolSet a player's name/chat colour.
SetPlayerDrunkLevel(int playerID, int level) -> boolSet a player's drunk level.
SetPlayerFacingAngle(int playerID, float angle) -> boolSet a player's facing angle.
SetPlayerFightingStyle(int playerID, int style) -> boolSet a player's fighting style.
SetPlayerHealth(int playerID, float health) -> boolSet a player's health.
SetPlayerInterior(int playerID, int interior) -> boolSet a player's interior.
SetPlayerMapIcon(int playerID, int iconID, float x, float y, float z, int markerType, int colour, int style) -> boolAdd a radar map icon for a player.
SetPlayerMarkerForPlayer(int viewerID, int targetID, int colour) -> boolShow or hide another player's marker.
SetPlayerName(int playerID, string name) -> boolSet a player's name.
SetPlayerObjectMaterial(int playerID, int objectID, int materialIndex, int modelID, string txdName, string textureName, int colour) -> boolSet a player object material.
SetPlayerObjectMaterialText(int playerID, int objectID, int materialIndex, string text, int materialSize, string fontName, int fontSize, bool bold, int fontColour, int backgroundColour, int alignment) -> boolSet player object material text.
SetPlayerObjectNoCameraCol(int playerID, int id) -> boolDisable camera collision for a player object.
SetPlayerObjectPos(int playerID, int id, float x, float y, float z) -> boolSet a player object's position.
SetPlayerObjectRot(int playerID, int id, float rx, float ry, float rz) -> boolSet a player object's rotation.
SetPlayerPos(int playerID, float x, float y, float z) -> boolTeleport a player.
SetPlayerPosFindZ(int playerID, float x, float y, float z) -> boolTeleport a player and snap to ground Z.
SetPlayerRaceCheckpoint(int playerID, int cpType, float x, float y, float z, float nextX, float nextY, float nextZ, float radius) -> boolCreate a race checkpoint for a player.
SetPlayerScore(int playerID, int score) -> boolSet a player's score.
SetPlayerShopName(int playerID, string name) -> boolSet the shop name for a player's interior.
SetPlayerSkillLevel(int playerID, int skillType, int level) -> boolSet a player's weapon skill level.
SetPlayerSkin(int playerID, int skin) -> boolSet a player's skin.
SetPlayerSpecialAction(int playerID, int action) -> boolSet a player's special action.
SetPlayerTeam(int playerID, int team) -> boolSet a player's team.
SetPlayerTime(int playerID, int hour, int minute) -> boolSet a player's local time.
SetPlayerVelocity(int playerID, float x, float y, float z) -> boolSet a player's velocity.
SetPlayerVirtualWorld(int playerID, int world) -> boolSet a player's virtual world.
SetPlayerWantedLevel(int playerID, int level) -> boolSet a player's wanted level.
SetPlayerWeather(int playerID, int weather) -> boolSet a player's weather.
SetPlayerWorldBounds(int playerID, float maxX, float minX, float maxY, float minY) -> boolSet a player's world boundaries.
SpawnPlayer(int playerID) -> boolSpawn a player immediately.
TogglePlayerClock(int playerID, bool toggle) -> boolToggle the in-game clock.
TogglePlayerControllable(int playerID, bool controllable) -> boolEnable or disable player control.
TogglePlayerSpectating(int playerID, bool toggle) -> boolToggle spectate mode.
TogglePlayerWidescreen(int playerID, bool enable) -> boolToggle widescreen mode.

Vehicles 48

SignatureDescription
AddStaticVehicle(int model, float x, float y, float z, float angle, int colour1, int colour2) -> intCreate a static vehicle (engine-managed).
AddStaticVehicleEx(int model, float x, float y, float z, float angle, int colour1, int colour2, int respawnDelay, bool addsiren) -> intCreate a static vehicle with respawn delay.
AddVehicleComponent(int vehicleID, int componentID) -> boolAttach a visual component to a vehicle.
AttachTrailerToVehicle(int trailerID, int vehicleID) -> boolAttach a trailer to a vehicle.
ChangeVehicleColor(int vehicleID, int color1, int color2) -> boolChange a vehicle's colours.
ChangeVehiclePaintjob(int vehicleID, int paintjob) -> boolChange a vehicle's paintjob.
CreateVehicle(int model, float x, float y, float z, float angle, int colour1, int colour2) -> intCreate a vehicle; returns its id.
DestroyVehicle(int id) -> boolDestroy a vehicle.
DetachTrailerFromVehicle(int vehicleID) -> boolDetach a trailer from a vehicle.
GetVehicleComponentInSlot(int vehicleID, int slot) -> intGet the component in a vehicle slot.
GetVehicleComponentType(int component) -> intGet a component's type.
GetVehicleDamageStatus(int id) -> array (multiple values)Get vehicle panel/door/light/tyre damage.
GetVehicleDistanceFromPoint(int vehicleID, float x, float y, float z) -> floatDistance from a vehicle to a point.
GetVehicleHealth(int id) -> floatGet a vehicle's health.
GetVehicleModel(int vehicleID) -> intGet a vehicle's model id.
GetVehicleModelInfo(int model, int infoType) -> array (multiple values)Get model info (size, seats, ...).
GetVehicleParamsCarDoors(int vehicleID) -> array (multiple values)Get vehicle door open states.
GetVehicleParamsCarWindows(int vehicleID) -> array (multiple values)Get vehicle window open states.
GetVehicleParamsEx(int vehicleID) -> array (multiple values)Get vehicle params (engine, lights, ...).
GetVehicleParamsSirenState(int vehicleID) -> intGet the siren state.
GetVehiclePoolSize() -> intHighest allocated vehicle id.
GetVehiclePos(int vehicleID) -> array (multiple values)Get a vehicle's position.
GetVehiclePosX(int vehicleid) -> floatGet a vehicle's X coordinate.
GetVehiclePosY(int vehicleid) -> floatGet a vehicle's Y coordinate.
GetVehiclePosZ(int vehicleid) -> floatGet a vehicle's Z coordinate.
GetVehicleRotationQuat(int vehicleID) -> array (multiple values)Get a vehicle's rotation quaternion.
GetVehicleTrailer(int vehicleID) -> intGet a vehicle's attached trailer.
GetVehicleVelocity(int vehicleID) -> array (multiple values)Get a vehicle's velocity.
GetVehicleVirtualWorld(int vehicleID) -> intGet a vehicle's virtual world.
GetVehicleZAngle(int vehicleID) -> floatGet a vehicle's Z angle.
IsVehicleStreamedIn(int vehicleID, int forPlayerID) -> boolWhether a vehicle is streamed to a player.
LinkVehicleToInterior(int vehicleID, int interiorID) -> boolLink a vehicle to an interior.
PutPlayerInVehicle(int playerID, int vehicleID, int seatID) -> boolPut a player into a vehicle seat.
RemoveVehicleComponent(int vehicleID, int componentID) -> boolRemove a vehicle component.
RepairVehicle(int vehicleID) -> boolRepair a vehicle.
SetVehicleAngularVelocity(int vehicleID, float x, float y, float z) -> boolSet a vehicle's angular velocity.
SetVehicleDamageStatus(int id, int panels, int doors, int lights, int tyres) -> boolSet vehicle panel/door/light/tyre damage.
SetVehicleHealth(int id, float health) -> boolSet a vehicle's health.
SetVehicleNumberPlate(int vehicleID, string plate) -> boolSet a vehicle's number plate.
SetVehicleParamsCarDoors(int vehicleID, int driver, int passenger, int backLeft, int backRight) -> boolSet vehicle door open states.
SetVehicleParamsCarWindows(int vehicleID, int driver, int passenger, int backLeft, int backRight) -> boolSet vehicle window open states.
SetVehicleParamsEx(int vehicleID, int engine, int lights, int alarm, int doors, int bonnet, int boot, int objective) -> boolSet vehicle params (engine, lights, ...).
SetVehicleParamsForPlayer(int vehicleID, int playerID, int objective, int doorsLocked) -> boolSet vehicle params for one player.
SetVehiclePos(int vehicleID, float x, float y, float z) -> boolTeleport a vehicle.
SetVehicleToRespawn(int vehicleID) -> boolRespawn a vehicle.
SetVehicleVelocity(int vehicleID, float x, float y, float z) -> boolSet a vehicle's velocity.
SetVehicleVirtualWorld(int vehicleID, int world) -> boolSet a vehicle's virtual world.
SetVehicleZAngle(int vehicleID, float angle) -> boolSet a vehicle's Z angle.

Objects 25

SignatureDescription
AttachObjectToObject(int id, int attachToID, float offsetX, float offsetY, float offsetZ, float rotX, float rotY, float rotZ, bool syncRotation) -> boolAttach an object to another object.
AttachObjectToPlayer(int id, int playerID, float offsetX, float offsetY, float offsetZ, float rotX, float rotY, float rotZ) -> boolAttach an object to a player bone.
AttachObjectToVehicle(int id, int vehicleID, float offsetX, float offsetY, float offsetZ, float rotX, float rotY, float rotZ) -> boolAttach an object to a vehicle.
CancelEdit(int playerID) -> boolCancel object editing for a player.
CreateObject(int model, float x, float y, float z, float rotX, float rotY, float rotZ, float drawDistance) -> intCreate a global object.
DestroyObject(int id) -> boolDestroy a global object.
EditObject(int playerID, int id) -> boolOpen the object editor.
GetObjectModel(int objectID) -> intGet an object's model id.
GetObjectPos(int objectID) -> array (multiple values)Get an object's position.
GetObjectPosX(int objectid) -> floatGet an object's X coordinate.
GetObjectPosY(int objectid) -> floatGet an object's Y coordinate.
GetObjectPosZ(int objectid) -> floatGet an object's Z coordinate.
GetObjectRot(int objectID) -> array (multiple values)Get an object's rotation.
IsObjectMoving(int objectID) -> boolWhether an object is moving.
MoveObject(int id, float toX, float toY, float toZ, float speed, float toRX, float toRY, float toRZ) -> boolMove an object over time.
RemoveBuildingForPlayer(int playerID, int modelID, float x, float y, float z, float radius) -> boolRemove a map building for a player.
SelectObject(int playerID) -> boolOpen object selection for a player.
SetObjectMaterial(int id, int materialIndex, int modelID, string txdName, string textureName, int colour) -> boolSet an object material.
SetObjectMaterialText(int id, int materialIndex, string text, int materialSize, string fontName, int fontSize, bool bold, int fontColour, int backgroundColour, int alignment) -> boolSet object material text.
SetObjectNoCameraCol(int id) -> boolDisable camera collision for an object.
SetObjectPos(int id, float x, float y, float z) -> boolSet an object's position.
SetObjectRot()Set an object's rotation.
SetObjectRotation(int id, float rx, float ry, float rz) -> boolSet an object's rotation.
SetObjectsDefaultCameraCol(bool enable) -> boolToggle default camera collision for objects.
StopObject(int id) -> boolStop an object's move.

Pickups 3

SignatureDescription
AddStaticPickup(int model, int typ, float x, float y, float z, int virtualWorld) -> boolCreate a static pickup (engine-managed).
CreatePickup(int model, int typ, float x, float y, float z) -> intCreate a pickup.
DestroyPickup(int id) -> boolDestroy a pickup.

Actors 17

SignatureDescription
ApplyActorAnimation(int id, string animLib, string animName, float delta, bool loop, bool lockX, bool lockY, bool freeze, int time) -> boolPlay an animation on an actor.
ClearActorAnimation()Stop an actor's animation.
ClearActorAnimations(int id) -> boolStop all animations on an actor.
CreateActor(int skin, float x, float y, float z, float angle) -> intCreate a static actor.
DestroyActor(int id) -> boolDestroy a static actor.
GetActorFacingAngle(int actorID) -> floatGet an actor's facing angle.
GetActorHealth(int actorID) -> floatGet an actor's health.
GetActorPoolSize() -> intHighest allocated actor id.
GetActorPos(int actorID) -> array (multiple values)Get an actor's position.
GetActorVirtualWorld(int actorID) -> intGet an actor's virtual world.
IsActorInvulnerable(int actorID) -> boolWhether an actor is invulnerable.
IsActorStreamedIn(int actorID, int forPlayerID) -> boolWhether an actor is streamed to a player.
SetActorFacingAngle(int id, float angle) -> boolSet an actor's facing angle.
SetActorHealth(int id, float health) -> boolSet an actor's health.
SetActorInvulnerable(int actorID, bool invuln) -> boolMake an actor invulnerable.
SetActorPos(int id, float x, float y, float z) -> boolSet an actor's position.
SetActorVirtualWorld(int actorID, int world) -> boolSet an actor's virtual world.

Labels 5

SignatureDescription
Create3DTextLabel(string text, int colour, float x, float y, float z, float drawDistance, int testLOS, int virtualWorld) -> intCreate a 3D text label in the world.
Create3DTextLabelAttachedToPlayer(string text, int colour, float x, float y, float z, float drawDistance, int testLOS, int attachToPlayerID) -> intCreate a 3D label attached to a player.
Create3DTextLabelAttachedToVehicle(string text, int colour, float x, float y, float z, float drawDistance, int testLOS, int attachToVehicleID) -> intCreate a 3D label attached to a vehicle.
Delete3DTextLabel(int id) -> boolDelete a 3D text label.
Update3DTextLabelText(int id, int colour, string text) -> boolUpdate a 3D text label's text.

Gang Zones 10

SignatureDescription
GangZoneCreate(float minX, float minY, float maxX, float maxY) -> intCreate a gang zone rectangle.
GangZoneDestroy(int id) -> boolDestroy a gang zone.
GangZoneFlashForAll(int id, int colour) -> boolFlash a gang zone for all players.
GangZoneFlashForPlayer(int playerID, int id, int colour) -> boolFlash a gang zone for one player.
GangZoneHideForAll(int id) -> boolHide a gang zone from all players.
GangZoneHideForPlayer(int playerID, int id) -> boolHide a gang zone from one player.
GangZoneShowForAll(int id, int colour) -> boolShow a gang zone to all players.
GangZoneShowForPlayer(int playerID, int id, int colour) -> boolShow a gang zone to one player.
GangZoneStopFlashForAll(int id) -> boolStop flashing a gang zone for all players.
GangZoneStopFlashForPlayer(int playerID, int id) -> boolStop flashing a gang zone for one player.

TextDraw 22

SignatureDescription
TextDrawAlignment(int player, int id, int alignment) -> boolSet text draw alignment.
TextDrawBackgroundColor(int player, int id, int color) -> boolSet text draw background colour.
TextDrawBoxColor(int player, int id, int color) -> boolSet text draw box colour.
TextDrawColor(int player, int id, int color) -> boolSet text draw text colour.
TextDrawCreate(int player, int id, float x, float y, string text) -> boolCreate a global text draw.
TextDrawDestroy(int player, int id) -> boolDestroy a global text draw.
TextDrawFont(int player, int id, int font) -> boolSet text draw font.
TextDrawHideForAll(int id) -> boolHide a text draw from everyone.
TextDrawHideForPlayer(int playerID, int id) -> boolHide a text draw from a player.
TextDrawLetterSize(int player, int id, float x, float y) -> boolSet text draw letter size.
TextDrawSetOutline(int player, int id, int size) -> boolSet text draw outline.
TextDrawSetPreviewModel(int player, int id, int model) -> boolSet a model preview for a text draw.
TextDrawSetPreviewRot(int player, int id, float rx, float ry, float rz, float zoom) -> boolSet the rotation of a model preview.
TextDrawSetPreviewVehCol(int player, int id, int color1, int color2) -> boolSet preview vehicle colours.
TextDrawSetProportional(int player, int id, bool proportional) -> boolToggle proportional spacing.
TextDrawSetSelectable(int player, int id, bool selectable) -> boolMake a text draw selectable.
TextDrawSetShadow(int player, int id, int size) -> boolSet text draw shadow.
TextDrawSetString(int player, int id, string text) -> boolSet text draw string.
TextDrawShowForAll(int id) -> boolShow a text draw to everyone.
TextDrawShowForPlayer(int playerID, int id) -> boolShow a text draw to a player.
TextDrawTextSize(int player, int id, float x, float y) -> boolSet text draw text size.
TextDrawUseBox(int player, int id, bool use) -> boolToggle the text draw box.

Player TextDraw 20

SignatureDescription
PlayerTextDrawAlignment()Set a player text draw alignment.
PlayerTextDrawBackgroundColor()Set a player text draw background colour.
PlayerTextDrawBoxColor()Set a player text draw box colour.
PlayerTextDrawColor()Set a player text draw text colour.
PlayerTextDrawCreate()Create a player text draw.
PlayerTextDrawDestroy()Destroy a player text draw.
PlayerTextDrawFont()Set a player text draw font.
PlayerTextDrawHide(int playerID, int id) -> boolHide a player text draw.
PlayerTextDrawLetterSize()Set player text draw letter size.
PlayerTextDrawSetOutline()Set player text draw outline.
PlayerTextDrawSetPreviewModel()Set the model preview for a player text draw.
PlayerTextDrawSetPreviewRot()Set the rotation of a model preview.
PlayerTextDrawSetPreviewVehCol()Set preview vehicle colours.
PlayerTextDrawSetProportional()Toggle proportional spacing.
PlayerTextDrawSetSelectable()Make a player text draw selectable.
PlayerTextDrawSetShadow()Set player text draw shadow.
PlayerTextDrawSetString()Set player text draw string.
PlayerTextDrawShow(int playerID, int id) -> boolShow a player text draw.
PlayerTextDrawTextSize()Set player text draw text size.
PlayerTextDrawUseBox()Toggle the player text draw box.

Messages 9

SignatureDescription
GameTextForAll(int style, int timeMS, string text)Show game text to all players.
GameTextForPlayer(int playerID, int style, int timeMS, string text) -> boolShow game text to one player.
SendClientCheck(int playerID, int typ, int address, int offset, int count) -> boolSend an integrity check request to a client.
SendClientMessage(int playerID, int color, string text) -> boolSend a chat message to a player.
SendClientMessageToAll(int color, string text)Send a chat message to everyone.
SendDeathMessage(int killerID, int killeeID, int reason) -> boolAdd a death to the kill feed.
SendDeathMessageToPlayer(int playerID, int killerID, int killeeID, int reason) -> boolAdd a death to one player's kill feed.
SendPlayerMessageToAll(int senderID, string text)Send a message to everyone from a player.
SendPlayerMessageToPlayer(int playerID, int senderID, string text) -> boolSend a message from one player to another.

Server 34

SignatureDescription
AllowAdminTeleport(bool allow) -> boolAllow admins to teleport with the map.
AllowInteriorWeapons(bool allow) -> boolAllow weapons inside interiors.
AllowPlayerTeleport(bool allow) -> boolAllow the player to teleport via the map.
DisableInteriorEnterExits() -> boolRemove interior entrance markers from the map.
EnablePlayerCameraTarget(int playerID, bool enable) -> boolEnable camera target queries for a player.
EnableStuntBonusForAll(bool enable) -> boolEnable stunt bonuses for everyone.
EnableStuntBonusForPlayer(int playerID, bool enable) -> boolEnable stunt bonuses for a player.
EnableTirePopping(bool enable) -> boolEnable tyre popping.
EnableVehicleFriendlyFire(bool enable) -> boolAllow players in the same team to damage vehicles.
EnableZoneNames(bool enable) -> boolShow zone names above the radar.
GameModeExit() -> boolShut the server down cleanly.
GetConsoleVarAsBool()Read a boolean console variable.
GetConsoleVarAsInt()Read an integer console variable.
GetConsoleVarAsString()Read a string console variable.
GetGravity() -> floatGet the world gravity.
GetMaxPlayers() -> intGet the configured player slot count.
GetServerTickRate() -> intGet the server tick rate.
GetServerVarAsBool(string name)Read a boolean server variable.
GetServerVarAsInt(string name) -> intRead an integer server variable.
GetServerVarAsString(string name) -> stringRead a string server variable.
GetTickCount() -> intMilliseconds since server start.
GetWorldTime() -> intGet the world time.
LimitGlobalChatRadius(float radius) -> boolLimit global chat to a radius.
LimitPlayerMarkerRadius(float radius) -> boolLimit player marker radius.
ManualVehicleEngineAndLights() -> boolRequire manual engine/light control.
SetDeathDropAmount(int amount) -> boolSet the money dropped on death.
SetGravity(float gravity) -> boolSet the world gravity.
SetNameTagDrawDistance(float distance) -> boolSet the name tag draw distance.
SetTeamCount(int count) -> boolSet the number of teams.
SetWeather(int weather) -> boolSet the global weather.
SetWorldTime(int hour) -> boolSet the global world time.
ShowNameTags(bool show) -> boolToggle name tags globally.
ShowPlayerMarkers(int mode) -> boolToggle player markers.
UsePlayerPedAnims() -> boolUse the player ped animation set.

Network Stats 9

SignatureDescription
NetStats_BytesReceived(int playerID) -> intBytes received for a player.
NetStats_BytesSent(int playerID) -> intBytes sent for a player.
NetStats_ConnectionStatus(int playerID) -> intConnection status for a player.
NetStats_GetConnectedTime(int playerID) -> intConnected time in milliseconds.
NetStats_GetIpPort(int playerID) -> stringIP and port for a player.
NetStats_MessagesReceived(int playerID) -> intMessages received for a player.
NetStats_MessagesRecvPerSecond(int playerID) -> intMessages received per second.
NetStats_MessagesSent(int playerID) -> intMessages sent for a player.
NetStats_PacketLossPercent(int playerID) -> floatPacket loss percentage.

Security 3

SignatureDescription
BlockIpAddress(string ip, int time_ms) -> boolBlock an IP address for a duration.
SendRconCommand(string command) -> boolExecute an RCON command.
UnBlockIpAddress(string ip) -> boolUnblock a previously blocked IP.

Script 13

SignatureDescription
AddMenuItem(int menuid, int column, string text) -> boolMenu emulation: always returns false. Use dialogs for real UI.
CallLocalFunction(string function, ...args) -> intCall a top-level function by name and return its value as an int.
CallRemoteFunction(string function, ...args) -> intAlias of CallLocalFunction: call a top-level function by name.
CreateMenu(string title, int columns, float x, float y, float col1width, float col2width) -> intMenu emulation: returns -1. Use dialogs for real UI.
DestroyMenu(int menuid) -> boolMenu emulation: always returns false. Use dialogs for real UI.
DisableMenu(int menuid) -> boolMenu emulation: always returns false. Use dialogs for real UI.
DisableMenuRow(int menuid, int row) -> boolMenu emulation: always returns false. Use dialogs for real UI.
HideMenuForPlayer(int menuid, int playerid) -> boolMenu emulation: always returns false. Use dialogs for real UI.
IsValidMenu(int menuid) -> boolMenu emulation: always returns false. Use dialogs for real UI.
SendChat(int playerid, string message) -> boolSend a chat line to the player.
SendCommand(int playerid, string command) -> boolRun a /command as the player. Returns whether a handler handled it.
SetMenuColumnHeader(int menuid, int column, string header) -> boolMenu emulation: always returns false. Use dialogs for real UI.
ShowMenuForPlayer(int menuid, int playerid) -> boolMenu emulation: always returns false. Use dialogs for real UI.

Crypto 5

SignatureDescription
SHA256_PassHash(string password, string salt) -> stringHash a password with SHA-256 and salt.
gpci(int playerid) -> stringGet the player's client serial (GPCI).
hash_password(string password) -> stringHash a password with bcrypt.
random_token(int length) -> stringGenerate a random token string.
verify_password(string password, string hash) -> boolVerify a password against a bcrypt hash.

String 12

SignatureDescription
format(string format, ...args) -> stringFormat a string with placeholders.
sscanf(string input, string format) -> intParse a string by format.
strcat(string dest, string src) -> stringConcatenate strings into a destination.
strcmp(string a, string b) -> intCompare two strings.
strdel(string s, int start, int end) -> stringDelete part of a string.
strfind(string s, string sub) -> intFind a substring.
strins(string s, string insert, int pos) -> stringInsert a string at an offset.
strlen(string s) -> intString length.
strmid(string s, int start, int end) -> stringExtract a substring.
strpack(string s) -> stringPack a string into a destination.
strunpack(string s) -> stringUnpack a string.
strval(string s) -> intParse a string to an integer.

Math 14

SignatureDescription
acos(float value) -> floatArc cosine of a value. Returns radians.
asin(float value) -> floatArc sine of a value. Returns radians.
atan(float value) -> floatArc tangent of a value. Returns radians.
atan2(float y, float x) -> floatArc tangent of y/x using both signs to pick the quadrant. Returns radians.
floatabs(float value) -> floatAbsolute value of a float.
floatcmp(float value1, float value2) -> intCompare two floats: -1, 0 or 1.
floatcos(float angle) -> floatCosine of an angle in degrees.
floatfract(float value) -> floatFractional part of a float.
floatlog(float value, float base) -> floatNatural logarithm, or logarithm in the given base.
floatpower(float value, float exponent) -> floatRaise a float to a power.
floatround(float value, int method) -> intRound a float using a mode: 0 nearest, 1 floor, 2 ceil, 3 toward zero.
floatsin(float angle) -> floatSine of an angle in degrees.
floatsqroot(float value) -> floatSquare root of a float (0 for negative input).
floattan(float angle) -> floatTangent of an angle in degrees.

Utility 6

SignatureDescription
GetDistanceBetweenPlayers(int player1, int player2) -> floatDistance between two players.
GetDistanceFromMeToPoint(int playerid, float x, float y, float z) -> floatDistance from the player to x, y, z.
Log(string text)Write a line to the server log.
VectorSize(float x, float y, float z) -> floatLength of a vector (x, y, z).
print(string text)Write a line to the server log. Alias for Log.
printf(string format, ...args)Write a formatted line to the server log (%s, %d, %f, %v).

Custom Models 8

SignatureDescription
AddCharModel(int baseid, int newid, string dffname, string txdname) -> boolRegister a custom character model (skin).
AddSimpleModel(int virtualworld, int baseid, int newid, string dffname, string txdname) -> boolRegister an object model for custom objects.
AddSimpleModelTimed(int virtualworld, int baseid, int newid, string dffname, string txdname, int timeon, int timeoff) -> boolRegister a time-limited custom object model.
FindModelFileNameFromCRC(int crc) -> stringResolve a model file name from its CRC.
FindTextureFileNameFromCRC(int crc) -> stringResolve a texture file name from its CRC.
GetPlayerCustomSkin(int playerID) -> intGet a player's custom skin id.
IsValidCustomModel()Whether an id is a registered custom skin or object id.
RedirectDownload(int playerID, string url) -> boolRedirect a client download URL.

SQLite 6

SignatureDescription
sqlite_close(int handle) -> boolClose a SQLite connection.
sqlite_exec(int handle, string query, ...params) -> stringRun a SQLite statement (returns error or null).
sqlite_exec_async(int handle, string callback, string query, ...params) -> boolRun a SQLite statement asynchronously.
sqlite_open(string path) -> intOpen a SQLite connection (returns handle or null).
sqlite_query(int handle, string query, ...params) -> intRun a SQLite query (returns result index or null).
sqlite_query_async(int handle, string callback, string query, ...params) -> boolRun a SQLite query asynchronously.

MySQL 6

SignatureDescription
mysql_close(int handle) -> boolClose a MySQL connection.
mysql_errno(int handle) -> intLast MySQL error number.
mysql_format(int handle, string format, ...args) -> stringFormat a MySQL query string.
mysql_open(string dsn) -> intOpen a MySQL connection.
mysql_pquery(int handle, string query, string callback) -> boolRun a parallel MySQL query.
mysql_tquery(int handle, string query, string callback) -> boolRun a threaded MySQL query.

Database Cache 8

SignatureDescription
cache_delete(int result) -> boolDelete a cached result set.
cache_get_field_count(int result) -> intNumber of fields in a cached result.
cache_get_row_count(int result) -> intNumber of rows in a cached result.
cache_get_value_index_int(int result, int row, int column) -> intRead an integer field by row/column index.
cache_get_value_name(int result, int row, string field) -> stringRead a field value by column name.
cache_get_value_name_float(int result, int row, string field) -> floatRead a float field by column name.
cache_get_value_name_int(int result, int row, string field) -> intRead an integer field by column name.
cache_insert_id(int result) -> intLast inserted row id.

Streamer 11

SignatureDescription
Streamer_CountItems(int type, int playerid) -> intCount streamer items of a type.
Streamer_DestroyAllVisibleItems(int playerid, int type, bool serverwide) -> intDestroy all visible streamer items.
Streamer_GetArrayData(int type, int id, int data) -> intRead streamer array data.
Streamer_MaxItems(int type, int items)Set the maximum streamed items.
Streamer_SetArrayData(int type, int id, int data, int value, ...extra)Write streamer array data.
Streamer_SetIntData(int type, int id, int data, int value)Set streamer integer data.
Streamer_SetRadiusMultiplier(int type, float multiplier)Set the streamer radius multiplier.
Streamer_SetVisibleItems(int type, int items)Set the visible item count.
Streamer_ToggleIdleUpdate(int playerid, bool enable) -> boolToggle idle streamer updates.
Streamer_Update(int playerid, int type)Update the streamer for a player.
Streamer_UpdateEx(int playerid, float x, float y, float z, int virtualworld, int interior)Update the streamer at a position.

Getters 18

SignatureDescription
GetAnimationName(int index) -> array (multiple values)Resolve an animation index to library/name.
GetCustomVehicleObject(int vehicleID) -> intGet the object id attached to a custom vehicle, or -1.
GetDynamicObjectPos(int id) -> array (multiple values)Get a dynamic object's position.
GetDynamicObjectRot(int id) -> array (multiple values)Get a dynamic object's rotation.
GetNetworkStats() -> stringGet network statistics for a player.
GetPVarFloat(int playerID, string name) -> floatRead a float player variable.
GetPVarInt(int playerID, string name) -> intRead an integer player variable.
GetPVarNameAtIndex(int playerID, int index) -> stringGet a player variable name at an index.
GetPVarString(int playerID, string name) -> stringRead a string player variable.
GetPVarType(int playerID, string name) -> intGet a player variable's type.
GetPVarsUpperIndex(int playerID) -> intHighest player variable index.
GetSVarFloat(string name) -> floatRead a float server variable.
GetSVarInt(string name) -> intRead an integer server variable.
GetSVarNameAtIndex(int index) -> stringGet a server variable name at an index.
GetSVarString(string name) -> stringRead a string server variable.
GetSVarType(string name) -> intGet a server variable's type.
GetSVarsUpperIndex() -> intHighest server variable index.
GetWeaponName(int weaponid) -> stringResolve a weapon id to its name.

Setters 17

SignatureDescription
SetCameraBehindPlayer(int playerID) -> boolRestore the camera behind the player.
SetDynamicActorFacingAngle(int id, float angle) -> boolSet a dynamic actor's facing angle.
SetDynamicActorPos(int id, float x, float y, float z) -> boolSet a dynamic actor's position.
SetDynamicObjectMaterial(int id, int materialIndex, int modelID, string txdName, string textureName, int colour) -> boolSet a dynamic object material.
SetDynamicObjectMaterialText(int id, int materialIndex, string text, int materialSize, string fontName, int fontSize, bool bold, int fontColour, int backgroundColour, int alignment) -> boolSet dynamic object material text.
SetDynamicObjectPos(int id, float x, float y, float z) -> boolSet a dynamic object's position.
SetDynamicObjectRot(int id, float rx, float ry, float rz) -> boolSet a dynamic object's rotation.
SetGameModeText(string text) -> boolSet the gamemode text shown in the browser.
SetPVarFloat(int playerID, string name, float val) -> boolSet a float player variable.
SetPVarInt(int playerID, string name, int val) -> boolSet an integer player variable.
SetPVarString(int playerID, string name, string val) -> boolSet a string player variable.
SetSVarFloat(string name, float val) -> boolSet a float server variable.
SetSVarInt(string name, int val) -> boolSet an integer server variable.
SetSVarString(string name, string val) -> boolSet a string server variable.
SetSpawnInfo(int playerID, int team, int skin, float x, float y, float z, float angle) -> boolSet the spawn information for the next spawn.
SetTimer(string callback, int interval, bool repeat) -> intSchedule a named function after a delay.
SetTimerEx(string callback, int interval, bool repeat, string format, ...args) -> intSchedule a named function with arguments.

Checks 12

SignatureDescription
IsCustomVehicle(int vehicleID) -> boolWhether a vehicle was created by CreateCustomVehicle.
IsTrailerAttachedToVehicle(int vehicleID) -> boolWhether a trailer is attached.
IsValidActor(int actorID) -> boolWhether an actor id is valid.
IsValidDynamic3DTextLabel(int id) -> boolWhether a dynamic 3D label is valid.
IsValidDynamicActor(int id) -> boolWhether a dynamic actor is valid.
IsValidDynamicArea(int id) -> boolWhether a dynamic area is valid.
IsValidDynamicMapIcon(int id) -> boolWhether a dynamic map icon is valid.
IsValidDynamicObject(int id) -> boolWhether a dynamic object is valid.
IsValidDynamicPickup(int id) -> boolWhether a dynamic pickup is valid.
IsValidObject(int objectID) -> boolWhether an object id is valid.
IsValidPlayerObject(int playerID, int id) -> boolWhether a player object is valid.
IsValidVehicle()Whether a vehicle id is valid.

Misc 78

SignatureDescription
AddPlayerClass(int model, float x, float y, float z, float angle, int weapon1, int ammo1, int weapon2, int ammo2, int weapon3, int ammo3) -> intAdd a spawn class (skin, position, angle, optional weapons).
AddPlayerClassEx(int team, int model, float x, float y, float z, float angle, int weapon1, int ammo1, int weapon2, int ammo2, int weapon3, int ammo3) -> intAdd a spawn class for a specific team.
ApplyAnimation()Play a library/name animation on a player.
ApplyDynamicActorAnimation(int id, string animLib, string animName, float delta, bool loop, bool lockX, bool lockY, bool freeze, int time) -> boolPlay an animation on a dynamic actor.
Attach3DTextLabelToPlayer(int id, int playerID, float offsetX, float offsetY, float offsetZ) -> boolAttach a 3D text label to a player.
Attach3DTextLabelToVehicle(int id, int vehicleID, float offsetX, float offsetY, float offsetZ) -> boolAttach a 3D text label to a vehicle.
AttachCameraToObject(int playerID, int objectID) -> boolAttach the player camera to an object.
AttachCameraToPlayerObject(int playerID, int objectID) -> boolAttach the camera to a player object.
AttachDynamicObjectToPlayer(int id, int playerID, float offsetX, float offsetY, float offsetZ, float rotX, float rotY, float rotZ) -> boolAttach a dynamic object to a player.
AttachDynamicObjectToVehicle(int id, int vehicleID, float offsetX, float offsetY, float offsetZ, float rotX, float rotY, float rotZ) -> boolAttach a dynamic object to a vehicle.
AttachPlayerObjectToPlayer(int objectID, int playerID, int targetID, float offsetX, float offsetY, float offsetZ, float rotX, float rotY, float rotZ) -> boolAttach a player object to a player.
AttachPlayerObjectToVehicle(int objectID, int playerID, int vehicleID, float offsetX, float offsetY, float offsetZ, float rotX, float rotY, float rotZ) -> boolAttach a player object to a vehicle.
CancelSelectTextDraw()Cancel text draw selection mode.
ClearAnimations()Stop a player's animation.
ClearDynamicActorAnimations(int id) -> boolStop all animations on a dynamic actor.
ConnectNPC(string name, string script) -> boolConnect an NPC into the world.
CreateCustomVehicle(int baseModel, int objModel, float x, float y, float z, float angle, int colour1, int colour2, bool invisible) -> intCreate a drivable base vehicle with a custom object model attached (0.3.DL).
CreateDynamic3DTextLabel(string text, int colour, float x, float y, float z, float drawDistance, int attachedPlayer, int attachedVehicle, bool testLOS, int world, int interior, int playerid, float streamDistance) -> intCreate a streamed 3D text label.
CreateDynamicActor(int model, float x, float y, float z, float angle, bool invulnerable, float health, int world, int interior, int playerid, float streamDistance) -> intCreate a streamed dynamic actor.
CreateDynamicCP(float x, float y, float z, float radius, int world, int interior, int playerid, float streamDistance) -> intCreate a streamed checkpoint.
CreateDynamicCircle(float x, float y, float radius, int world) -> intCreate a streamed circular area.
CreateDynamicMapIcon(float x, float y, float z, int typ, int colour, int world, int interior, int playerid, float streamDistance, int style) -> intCreate a streamed radar map icon.
CreateDynamicObject(int playerID, int model, float x, float y, float z, float rx, float ry, float rz, int world, int interior, int owner, float streamDistance) -> intCreate a streamed object.
CreateDynamicPickup(int model, int typ, float x, float y, float z, int world, int interior, int playerid, float streamDistance) -> intCreate a streamed pickup.
CreateDynamicRaceCP(int cpType, float x, float y, float z, float nextX, float nextY, float nextZ, float radius, int world, int interior, int playerid, float streamDistance) -> intCreate a streamed race checkpoint.
CreateDynamicRectangle(float minX, float minY, float maxX, float maxY, int world) -> intCreate a streamed rectangular area.
CreateExplosion(float x, float y, float z, int typ, float radius) -> boolCreate an explosion in the world.
CreateExplosionForPlayer(int playerID, float x, float y, float z, int typ, float radius) -> boolCreate an explosion visible to one player.
CreatePlayer3DTextLabel(int playerID, string text, int colour, float x, float y, float z, float drawDistance, int attachedPlayer, int attachedVehicle, int testLOS) -> intCreate a player-local 3D text label.
CreatePlayerObject(int playerID, int model, float x, float y, float z, float rotX, float rotY, float rotZ, float drawDistance) -> intCreate a player-local object.
CreatePlayerTextDraw(int playerid, float x, float y, string text) -> intCreate a per-player text draw and return its id.
CreatePlayerVehicle(int playerid, int model, float x, float y, float z, float angle, int colour1, int colour2) -> intCreate a vehicle owned by a player (ownership is bookkeeping for GetPlayerVehicleCount).
DeletePVar(int playerID, string name) -> boolDelete a player variable.
DeletePlayer3DTextLabel(int playerID, int id) -> boolDelete a player 3D text label.
DeleteSVar(string name) -> boolDelete a server variable.
DestroyCustomVehicle(int vehicleID) -> boolDestroy a custom vehicle and its attached object.
DestroyDynamic3DTextLabel(int id) -> boolDestroy a streamed 3D text label.
DestroyDynamicActor(int id) -> boolDestroy a dynamic actor.
DestroyDynamicArea(int id) -> boolDestroy a dynamic area.
DestroyDynamicCP(int id) -> boolDestroy a streamed checkpoint.
DestroyDynamicMapIcon(int id) -> boolDestroy a streamed map icon.
DestroyDynamicObject(int id) -> boolDestroy a streamed object.
DestroyDynamicPickup(int id) -> boolDestroy a streamed pickup.
DestroyDynamicRaceCP(int id) -> boolDestroy a streamed race checkpoint.
DestroyPlayerObject(int playerID, int id) -> boolDestroy a player object.
DisableNameTagLOS() -> boolRemove line-of-sight checks for name tags.
DisablePlayerCheckpoint(int playerID) -> boolRemove the player's checkpoint.
DisablePlayerRaceCheckpoint(int playerID) -> boolRemove the player's race checkpoint.
DisableRemoteVehicleCollisions(int playerID, bool disable) -> boolDisable collisions with remote vehicles.
EditAttachedObject(int playerID, int index) -> boolOpen the attached-object editor.
EditDynamicObject(int playerID, int id) -> boolOpen the object editor for a dynamic object.
EditPlayerObject(int playerID, int id) -> boolOpen the editor for a player object.
HidePlayerDialog(int playerID) -> boolClose the player's current dialog.
InterpolateCameraLookAt(int playerID, float fromX, float fromY, float fromZ, float toX, float toY, float toZ, int time, int cutType) -> boolInterpolate the camera look-at point.
InterpolateCameraPos(int playerID, float fromX, float fromY, float fromZ, float toX, float toY, float toZ, int time, int cutType) -> boolInterpolate the camera position.
KillTimer(int timerid) -> boolCancel a timer.
MaxAttachedObjectSlots() -> intReturn the number of attached-object slots a player has.
MoveDynamicObject(int id, float x, float y, float z, float speed, float rx, float ry, float rz) -> boolMove a dynamic object over time.
MovePlayerObject(int playerID, int id, float toX, float toY, float toZ, float speed, float toRX, float toRY, float toRZ) -> boolMove a player object over time.
MySQLFormat(int handle, string format, ...args) -> stringFormat a query string with %s/%d/%f placeholders (legacy alias).
MySQLQueryAsync(int handle, string query, string callback, bool parallel) -> boolRun a query asynchronously against an open MySQL handle.
PauseRecordingPlayback() -> boolRecording playback is not supported; returns false.
PlayAudioStreamForPlayer(int playerID, string url, float x, float y, float z, float distance, bool usePos) -> boolPlay an audio stream URL.
PlayCrimeReportForPlayer(int playerID, int suspectID, int inVehicle, int vehicleModel, int vehicleColour, int crime, float x, float y, float z) -> boolPlay a crime report sound.
ResumeRecordingPlayback() -> boolRecording playback is not supported; returns false.
SelectTextDraw(int playerID, bool enable, int color) -> boolEnable text draw selection mode.
ShowPlayerDialog(int playerID, int dialogID, int style, string title, string body, string button1, string button2) -> boolShow a dialog to a player.
ShowPlayerNameTagForPlayer(int viewerID, int targetID, bool show) -> boolShow or hide a name tag for one player.
StartRecordingPlayback(int playbacktype, string recordname) -> boolRecording playback is not supported; returns false.
StartRecordingPlayerData(int playerID, int recordType, string recordName) -> boolStart recording player data.
StopAudioStreamForPlayer(int playerID) -> boolStop a player's audio stream.
StopDynamicObject(int id) -> boolStop a dynamic object's move.
StopPlayerObject(int playerID, int id) -> boolStop a player object's move.
StopRecordingPlayback() -> boolRecording playback is not supported; returns false.
StopRecordingPlayerData(int playerID) -> boolStop recording player data.
UpdateDynamic3DTextLabelText(int id, int colour, string text) -> boolUpdate a dynamic 3D label's text.
UpdatePlayer3DTextLabelText(int playerID, int id, int colour, string text) -> boolUpdate a player 3D label's text.
UpdateVehicleDamageStatus(int vehicleID, int panels, int doors, int lights, int tyres) -> boolUpdate vehicle damage status.