πŸ’Žnova_core

The core resource of the NOVA Framework. Provides the foundation for all other scripts: player management, jobs, economy, callbacks, permissions, vehicle keys, weather/time sync, and database operations.

Features

  • Player System β€” Modern OOP player objects with character info, jobs, gangs, metadata

  • Job System β€” Configurable jobs with grades, duty toggle, salary

  • Gang System β€” Gang/group integration

  • Economy β€” Cash, bank, and black_money management

  • Callbacks β€” Server-client callback system

  • Permissions β€” O(1) permission cache with auth-gated exports

  • Vehicle Keys β€” Key management for vehicle ownership

  • Weather & Time Sync β€” Synchronized weather and time across all players

  • Needs System β€” Hunger and thirst metabolism

  • World Control β€” NPC density, traffic control

  • Localization β€” Portuguese and English support

  • Database β€” oxmysql integration with optimized queries

Exports

Shared Exports

Export
Returns
Description

GetObject

table

Get the core framework object

GetConfig

table

Get the framework configuration

GetItems

table

Get all registered items

Server Exports

Export
Parameters
Returns
Description

IsFrameworkReady

β€”

boolean

Check if framework is initialized

GetPlayer

source

Player

Get player object by server ID

GetPlayerByCitizenId

citizenid

Player

Get player by citizen ID

GetPlayers

β€”

table

Get all loaded players

IsPlayerLoaded

source

boolean

Check if player is loaded

AddPlayerMoney

source, type, amount

boolean

Add money (cash/bank/black_money)

RemovePlayerMoney

source, type, amount

boolean

Remove money

SetPlayerInventory

source, inventory

β€”

Set player inventory data

SetPlayerSkin

source, skin

β€”

Set player appearance

SavePlayer

source

β€”

Force save player data

SetPlayerMetadata

source, key, value

β€”

Set metadata (hunger, thirst, etc.)

LoginPlayer

source, citizenid

β€”

Load character

LogoutPlayer

source

β€”

Save and unload character

CreateCallback

name, handler

β€”

Register a server callback

Notify

source, message, type

β€”

Send notification

HasPermission

source, permission

boolean

Check permission

HasPermissionNode

source, node

boolean

Check permission node

IsAdmin

source

boolean

Check admin status

GetJobs

β€”

table

Get all registered jobs

GetGangs

β€”

table

Get all registered gangs

GiveKeys

source, plate

β€”

Give vehicle keys

RemoveKeys

source, plate

β€”

Remove vehicle keys

HasKeys

source, plate

boolean

Check if player has keys

GetCurrentWeather

β€”

string

Get current weather

GetCurrentTime

β€”

table

Get current time

SetWeather

weather

β€”

Set weather

SetTime

hour, minute

β€”

Set time

Client Exports

Export
Parameters
Returns
Description

IsFrameworkReady

β€”

boolean

Check if framework is ready

IsPlayerLoaded

β€”

boolean

Check if local player is loaded

GetPlayerData

β€”

table

Get local player data

TriggerCallback

name, cb, ...args

β€”

Trigger a server callback

ClientNotify

message, type

β€”

Show local notification

HasKey

plate

boolean

Check if player has vehicle key

GetMyKeys

β€”

table

Get all vehicle keys

Configuration

Main configuration in config/main.lua:

Dependencies

  • oxmysql β€” Database operations

Notes

  • All server exports validate the source player before executing

  • Money operations are atomic and validated server-side

  • The permission system uses an O(1) lookup cache

  • Weather and time sync runs on a configurable interval

  • Player data auto-saves periodically and on disconnect

Security

  • All server exports validate the caller before executing

  • Internal event names and database schema are not disclosed for security purposes

  • The permission system uses O(1) lookup cache with server-side validation

Last updated