mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-30 04:01:32 +00:00
Update weed.lua
Fix error when making transformation cannabis into marijuana if Config.LicenseEnable is enable (true). Error in client consol xCannabis is null and when exiting the zone transformation still running.
This commit is contained in:
@@ -26,20 +26,19 @@ CreateThread(function()
|
||||
end
|
||||
|
||||
if IsControlJustReleased(0, 38) and not isProcessing then
|
||||
if Config.LicenseEnable then
|
||||
ESX.TriggerServerCallback('esx_license:checkLicense', function(hasProcessingLicense)
|
||||
if hasProcessingLicense then
|
||||
ProcessWeed()
|
||||
else
|
||||
OpenBuyLicenseMenu('weed_processing')
|
||||
end
|
||||
end, GetPlayerServerId(PlayerId()), 'weed_processing')
|
||||
else
|
||||
ESX.TriggerServerCallback('esx_drugs:cannabis_count', function(xCannabis)
|
||||
ESX.TriggerServerCallback('esx_drugs:cannabis_count', function(xCannabis)
|
||||
if Config.LicenseEnable then
|
||||
ESX.TriggerServerCallback('esx_license:checkLicense', function(hasProcessingLicense)
|
||||
if hasProcessingLicense then
|
||||
ProcessWeed(xCannabis)
|
||||
else
|
||||
OpenBuyLicenseMenu('weed_processing')
|
||||
end
|
||||
end, GetPlayerServerId(PlayerId()), 'weed_processing')
|
||||
else
|
||||
ProcessWeed(xCannabis)
|
||||
end)
|
||||
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
Wait(wait)
|
||||
|
||||
Reference in New Issue
Block a user