💻
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
  • WorldNotificationController
  • Note on Limitations
  • Example - World
  • Example - Single User
Edit on GitHub
  1. Controllers

World Notification Controller

Create in-world help text that is displayed in a 3D location.

WorldNotificationController

Creates in-world help text that is displayed in-game at a 3D location.

Note on Limitations

Can only render one of these at a time in-world. Try to use them sparingly.

Example - World

const uid = Athena.controllers.notification.append({
    text: 'Hello World!',
    type: WORLD_NOTIFICATION_TYPE.ARROW_BOTTOM,
    pos: { ...player.pos },
});

Example - Single User

Keep in mind you should have a player reference to use this

const uid = Athena.controllers.notification.addToPlayer(player, {
    text: 'Hello World!',
    type: WORLD_NOTIFICATION_TYPE.ARROW_BOTTOM,
    pos: { ...player.pos },
});

alt.setTimeout(() => {
    if (!player || !player.valid) {
        return;
    }

   Athena.controllers.notification.removeFromPlayer(player, uid);
}, 5000);
PreviousText Label ControllerNextInteriors

Last updated 3 years ago