GARAGE

FiveM Garage Configuration FiveM Garage Setup FiveM Garage Management FiveM Garage Customization FiveM Garage Locations FiveM Impound Garage FiveM Job Garage FiveM Garage Blips FiveM Garage Script

Garage Script Configuration Guide

1. General Customization

Customize = {
    Framework = "NewESX", -- QBCore - ESX - NewESX - OldQBCore (Write the framework you used as in the example)
    Mysql = "oxmysql", -- oxmysql | ghmattimysql | mysql-async (Write the SQL script you use as in the example)

    AdminNewJobCar = 'newjobvehicle', -- /newjobvehicle PlayerID JobVehicle - (Example: /newjobvehicle 2 police3)
    AdminList = {
        ["license:392d20db55be8ad6069a3c5e135f59e7b0ce1c4d"],
        --["license:"],
    },

    PriceType = 'cash', -- cash - bank
    GaragesPrice = 0,
    ImpoundGaragesPrice = 600,
    JobGaragesPrice = 1,

    Carkeys = function(Plate)
        TriggerEvent('vehiclekeys:client:SetOwner', Plate) --   qb-core
    end,

    VehNotOwnedNotify = function()
        print("Vehicle Not Owner Notification")
    end,
    
    GetVehFuel = function(Veh)
        return GetVehicleFuelLevel(Veh) -- exports["fuel-script"]:GetFuel(Veh) - exports["LegacyFuel"]:GetFuel(Veh) - GetVehicleFuelLevel(Veh)
    end,

    SetVehFuel = function(Veh, Fuel)
        return SetVehicleFuelLevel(Veh, Fuel) -- exports['fuel-script']:SetFuel(Veh, Fuel) - exports['LegacyFuel']:SetFuel(Veh, Fuel) - SetVehicleFuelLevel(Veh, Fuel)
    end,
}

2. Adding Garages

To add garages, you can use the following format. Each garage should be defined with its location, type, and other features.

Example Garage Configuration

4. Adding Impound Garages

Impound garages are also added in a similar way.

Example Impound Garage Configuration

5. Helper Functions

The script includes several helper functions to manage framework integration and SQL execution.

Example Helper Functions

Summary

This guide helps you configure your garage script by providing detailed examples for general customization, adding garages, job garages, impound garages, and helper functions. By following this structure, you can easily manage and expand your FiveM server's garage system.

Feel free to adjust the examples to fit your specific needs and integrate them into your GitBook documentation for better visibility and usability.

Last updated