💻
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
  • Creation
  • Clearing
  • Example
Edit on GitHub
  1. Player

Progress Bar

Create a simple progress bar.

PreviousParticleNextSave

Last updated 3 years ago

Progress bars are server-based and controlled server-side. They are not distributed to several players but can be shown to a single user. They're based on a set period of time between a starting point and an ending point.

Accessible on Server Side

Creation

Creation very simple and will always return a uid if not specified.

const uid = Athena.player.emit.createProgressBar(player, {
    color: new alt.RGBA(0, 255, 0, 255),
    distance: 5,
    position: player.pos,
    milliseconds: 5000,
    percentageEnabled: true,
});

Clearing

If for some reason you need to clear the progress bar early you can use the uid to clear it.

const uid = Athena.player.emit.createProgressBar(player, {
    color: new alt.RGBA(0, 255, 0, 255),
    distance: 5,
    position: player.pos,
    milliseconds: 5000,
    percentageEnabled: true,
});

Athena.player.emit.removeProgressBar(player, uid);

Example

This progress bar lasts 5 seconds.

const uid = Athena.player.emit.createProgressBar(player, {
    color: new alt.RGBA(0, 255, 0, 255),
    distance: 5,
    position: player.pos,
    milliseconds: 5000,
    percentageEnabled: true,
});