All resources

rsg-hotair — Technical Docs#

Dependencies#

rsg-core (locales, notify, callbacks), rsg-target, rsg-inventory. No ox_lib.

Locales#

@rsg-core/shared/locale.lua is loaded in shared_scripts; strings live in locales/*.json (en, de, el, es, fr, ja, nl, pl, pt-br, ro, ru) and are read with locale('key'). The language is set with setr rsg:locale <code>. The NUI receives its strings from Lua when it opens.

Config (shared/config.lua)#

KeyPurpose
Config.ModelBalloon model
Config.HirePriceHire fee (cash)
Config.PassengerOffsetsBasket seat offsets (4)
Config.CruiseSpeed / BoostSpeedDrift per tick
Config.MaxAltitudeAGLCeiling above ground
Config.StoreMax* / BoardMax*Speed/height limits to store or board
Config.TargetDistancersg-target interaction distance
Config.StorageMaxWeight / StorageMaxSlotsPer-balloon stash
Config.DocksHire docks (NPC, blip, spawn)

Server callbacks (RSGCore)#

  • rsg-hotair:server:hireBalloon (dock) → success, reason
  • rsg-hotair:server:requestSeat (netId) → granted, seat, reason
  • rsg-hotair:server:openStorage → success, reason

Server events#

rsg-hotair:server:registerBalloon, cancelHire, storedBalloon, vacateSeat, disembarkAll

Client events#

rsg-hotair:client:forceDisembark, rsg-hotair:client:seatUpdate

NUI callbacks#

hireBalloon, storeBalloon, closeUI

Commands#

/hotair

Changelog#

  • 2.1.0 — Removed ox_lib: locales now come from rsg-core, lib.notify is replaced by RSGCore.Functions.Notify, ox_target is replaced by rsg-target.
<!-- BEGIN AUTO-REFERENCE (generated from the code; re-run the generator instead of editing by hand) -->

Technical reference#

Generated from the source of rsg-hotair 3.0.0. Names, arguments and defaults below are read straight from the code.

Dependencies#

rsg-core, rsg-target, rsg-inventory

Configuration#

OptionDefaultNotes
Config.Model'hotAirBalloon01'Balloon vehicle model
Config.HirePrice50Flat hire fee (cash). No timers, no cooldowns, no fuel.
Config.PassengerOffsetstablepilot uses the driver seat (-1), passengers attach at these offsets
Config.CruiseSpeed0.05drift added per tick
Config.BoostSpeed0.15drift added per tick while boost held
Config.MaxAltitudeAGL150.0ceiling above ground level
Config.StoreMaxSpeed3.0m/s, balloon must be near-stationary to store
Config.StoreMaxHeightAGL4.0must be close to the ground to store
Config.BoardMaxSpeed3.0same limits for boarding / piloting
Config.BoardMaxHeightAGL4.0
Config.TargetDistance6.0rsg-target distance (balloon is a large entity)
Config.StorageMaxWeight100000Balloon storage (rsg-inventory stash per owner citizenid)
Config.StorageMaxSlots20
Config.Dockstablecreated per entry automatically. Ground Z is resolved at runtime.

Callbacks#

CallbackSideArgumentsFile
rsg-hotair:server:hireBalloonserversource, cb, dockserver/server.lua
rsg-hotair:server:requestSeatserversource, cb, netIdserver/server.lua
rsg-hotair:server:openStorageserversource, cbserver/server.lua
-- client side
RSGCore.Functions.TriggerCallback('rsg-hotair:server:hireBalloon', function(result)
    -- use result
end, dock)

Events#

Server events can be fired by any client, so every handler re-validates the player, the arguments and any permission, distance or cooldown on the server. Never add a reward to a handler without those checks.

EventSideArgumentsFile
rsg-hotair:client:forceDisembarkclient``client/client.lua
rsg-hotair:client:seatUpdateclientcountclient/client.lua
rsg-hotair:server:registerBalloonservernetIdserver/server.lua
rsg-hotair:server:cancelHireserver``server/server.lua
rsg-hotair:server:storedBalloonserver``server/server.lua
rsg-hotair:server:vacateSeatservernetId, seatserver/server.lua
rsg-hotair:server:disembarkAllservernetIdserver/server.lua
-- from a client script
TriggerServerEvent('rsg-hotair:server:registerBalloon', netId)
-- from a server script
TriggerClientEvent('rsg-hotair:client:forceDisembark', source)

Commands#

CommandNotesFile
/hotairclient/client.lua

Locales#

Language files in locales/: de, el, en, es, fr, ja, nl, pl, pt-br, ro, ru. Set the language with setr rsg:locale "en".

<!-- END AUTO-REFERENCE -->