Events
ESX = exports.es_extended:getSharedObject()
-- Function Air Suspension
function AirSuspensionMenu()
lib.registerContext({
id = 'AirSuspension',
title = 'Air Suspension',
options = {
{ title = '๐ธStock', description = 'Click here to adjust the suspension', event = Config.Prefix..":client:AirSuspension", args = 1 },
{ title = '๐นLevel 1', description = 'Click here to adjust the suspension', event = Config.Prefix..":client:AirSuspension", args = 2 },
{ title = '๐นLevel 2', description = 'Click here to adjust the suspension', event = Config.Prefix..":client:AirSuspension", args = 3 },
{ title = '๐นLevel 3', description = 'Click here to adjust the suspension', event = Config.Prefix..":client:AirSuspension", args = 4 },
{ title = '๐นLevel 4', description = 'Click here to adjust the suspension', event = Config.Prefix..":client:AirSuspension", args = 5 },
}
})
lib.showContext('AirSuspension')
end
-- Function Coilovers
function coiloverMenu()
lib.registerContext({
id = 'CoiloverMenu',
title = 'Coilover Menu',
options = {
{ title = '๐ธStock', description = 'Click here to adjust the vehicle\'s coilovers', event = Config.Prefix..":client:applyCoilovers", args = 1 },
{ title = '๐นStage 1', description = 'Click here to adjust the vehicle\'s coilovers', event = Config.Prefix..":client:applyCoilovers", args = 2 },
{ title = '๐นStage 2', description = 'Click here to adjust the vehicle\'s coilovers', event = Config.Prefix..":client:applyCoilovers", args = 3 },
{ title = '๐นStage 3', description = 'Click here to adjust the vehicle\'s coilovers', event = Config.Prefix..":client:applyCoilovers", args = 4 },
{ title = '๐นStage 4', description = 'Click here to adjust the vehicle\'s coilovers', event = Config.Prefix..":client:applyCoilovers", args = 5 },
}
})
lib.showContext('CoiloverMenu')
end
-- Function Xenons
function xenonControllerMenu()
lib.registerContext({
id = 'XenonLights',
title = 'Xenon Lights',
options = {
{ title = '๐ธStock', description = 'Click here to adjust the xenon\'s headlights', event = Config.Prefix..":client:applyXenonColor", args = 1 },
{ title = '๐นIce Blue', description = 'Click here to adjust the xenon\'s headlights', event = Config.Prefix..":client:applyXenonColor", args = 2 },
{ title = '๐นBlue', description = 'Click here to adjust the xenon\'s headlights', event = Config.Prefix..":client:applyXenonColor", args = 3 },
{ title = '๐นElectric Blue', description = 'Click here to adjust the xenon\'s headlights', event = Config.Prefix..":client:applyXenonColor", args = 4 },
{ title = '๐นGreen', description = 'Click here to adjust the xenon\'s headlights', event = Config.Prefix..":client:applyXenonColor", args = 5 },
{ title = '๐นGreen Lemon', description = 'Click here to adjust the xenon\'s headlights', event = Config.Prefix..":client:applyXenonColor", args = 6 },
{ title = '๐นYellow', description = 'Click here to adjust the xenon\'s headlights', event = Config.Prefix..":client:applyXenonColor", args = 7 },
{ title = '๐นGold', description = 'Click here to adjust the xenon\'s headlights', event = Config.Prefix..":client:applyXenonColor", args = 8 },
{ title = '๐นOrange', description = 'Click here to adjust the xenon\'s headlights', event = Config.Prefix..":client:applyXenonColor", args = 9 },
{ title = '๐นRed', description = 'Click here to adjust the xenon\'s headlights', event = Config.Prefix..":client:applyXenonColor", args = 10 },
{ title = '๐นPink', description = 'Click here to adjust the xenon\'s headlights', event = Config.Prefix..":client:applyXenonColor", args = 11 },
{ title = '๐นHot Pink', description = 'Click here to adjust the xenon\'s headlights', event = Config.Prefix..":client:applyXenonColor", args = 12 },
{ title = '๐นPurple', description = 'Click here to adjust the xenon\'s headlights', event = Config.Prefix..":client:applyXenonColor", args = 13 },
{ title = '๐นBlack', description = 'Click here to adjust the xenon\'s headlights', event = Config.Prefix..":client:applyXenonColor", args = 14 },
}
})
lib.showContext('XenonLights')
end
-- Open menu of cameras
RegisterNetEvent(Config.Prefix..":client:MenuCameras", function()
lib.registerContext({
id = 'Cameras',
title = '๐ฅ Cรขmeras',
options = {
{ title = '๐นID: #1', description = 'Click here to access the camera', event = Config.Prefix..":client:AtivarCamera1" },
{ title = '๐นID: #2', description = 'Click here to access the camera', event = Config.Prefix..":client:AtivarCamera2" },
{ title = '๐นID: #3', description = 'Click here to access the camera', event = Config.Prefix..":client:AtivarCamera3" },
{ title = '๐นID: #4', description = 'Click here to access the camera', event = Config.Prefix..":client:AtivarCamera4" },
}
})
lib.showContext('Cameras')
end)
-- Neons
RegisterNetEvent(Config.Prefix..':client:neonMenu', function()
lib.registerContext({
id = 'neonMenu',
title = '[๐จ] Neon Underglow',
options = {
{ title = '[โ
] Active Neon', description = 'Click here to adjust the neon\'s headlights', event = Config.Prefix..":client:neonToggleMenu" },
{ title = '[โป๏ธ] Change Colour', description = 'Click here to adjust the neon\'s headlights', event = Config.Prefix..":client:neonColorMenu" },
}
})
lib.showContext('neonMenu')
end)
RegisterNetEvent(Config.Prefix..':client:neonToggleMenu', function()
lib.registerContext({
id = 'neonToggleMenu',
title = '[๐จ] Neon Underglow',
options = {
{ title = '[โ
] Turn ON', description = 'Click here to turn on your neon\'s', event = Config.Prefix..":client:applyNeonPostion", args = 1 },
{ title = '[โ] Turn OFF', description = 'Click here to turn off your neon\'s', event = Config.Prefix..":client:applyNeonPostion", args = 2 },
}
})
lib.showContext('neonToggleMenu')
end)
RegisterNetEvent(Config.Prefix..":client:neonColorMenu", function()
lib.registerContext({
id = 'NeonUnderglow',
title = '[๐จ] Neon Underglow',
options = {
{ title = '๐นWhite', description = 'Click here to adjust the neon\'s headlights', event = Config.Prefix..":client:applyNeonColor", args = 1 },
{ title = '๐นBlue', description = 'Click here to adjust the neon\'s headlights', event = Config.Prefix..":client:applyNeonColor", args = 2 },
{ title = '๐นElectric Blue', description = 'Click here to adjust the neon\'s headlights', event = Config.Prefix..":client:applyNeonColor", args = 3 },
{ title = '๐นGreen', description = 'Click here to adjust the neon\'s headlights', event = Config.Prefix..":client:applyNeonColor", args = 4 },
{ title = '๐นGreen Lemon', description = 'Click here to adjust the neon\'s headlights', event = Config.Prefix..":client:applyNeonColor", args = 5 },
{ title = '๐นYellow', description = 'Click here to adjust the neon\'s headlights', event = Config.Prefix..":client:applyNeonColor", args = 6 },
{ title = '๐นGold', description = 'Click here to adjust the neon\'s headlights', event = Config.Prefix..":client:applyNeonColor", args = 7 },
{ title = '๐นOrange', description = 'Click here to adjust the neon\'s headlights', event = Config.Prefix..":client:applyNeonColor", args = 8 },
{ title = '๐นRed', description = 'Click here to adjust the neon\'s headlights', event = Config.Prefix..":client:applyNeonColor", args = 9 },
{ title = '๐นPink', description = 'Click here to adjust the neon\'s headlights', event = Config.Prefix..":client:applyNeonColor", args = 10 },
{ title = '๐นLight Pink', description = 'Click here to adjust the neon\'s headlights', event = Config.Prefix..":client:applyNeonColor", args = 11 },
{ title = '๐นHot Pink', description = 'Click here to adjust the neon\'s headlights', event = Config.Prefix..":client:applyNeonColor", args = 12 },
{ title = '๐นBlack', description = 'Click here to adjust the neon\'s headlights', event = Config.Prefix..":client:applyNeonColor", args = 13 },
}
})
lib.showContext('NeonUnderglow')
end)
-- Menu Vehicles List
RegisterNetEvent(Config.Prefix..":Client:VehiclesMenu", function()
lib.registerContext({
id = 'MechanicVehicles',
title = '๐ Mechanic Vehicles',
options = {
{ title = '๐ Vehicle List', description = '', event = Config.Prefix..":client:ListaVeiculos" },
{ title = '๐ฅ Return Vehicle', description = '', event = Config.Prefix..":Client:ReturnVehicle" },
}
})
lib.showContext('MechanicVehicles')
end)
-- Function DrawText
function DrawText3Ds(x, y, z, text)
SetTextScale(0.35, 0.35)
SetTextFont(4)
SetTextProportional(1)
SetTextColour(255, 255, 255, 215)
SetTextEntry("STRING")
SetTextCentre(true)
AddTextComponentString(text)
SetDrawOrigin(x,y,z, 0)
DrawText(0.0, 0.0)
local factor = (string.len(text)) / 370
DrawRect(0.0, 0.0+0.0125, 0.017+ factor, 0.03, 0, 0, 0, 75)
ClearDrawOrigin()
end
Last updated