Skip to content

v3.43.0

Latest

Choose a tag to compare

@github-actions github-actions released this 03 Dec 11:03
· 2 commits to main since this release

Ox now maintains its own database, user system, bans, and character system. These systems work alongside any existing user and character systems (i.e. esx, qb, qbx, ox_core) without conflict or introducing unwanted behaviour -- you can ignore their existence or build your scripts to support any server that runs Ox. Documentation is not yet available, but for a quick overview;

local Player = require 'Ox.Game.Player'

local player = Player.fromId(serverId)
local user = player:getUser()
local char = player:getCharacter()

print(json.encode(user))
-- { id: number, license: string }

print(json.encode(char))
-- { id: number, userId: number, uuid: string }

Each object is a distinct class with properties and methods for interacting with the user or character in some way. Both expose set and get methods for storing key-value pairs in a sqlite database. The user class also exposes isBanned, getBans, ban, and unban methods.

See below for some new events to handle user and character lifecycles.

https://github.com/overextended/ox/blob/b5bfe4ff3f0b6bc96d031354d48a7152fd7b6aac/src/server.ts#L12-L38


Features

  • internal user management/database (Linden)
  • begin internals ts rewrite (Linden)
  • package: migrate @overextended/core npm code (Linden)
  • Player: unsubscribe from state handlers (Linden)
  • database: store uuids for characters (Linden)
  • database: handling for offline users (Linden)
  • build: drop labels (Linden)
  • database: session and character lifecycle events (Linden)
  • Player: player interning with Player.fromId (Linden)
  • database/user: set states for user/character identity (Linden)
  • anticheese: disallow client from overriding identity states (Linden)
  • package/remote-class: cross-runtime class accessors (Linden)
  • classes/user: implement User as RemoteClass (Linden)
  • version: stop resources that fail to meet semver checks (Linden)
  • remote-class: add User and Character bindings (Linden)
  • game/Player: getUser and getCharacter methods (Linden)
  • advisories: warn about unsafe convars (Linden)
  • ac: game event rate limiting (Linden)
  • character: register remote provider (Linden)
  • modules: add remote class consumer and bindings for user/character (Linden)
  • implement GetEntitiesInRadius for FiveM (Linden)
  • GameEntity: entity identities/lifecycle handling (Linden)
  • GameEntity: add caching and fromHandle methods (Linden)
  • User: add ban system (Linden)
  • Character: handling for unknown/no framework and ox_core (Linden)

Bug Fixes

  • package/getNearbyVehicles: remove NetworkGetEntityIsNetworked (#847) #847 (Trauzer)
  • uuid: validation (Linden)
  • hooks: use global hook ids to prevent reuse (Linden)
  • logger: protected calls (Linden)
  • logger: register export when no provider exists (Linden)
  • database/sqlite: uuid serialisation (Linden)
  • config: import paths (Linden)
  • Game/Player: getCharacter handling (Linden)
  • Game/Vehicle: set type (Linden)
  • db/schema: use composite key for token-user_id (Linden)
  • session: disallow multiple user connections (Linden)
  • update web build path (Linden)
  • package: update git url (Linden)

Documentation

  • package: add and improve descriptions (Linden)

Code Refactoring

  • package: use internal vectors module (Linden)
  • database: lru cache and template strings (Linden)
  • database/sqlite: improve structuring and typing (Linden)
  • framework: derive tables from common object (Linden)
  • database/kvp: fetch data as json object (Linden)
  • database: move external framework loading (Linden)
  • database/user: User.fromPlayerId sets cached users as online (Linden)
  • remote-class: clean-up methods and typing (Linden)
  • User: addTokens on playerConnecting (Linden)
  • User: retrieve bans from users with matching tokens (Linden)
  • reorganise and tidy-up some modules (Linden)
  • session: centralise the user lifecycle (Linden)
  • character: separate Character lifecycle from User (Linden)
  • locales: add locale support for more messages (Linden)
  • GameEntity: share instance cache with Player (Linden)
  • common: barrel exports (Linden)
  • GameEntity: infer entity type in fromHandle call (Linden)
  • states: set bucket state using change events (Linden)
  • states: change userId and charId key names (Linden)

Continuous Integration

  • release: use node to run actions (Linden)
  • release: drop bump-manifest-version script (Linden)
  • release: update build scripts (Linden)
  • release: update permissions (Linden)

Chores

Commits

  • 2a311ba: Merge branch 'feat/user-data' (Linden)
  • 24f65bc: rename repo and expand description (Linden)