πŸ–₯️Server Functions

Server functions are available through Nova.Functions inside nova_core, or via exports from any script.

Player Management

Nova.Functions.GetPlayer(source)

Gets a player object by their server ID.

local player = Nova.Functions.GetPlayer(source)
if player then
    print(player.fullname)
end
Parameter
Type
Description

source

number

Player's server ID

Returns: NovaPlayer object or nil


Nova.Functions.GetPlayerByIdentifier(identifier)

Gets a player object by their unique identifier.

local player = Nova.Functions.GetPlayerByIdentifier('license:abc123def456')
Parameter
Type
Description

identifier

string

Player's license identifier

Returns: NovaPlayer object or nil


Nova.Functions.GetPlayers()

Gets all currently online player objects.

Returns: table of NovaPlayer objects


Communication

Nova.Functions.Notify(source, message, type)

Sends a notification to a player (requires nova_notify).

Parameter
Type
Description

source

number

Player's server ID

message

string

Notification text

type

string

'success', 'error', 'info', 'warning'


Nova.Functions.CreateCallback(name, handler)

Registers a server callback that clients can trigger.

Parameter
Type
Description

name

string

Unique callback name

handler

function

Handler function (source, cb, ...)

The handler receives:

  • source - Player's server ID

  • cb - Callback function to send response

  • ... - Additional arguments from client


Exports (from other scripts)

Last updated