For the complete documentation index, see llms.txt. This page is also available as Markdown.

Server

The ak47_hud server-side API provides powerful tools for external scripts to seamlessly interact with your core systems. These exports allow other resources—such as heist scripts, admin menus, minigames, and racing systems—to bypass standard UI requirements, sync state globally, and manipulate data safely.

Note: All functions below are Server-Side exports. You must call them from a server script using exports['ak47_hud']:FunctionName().

💬 Chat System API

Manage player chat groups programmatically. These exports interact directly with the local cache and database, automatically refreshing the UI for all relevant players without requiring them to type commands or enter passwords.

GetPlayerChatGroup

Instantly checks the server's cache to see which chat group a player is currently in (0 database queries).

Parameter

Type

Description

source

number

The player's server ID.

Returns: string (The group name) or nil if not in a group.

local groupName = exports['ak47_hud']:GetPlayerChatGroup(source)

if groupName then
    print("Player is currently in group: " .. groupName)
end

CreatePlayerGroup

Creates a brand new chat group via script, saves it to the database, and automatically assigns the target player as the owner.

Parameter

Type

Description

groupName

string

The desired name for the group.

password

string

The group's password.

ownerSrc

number

The server ID of the player who will own it.

AddPlayerToGroup

Forces an online player into a specific group. This completely bypasses the password requirement, making it perfect for external script integrations.

Parameter

Type

Description

targetSrc

number

The server ID of the player to add.

groupName

string

The name of the group.

RemovePlayerFromGroup

Removes an online player from whatever group they are currently in. Automatically updates the UI for the removed player and all remaining members.

Parameter

Type

Description

targetSrc

number

The server ID of the player to remove.

🛠️ Utilities & Systems API

Use these exports to interact with the HUD's notification, kill feed, and vehicle systems programmatically.

SendSystemMessage

Sends a standardized, formatted system message directly to a specific player's chat window.

Parameter

Type

Description

source

number

The player ID to send the message to.

message

string

The text to display.

rgb

table

(Optional) {R, G, B} color table. Defaults to a standard system green {52, 211, 153}.

BroadcastCustomKill

Broadcasts a custom kill to the Kill Feed UI for all players on the server. Ideal for paintball, laser tag, arena minigames, or custom death scripts that bypass native damage events.

Parameter

Type

Description

killerName

string

Display name of the attacker.

killerId

number

Server ID of the attacker.

victimName

string

Display name of the victim.

victimId

number

Server ID of the victim.

weaponHash

number/string

The weapon hash or weapon name.

isHeadshot

boolean

true to display the headshot icon and play the sound.

SetVehicleNitro

Sets the nitro level of a specific vehicle programmatically. This sets the global network state, immediately reflecting on the driver's HUD.

Parameter

Type

Description

netId

number

The network ID of the vehicle.

amount

number

The amount of nitro to set (0 to 100).

Last updated