context implementation

This commit is contained in:
Taavi
2022-11-06 16:28:38 +08:00
committed by GitHub
parent f92c3e1f7d
commit 540d36da36
@@ -137,6 +137,7 @@ function OpenDMVSchoolMenu()
if element.value == "theory_test" then
ESX.TriggerServerCallback('esx_dmvschool:canYouPay', function(haveMoney)
if haveMoney then
ESX.CloseContext()
StartTheoryTest()
else
ESX.ShowNotification(TranslateCap('not_enough_money'))
@@ -145,6 +146,7 @@ function OpenDMVSchoolMenu()
elseif element.value == "drive_test" then
ESX.TriggerServerCallback('esx_dmvschool:canYouPay', function(haveMoney)
if haveMoney then
ESX.CloseContext()
StartDriveTest(element.type)
else
ESX.ShowNotification(TranslateCap('not_enough_money'))