Skip to content

Dynamic Billboard Advertising

This page documents the intended integration surface: the open server/bridge.lua, the configuration, and the in-game admin panel. There are no public gameplay exports. Internal NUI callbacks, network events, and database tables are not public APIs.


server/bridge.lua is left open so the script can fit any framework, staff system, or economy. Keep the function names and return values when you change them.

FunctionReturnsUsed for
AgencyServer.isAdmin(source)booleanAgency admin checks: console, test mode, ACE, and framework groups
AgencyServer.playerJob(source)string or nilThe playerโ€™s job name on Qbox, QBCore, or ESX
AgencyServer.ownerIdentifier(source)stringThe identifier that owns a rental (the playerโ€™s license)
AgencyServer.rentalPaymentProvider(amount)stringWhich economy charges a rental, or 'unavailable'
AgencyServer.chargeRental(source, amount, reason, provider)ok, provider, chargedTakes the rent
AgencyServer.refundRental(source, amount, provider, reason)booleanPays a refund back when an admin revokes a rental

Add your own staff check inside AgencyServer.isAdmin, before its final return false:

server/bridge.lua
-- server/bridge.lua, inside AgencyServer.isAdmin(source)
if exports['my_staff']:IsStaff(source) then
return true
end

To charge rent through your own banking resource, change the three payment functions together:

server/bridge.lua โ€” example
function AgencyServer.rentalPaymentProvider(amount)
return (tonumber(amount) or 0) > 0 and 'my_banking' or 'free'
end
function AgencyServer.chargeRental(source, amount, reason, requestedProvider)
if amount <= 0 then return true, 'free', 0 end
local paid = exports['my_banking']:RemoveMoney(source, amount, reason) == true
return paid, 'my_banking', paid and amount or 0
end
function AgencyServer.refundRental(source, amount, provider, reason)
if amount <= 0 or provider ~= 'my_banking' then return true end
return exports['my_banking']:AddMoney(source, amount, reason) == true
end

CommandAccessPurpose
/adagencyPlayerOpen the agency manager: find, rent, and edit boards
/adagencyadminStaffOpen the admin panel
/rsad_kiosk place [label]StaffPlace a kiosk with a live preview
/rsad_kiosk remove, /rsad_kiosk listStaffRemove or list kiosks
/rsad_npc place, remove, listStaffPlace, remove, or list agency reps
/rsad_audit [code]StaffTour every board and check that its ad renders; results in F8. stop ends the tour
/rsad_goto <code>StaffStand at a boardโ€™s viewing spot; run again to return

Board codes look like RS-BB-0144 and appear on every board card in the agency manager and the admin panel.

KeyWhereAction
ENear a kiosk or repUse it (in key interaction mode)
HAd editorPreview the ad on the real billboard
TABAd editorShow or hide the editor tools
Mouse wheelPlacing a kiosk or repRotate the preview
Enter / Left clickPlacing a kiosk or repPlace it

/adagencyadmin manages the whole agency in game:

TabWhat staff can do
OverviewIncome, rentals, boards, kiosks, and reps at a glance
BoardsSet day prices, turn renting on or off, clear ads, teleport, and manage reservations
RentalsHover a board to preview every slide; extend, clear the ad, or revoke
PlayersStop players from renting, and let them back in
LocationsKiosks and reps, with teleport and remove
SettingsEvery configuration value, with an explanation on hover; changes apply live

A board can be kept for chosen players or jobs, so only they can rent it, or dedicated: free and permanent, for example for server announcements or a police board.

A revoked rental can be refunded in three ways: no refund, a refund for the time left, or a full refund. Refunds go back through the economy that charged the rental.