Client API
Every export below is client-side. Call them onexports.road_minigolf.
Exports
OpenCourseMenu
Opens the course menu of a course, for example from your own target zone or a phone app.The server still checks that the player stands at the course start and is
out of a vehicle before a game can be opened, joined or started.
IsInGame
OpenEditor
Opens the course editor, as F7 does. The server checks admin rights.IsEditorActive
ShowcaseCue
For trailers and camera tools. After an admin ran/mgshowcase at a course, this export plays
a hole so that a chosen moment happens on time. Only the calling client sees
these balls, and they wait for the windmill sails.
Seconds until the moment, or
nil when /mgshowcase found no stroke for that
hole or the hole has no such moment.ShowcaseStop
Stops every showcase ball on this client.State bags
For HUD, phone and inventory scripts that should stay out of the way during a round.Player(source).state.inMinigolf.
Events
Local client events, triggered withTriggerEvent. Listen with
AddEventHandler.
The weapon in the player’s hands is put away for the putter and given back
after the round. With ox_inventory the inventory manages weapons itself.