Implemented check for car license, resolves #101

This commit is contained in:
ElPumpo
2018-12-02 14:24:35 +01:00
parent db50acd322
commit 2d4fa6dd73
8 changed files with 47 additions and 19 deletions
+15 -1
View File
@@ -962,7 +962,21 @@ Citizen.CreateThread(function()
if IsControlJustReleased(0, Keys['E']) then
if CurrentAction == 'shop_menu' then
OpenShopMenu()
if Config.LicenseEnable then
ESX.TriggerServerCallback('esx_license:checkLicense', function(hasDriversLicense)
if hasDriversLicense then
OpenShopMenu()
else
ESX.ShowNotification(_U('license_missing'))
end
end, GetPlayerServerId(PlayerId()), 'drive')
else
OpenShopMenu()
end
elseif CurrentAction == 'reseller_menu' then
OpenResellerMenu()
elseif CurrentAction == 'give_back_vehicle' then