HRScripts Documentation
  • HRScripts Documentation
  • Resources
    • 📚HRLib
      • Classes
        • HRLibConfig
        • HRLibClientFPlayer
        • HRLibServerFPlayer
        • HRLibClientIPlayer
        • HRLibServerIPlayer
        • HRLibCloseIPlayer
        • HRLibCloseFPlayer
        • HRLibBlipOptions
        • HRLibBlipForCoordOptions
        • HRLibBlipForEntityOptions
        • HRLibBlipForAreaOptions
        • HRLibBlipForPickupOptions
        • HRLibInputDialogueTextOptions
        • HRLibVehicleProperties
      • Modules
        • Bridge
          • Shared
          • Client
          • Server
        • Callbacks
          • Shared
          • Client
          • Server
        • Closest
          • Client
        • Controls Disable
          • Client
        • CreateBlip
          • Client
        • DiscordMsg
          • Server
        • DoesIdExist
          • Shared
        • FPlayer
          • Shared
          • Client
          • Server
        • GetPedsInVehicle
          • Client
        • GetPedWeapons
          • Client
        • GetPlayers
          • Client
        • GetVehicleDoorStatus
          • Client
        • GetVehicleFromPlate
          • Client
        • Interface
          • Client
          • Server
        • IPlayer
          • Client
          • Server
        • PlayerIdentifiers
          • Server
        • RadomValueWithNoRepetition
          • Shared
        • RegCommand
          • Client
          • Server
        • Resource
          • Shared
          • Server
        • SpawnVehicle
          • Shared
        • Streaming
          • Client
        • string
          • Shared
        • table
          • Shared
        • ToVector
          • Shared
        • TrackingEntities
          • Client
            • Functions
            • Events
        • Values
          • Shared
          • Client
        • VehicleProperties
          • Client
          • Server
        • SetDefaultPedVariation
          • Shared
    • HRGarages
      • Classes
        • HRGaragesConfig
        • HRGaragesVehicleInfo
        • HRGaragesClientFunctions
      • Exports
        • Server
    • 📦HRStorages
      • Exports
        • Client
        • Server
      • Callbacks
      • Commands
    • 🧹HRComserv
    • 🥷HRHostage
    • HRAdminMenu
      • Events
      • Exports
        • Client
        • Server
      • State Bags
    • ☑️HRWhitelist
    • HRExtraCommands
    • 🚦HRRealisticTraffic
    • 🗣️HRNPCDialogue
      • Classes
Powered by GitBook
On this page
  • addVehicleToGarage
  • addVehiclePropsToGarage
  • updateVehicleProperties
  • getDatabaseVehicleInfo
  • doesVehicleExistInGarage
  • addVehicleToImpoundGarage
  1. Resources
  2. HRGarages
  3. Exports

Server

addVehicleToGarage

Export to add a vehicle into specific garage with model, plate and fuelLevel options

function exports.HRGarages:addVehicleToGarage(
    owner: string,
    garageName: string,
    model: integer,
    plate: string<8>,
    fuelLevel: number?
)

Parameters description

  • owner - the owner's license identifier

  • garageName - the garage name from the available garages in your garages table in database

  • model - the vehicle model to save

  • plate - the vehicle plate, if nil it will be a random vehicle plate

  • fuelLevel - the fuel level, if nil it'll be full tank's fuelLevel

addVehiclePropsToGarage

Function to add vehicle to garage with vehicle properties table option

function exports.HRGarages:addVehiclePropsToGarage(
    garageName: string,
    vehProperties: HRGaragesVehicleProperties
)

Parameters description

  • garageName - the garage name from the available garages in your garages table in database

  • vehProperties - the vehicle properties. Required fields are model, owner and plate

updateVehicleProperties

Export to update vehicle properties

function exports.HRGarages:updateVehicleProperties(
    vehProperties: HRGaragesVehicleProperties
)

Parameters description

  • vehProperties - the vehicle properties. Required fields are model, owner and plate

getDatabaseVehicleInfo

Export to get vehicle properties of a vehicle in the database by plate

function exports.HRGarages:getDatabaseVehicleInfo(
    plate: string<8>
): HRGaragesVehicleInfo?

Parameters description

  • plate - the vehicle plate to get the database info of

doesVehicleExistInGarage

Export to check vehicle existance in any garage or specific one

function exports.HRGarages:doesVehicleExistInGarage(
    plate: string<8>,
    garageName: string?
): boolean

Parameters description

  • plate - the vehicle plate to check for existance

  • garageName - the garage name to focus on while searching, if nil it'll not focus and search in each garage

addVehicleToImpoundGarage

Export to add a vehicle that exists in the public garages into a impound garage

function exports.HRGarages:addVehicleToImpoundGarage(
    vehicleProperties: HRGaragesVehicleInfo,
    garageName: string
)

Parameters description

  • vehicleProperties - the vehicle properties. Required fields are model, owner and plate

  • garageName - the garage name from the available garages in the impound_garages table in your database

PreviousExportsNextHRStorages

Last updated 28 days ago