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
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
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.SetParkDevices
Places the games ofroadpark_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 fromroadpark/park_addons.json every five seconds. To
apply a change at once, trigger this server event:
server.lua
πͺ Hooks
Theopen/ files stay editable in the encrypted download.
π‘ Events
roadpark_drinks:consumed
Client-side, local. Fired after a player finished a drink.client.lua