Skip to content

Commit

Permalink
fix: fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
bitpredator committed Nov 19, 2023
1 parent 3e46081 commit 8b4d8b4
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 24 deletions.
3 changes: 2 additions & 1 deletion .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,5 @@
29. [bpt_deliveries]: chore: clean up the code @bitpredator
30. [esx-radialmenu]: chore: fix lint error + clean up the code @bitpredator
31. [esx-qalle-jail]: fix: fix lint error @bitpredator
32. [esx_multicaracter]: fix: fix lint error @bitpredator
32. [esx_multicaracter]: fix: fix lint error @bitpredator
33. [esx_dmvschool]: fix: fix lint error @bitpredator
14 changes: 7 additions & 7 deletions server-data/resources/[esx_addons]/esx_dmvschool/client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function OpenDMVSchoolMenu()
end
end

ESX.OpenContext("right", elements, function(menu,element)
ESX.OpenContext("right", elements, function(_, element)
if element.value == "theory_test" then
ESX.TriggerServerCallback('esx_dmvschool:canYouPay', function(haveMoney)
if haveMoney then
Expand All @@ -151,26 +151,26 @@ function OpenDMVSchoolMenu()
end
end, element.type)
end
end, function(menu)
end, function()
CurrentAction = 'dmvschool_menu'
CurrentActionMsg = _U('press_open_menu')
CurrentActionData = {}
end)
end

RegisterNUICallback('question', function(data, cb)
RegisterNUICallback('question', function(_, cb)
SendNUIMessage({
openSection = 'question'
})
cb()
end)

RegisterNUICallback('close', function(data, cb)
RegisterNUICallback('close', function(_, cb)
StopTheoryTest(true)
cb()
end)

RegisterNUICallback('kick', function(data, cb)
RegisterNUICallback('kick', function(_, cb)
StopTheoryTest(false)
cb()
end)
Expand All @@ -183,7 +183,7 @@ AddEventHandler('esx_dmvschool:hasEnteredMarker', function(zone)
end
end)

AddEventHandler('esx_dmvschool:hasExitedMarker', function(zone)
AddEventHandler('esx_dmvschool:hasExitedMarker', function()
CurrentAction = nil
ESX.CloseContext()
end)
Expand Down Expand Up @@ -214,7 +214,7 @@ CreateThread(function()
local playerPed = PlayerPedId()
local coords = GetEntityCoords(playerPed)

for k,v in pairs(Config.Zones) do
for _, v in pairs(Config.Zones) do
local Pos = vector3(v.Pos.x, v.Pos.y, v.Pos.z)
if(v.Type ~= -1 and #(coords - Pos) < Config.DrawDistance) then
sleep = 0
Expand Down
32 changes: 16 additions & 16 deletions server-data/resources/[esx_addons]/esx_dmvschool/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,21 @@ Config.CheckPoints = {

{
Pos = {x = 255.139, y = -1400.731, z = 29.537},
Action = function(playerPed, vehicle, setCurrentZoneType)
Action = function()
DrawMissionText(_U('next_point_speed', Config.SpeedLimits['residence']), 5000)
end
},

{
Pos = {x = 271.874, y = -1370.574, z = 30.932},
Action = function(playerPed, vehicle, setCurrentZoneType)
Action = function()
DrawMissionText(_U('go_next_point'), 5000)
end
},

{
Pos = {x = 234.907, y = -1345.385, z = 29.542},
Action = function(playerPed, vehicle, setCurrentZoneType)
Action = function(_, vehicle)
CreateThread(function()
DrawMissionText(_U('stop_for_ped'), 5000)
PlaySound(-1, 'RACE_PLACED', 'HUD_AWARDS', false, 0, true)
Expand All @@ -74,7 +74,7 @@ Config.CheckPoints = {

{
Pos = {x = 217.821, y = -1410.520, z = 28.292},
Action = function(playerPed, vehicle, setCurrentZoneType)
Action = function(_, vehicle, setCurrentZoneType)
setCurrentZoneType('town')

CreateThread(function()
Expand All @@ -91,21 +91,21 @@ Config.CheckPoints = {

{
Pos = {x = 178.550, y = -1401.755, z = 27.725},
Action = function(playerPed, vehicle, setCurrentZoneType)
Action = function()
DrawMissionText(_U('watch_traffic_lightson'), 5000)
end
},

{
Pos = {x = 113.160, y = -1365.276, z = 27.725},
Action = function(playerPed, vehicle, setCurrentZoneType)
Action = function()
DrawMissionText(_U('go_next_point'), 5000)
end
},

{
Pos = {x = -73.542, y = -1364.335, z = 27.789},
Action = function(playerPed, vehicle, setCurrentZoneType)
Action = function(_, vehicle)
DrawMissionText(_U('stop_for_passing'), 5000)
PlaySound(-1, 'RACE_PLACED', 'HUD_AWARDS', false, 0, true)
FreezeEntityPosition(vehicle, true)
Expand All @@ -116,21 +116,21 @@ Config.CheckPoints = {

{
Pos = {x = -355.143, y = -1420.282, z = 27.868},
Action = function(playerPed, vehicle, setCurrentZoneType)
Action = function()
DrawMissionText(_U('go_next_point'), 5000)
end
},

{
Pos = {x = -439.148, y = -1417.100, z = 27.704},
Action = function(playerPed, vehicle, setCurrentZoneType)
Action = function()
DrawMissionText(_U('go_next_point'), 5000)
end
},

{
Pos = {x = -453.790, y = -1444.726, z = 27.665},
Action = function(playerPed, vehicle, setCurrentZoneType)
Action = function(_, _, setCurrentZoneType)
setCurrentZoneType('freeway')

DrawMissionText(_U('hway_time', Config.SpeedLimits['freeway']), 5000)
Expand All @@ -140,44 +140,44 @@ Config.CheckPoints = {

{
Pos = {x = -463.237, y = -1592.178, z = 37.519},
Action = function(playerPed, vehicle, setCurrentZoneType)
Action = function()
DrawMissionText(_U('go_next_point'), 5000)
end
},

{
Pos = {x = -900.647, y = -1986.28, z = 26.109},
Action = function(playerPed, vehicle, setCurrentZoneType)
Action = function()
DrawMissionText(_U('go_next_point'), 5000)
end
},

{
Pos = {x = 1225.759, y = -1948.792, z = 38.718},
Action = function(playerPed, vehicle, setCurrentZoneType)
Action = function()
DrawMissionText(_U('go_next_point'), 5000)
end
},

{
Pos = {x = 1225.759, y = -1948.792, z = 38.718},
Action = function(playerPed, vehicle, setCurrentZoneType)
Action = function(_, _, setCurrentZoneType)
setCurrentZoneType('town')
DrawMissionText(_U('in_town_speed', Config.SpeedLimits['town']), 5000)
end
},

{
Pos = {x = 1163.603, y = -1841.771, z = 35.679},
Action = function(playerPed, vehicle, setCurrentZoneType)
Action = function()
DrawMissionText(_U('gratz_stay_alert'), 5000)
PlaySound(-1, 'RACE_PLACED', 'HUD_AWARDS', false, 0, true)
end
},

{
Pos = {x = 235.283, y = -1398.329, z = 28.921},
Action = function(playerPed, vehicle, setCurrentZoneType)
Action = function(_, vehicle)
ESX.Game.DeleteVehicle(vehicle)
end
}
Expand Down

0 comments on commit 8b4d8b4

Please sign in to comment.