Skip to main content
Everything here is plain Lua and works from any resource, whether or not it has an app on the tablet. For putting your own app on the home screen, see Building an app.

Client

Open respects Config.DisableWhile, so it will not open for a dead or handcuffed player.

Notifications

Saved to the player’s inbox, so it survives a reconnect, and shown as a pop-up if the tablet is closed. Returns the saved row, or nil if the player is not loaded or the payload was malformed. The inbox badge updates itself. You do not need to call SetAppBadge as well.

Badges

A small count on your app’s tile, for a number your own script keeps. Pass 0 to clear.

The HUD

A small card at the side of the screen that stays up while the tablet is closed. Built for live job state. One per player at a time, and calling ShowHud again replaces it.
Each entry in stats is a label and value row, or { separator = true } for a thin divider. Update the card by calling ShowHud again with new values. The colour is always the player’s own tablet accent and cannot be set by the script. Players choose the side of the screen in the tablet’s Settings app and can hide the card with the HUD key.
With Config.Debug = true in the tablet’s config, /awokenhud_test pushes a sample card to you and /awokenhud_clear hides it.

Groups

leader is the leader’s identifier. Everyone on the roster is online: a player who drops is removed.
Use this instead of polling.
Groups live in memory and are wiped by a server restart. A script that needs a crew to survive a restart should keep its own record.

SD cards

Turns a player’s stock tablet into a modded one and charges Config.SdCards.install.price. If the payment fails the stock tablet comes back and nothing is charged.
HasTablet is true for either tablet, stock or modded. Use it rather than checking for the item yourself, which misses the modded one.

Apps

These are for scripts that put an app on the tablet. They are covered in Building an app.