💻
alt:V Athena Docs v3.0.0
  • Info
    • Introduction
    • Patreon & Support
    • Athena Discord
    • FAQ
  • Installation
    • Common Issues
    • Windows
    • Linux (Ubuntu 20.04+)
    • Debugging
    • Updating
  • Info
    • Admin
    • Configuration
    • Console
    • Database
    • Hotkeys
    • Identifier
  • Plugins
    • Load Plugins
    • Create Plugins
    • Mods
    • Clothing
  • Controllers
    • What is a Controller?
    • Blip Controller
    • Interaction Controller
    • Marker Controller
    • Object Controller
    • Ped Controller
    • Text Label Controller
    • World Notification Controller
  • Systems
    • Interiors
    • Inventory & Items
    • Inventory Rules
    • Jobs
    • Time
    • Weather
  • Menus
    • Menu Types
    • Action Menus
    • Input Menu
    • Wheel Menu
  • Player
    • Admin-Commands
    • Animations
    • Attach Objects
    • Credits
    • Currency
    • Commands
    • Error Screen
    • Message
    • Meta
    • Notifications
    • Particle
    • Progress Bar
    • Save
    • Shard
    • Sound
    • Spinners
    • Task Timeline
  • Custom WebViews
    • Introduction
    • Your First Page
    • CSS Framework
  • Misc
    • Custom Sounds
    • Custom Streamers
    • Custom Icons
    • Adding Locale / Translations
    • Adding Vehicle Rules
    • Adding Whitelist
    • Adding Wheel Menus
    • Adding Parking Garages
Powered by GitBook
On this page
  • Obtaining the identifier
  • Modifying the Strategy
  • Example
Edit on GitHub
  1. Info

Identifier

Player identification system explained

PreviousHotkeysNextLoad Plugins

Last updated 2 years ago

Players have various ways to be identified but it is up to you as the server owner to decide how you want your player's identified.

The current strategy is based on a temporary alt:v id or server_id for short.

This means that a player joins, gets asigned an incremental id (1, 2, 3, 4...) and after they leave that number is freed up for any other player to take that same identifying number.

server_id -> A temporary player identifier assigned by the alt:V system.

character_id -> A persistent incremental character identifier in the database. Unique to the character.

account_id -> A persistent incremental account identifier in the database. Unique to an account who may own multiple characters.

Obtaining the identifier

When working with the ID system you can get any player by the ID that they see by using the following API.

const id = 5;
const player = Athena.systems.identifier.getPlayer(id);

This should always be used when a player is feeding you a command with an id.

Modifying the Strategy

If you need to modify the strategy; you can simply create a new plugin that calls the Athena.systems.identifier.setIdentificationStrategy function and pass any of the types specified below.

'server_id',
'character_id',
'account_id'

Example

Athena.systems.identifier.setIdentificationStrategy('character_id');