Uber App: Exports & Events
Send notifications through the Uber App, adapt the framework bridge and hook into player load events.
Resource name
Because the resource name contains hyphens, call exports as exports["hype-uber-app"] rather than
exports.hype-uber-app.
| Export | Side | Purpose |
|---|---|---|
SendNotify | Client | Shows a notification with the configured resource |
SendNotify | Server | Same, sent to a player from the server |
GetModules | Both | Returns the script's module table |
Client exports
SendNotify
Shows a notification to the local player with the resource set in Notifications (okokNotify, ps-ui or ox_lib). Use it
to keep your own messages in the same style as the app's in-game notifications.
exports["hype-uber-app"]:SendNotify("LS Rides", "Your ride is on the way.", 5000, "success")Prop
Type
Server exports
SendNotify
Sends the same notification to a player from the server. Pass -1 to notify everyone.
exports["hype-uber-app"]:SendNotify(source, "LS Rides", "Fares are doubled tonight!", 5000, "info")Prop
Type
Shared exports
GetModules
Returns the module table of the side it is called on. With a name, only that module.
local notify = exports["hype-uber-app"]:GetModules("Notify")
notify.SendNotify(source, "LS Rides", "Hello!", 5000, "success")Prop
Type
Framework bridges
The framework bridges in frameworks/ are not escrow protected. If your economy or character system is customized, you
can change how the script reads players and moves money there. Each bridge implements the same functions:
| Function | Purpose |
|---|---|
GetPlayerIdentifier(playerId) | Character id, citizenid on QB/QBox, identifier on ESX |
GetCharacterName(playerId) | First and last name, used to fill the sign up form |
GetPlayerBirthday(playerId) | Birth date, used to fill the age |
GetPlayerMoney(playerId, type) | Balance of "bank" or "cash" |
RemovePlayerMoney(playerId, type, amount, reason) | Charges fares and tips, returns true on success |
AddPlayerMoney(identifier, type, amount, reason) | Refunds and withdrawals, also works for offline characters |
Keep the return values
The script relies on RemovePlayerMoney and AddPlayerMoney returning true only when the money really moved.
Returning true on a failed payment lets players get money for free.
Events
hype-uber-app:server:player-loaded
Binds a character to the app: their profile, online status and active trip are loaded. The bridges trigger it from
QBCore:Server:OnPlayerLoaded and esx:playerLoaded. Trigger it yourself if your multicharacter resource loads
characters without these events.
TriggerEvent('hype-uber-app:server:player-loaded', source)hype-uber-app:server:player-unloaded
The opposite: run it when a player switches characters without leaving the server. A driver goes offline, and an
active trip gets the DisconnectGrace time to reconnect.
TriggerEvent('hype-uber-app:server:player-unloaded', source)Server only
These are local server events. Never trigger them from the client.