Skip to main content

Integration

RoadPark exposes server exports for chips and placements, open/ hooks for your own rules and notifications, and a few events.

🎟️ Ticket exports

roadpark_tickets lets your own scripts charge Park Chips β€” for example for a ride or a game of your own. All exports are server-side and return plain tables.

redeem

Takes the chips for a ride from the player’s inventory.
server.lua
number
required
Server ID of the player.
string
required
Ride ID β€” lowercase letters, digits and _. The price is Config.Rides[rideId].tickets, or Config.DefaultTickets for unknown IDs.
boolean
true when the chips were taken. Without a framework, or when the price is 0, ok is true and nothing is taken.
string
Receipt ID for refund. Valid for 30 minutes, once.
number
Chips taken.
number
Chips the player has left.
string
On failure: no_tickets, busy (another chip transaction is running for this player) or unavailable.
number
On failure: chips needed and chips the player has.

refund

Gives the chips of a receipt back.
server.lua
A receipt can be refunded once, within 30 minutes, to the same player in the same session. A player who reconnected gets unknown_receipt. Other reasons: busy, expired, unavailable.

quote

server.lua

announce

Lists your ride on the price board of every booth while your resource runs.
server.lua
Call it when your resource starts and again when roadpark_tickets starts. The price and label come from Config.Rides in roadpark_tickets/config.lua.

πŸ“ Placement exports

The park map places attractions through server exports. You can use the same exports to place attractions from your own resource.

SetParkPlacements

server.lua
string
required
Letters, digits, _ and -, up to 32 characters, unique in the list.
table
required
{ x, y, z } in world coordinates.
number
required
Heading in degrees.
number
Routing bucket, default 0.
Each calling resource owns one complete set: a new valid list replaces it, an invalid list keeps the previous one, an empty list removes it, and the set is removed automatically when the calling resource stops. A ride that is in use moves only once it is empty.

SetParkDevices

Places the games of roadpark_games:
server.lua
game is one of cans, range, lukas (High Striker), hoops or hoops2 (Moving Hoop). price is optional (0–100,000, default Config.DefaultPrice) and an optional settings table overrides the game’s Settings defaults. Up to 64 devices per caller. Failure reasons: invalid_list, invalid_device, invalid_position, invalid_settings, duplicate_position, position_occupied.

Reloading park_addons.json

The Ferris Wheel, the Grand Prix, the Claw Arcade and the ticket booth read their park position from roadpark/park_addons.json every five seconds. To apply a change at once, trigger this server event:
server.lua

πŸͺ Hooks

The open/ files stay editable in the encrypted download.

πŸ“‘ Events

roadpark_drinks:consumed

Client-side, local. Fired after a player finished a drink.
client.lua
Use it to add thirst on QBCore, Qbox or your own needs system.