Config Script
FiveStar Script
config.lua
-- ! ███████╗██╗██╗ ██╗███████╗███████╗████████╗ █████╗ ██████╗
-- ! ██╔════╝██║██║ ██║██╔════╝██╔════╝╚══██╔══╝██╔══██╗██╔══██╗
-- ! █████╗ ██║██║ ██║█████╗ ███████╗ ██║ ███████║██████╔╝
-- ! ██╔══╝ ██║╚██╗ ██╔╝██╔══╝ ╚════██║ ██║ ██╔══██║██╔══██╗
-- ! ██║ ██║ ╚████╔╝ ███████╗███████║ ██║ ██║ ██║██║ ██║
-- ! ╚═╝ ╚═╝ ╚═══╝ ╚══════╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝
-- ! Copyright ® 2023 Lorem All rights FiveStar
-- ! 5star.tebex.io | Discord.gg/HdEzqEJBdh
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
--- @param If your are using ESX 1.8.5 or higher put in true
Config.FrameworkConnection = "event" --- @param exports or event
Config.getSharedObject = 'esx:getSharedObject' --- @param Configure your framework here.
function FrameworkExport() --- @param Add the export here, as in the following example.
return exports['es_extended']:getSharedObject() --- @return ESX
end
Config.Debug = true ---@alias By selecting the car, the vehicle information will be displayed in F8
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
}
Config.Cooldown = 2 ---@return cooldown after taking out the vehicle
Config.RandomMaxTunningVehicle = 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.TestDrive = {
["PDM"] = {
MainCoords = vector4(-2216.93, 1153.314, -23.25, 268.41),
Coords = vector4(-2145.13, 1106.132, -25.42, 269.12),
CameraRot = vector3(0, 0, 268.41),
CameraCoords = vector3(-2134.38, 1105.851, -24.80),
TimerForTestVehicle = 1000 * 30, ---@param 30 seconds
ShowTimerUI = function(time)
local time = math.floor(time / 1000)
lib.showTextUI('The vehicle test time will end in ' .. time .. ' seconds', {
position = "top-center",
icon = 'fas fa-hourglass-half',
style = {
borderRadius = '0.5vw',
backgroundColor = '#363636',
boxShadow = '0vw 0vw 0.3vw #303030',
color = 'white'
}
})
end,
HideTimerUI = function()
lib.hideTextUI()
end
},
["GET AWEIGH"] = {
MainCoords = vector4(-829.660, -1405.26, 0.8144, 109.78),
Coords = vector4(-829.660, -1405.26, 0.8144, 109.78),
TimerForTestVehicle = 1000 * 60, ---@param 30 seconds
ShowTimerUI = function(time)
local time = math.floor(time / 1000)
lib.showTextUI('The Boat test time will end in ' .. time .. ' seconds', {
position = "top-center",
icon = 'fas fa-hourglass-half',
style = {
borderRadius = '0.5vw',
backgroundColor = '#363636',
boxShadow = '0vw 0vw 0.3vw #303030',
color = 'white'
}
})
end,
HideTimerUI = function()
lib.hideTextUI()
end
},
["Caipira"] = {
MainCoords = vector4(-974.751, -2995.45, 13.527, 63.0),
Coords = vector4(-974.751, -2995.45, 13.527, 63.0),
TimerForTestVehicle = 1000 * 80, ---@param 30 seconds
ShowTimerUI = function(time)
local time = math.floor(time / 1000)
lib.showTextUI('The Aircraft test time will end in ' .. time .. ' seconds', {
position = "top-center",
icon = 'fas fa-hourglass-half',
style = {
borderRadius = '0.5vw',
backgroundColor = '#363636',
boxShadow = '0vw 0vw 0.3vw #303030',
color = 'white'
}
})
end,
HideTimerUI = function()
lib.hideTextUI()
end
}
}
Config.Display = {
Ped = {
Display = true,
Model = "s_m_m_fiboffice_01",
TargetExport = function(PedData, type, data)
exports['qb-target']:AddTargetEntity(PedData,
{ ---@type For ESX: ox-target does not support change world | Use qb-target for esx to solve this problem or Do not use Config.ChangeRoutingBucket(change world).
options = {{
action = function()
local PlayerPed = PlayerPedId()
local CoordsForBack = GetEntityCoords(PlayerPed)
PlayerCoordsBack = vector4(CoordsForBack.x, CoordsForBack.y, CoordsForBack.z,
GetEntityHeading(PlayerPed))
OpenMenu(type, data)
end,
canInteract = function(entity, distance, data)
TaskPlayAnim(entity, "anim@amb@nightclub@peds@", "rcmme_amanda1_stand_loop_cop", 8.0, -8.0,
-1, 0, 0, false, false, false)
return true
end,
icon = 'fas fa-car',
label = "Open Vehicle Shop"
}},
distance = 1.8
})
-- exports.ox_target:addLocalEntity(PedData, { ---@type For ESX Framework | Be sure to disable Config.ChangeRoutingBucket(change world) before use
-- {
-- onSelect = function()
-- local PlayerPed = PlayerPedId()
-- local CoordsForBack = GetEntityCoords(PlayerPed)
-- PlayerCoordsBack = vector4(CoordsForBack.x, CoordsForBack.y, CoordsForBack.z,
-- GetEntityHeading(PlayerPed))
-- OpenMenu(type, data)
-- end,
-- icon = 'fas fa-car',
-- label = "Open Vehicle Shop"
-- },
-- })
end,
Emote = function(PedData, Company)
if Company == "PDM" then ---@alias You can apply emotes on ped
Citizen.CreateThread(function()
while true do
local dict = "anim@heists@prison_heiststation@cop_reactions"
RequestAnimDict(dict)
while not HasAnimDictLoaded(dict) do
Citizen.Wait(0)
end
TaskPlayAnim(PedData, dict, "cop_b_idle", 8.0, -8.0, -1, 0, 0, false, false, false)
Citizen.Wait(6000)
end
end)
elseif Company == "GET AWEIGH" then ---@alias You can apply emotes on ped
elseif Company == "Caipira" then ---@alias You can apply emotes on ped
end
end
},
Marker = {
Display = false,
Color = {
r = 255,
g = 255,
b = 0
},
Size = {
x = 1.0,
y = 1.0,
z = 0.8
},
Type = 27,
Distance = 2
},
Text = {
Display = false,
Size = {
x = 1.5,
y = 1.5,
z = 1.0
},
Distance = 1.2,
Message = "Press ~y~[E]~s~ To Open Vehicle Shop Menu"
}
}
Config.Location = {
["PDM"] = {
LoadUIData = {
Text = function(name)
return name .. ", Welcome to Premium Deluxe Motorsport"
end
},
Blip = {
Display = true,
Color = 38,
Size = 0.6,
Type = 523,
Message = "Premium deluxe motorsport"
},
ShopMarker = {
Ped = vector4(-55.5716, -1097.97, 26.55, 370.37),
Coords = vector4(-56.2453, -1096.46, 25.500, 203.16)
},
ShopSpawn = {vector4(22.07732, -1071.38, 37.802, 249.7), vector4(31.44773, -1059.70, 37.803, 250.13),
vector4(-4.26332, -1043.47, 37.802, 70.29), vector4(-11.4178, -1062.55, 37.802, 69.25),
vector4(5.155922, -1062.28, 37.727, 69.64), vector4(28.27450, -1070.44, 37.728, 70.32),
vector4(49.00745, -1053.91, 37.728, 69.45), vector4(-66.0244, -1161.53, 25.510, 1.51),
vector4(-62.8223, -1161.30, 25.559, 358.4), vector4(-59.9101, -1161.63, 25.617, 359.17),
vector4(-71.2446, -1169.84, 25.605, 275.69), vector4(-60.8476, -1167.66, 25.619, 281.99),
vector4(-48.5506, -1168.20, 25.649, 276.63), vector4(-40.0044, -1162.19, 25.658, 357.01),
vector4(-34.4324, -1160.41, 25.661, 273.85), vector4(-19.0070, -1159.46, 25.718, 277.33),
vector4(-13.8433, -1161.23, 25.773, 262.53)},
ShopDisplay = {
MainCoords = vector4(-1357.85, 168.5449, -98.78, 179.71),
Coords = vector4(-1346.14, 155.6806, -99.19, 235.263),
CameraRot = vector3(math.random(-5, 0), math.random(0, 5), 239.85),
CameraCoords = vector3(-1346.14, 155.6806, -99.19),
VehicleShowCoords = vector4(-1340.23, 152.2792, -99.54, 31.44)
}
},
["Caipira"] = {
LoadUIData = {
Text = function(name)
return name .. ", Welcome to Caipira"
end
},
Blip = {
Display = true,
Color = 38,
Size = 0.6,
Type = 572,
Message = "Caipira"
},
ShopMarker = {
Ped = vector4(-1616.82, -3146.69, 13.991, 83.65),
Coords = vector4(-1616.82, -3146.69, 12.991, 83.65)
},
ShopDisplay = {
MainCoords = vector4(-1540.13, -3077.89, 24.868, 100.7),
Coords = vector4(-1647.73, -3135.02, 16.444, 148.86),
CameraRot = vector3(-10.0, 0.0, -210),
CameraCoords = vector3(-1647.73, -3135.02, 16.444),
VehicleShowCoords = vector4(-1654.09, -3146.68, 13.891, 295.39)
}
},
["GET AWEIGH"] = {
LoadUIData = {
Text = function(name)
return name .. ", Welcome to Get Aweigh"
end
},
Blip = {
Display = true,
Color = 38,
Size = 0.6,
Type = 410,
Message = "Get Aweigh"
},
ShopMarker = {
Ped = vector4(396.7857, -1170.75, 29.37, 353.54),
Coords = vector4(396.7332, -1170.87, 28.42, 353.54)
},
ShopDisplay = {
MainCoords = vector4(-1011.44, -1384.86, 5.1868, 281.98),
Coords = vector4(-885.850, -1329.77, 2.9903, 204.04),
CameraRot = vector3(-15.0, 0.0, -161.5),
CameraCoords = vector3(-885.850, -1329.77, 2.5),
VehicleShowCoords = vector4(-883.004, -1339.70, 0.23, 339.89)
}
}
}
Config.Customize = {
DeleteVehicleInMenu = {
[-2122757008] = "Delete" ---@alias example
},
Price = {
Tax = 9,
Category = {
["Compact"] = 4000,
["Sedan"] = 68800,
["SUV"] = 3900,
["Coupe"] = 5880,
["Muscle"] = 95000,
["Sport Classic"] = 55000,
["Sport"] = 85000,
["Super"] = 65000,
["Motorcycle"] = 81000,
["Off-Road"] = 32000,
["Van"] = 56000,
["Cycle"] = 24000,
["Boat"] = 45000,
["Helicopter"] = 65000,
["Plane"] = 85000
},
CustomPrice = {
[14132132165] = 5000 ---@alias example
},
Discount = {
Category = {
["Compact"] = 50,
["Sedan"] = 10,
["SUV"] = 10,
["Coupe"] = 60,
["Muscle"] = 0,
["Sport Classic"] = 25,
["Sport"] = 30,
["Super"] = 50,
["Motorcycle"] = 10,
["Off-Road"] = 10,
["Van"] = 32,
["Cycle"] = 10,
["Boat"] = 9,
["Helicopter"] = 8,
["Plane"] = 2
},
CustomPrice = {
[14132132165] = 2 ---@alias example
}
}
},
HideInGarage = {
["PDM"] = {
List = {
[349315417] = "Hide" ---@alias example
},
DisplayError = function()
lib.showTextUI('The desired vehicle is not in the garage', {
position = "top-center",
icon = 'fa-solid fa-triangle-exclamation',
style = {
borderRadius = '0.5vw',
backgroundColor = 'rgba(0, 0, 0, 0.5)',
color = 'white'
}
})
Citizen.Wait(1500)
lib.hideTextUI()
end
},
["GET AWEIGH"] = {
List = {
[349315417] = "Hide" ---@alias example
},
DisplayError = function()
lib.showTextUI('The desired boat is not in the garage', {
position = "top-center",
icon = 'fa-solid fa-triangle-exclamation',
style = {
borderRadius = '0.5vw',
backgroundColor = 'rgba(0, 0, 0, 0.5)',
color = 'white'
}
})
Citizen.Wait(1500)
lib.hideTextUI()
end
},
["Caipira"] = {
List = {
[349315417] = "Hide" ---@alias example
},
DisplayError = function()
lib.showTextUI('The desired vehicle is not available', {
position = "top-center",
icon = 'fa-solid fa-triangle-exclamation',
style = {
borderRadius = '0.5vw',
backgroundColor = 'rgba(0, 0, 0, 0.5)',
color = 'white'
}
})
Citizen.Wait(1500)
lib.hideTextUI()
end
}
},
DamageTestVehicle = {
CategoryPenalty = {
["Compact"] = {
Price = 15000,
Cooldown = 36 ---@alias Set the cooldown below 60 minutes
},
["Sedan"] = {
Price = 1000,
Cooldown = 16 ---@alias Set the cooldown below 60 minutes
},
["SUV"] = {
Price = 2000,
Cooldown = 25 ---@alias Set the cooldown below 60 minutes
},
["Coupe"] = {
Price = 8000,
Cooldown = 44 ---@alias Set the cooldown below 60 minutes
},
["Muscle"] = {
Price = 4000,
Cooldown = 55 ---@alias Set the cooldown below 60 minutes
},
["Sport Classic"] = {
Price = 12000,
Cooldown = 47 ---@alias Set the cooldown below 60 minutes
},
["Sport"] = {
Price = 21000,
Cooldown = 38 ---@alias Set the cooldown below 60 minutes
},
["Super"] = {
Price = 5000,
Cooldown = 21 ---@alias Set the cooldown below 60 minutes
},
["Motorcycle"] = {
Price = 4500,
Cooldown = 15 ---@alias Set the cooldown below 60 minutes
},
["Off-Road"] = {
Price = 6800,
Cooldown = 45 ---@alias Set the cooldown below 60 minutes
},
["Van"] = {
Price = 25000,
Cooldown = 35 ---@alias Set the cooldown below 60 minutes
},
["Cycle"] = {
Price = 4000,
Cooldown = 24 ---@alias Set the cooldown below 60 minutes
},
["Boat"] = {
Price = 6000,
Cooldown = 14 ---@alias Set the cooldown below 60 minutes
},
["Helicopter"] = {
Price = 4000,
Cooldown = 60 ---@alias Set the cooldown below 60 minutes
},
["Plane"] = {
Price = 2000,
Cooldown = 15 ---@alias Set the cooldown below 60 minutes
}
},
CustomPenalty = {
[14132132165] = {
Price = 15000,
Cooldown = 50 ---@alias Set the cooldown below 60 minutes
}
},
["PDM"] = {
Coords = vector4(-55.4068, -1080.59, 26.914, 23.26) ---@alias Throwing out the person who caused the damage to the Vehicle
},
["GET AWEIGH"] = {
Coords = vector4(409.8665, -1144.73, 29.384, 36.73) ---@alias Throwing out the person who caused the damage to the Boat
},
["Caipira"] = {
Coords = vector4(-927.091, -2742.88, 13.784, 76.4) ---@alias Throwing out the person who caused the damage to the Aircraft
}
}
}
--- @param [ESX]: All notifications are called from ESX.ShowNotification function and esx:showNotification trigger
Config.Text = {
[1] = "Loading the vehicle",
[2] = "Custom plate | Attempt to Cheat Lua Execute",
[3] = "You don't have enough money to buy a vehicle",
[4] = "Buying a Vehicle plate: ",
[5] = "You don't have enough money to pay for the vehicle damage | Company: ",
[6] = "You have successfully paid the vehicle damage | Cost of damage: $",
[7] = "You can't buy vehicles from ",
[8] = " because you damaged the store",
[9] = "You have successfully purchased a vehicle",
[10] = "Your vehicle has been successfully delivered",
[11] = "All vehicle spawn locations are full",
[12] = "You have successfully purchased a boat, go to garage 1"
}
Last updated
Was this helpful?