mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 15:01:40 +00:00
Implemented check for car license, resolves #101
This commit is contained in:
+15
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user