💻
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
  • ServerObjectController
  • Video Guide
  • Adding a Global Object
  • Removing a Global Object
  • Adding a Local Object to a Player
  • Removing a Local Object from a Player
Edit on GitHub
  1. Controllers

Object Controller

Learn how to add objects to the object streamer.

PreviousMarker ControllerNextPed Controller

Last updated 3 years ago

ServerObjectController

Object(s) inheritely are always global unless they are attached to an interior. In our case we'll just be generating some basic objects and explaining what is happening.

Video Guide

Adding a Global Object

Global Object(s) are defined as a type of object that everyone can see.

All object(s) must have a unique identifier or a uid just in case they need to be removed later.

Athena.controllers.object.append({ uid: `test-object-1`, model: 'prop_ld_int_safe_01', pos });

Removing a Global Object

Global Object(s) can easily be removed if you know the uid of that object.

 Athena.controllers.object.remove('test-object-1')

Adding a Local Object to a Player

Local Object(s) are only for a single player to see. Remember that the uid is something you define to remove it later.

Athena.controllers.object.addToPlayer(player, { uid: `test-object-local-1`, model: 'prop_ld_int_safe_01', pos })

Removing a Local Object from a Player

As long as you know the uid of the local object it can be removed.

Athena.controllers.object.removeFromPlayer(player, 'test-object-local-1');
Object Adding Video