API ReferenceGE Extensionscareermodules
Career Quick Travel Module
M.dependencies = {'career_career'}
Dependencies
M.dependencies = {'career_career'}Distance-based taxi system for career mode. Calculates route distance via the road network and charges a fee for teleportation. Free for distances under 300m.
Public API
| Function | Signature | Description |
|---|---|---|
M.quickTravelToPos | (pos, useWalkingMode, reasonString) | Pays and teleports player to a world position |
M.quickTravelToGarage | (garagePoi) | Teleports player to a garage's first parking spot |
M.getPriceForQuickTravel | (pos) → price, distance | Calculates cost based on road-network distance |
M.getPriceForQuickTravelToGarage | (garage) → price, distance | Price for traveling to a specific garage |
Dependencies
career_career(required)career_modules_payment- affordability checkcareer_modules_playerAttributes- money deductiongameplay/route/route- road-network path calculationfreeroam_facilities- garage position lookupgameplay_walk- walking mode teleportation
Pricing Formula
distance < 300m → free
distance ≥ 300m → $5 base + $0.004/meterCalculated via routePlanner:setupPath() for accurate road distance, not straight-line.
Usage Example
-- Check price first
local price, dist = career_modules_quickTravel.getPriceForQuickTravel(targetPos)
log("I", "", string.format("Travel cost: $%.2f (%.0fm)", price, dist))
-- Travel
career_modules_quickTravel.quickTravelToPos(targetPos, true, "Took a taxi")
-- Travel to garage
career_modules_quickTravel.quickTravelToGarage(garagePoi)See Also
- payment - Payment gateway
- playerDriving - Garage teleportation (vehicle-based)