mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-30 17:58:54 +00:00
Multi-language support
This commit is contained in:
+18
-4
@@ -1,7 +1,21 @@
|
||||
description 'esx_drugs'
|
||||
|
||||
server_script 'server/esx_drugs_sv.lua'
|
||||
server_script 'config.lua'
|
||||
server_scripts {
|
||||
|
||||
client_script 'config.lua'
|
||||
client_script 'client/esx_drugs_cl.lua'
|
||||
'@es_extended/locale.lua',
|
||||
'locales/en.lua',
|
||||
'locales/fr.lua',
|
||||
'server/esx_drugs_sv.lua',
|
||||
'config.lua'
|
||||
|
||||
}
|
||||
|
||||
client_scripts {
|
||||
|
||||
'@es_extended/locale.lua',
|
||||
'locales/en.lua',
|
||||
'locales/fr.lua',
|
||||
'config.lua',
|
||||
'client/esx_drugs_cl.lua'
|
||||
|
||||
}
|
||||
@@ -43,7 +43,7 @@ AddEventHandler('esx_drugs:hasEnteredMarker', function(zone)
|
||||
if zone == 'CokeFarm' then
|
||||
if myJob ~= "police" then
|
||||
CurrentAction = 'coke_harvest'
|
||||
CurrentActionMsg = 'Appuez sur ~INPUT_CONTEXT~ pour récolter la coke'
|
||||
CurrentActionMsg = _U('press_collect_coke')
|
||||
CurrentActionData = {}
|
||||
end
|
||||
end
|
||||
@@ -52,7 +52,7 @@ AddEventHandler('esx_drugs:hasEnteredMarker', function(zone)
|
||||
if myJob ~= "police" then
|
||||
if cokeQTE >= 5 then
|
||||
CurrentAction = 'coke_treatment'
|
||||
CurrentActionMsg = 'Appuez sur ~INPUT_CONTEXT~ pour traiter la coke'
|
||||
CurrentActionMsg = _U('press_process_coke')
|
||||
CurrentActionData = {}
|
||||
end
|
||||
end
|
||||
@@ -62,7 +62,7 @@ AddEventHandler('esx_drugs:hasEnteredMarker', function(zone)
|
||||
if myJob ~= "police" then
|
||||
if coke_poochQTE >= 1 then
|
||||
CurrentAction = 'coke_resell'
|
||||
CurrentActionMsg = 'Appuez sur ~INPUT_CONTEXT~ pour vendre la coke'
|
||||
CurrentActionMsg = _U('press_sell_coke')
|
||||
CurrentActionData = {}
|
||||
end
|
||||
end
|
||||
@@ -71,7 +71,7 @@ AddEventHandler('esx_drugs:hasEnteredMarker', function(zone)
|
||||
if zone == 'MethFarm' then
|
||||
if myJob ~= "police" then
|
||||
CurrentAction = 'meth_harvest'
|
||||
CurrentActionMsg = 'Appuez sur ~INPUT_CONTEXT~ pour récolter la meth'
|
||||
CurrentActionMsg = _U('press_collect_meth')
|
||||
CurrentActionData = {}
|
||||
end
|
||||
end
|
||||
@@ -80,7 +80,7 @@ AddEventHandler('esx_drugs:hasEnteredMarker', function(zone)
|
||||
if myJob ~= "police" then
|
||||
if methQTE >= 5 then
|
||||
CurrentAction = 'meth_treatment'
|
||||
CurrentActionMsg = 'Appuez sur ~INPUT_CONTEXT~ pour traiter la meth'
|
||||
CurrentActionMsg = _U('press_process_meth')
|
||||
CurrentActionData = {}
|
||||
end
|
||||
end
|
||||
@@ -90,7 +90,7 @@ AddEventHandler('esx_drugs:hasEnteredMarker', function(zone)
|
||||
if myJob ~= "police" then
|
||||
if meth_poochQTE >= 1 then
|
||||
CurrentAction = 'meth_resell'
|
||||
CurrentActionMsg = 'Appuez sur ~INPUT_CONTEXT~ pour vendre la meth'
|
||||
CurrentActionMsg = _U('press_sell_meth')
|
||||
CurrentActionData = {}
|
||||
end
|
||||
end
|
||||
@@ -99,7 +99,7 @@ AddEventHandler('esx_drugs:hasEnteredMarker', function(zone)
|
||||
if zone == 'WeedFarm' then
|
||||
if myJob ~= "police" then
|
||||
CurrentAction = 'weed_harvest'
|
||||
CurrentActionMsg = 'Appuez sur ~INPUT_CONTEXT~ pour récolter la weed'
|
||||
CurrentActionMsg = _U('press_collect_weed')
|
||||
CurrentActionData = {}
|
||||
end
|
||||
end
|
||||
@@ -108,7 +108,7 @@ AddEventHandler('esx_drugs:hasEnteredMarker', function(zone)
|
||||
if myJob ~= "police" then
|
||||
if weedQTE >= 5 then
|
||||
CurrentAction = 'weed_treatment'
|
||||
CurrentActionMsg = 'Appuez sur ~INPUT_CONTEXT~ pour traiter la weed'
|
||||
CurrentActionMsg = _U('press_process_weed')
|
||||
CurrentActionData = {}
|
||||
end
|
||||
end
|
||||
@@ -118,7 +118,7 @@ AddEventHandler('esx_drugs:hasEnteredMarker', function(zone)
|
||||
if myJob ~= "police" then
|
||||
if weed_poochQTE >= 1 then
|
||||
CurrentAction = 'weed_resell'
|
||||
CurrentActionMsg = 'Appuez sur ~INPUT_CONTEXT~ pour vendre la weed'
|
||||
CurrentActionMsg = _U('press_sell_weed')
|
||||
CurrentActionData = {}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -6,6 +6,7 @@ Config.ZoneSize = {x = 5.0, y = 5.0, z = 3.0}
|
||||
Config.RequiredCopsCoke = 2
|
||||
Config.RequiredCopsMeth = 2
|
||||
Config.RequiredCopsWeed = 0
|
||||
Config.Locale = 'fr'
|
||||
|
||||
Config.Zones = {
|
||||
CokeFarm = {x=2448.9228515625, y=-1836.8076171875, z=51.953701019287},
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
Locales['en'] = {
|
||||
|
||||
['press_collect_coke'] = 'press ~INPUT_CONTEXT~ to collect coke',
|
||||
['press_process_coke'] = 'press ~INPUT_CONTEXT~ to process coke',
|
||||
['press_sell_coke'] = 'press ~INPUT_CONTEXT~ to sell coke',
|
||||
['press_collect_meth'] = 'press ~INPUT_CONTEXT~ to collect meth',
|
||||
['press_process_meth'] = 'press ~INPUT_CONTEXT~ to process meth',
|
||||
['press_sell_meth'] = 'press ~INPUT_CONTEXT~ to sell meth',
|
||||
['press_collect_weed'] = 'press ~INPUT_CONTEXT~ to collect weed',
|
||||
['press_process_weed'] = 'press ~INPUT_CONTEXT~ to process weed',
|
||||
['press_sell_weed'] = 'press ~INPUT_CONTEXT~ to sell weed',
|
||||
['act_imp_police'] = 'action ~r~impossible~s~, ~b~police~s~: ',
|
||||
['inv_full_coke'] = 'you can no longer collect Cocaine, your inventory is ~r~full~s~',
|
||||
['pickup_in_prog'] = '~y~Pickup in progress~s~...',
|
||||
['too_many_pouches'] = 'you have too many pouches',
|
||||
['not_enough_coke'] = 'you do not have enough coca leaf to ~r~pack~s~',
|
||||
['packing_in_prog'] = '~y~Packaging in progress~s~...',
|
||||
['no_pouchs_sale'] = 'You have no more pouches for ~r~sale~s~',
|
||||
['sold_one_coke'] = 'you\'ve sold ~g~x1 Coke Pouch~s~',
|
||||
['sale_in_prog'] = '~g~Sale in progress~s~...',
|
||||
['inv_full_meth'] = 'you can no longer collect Meth, your inventory is ~r~full~s~',
|
||||
['not_enough_meth'] = 'you do not have enough Meth to ~r~pack~s~',
|
||||
['sold_one_meth'] = 'you\'ve sold ~g~x1 Meth Pouch~s~',
|
||||
['inv_full_weed'] = 'you can no longer collect Weed, your inventory is ~r~full~s~',
|
||||
['not_enough_weed'] = 'you do not have enough Weed to ~r~pack~s~',
|
||||
['sold_one_weed'] = 'you\'ve sold ~g~x1 Weed Pouch~s~',
|
||||
['used_one_weed'] = 'you used 1 pouch of ~b~weed',
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
Locales['fr'] = {
|
||||
|
||||
['press_collect_coke'] = 'appuyez sur ~INPUT_CONTEXT~ pour récolter la coke',
|
||||
['press_process_coke'] = 'appuyez sur ~INPUT_CONTEXT~ pour traiter la coke',
|
||||
['press_sell_coke'] = 'appuyez sur ~INPUT_CONTEXT~ pour vendre la coke',
|
||||
['press_collect_meth'] = 'appuyez sur ~INPUT_CONTEXT~ pour récolter la meth',
|
||||
['press_process_meth'] = 'appuyez sur ~INPUT_CONTEXT~ pour traiter la meth',
|
||||
['press_sell_meth'] = 'appuyez sur ~INPUT_CONTEXT~ pour vendre la meth',
|
||||
['press_collect_weed'] = 'appuyez sur ~INPUT_CONTEXT~ pour récolter la weed',
|
||||
['press_process_weed'] = 'appuyez sur ~INPUT_CONTEXT~ pour traiter la weed',
|
||||
['press_sell_weed'] = 'appuyez sur ~INPUT_CONTEXT~ pour vendre la weed',
|
||||
['act_imp_police'] = 'action ~r~impossible~s~, ~b~policiers~s~: ',
|
||||
['inv_full_coke'] = 'vous ne pouvez plus ramasser de Cocaine, votre inventaire est ~r~plein~s~',
|
||||
['pickup_in_prog'] = '~y~Ramassage en cours~s~...',
|
||||
['too_many_pouches'] = 'vous avez trop de pochons',
|
||||
['not_enough_coke'] = 'vous n\'avez pas assez de feuille de coca à ~r~conditionner~s~',
|
||||
['packing_in_prog'] = '~y~Conditonnement en cours~s~...',
|
||||
['no_pouches_sale'] = 'vous n\'avez plus de pochons à ~r~vendre~s~',
|
||||
['sold_one_coke'] = 'vous avez vendu ~g~x1 Pochon de coke~s~',
|
||||
['sale_in_prog'] = '~g~Vente en cours~s~...',
|
||||
['inv_full_meth'] = 'vous ne pouvez plus ramasser de Meth, votre inventaire est ~r~plein~s~',
|
||||
['not_enough_meth'] = 'vous n\'avez pas assez de Meth à ~r~conditionner~s~',
|
||||
['sold_one_meth'] = 'vous avez vendu ~g~x1 Pochon de meth~s~',
|
||||
['inv_full_weed'] = 'vous ne pouvez plus ramasser de weed, votre inventair est ~r~plein~s~',
|
||||
['not_enough_weed'] = 'vous n\'avez pas assez de weed à ~r~conditionner~s~',
|
||||
['sold_one_weed'] = 'vous avez vendu ~g~x1 Pochon de weed~s~',
|
||||
['used_one_weed'] = 'Vous avez utilisé 1 Pochon de ~b~weed',
|
||||
|
||||
}
|
||||
+49
-49
@@ -33,7 +33,7 @@ CountCops()
|
||||
local function HarvestCoke(source)
|
||||
|
||||
if CopsConnected < Config.RequiredCopsCoke then
|
||||
TriggerClientEvent('esx:showNotification', source, 'Action ~r~impossible~s~, ~b~policiers~s~: ' .. CopsConnected .. '/' .. Config.RequiredCopsCoke)
|
||||
TriggerClientEvent('esx:showNotification', source, _U('act_imp_police') .. CopsConnected .. '/' .. Config.RequiredCopsCoke)
|
||||
return
|
||||
end
|
||||
|
||||
@@ -46,7 +46,7 @@ local function HarvestCoke(source)
|
||||
local coke = xPlayer.getInventoryItem('coke')
|
||||
|
||||
if coke.limit ~= -1 and coke.count >= coke.limit then
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous ne pouvez plus ramasser de Cocaine, votre inventaire est ~r~plein~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('inv_full_coke'))
|
||||
else
|
||||
xPlayer.addInventoryItem('coke', 1)
|
||||
HarvestCoke(source)
|
||||
@@ -63,7 +63,7 @@ AddEventHandler('esx_drugs:startHarvestCoke', function()
|
||||
|
||||
PlayersHarvestingCoke[_source] = true
|
||||
|
||||
TriggerClientEvent('esx:showNotification', _source, '~y~Ramassage en cours~s~...')
|
||||
TriggerClientEvent('esx:showNotification', _source, _U('pickup_in_prog'))
|
||||
|
||||
HarvestCoke(source)
|
||||
|
||||
@@ -81,7 +81,7 @@ end)
|
||||
local function TransformCoke(source)
|
||||
|
||||
if CopsConnected < Config.RequiredCopsCoke then
|
||||
TriggerClientEvent('esx:showNotification', source, 'Action ~r~impossible~s~, ~b~policiers~s~: ' .. CopsConnected .. '/' .. Config.RequiredCopsCoke)
|
||||
TriggerClientEvent('esx:showNotification', source, _U('act_imp_police') .. CopsConnected .. '/' .. Config.RequiredCopsCoke)
|
||||
return
|
||||
end
|
||||
|
||||
@@ -95,9 +95,9 @@ local function TransformCoke(source)
|
||||
local poochQuantity = xPlayer.getInventoryItem('coke_pooch').count
|
||||
|
||||
if poochQuantity > 35 then
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous avez trop de pochons')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('too_many_pouches'))
|
||||
elseif cokeQuantity < 5 then
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous n\'avez pas assez de feuille de coca à ~r~conditionner~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('not_enough_coke'))
|
||||
else
|
||||
xPlayer.removeInventoryItem('coke', 5)
|
||||
xPlayer.addInventoryItem('coke_pooch', 1)
|
||||
@@ -116,7 +116,7 @@ AddEventHandler('esx_drugs:startTransformCoke', function()
|
||||
|
||||
PlayersTransformingCoke[_source] = true
|
||||
|
||||
TriggerClientEvent('esx:showNotification', _source, '~y~Conditonnement en cours~s~...')
|
||||
TriggerClientEvent('esx:showNotification', _source, _U('packing_in_prog'))
|
||||
|
||||
TransformCoke(source)
|
||||
|
||||
@@ -134,7 +134,7 @@ end)
|
||||
local function SellCoke(source)
|
||||
|
||||
if CopsConnected < Config.RequiredCopsCoke then
|
||||
TriggerClientEvent('esx:showNotification', source, 'Action ~r~impossible~s~, ~b~policiers~s~: ' .. CopsConnected .. '/' .. Config.RequiredCopsCoke)
|
||||
TriggerClientEvent('esx:showNotification', source, _U('act_imp_police') .. CopsConnected .. '/' .. Config.RequiredCopsCoke)
|
||||
return
|
||||
end
|
||||
|
||||
@@ -147,27 +147,27 @@ local function SellCoke(source)
|
||||
local poochQuantity = xPlayer.getInventoryItem('coke_pooch').count
|
||||
|
||||
if poochQuantity == 0 then
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous n\'avez plus de pochons à ~r~vendre~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('no_pouches_sale'))
|
||||
else
|
||||
xPlayer.removeInventoryItem('coke_pooch', 1)
|
||||
if CopsConnected == 0 then
|
||||
xPlayer.addAccountMoney('black_money', 198)
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous avez vendu ~g~x1 Pochon de coke~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('sold_one_coke'))
|
||||
elseif CopsConnected == 1 then
|
||||
xPlayer.addAccountMoney('black_money', 258)
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous avez vendu ~g~x1 Pochon de coke~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('sold_one_coke'))
|
||||
elseif CopsConnected == 2 then
|
||||
xPlayer.addAccountMoney('black_money', 308)
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous avez vendu ~g~x1 Pochon de coke~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('sold_one_coke'))
|
||||
elseif CopsConnected == 3 then
|
||||
xPlayer.addAccountMoney('black_money', 358)
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous avez vendu ~g~x1 Pochon de coke~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('sold_one_coke'))
|
||||
elseif CopsConnected == 4 then
|
||||
xPlayer.addAccountMoney('black_money', 396)
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous avez vendu ~g~x1 Pochon de coke~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('sold_one_coke'))
|
||||
elseif CopsConnected >= 5 then
|
||||
xPlayer.addAccountMoney('black_money', 428)
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous avez vendu ~g~x1 Pochon de coke~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('sold_one_coke'))
|
||||
end
|
||||
|
||||
SellCoke(source)
|
||||
@@ -184,7 +184,7 @@ AddEventHandler('esx_drugs:startSellCoke', function()
|
||||
|
||||
PlayersSellingCoke[_source] = true
|
||||
|
||||
TriggerClientEvent('esx:showNotification', _source, '~g~Vente en cours~s~...')
|
||||
TriggerClientEvent('esx:showNotification', _source, _U('sale_in_prog'))
|
||||
|
||||
SellCoke(source)
|
||||
|
||||
@@ -202,7 +202,7 @@ end)
|
||||
local function HarvestMeth(source)
|
||||
|
||||
if CopsConnected < Config.RequiredCopsMeth then
|
||||
TriggerClientEvent('esx:showNotification', source, 'Action ~r~impossible~s~, ~b~policiers~s~: ' .. CopsConnected .. '/' .. Config.RequiredCopsMeth)
|
||||
TriggerClientEvent('esx:showNotification', source, _U('act_imp_police') .. CopsConnected .. '/' .. Config.RequiredCopsMeth)
|
||||
return
|
||||
end
|
||||
|
||||
@@ -215,7 +215,7 @@ local function HarvestMeth(source)
|
||||
local meth = xPlayer.getInventoryItem('meth')
|
||||
|
||||
if meth.limit ~= -1 and meth.count >= meth.limit then
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous ne pouvez plus ramasser de Meth, votre inventaire est ~r~plein~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('inv_full_meth'))
|
||||
else
|
||||
xPlayer.addInventoryItem('meth', 1)
|
||||
HarvestMeth(source)
|
||||
@@ -232,7 +232,7 @@ AddEventHandler('esx_drugs:startHarvestMeth', function()
|
||||
|
||||
PlayersHarvestingMeth[_source] = true
|
||||
|
||||
TriggerClientEvent('esx:showNotification', _source, '~y~Ramassage en cours~s~...')
|
||||
TriggerClientEvent('esx:showNotification', _source, _U('pickup_in_prog'))
|
||||
|
||||
HarvestMeth(source)
|
||||
|
||||
@@ -250,7 +250,7 @@ end)
|
||||
local function TransformMeth(source)
|
||||
|
||||
if CopsConnected < Config.RequiredCopsMeth then
|
||||
TriggerClientEvent('esx:showNotification', source, 'Action ~r~impossible~s~, ~b~policiers~s~: ' .. CopsConnected .. '/' .. Config.RequiredCopsMeth)
|
||||
TriggerClientEvent('esx:showNotification', source, _U('act_imp_police') .. CopsConnected .. '/' .. Config.RequiredCopsMeth)
|
||||
return
|
||||
end
|
||||
|
||||
@@ -264,9 +264,9 @@ local function TransformMeth(source)
|
||||
local pochonQuantity = xPlayer.getInventoryItem('meth_pooch').count
|
||||
|
||||
if pochonQuantity > 35 then
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous avez trop de pochons')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('too_many_pouches'))
|
||||
elseif methQuantity < 5 then
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous n\'avez pas assez de Meth à ~r~conditionner~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('not_enough_meth'))
|
||||
else
|
||||
xPlayer.removeInventoryItem('meth', 5)
|
||||
xPlayer.addInventoryItem('meth_pochon', 1)
|
||||
@@ -285,7 +285,7 @@ AddEventHandler('esx_drugs:startTransformMeth', function()
|
||||
|
||||
PlayersTransformingMeth[_source] = true
|
||||
|
||||
TriggerClientEvent('esx:showNotification', _source, '~y~Conditonnement en cours~s~...')
|
||||
TriggerClientEvent('esx:showNotification', _source, _U('packing_in_prog'))
|
||||
|
||||
TransformMeth(source)
|
||||
|
||||
@@ -303,7 +303,7 @@ end)
|
||||
local function SellMeth(source)
|
||||
|
||||
if CopsConnected < Config.RequiredCopsMeth then
|
||||
TriggerClientEvent('esx:showNotification', source, 'Action ~r~impossible~s~, ~b~policiers~s~: ' .. CopsConnected .. '/' .. Config.RequiredCopsMeth)
|
||||
TriggerClientEvent('esx:showNotification', source, _U('act_imp_police') .. CopsConnected .. '/' .. Config.RequiredCopsMeth)
|
||||
return
|
||||
end
|
||||
|
||||
@@ -316,30 +316,30 @@ local function SellMeth(source)
|
||||
local pochonQuantity = xPlayer.getInventoryItem('meth_pooch').count
|
||||
|
||||
if pochonQuantity == 0 then
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous n\'avez plus de pochons à ~r~vendre~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('no_pouches_sale'))
|
||||
else
|
||||
xPlayer.removeInventoryItem('meth_pochon', 1)
|
||||
if CopsConnected == 0 then
|
||||
xPlayer.addAccountMoney('black_money', 276)
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous avez vendu ~g~x1 Pochon de meth~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('sold_one_meth'))
|
||||
elseif CopsConnected == 1 then
|
||||
xPlayer.addAccountMoney('black_money', 374)
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous avez vendu ~g~x1 Pochon de meth~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('sold_one_meth'))
|
||||
elseif CopsConnected == 2 then
|
||||
xPlayer.addAccountMoney('black_money', 474)
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous avez vendu ~g~x1 Pochon de meth~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('sold_one_meth'))
|
||||
elseif CopsConnected == 3 then
|
||||
xPlayer.addAccountMoney('black_money', 552)
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous avez vendu ~g~x1 Pochon de meth~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('sold_one_meth'))
|
||||
elseif CopsConnected == 4 then
|
||||
xPlayer.addAccountMoney('black_money', 616)
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous avez vendu ~g~x1 Pochon de meth~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('sold_one_meth'))
|
||||
elseif CopsConnected == 5 then
|
||||
xPlayer.addAccountMoney('black_money', 654)
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous avez vendu ~g~x1 Pochon de meth~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('sold_one_meth'))
|
||||
elseif CopsConnected >= 6 then
|
||||
xPlayer.addAccountMoney('black_money', 686)
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous avez vendu ~g~x1 Pochon de meth~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('sold_one_meth'))
|
||||
end
|
||||
|
||||
SellMeth(source)
|
||||
@@ -356,7 +356,7 @@ AddEventHandler('esx_drugs:startSellMeth', function()
|
||||
|
||||
PlayersSellingMeth[_source] = true
|
||||
|
||||
TriggerClientEvent('esx:showNotification', _source, '~g~Vente en cours~s~...')
|
||||
TriggerClientEvent('esx:showNotification', _source, _U('sale_in_prog'))
|
||||
|
||||
SellMeth(source)
|
||||
|
||||
@@ -374,7 +374,7 @@ end)
|
||||
local function HarvestWeed(source)
|
||||
|
||||
if CopsConnected < Config.RequiredCopsWeed then
|
||||
TriggerClientEvent('esx:showNotification', source, 'Action ~r~impossible~s~, ~b~policiers~s~: ' .. CopsConnected .. '/' .. Config.RequiredCopsWeed)
|
||||
TriggerClientEvent('esx:showNotification', source, _U('act_imp_police') .. CopsConnected .. '/' .. Config.RequiredCopsWeed)
|
||||
return
|
||||
end
|
||||
|
||||
@@ -387,7 +387,7 @@ local function HarvestWeed(source)
|
||||
local weed = xPlayer.getInventoryItem('weed')
|
||||
|
||||
if weed.limit ~= -1 and weed.count >= weed.limit then
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous ne pouvez plus ramasser de weed, votre inventaire est ~r~plein~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('inv_full_weed'))
|
||||
else
|
||||
xPlayer.addInventoryItem('weed', 1)
|
||||
HarvestWeed(source)
|
||||
@@ -404,7 +404,7 @@ AddEventHandler('esx_drugs:startHarvestWeed', function()
|
||||
|
||||
PlayersHarvestingWeed[_source] = true
|
||||
|
||||
TriggerClientEvent('esx:showNotification', _source, '~y~Ramassage en cours~s~...')
|
||||
TriggerClientEvent('esx:showNotification', _source, _U('pickup_in_prog'))
|
||||
|
||||
HarvestWeed(source)
|
||||
|
||||
@@ -422,7 +422,7 @@ end)
|
||||
local function TransformWeed(source)
|
||||
|
||||
if CopsConnected < Config.RequiredCopsWeed then
|
||||
TriggerClientEvent('esx:showNotification', source, 'Action ~r~impossible~s~, ~b~policiers~s~: ' .. CopsConnected .. '/' .. Config.RequiredCopsWeed)
|
||||
TriggerClientEvent('esx:showNotification', source, _U('act_imp_police') .. CopsConnected .. '/' .. Config.RequiredCopsWeed)
|
||||
return
|
||||
end
|
||||
|
||||
@@ -436,9 +436,9 @@ local function TransformWeed(source)
|
||||
local poochQuantity = xPlayer.getInventoryItem('weed_pooch').count
|
||||
|
||||
if poochQuantity > 35 then
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous avez trop de pochons')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('too_many_pouches'))
|
||||
elseif weedQuantity < 5 then
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous n\'avez pas assez de weed à ~r~conditionner~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('not_enough_weed'))
|
||||
else
|
||||
xPlayer.removeInventoryItem('weed', 5)
|
||||
xPlayer.addInventoryItem('weed_pooch', 1)
|
||||
@@ -457,7 +457,7 @@ AddEventHandler('esx_drugs:startTransformWeed', function()
|
||||
|
||||
PlayersTransformingWeed[_source] = true
|
||||
|
||||
TriggerClientEvent('esx:showNotification', _source, '~y~Conditonnement en cours~s~...')
|
||||
TriggerClientEvent('esx:showNotification', _source, _U('packing_in_prog'))
|
||||
|
||||
TransformWeed(source)
|
||||
|
||||
@@ -475,7 +475,7 @@ end)
|
||||
local function SellWeed(source)
|
||||
|
||||
if CopsConnected < Config.RequiredCopsWeed then
|
||||
TriggerClientEvent('esx_weedjob:showNotification', source, 'Action ~r~impossible~s~, ~b~policiers~s~: ' .. CopsConnected .. '/' .. Config.RequiredCopsWeed)
|
||||
TriggerClientEvent('esx_weedjob:showNotification', source, _U('act_imp_police') .. CopsConnected .. '/' .. Config.RequiredCopsWeed)
|
||||
return
|
||||
end
|
||||
|
||||
@@ -488,24 +488,24 @@ local function SellWeed(source)
|
||||
local poochQuantity = xPlayer.getInventoryItem('weed_pooch').count
|
||||
|
||||
if poochQuantity == 0 then
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous n\'avez plus de pochons à ~r~vendre~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('no_pouches_sale'))
|
||||
else
|
||||
xPlayer:removeInventoryItem('weed_pooch', 1)
|
||||
if CopsConnected == 0 then
|
||||
xPlayer.addAccountMoney('black_money', 108)
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous avez vendu ~g~x1 Pochon de weed~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('sold_one_weed'))
|
||||
elseif CopsConnected == 1 then
|
||||
xPlayer.addAccountMoney('black_money', 128)
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous avez vendu ~g~x1 Pochon de weed~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('sold_one_weed'))
|
||||
elseif CopsConnected == 2 then
|
||||
xPlayer.addAccountMoney('black_money', 152)
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous avez vendu ~g~x1 Pochon de weed~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('sold_one_weed'))
|
||||
elseif CopsConnected == 3 then
|
||||
xPlayer.addAccountMoney('black_money', 165)
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous avez vendu ~g~x1 Pochon de weed~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('sold_one_weed'))
|
||||
elseif CopsConnected >= 4 then
|
||||
xPlayer.addAccountMoney('black_money', 180)
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous avez vendu ~g~x1 Pochon de weed~s~')
|
||||
TriggerClientEvent('esx:showNotification', source, _U('sold_one_weed'))
|
||||
end
|
||||
|
||||
SellWeed(source)
|
||||
@@ -522,7 +522,7 @@ AddEventHandler('esx_drugs:startSellWeed', function()
|
||||
|
||||
PlayersSellingWeed[_source] = true
|
||||
|
||||
TriggerClientEvent('esx:showNotification', _source, '~g~Vente en cours~s~...')
|
||||
TriggerClientEvent('esx:showNotification', _source, _U('sale_in_prog'))
|
||||
|
||||
SellWeed(source)
|
||||
|
||||
@@ -556,6 +556,6 @@ ESX.RegisterUsableItem('weed', function(source)
|
||||
xPlayer.removeInventoryItem('weed', 1)
|
||||
|
||||
TriggerClientEvent('esx_drugs:onPot', _source)
|
||||
TriggerClientEvent('esx:showNotification', _source, 'Vous avez utilisé 1 de ~b~Weed')
|
||||
TriggerClientEvent('esx:showNotification', _source, _U('used_one_weed'))
|
||||
|
||||
end)
|
||||
Reference in New Issue
Block a user