Skip to Content

Exports and Integrations

All Prism Scripts contain various export functions that can be used to interact with the script.

Server Side Exports

IsVehicleImpounded

---@param plate string The plate of the vehicle. ---@return boolean impounded Whether the vehicle is impounded. ---@return json impoundData The impound data of the vehicle. local impounded, impoundData = exports['prism-advancedgarage']:IsVehicleImpounded(plate)

IsVehicleInGarage

---@param plate string The plate of the vehicle. ---@return boolean inGarage Whether the vehicle is in the garage. ---@return string garageId The id of the garage the vehicle is in. local inGarage, garageId = exports['prism-advancedgarage']:IsVehicleInGarage(plate)

IsVehicleParkedInSpot

---@param plate string The plate of the vehicle. ---@return boolean parkedInSpot Whether the vehicle is parked in a spot. ---@return json spotData The spot data of the vehicle. local parkedInSpot, spotData = exports['prism-advancedgarage']:IsVehicleParkedInSpot(plate)

GetVehicleStatus

---@param plate string The plate of the vehicle. ---@return json vehicleStatus The status of the vehicle. local vehicleStatus = exports['prism-advancedgarage']:GetVehicleStatus(plate)

GetGarageInfo

---@param garageId string The id of the garage. ---@return json garageInfo The info of the garage. local garageInfo = exports['prism-advancedgarage']:GetGarageInfo(garageId)

GetAllGarages

---@return json allGarages The info of all garages. local allGarages = exports['prism-advancedgarage']:GetAllGarages()

SetVehicleStoredState

---@param plate string The plate of the vehicle. ---@param garageId string The id of the garage. ---@param stored boolean Whether the vehicle is stored. ---@return boolean success Whether the operation was successful. local success = exports['prism-advancedgarage']:SetVehicleStoredState(plate, garageId, stored)

TransferVehicleOwnership

---@param plate string The plate of the vehicle. ---@param newOwner string The new owner identifier ---@param deleteSpawned boolean Whether to delete the spawned vehicle. ---@return boolean success Whether the operation was successful. local success = exports['prism-advancedgarage']:TransferVehicleOwnership(plate, newOwner, deleteSpawned)

Client Side Exports

IsPlayerInsideGarageShell

---@return boolean insideShell Whether the player is inside the garage shell. local insideShell = exports['prism-advancedgarage']:IsPlayerInsideGarageShell()

IsGarageUIOpen

---@return boolean uiOpen Whether the garage UI is open. local uiOpen = exports['prism-advancedgarage']:IsGarageUIOpen()

OpenGarage

---@return boolean success Whether the operation was successful. local success = exports['prism-advancedgarage']:OpenGarage()

CloseGarage

---@return boolean success Whether the operation was successful. local success = exports['prism-advancedgarage']:CloseGarage()
Last updated on