Server

Server-side exports for ak47_hud.

GetPlayerChatGroup

Returns the active chat group name for a player from the server cache.

local groupName = exports['ak47_hud']:GetPlayerChatGroup(source)
Parameter Type Required Description
source number Yes Server ID of the player
  • Returns: string | nil - Group name string, or nil if not in a group.

CreatePlayerGroup

Creates a persistent chat group and assigns ownership to the specified player.

exports['ak47_hud']:CreatePlayerGroup(groupName, password, ownerSrc)
Parameter Type Required Description
groupName string Yes Name of the chat group
password string Yes Password required to join
ownerSrc number Yes Server ID of the owning player
  • Returns: void

AddPlayerToGroup

Adds a player to a chat group without requiring a password.

exports['ak47_hud']:AddPlayerToGroup(targetSrc, groupName)
Parameter Type Required Description
targetSrc number Yes Server ID of the player to add
groupName string Yes Name of the destination group
  • Returns: void

RemovePlayerFromGroup

Removes a player from their current chat group and synchronizes UI state.

exports['ak47_hud']:RemovePlayerFromGroup(targetSrc)
Parameter Type Required Description
targetSrc number Yes Server ID of the player to remove
  • Returns: void

SendSystemMessage

Sends a formatted system message to a specific player chat window.

exports['ak47_hud']:SendSystemMessage(source, message, rgb)
Parameter Type Required Description
source number Yes Server ID of the target player
message string Yes Message text content
rgb table No RGB color table: {R, G, B} (default: {52, 211, 153})
  • Returns: void

BroadcastCustomKill

Broadcasts a kill notification event to all players on the kill feed UI.

exports['ak47_hud']:BroadcastCustomKill(killerName, killerId, victimName, victimId, weaponHash, isHeadshot)
Parameter Type Required Description
killerName string Yes Display name of the killer
killerId number Yes Server ID of the killer
victimName string Yes Display name of the victim
victimId number Yes Server ID of the victim
weaponHash string | number Yes Weapon hash or model name
isHeadshot boolean Yes true to show headshot icon and play audio
  • Returns: void

SetVehicleNitro

Sets the nitro level of a vehicle across all networked clients.

exports['ak47_hud']:SetVehicleNitro(netId, amount)
Parameter Type Required Description
netId number Yes Network entity ID of the vehicle
amount number Yes Nitro level value (0 to 100)
  • Returns: void