opx_infinityadmin
Client
Last updated on
The admin contract on the client — open, steer and close the staff menu.
local admin = OPX.Api.Get('admin')Inside opx_infinity. Opening is only a request: the client sends /opx.admin and the ACL decides.
Open
Asks the server to open the menu.
admin.Open()Returns
Result—{ open = true }if already open,{ queued = true }if sent; errornot_sent.queueddoes not mean allowed.
OpenAt
Opens the menu on one screen, over the root.
admin.OpenAt(screen, arg, form)Parameters
- screen:
stringroot,players,player,playerMove,playerHealth,playerCharacter,playerCharacters,character,offlineChars,playerItems,playerInventory,self,vehicles,vehicleClasses,vehicleList,pedFamilies,pedList,weaponList,ammoList,itemCategories,itemList,bag,locations,saved,world,dev,weather,time,server,confirm.
- arg?:
any- The screen's argument (e.g. a player id).
- form?:
string- A form kind to open over the screen.
Returns
Result—true; errornot_sent(also for an unknown screen).
admin.OpenAt('player', 3)Close
Closes the menu and any form it opened.
admin.Close()Returns
Result—true
State
admin.State()Returns
Result—{ open: boolean, screen: string? };screenis the screen on top, or nil.