OPX//77
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; error not_sent. queued does not mean allowed.

OpenAt

Opens the menu on one screen, over the root.

admin.OpenAt(screen, arg, form)

Parameters

  • screen: string
    • root, 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; error not_sent (also for an unknown screen).
Example
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? }; screen is the screen on top, or nil.

On this page