FiveStar Development
YoutubeCFX forumTebexDiscord
  • 👨‍💻About Us
  • 😊Control Panel ⁽ᶠᵒʳ ᶜᵘˢᵗᵒᵐᵉʳˢ ᵒᶠ ᵗʰᵉ ᵒᶠᶠᶦᶜᶦᵃˡ ˢᶦᵗᵉ⁾
    • 📲Active Redeem Code
    • ⬇️Download Script
    • 👾Create License
    • 📅Expiration date
    • ⬅️Reset Data License
  • 🧾Scripts
    • 🆘FiveStar-HelpMenu
      • 🧠How to Install
      • ⏭️Config Script
    • 🛡️FiveStar-Paintball
      • 😘[ESX]
        • 🧠How to Install
        • ⏭️Config Script
      • 🥰[QB]
        • 🧠How to Install
        • ⏭️Config Script
    • 🔫FiveStar-WeaponShop
      • 😘[ESX]
        • 🧠How to Install
        • ⏭️Config Script
      • 🥰[QB]
        • 🧠How to Install
        • ⏭️Config Script
    • 🔐FiveStar-Security [FREE FOR CUSTOMER]
      • 🧠How to Install
      • ⏭️Config Script
    • 🎟️FiveStar-MissionClub
      • 😘[ESX]
        • 🧠How to Install
        • ⏭️Config Script
      • 🥰[QB]
        • 🧠How to Install
        • ⏭️Config Script
    • 🛒FiveStar-VehicleShop
      • 😘[ESX]
        • 🧠How to Install
        • ⏭️Config Script
      • 🥰[QB]
        • 🧠How to Install
        • ⏭️Config Script
    • 💸FiveStar-Subscribe
      • 😘[ESX]
        • 🧠How to Install
        • ⏭️Config Script
      • 🥰[QB]
        • 🧠How to Install
        • ⏭️Config Script
    • 🚘FiveStar-Garage
      • 😘[ESX]
        • 🧠How to Install
        • ⏭️Config Script
      • 🥰[QB]
        • 🧠How to Install
        • ⏭️Config Script
    • 💋FiveStar-Speedometer [FREE]
      • 🧠How to Install
Powered by GitBook
On this page

Was this helpful?

  1. Scripts
  2. FiveStar-Garage
  3. [QB]

Config Script

FiveStar Script

config.lua
-- ! ███████╗██╗██╗   ██╗███████╗███████╗████████╗ █████╗ ██████╗ 
-- ! ██╔════╝██║██║   ██║██╔════╝██╔════╝╚══██╔══╝██╔══██╗██╔══██╗
-- ! █████╗  ██║██║   ██║█████╗  ███████╗   ██║   ███████║██████╔╝
-- ! ██╔══╝  ██║╚██╗ ██╔╝██╔══╝  ╚════██║   ██║   ██╔══██║██╔══██╗
-- ! ██║     ██║ ╚████╔╝ ███████╗███████║   ██║   ██║  ██║██║  ██║
-- ! ╚═╝     ╚═╝  ╚═══╝  ╚══════╝╚══════╝   ╚═╝   ╚═╝  ╚═╝╚═╝  ╚═╝
-- ! 		   Copyright ® 2023 Lorem All rights FiveStar
-- ! 		    5star.tebex.io | Discord.ggHdEzqEJBdh
Config = {}

-- * If an update is released for the script, it will not allow the script to start and will cause the server to shut down
Config.CheckVersion = true

---@type The impound charge is created in your SQL table. You can customize how much each vehicle costs and cooldowns to impound.
---@type The cost of the impound is paid from the player's inventory, otherwise it is deducted from the bank account | To view the code, server / callback.lua | line 60 and 76

Config.CoreName = 'qb-core' ---@param Enter your core name

Config.LoadUIData = {--- @param User interface changes | Text | Image
    Text = "FiveStar", ---@param Enter your server name
    Image = "img/Logo_Server.png" ---@param Put your server photo link here
}

Config.PlayerDisplay = {
    Visible = true, --- @param Invisible driver
    GPS = true, --- @param It does not display GPS
    DarkMode = false, --- @param Please either set DarkMode to true or set AnimationLeaveVehicle to true
    AnimationLeaveVehicle = true --- @param Please either set DarkMode to true or set AnimationLeaveVehicle to true
}

Config.ChangeRoutingBucket = function(src, world)
    if world then
        SetPlayerRoutingBucket(src, src)
        SetRoutingBucketEntityLockdownMode(src, 'inactive')
    else
        SetPlayerRoutingBucket(src, 0)
        SetRoutingBucketEntityLockdownMode(0, 'inactive')
    end
end

Config.Cooldown = 2 ---@return cooldown after taking out the vehicle

Config.Blip = {
    Car = {
        Display = true,
        Color = 38,
        Size = 0.6,
        Type = 290,
        Message = "Vehicle Garage",
    },
    Boat = {
        Display = true,
        Color = 38,
        Size = 0.6,
        Type = 410,
        Message = "Boat Garage",
    },
    Aircraft = {
        Display = true,
        Color = 38,
        Size = 0.6,
        Type = 423,
        Message = "Aircraft Garage",
    },
    Impound = {
        Display = true,
        Color = 38,
        Size = 0.6,
        Type = 380,
        Message = "Impound",
    }
}

Config.Garage = {
    Ped = {
        Display = true,
        Model = "cs_joeminuteman",
        TargetExport = function(PedData, type, model)
            exports['qb-target']:AddTargetEntity(PedData, {
                options = {
                    {
                        action = function()
                            OpenGarageMenu(model, type)
                        end,
                        icon = 'fas fa-car',
                        label = "Open Your Garage Menu",
                    },
                },
                distance = 2.5,
            })
        end
    },
    Marker = {
        Display = false,
        Color = {r = 255, g = 255, b = 0},
        Size = {x = 1.5, y = 1.5, z = 1.0},
        Type = 27,
        Distance = 3
    },
    Text = {
        Display = false,
        Size = {x = 1.5, y = 1.5, z = 1.0},
        Distance = 1.2,
        Message = "Press ~y~[E]~s~ To Open Your Garage Menu"
    }
}

Config.DeleteVehicle = {
    TextUI = {
        Display = true,
        Distance = 5, -- Distance Main
        ShowTextUI = function()
            lib.showTextUI('[E] Parking', {
                position = "left-center",
                icon = 'fas fa-sign-in-alt',
                style = {
                    borderRadius = '0.5vw',
                    backgroundColor = '#ca0000',
                    boxShadow = '0vw 0vw 0.3vw #ca0000',
                    color = 'white'
                }
            })
        end,
        HideTextUI = function()
            lib.hideTextUI()
        end
    },
    Marker = {
        Display = false,
        Color = {r = 255, g = 0, b = 0},
        Size = {x = 3.1, y = 3.1, z = 2.1},
        Type = 27,
        Distance = 5
    },
    Text = {
        Display = false,
        Size = {x = 2.5, y = 2.5, z = 1.5},
        Distance = 3, -- Distance Open
        Message = "Press ~r~[E]~s~ To Put the Vehicle in the Garage"
    }
}

Config.Impound = {
    Text = {
        Display = false,
        Size = {x = 2.5, y = 2.5, z = 1.5},
        Distance = 3, -- Distance Main
        Message = "Press ~y~[E]~s~ To Open Your Police Impound Menu"
    },
    UseSociety = true, 
    UseHasVehicleInCity = true, --- @param If the vehicle was in town, don't let it take un Impound
    Jobs = {"police", "sheriff"},
    TextUIForVehicleImpound = {
        Display = true,
        Distance = 5,  -- Distance Main
        ShowTextUI = function()
            lib.showTextUI('[E] Impound', {
                position = "left-center",
                icon = 'fas fa-sign-in-alt',
                style = {
                    borderRadius = '0.5vw',
                    backgroundColor = '#ca0000',
                    boxShadow = '0vw 0vw 0.3vw #ca0000',
                    color = 'white'
                }
            })
        end,
        HideTextUI = function()
            lib.hideTextUI()
        end
    },
    MarkerForVehicleImpound = {
        Display = false,
        Color = {r = 255, g = 0, b = 0},
        Size = {x = 3.1, y = 3.1, z = 2.1},
        Type = 27,
        Distance = 2
    },
    TextForVehicleImpound = {
        Display = false,
        Size = {x = 2.5, y = 2.5, z = 1.5},
        Distance = 3,
        Message = "Press ~r~[E]~s~ Placing the vehicles inside impound"
    },
    OpenMenuCommandForJobs = "menuIpmound"
}

if Config.Impound.UseSociety then
    function UseSociety(cost)
        exports['qb-management']:AddMoney("police", cost)
    end
end

Config.Jobs = {
    Ped = {
        ["police"] = {
            job = "police",
            Display = true,
            Model = "s_m_y_cop_01",
            TargetExport = function(PedData, type, model)
                exports['qb-target']:AddTargetEntity(PedData, {
                    options = {
                        {
                            action = function()
                                OpenGarageMenu(model, type)
                            end,
                            icon = 'fas fa-car',
                            job = "police",
                            label = "Open Your Private Garage",
                        },
                    },
                    distance = 2.5,
                })
            end
        },
        ["ambulance"] = {
            job = "ambulance",
            Display = true,
            Model = "s_m_m_paramedic_01",
            TargetExport = function(PedData, type, model)
                exports['qb-target']:AddTargetEntity(PedData, {
                    options = {
                        {
                            action = function()
                                OpenGarageMenu(model, type)
                            end,
                            icon = 'fas fa-car',
                            job = "ambulance",
                            label = "Open Your Private Garage",
                        },
                    },
                    distance = 2.5,
                })
            end
        }
    }
}

Config.Location = {
    UseCarGarages = true,
    UseBoatGarages = true,
    UseAircraftGarages = true,
    UseImpoundGarages = true,
    UseJobGarages = true,
    Car = {
        {
            GarageMarker = {
                Ped = vector4(215.0133, -809.673, 30.748, 253.49),
                Coords = vector4(214.707703, -806.479126, 30.796387 - 0.9, 155.905502)
            },
            GarageSpawn = vector4(229.700, -800.1149, 29.5722, 161.84),
            GarageDisplay = {
                Coords = vector4(236.39, -779.89, 30.67, 161.68),
                CameraRot = vector3(0.0, 0.0, -20.0),
                CameraCoords = vector3(234.57, -785.1, 30.59)
            },
            DeleteMarker = {
                Coords = vector3(223.797, -760.415, 29.825)
            },
            GarageSpace = 10,
            NumberPoint = 1
        },
        {
            GarageMarker = {
                Ped = vector4(-279.635, -888.502, 31.080, 259.0),
                Coords = vector4(-280.9, -887.92, 30.35, 155.905502)
            },
            GarageSpawn = vector4(-289.31, -886.88, 30.73, 167.32),
            GarageDisplay = {
                Coords = vector4(-285.59, -895.99, 30.73, 154.84),
                CameraRot = vector3(0.0, 0.0, -22),
                CameraCoords = vector3(-287.5, -900.25, 31.1)
            },
            DeleteMarker = {
                Coords = vector4(-277.95, -900.52, 30.1, 161.68),
            },
            GarageSpace = 9,
            NumberPoint = 2
        },
        {
            GarageMarker = {
                Ped = vector4(1735.950, 3709.526, 34.117, 351.19),
                Coords = vector4(1737.59, 3710.2, 33.18, 155.905502)
            },
            GarageSpawn = vector4(1737.84, 3719.28, 33.04, 21.22),
            GarageDisplay = {
                Coords = vector4(1734.269,3728.303, 33.603, 384.64),
                CameraRot = vector3(0.0, 0.0, -159),
                CameraCoords = vector3(1732.98, 3732.5, 33.834)
            },
            DeleteMarker = {
                Coords = vector4(1722.66, 3713.74, 33.30, 162.9),
            },
            GarageSpace = 6,
            NumberPoint = 3
        },
        {
            GarageMarker = {
                Ped = vector4(100.2882, 6607.875, 31.840, 276.31),
                Coords = vector4(101.274734, 6608.083496, 30.86, 147.401581)
            },
            GarageSpawn = vector4(141.08, 6606.7, 31.49, 177.32),
            GarageDisplay = {
                Coords = vector4(155.7261, 6571.440, 31.484, 236.86),
                CameraRot = vector3(0.0, 0.0, 60),
                CameraCoords = vector3(159.7657, 6568.8, 31.813)
            },
            DeleteMarker = {
                Coords = vector4(109.490, 6604.90, 30.892, 136.068),
            },
            GarageSpace = 7,
            NumberPoint = 4
        }, 
        {
            GarageMarker = {
                Ped = vector4(913.6117, -20.1031, 78.764, 167.57),
                Coords = vector4(913.38, -20.83, 77.77, 15.5)
            },
            GarageSpawn = vector4(908.11, -21.06, 78.37, 237.24),
            GarageDisplay = {
                Coords = vector4(929.9324, -8.97021, 78.414, 150.58),
                CameraRot = vector3(0.0, 0.0, -32),
                CameraCoords = vector3(927.2, -12.8, 78.8)
            },
            DeleteMarker = {
                Coords = vector4(917.47, -41.43, 77.78, 161.68),
            },
            GarageSpace = 6,
            NumberPoint = 5
        },
        {
            GarageMarker = {
                Ped = vector4(363.6303, 298.0777, 103.50, 258.82),
                Coords = vector4(362.2, 298.8, 102.89, 15.5)
            },
            GarageSpawn = vector4(357.04, 282.68, 102.08, 249.0),
            GarageDisplay = {
                Coords = vector4(376.33, 288.82, 103.2, 69.26),
                CameraRot = vector3(0.0, 0.0, -110.0),
                CameraCoords = vector3(371.18, 290.66, 103.31)
            },
            DeleteMarker = {
                Coords = vector4(359.84, 271.96, 102.1, 161.68),
            },
            GarageSpace = 5,
            NumberPoint = 6
        }
    },
    Boat = {
        {
            GarageMarker = {
                Ped = vector4(-736.599, -1324.23, 1.5952, 229.55),
                Coords = vector4(-735.87, -1325.08, 1.5 - 0.9, 155.905502)
            },
            GarageSpawn = vector4(-718.05, -1334.24, -0.44, 222.71),
            GarageDisplay = {
                Coords = vector4(-723.7, -1329.22, -0.11, 229.03),
                CameraRot = vector3(0.0, 0.0, 50.0),
                CameraCoords = vector3(-719.57, -1332.72, 1.41)
            },
            DeleteMarker = {
                Coords = vector3(-731.15,  -1334.71, 0.0)
            },
            GarageSpace = 6,
            NumberPoint = 1
        },
        {
            GarageMarker = {
                Ped = vector4(1332.141, 4271.553, 31.503, 213.05),
                Coords = vector4(1333.2, 4269.92, 30.565, 155.905)
            },
            GarageSpawn = vector4(1334.61, 4264.68, 29.86, 87.0),
            GarageDisplay = {
                Coords = vector4(1331.009, 4235.5, 30.010, 262.58),
                CameraRot = vector3(0.0, 0.0, 73),
                CameraCoords = vector3(1337.8, 4233.29, 31.5)
            },
            DeleteMarker = {
                Coords = vector4(1323.73, 4269.94, 30, 162.65),
            },
            GarageSpace = 8,
            NumberPoint = 2
        },
        {
            GarageMarker = {
                Ped = vector4(-284.131, 6631.875, 7.3644, 238.905),
                Coords = vector4(-283.74, 6629.51, 6.35, 155.905)
            },
            GarageSpawn = vector4(-290.46, 6622.72, -0.474, 52.0),
            GarageDisplay = {
                Coords = vector4(-294.795, 6645.748, 0.0, 20.50),
                CameraRot = vector3(0.0, 0.0, -157),
                CameraCoords = vector3(-296.799, 6650.908, 1.163)
            },
            DeleteMarker = {
                Coords = vector4(-304.66, 6607.36, 0.0, 161.68),
            },
            GarageSpace = 5,
            NumberPoint = 3
        }
    },
    Aircraft = {
        {
            GarageMarker = {
                Ped = vector4(-1237.42, -3386.94, 13.940, 74.56),
                Coords = vector4(-1238.19, -3385.89, 12.96, 155.905502)
            },
            GarageSpawn = vector4(-1246.91,-3355.14, 13.95, 330.68),
            GarageDisplay = {
                Coords = vector4(-1273.01, -3402.28, 13.94, 331.01),
                CameraRot = vector3(0.0, 0.0, -210.0),
                CameraCoords = vector3(-1268.42, -3394.32, 14.94)
            },
            DeleteMarker = {
                Coords = vector3(-1258.53, -3377.52, 13)
            },
            GarageSpace = 4,
            NumberPoint = 1
        },
        {
            GarageMarker = {
                Ped = vector4(1726.520, 3293.829, 41.223, 340.76),
                Coords = vector4(1723.84, 3288.29, 40.185, 155.905502)
            },
            GarageSpawn = vector4(1710.85, 3259.06, 40.69, 104.66),
            GarageDisplay = {
                Coords = vector4(1732.739, 3305.399, 41.122, 192.29),
                CameraRot = vector3(0.0, 0.0, 15),
                CameraCoords = vector3(1734.8, 3298.094, 42.162)
            },
            DeleteMarker = {
                Coords = vector4(1714.45, 3246.75, 40.15, 161.68),
            },
            GarageSpace = 7,
            NumberPoint = 2
        },
        {
            GarageMarker = {
                Ped = vector4(2120.650, 4784.766, 40.970, 293.87),
                Coords = vector4(2122.367, 4785.246, 39.970, 155.902)
            },
            GarageSpawn = vector4(2122.72, 4804.85, 40.78, 115.04),
            GarageDisplay = {
                Coords = vector4(2133.256, 4783.893, 40.869, 22.24),
                CameraRot = vector3(0.0, 0.0, -157),
                CameraCoords = vector3(2128.780, 4794.953, 42.0)
            },
            DeleteMarker = {
                Coords = vector4(2122.72, 4804.85, 40.2, 115.04),
            },
            GarageSpace = 3,
            NumberPoint = 3
        }
    },
    Impound = {
        {
            GarageMarker = {
                Ped = vector4(440.9937, -979.219, 30.724, 188.02),
                Coords = vector4(441.085724, -980.096680, 30.578345, 0.000000)
            },
            VehicleImpound = vector4(462.9306, -1019.22, 27.15, 115.04),
            NumberPoint = 1
        },
        {
            GarageMarker = {
                Ped = vector4(1853.096, 3689.045, 34.267, 222.95),
                Coords = vector4(1853.749512, 3688.826416, 34.100610, 28.346457)
            },
            VehicleImpound = vector4(1868.658, 3683.185, 32.74, 115.04),
            NumberPoint = 2
        },
        {
            GarageMarker = {
                Ped = vector4(-448.529, 6012.780, 31.716, 315.98),
                Coords = vector4(-448.261, 6013.243, 31.45, 28.346457)
            },
            VehicleImpound = vector4(-462.294, 6018.726, 30.340, 115.04),
            NumberPoint = 3
        }
    },
    Job = {
        police = {
            {
                GarageMarker = {
                    Ped = vector4(458.6029, -1011.62, 28.248, 145.93),
                    Coords = vector4(457.3764, -1011.65, 27.4, 155.90)
                },
                GarageSpawn = vector4(454.2236, -1015.09, 28.092, 90.37),
                GarageDisplay = {
                    Coords = vector4(442.60, -1018.14, 28.67, 90.87),
                    CameraRot = vector3(0.0, 0.0, -90.0),
                    CameraCoords = vector3(437.3, -1017.85, 28.77)
                },
                DeleteMarker = {
                    Coords = vector4(463.6336, -1015.06, 27.074, 91.72),
                },
                GarageSpace = 8,
                NumberPoint = 1
            },
        },
        ambulance = {
            {
                GarageMarker = {
                    Ped = vector4(298.1585, -600.767, 43.303, 166.22),
                    Coords = vector4(297.8482, -601.409, 42.32, 166.90)
                },
                GarageSpawn = vector4(297.6850, -604.934, 42.964, 70.6),
                GarageDisplay = {
                    Coords = vector4(289.08, -610.98, 43.36, 70.19),
                    CameraRot = vector3(0.0, 0.0, -110),
                    CameraCoords = vector3(284.5, -608.79, 43.26)
                },
                DeleteMarker = {
                    Coords = vector4(291.1885, -589.982, 42.172, 336.63),
                },
                GarageSpace = 4,
                NumberPoint = 1
            },
        }
    }
}

--- @param [QBCore]: All notifications are called from QBCore.Functions.Notify function and QBCore:Notify trigger
Config.Text = {
    [1] = "You have no Vehicles in your Garage",
    [2] = "The desired vehicle was successfully parked.",
    [3] = "This vehicle is not yours!",
    [4] = "You cannot park this vehicle here!",
    [5] = "You must be a driver to park a car in the garage",
    [6] = "You have no Boat in your Garage",
    [7] = "You have no Aircraft in your Garage",
    [8] = "You do not have an impounded vehicle!",
    [9] = "Loading the vehicle",
    [10] = "The target vehicle has a cooldown",
    [11] = "Warning: Please do not edit Devtools:)",
    [12] = "We are looking for your vehicle in the city by the police and the police station. Vehicle license plate number: ",
    [13] = "The desired vehicle is transferred to your garage",
    [14] = "You don't have enough money",
    [15] = "Result cooldown is invalid | Attempt to Cheat Lua Execute",
    [16] = "Result Plate is invalid | Attempt to Cheat Lua Execute",
    [17] = "Please do not Spam!",
    [18] = "Your garage is full Garage Number: ",
    [19] = "Result ImpoundBy is invalid | Attempt to Cheat Lua Execute",
    [20] = "The desired vehicle was successfully Impounded.",
    [21] = "The desired vehicle does not have an owner",
    [22] = "You must be a driver to impound a car in the station",
    [23] = "The desired player does not have an impounded vehicle",
    [24] = "Enter the first argument[ID]",
    [25] = "You are not the police or sheriff",
    [26] = "Your vehicle has been impounded by the ",
    [27] = " Please consult the ",
    [28] = "Specified Player is not online",
    [29] = "Result Remove Impound By Station is invalid | Attempt to Cheat Lua Execute",
    [30] = "The desired vehicle was removed from the system list by the relevant station",
    [31] = "invalid data result Your Vehicle",
    [32] = "Your garage is full",
    [33] = "invalid Garage Space Data",
    [34] = "The Vehicle Spawn Location is Full",
    [35] = "invalid data point Your Vehicle",
    [36] = "invalid data or plate Your Vehicle",
    [37] = "invalid data Damage Your Vehicle",
    [38] = "You must be a Driver to Add A Vehicle",
    [39] = "Data Add Vehicle is invalid | Attempt to Cheat Lua Execute",
    [40] = "The desired vehicle was added to the position",
    [41] = "Loading Dynamics and Properties Vehicle",
    [42] = "invalid data type Your Vehicle",
    [43] = "You cannot add this vehicle to the garage because its class is invalid"
}
PreviousHow to InstallNextFiveStar-Speedometer [FREE]

Last updated 1 year ago

Was this helpful?

🧾
🚘
🥰
⏭️
Page cover image