Fixed famous #18 exploit, added blips

- Added blips for all zones
- Improved code
- Fixed #18 exploit where if you quickly and repeatly enter & leave the zone, and spam press E you'll get loads of stuff very quickly.
- Tab indents
- Added missing SQL information (items max size)
- Improved README
- General improvements & Cleanup
This commit is contained in:
ElPumpo
2018-05-03 22:08:18 +02:00
parent 5ab0371373
commit 171813e357
17 changed files with 658 additions and 570 deletions
+26 -23
View File
@@ -1,36 +1,39 @@
# fxserver-esx_drugs
FXserver ESX Drugs
# esx_drugs
## Requirements
- [esx_policejob](https://github.com/ESX-Org/esx_policejob)
[REQUIREMENTS]
## Download & Installation
* esx_policejob => https://github.com/FXServer-ESX/fxserver-esx_policejob
[UPDATE]
to install opium :
### Using [fvm](https://github.com/qlaffont/fvm-installer)
```
INSERT INTO `items` (name, label) VALUES
('opium', 'Opium'),
('opium_pooch', 'Pochon de opium')
;
fvm install --save --folder=esx esx-org/esx_drugs
```
[INSTALLATION]
1) CD in your resources/[esx] folder
2) Clone the repository
### Using Git
```
git clone https://github.com/FXServer-ESX/fxserver-esx_drugs esx_drugs
cd resources
git clone https://github.com/ESX-Org/esx_drugs [esx]/esx_drugs
```
3) * Import esx_drugs.sql in your database
4) Add this in your server.cfg :
### Manually
- Download https://github.com/ESX-Org/esx_drugs/archive/master.zip
- Put it in the `[esx]` directory
- Import `esx_drugs.sql` in your database
- Add this in your `server.cfg`:
```
start esx_drugs
```
[FEATURES]
* Use weed
* Cops can't see or interact with the drugs zones
* In the config.lua change the Config.RequiredCop to block the drugs zone in function of the cops count conected
# Legal
### License
esx_drugs - drugs job
Copyright (C) 2015-2018 Jérémie N'gadi
This program Is free software: you can redistribute it And/Or modify it under the terms Of the GNU General Public License As published by the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version.
This program Is distributed In the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty Of MERCHANTABILITY Or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License For more details.
You should have received a copy Of the GNU General Public License along with this program. If Not, see http://www.gnu.org/licenses/.
+1 -1
View File
@@ -2,7 +2,7 @@ resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
description 'ESX Drugs'
version '1.0.1'
version '1.0.2'
server_scripts {
'@es_extended/locale.lua',
+252 -249
View File
@@ -1,20 +1,17 @@
local Keys = {
["ESC"] = 322, ["F1"] = 288, ["F2"] = 289, ["F3"] = 170, ["F5"] = 166, ["F6"] = 167, ["F7"] = 168, ["F8"] = 169, ["F9"] = 56, ["F10"] = 57,
["~"] = 243, ["1"] = 157, ["2"] = 158, ["3"] = 160, ["4"] = 164, ["5"] = 165, ["6"] = 159, ["7"] = 161, ["8"] = 162, ["9"] = 163, ["-"] = 84, ["="] = 83, ["BACKSPACE"] = 177,
["TAB"] = 37, ["Q"] = 44, ["W"] = 32, ["E"] = 38, ["R"] = 45, ["T"] = 245, ["Y"] = 246, ["U"] = 303, ["P"] = 199, ["["] = 39, ["]"] = 40, ["ENTER"] = 18,
["CAPS"] = 137, ["A"] = 34, ["S"] = 8, ["D"] = 9, ["F"] = 23, ["G"] = 47, ["H"] = 74, ["K"] = 311, ["L"] = 182,
["LEFTSHIFT"] = 21, ["Z"] = 20, ["X"] = 73, ["C"] = 26, ["V"] = 0, ["B"] = 29, ["N"] = 249, ["M"] = 244, [","] = 82, ["."] = 81,
["LEFTCTRL"] = 36, ["LEFTALT"] = 19, ["SPACE"] = 22, ["RIGHTCTRL"] = 70,
["HOME"] = 213, ["PAGEUP"] = 10, ["PAGEDOWN"] = 11, ["DELETE"] = 178,
["LEFT"] = 174, ["RIGHT"] = 175, ["TOP"] = 27, ["DOWN"] = 173,
["NENTER"] = 201, ["N4"] = 108, ["N5"] = 60, ["N6"] = 107, ["N+"] = 96, ["N-"] = 97, ["N7"] = 117, ["N8"] = 61, ["N9"] = 118
["ESC"] = 322, ["F1"] = 288, ["F2"] = 289, ["F3"] = 170, ["F5"] = 166, ["F6"] = 167, ["F7"] = 168, ["F8"] = 169, ["F9"] = 56, ["F10"] = 57,
["~"] = 243, ["1"] = 157, ["2"] = 158, ["3"] = 160, ["4"] = 164, ["5"] = 165, ["6"] = 159, ["7"] = 161, ["8"] = 162, ["9"] = 163, ["-"] = 84, ["="] = 83, ["BACKSPACE"] = 177,
["TAB"] = 37, ["Q"] = 44, ["W"] = 32, ["E"] = 38, ["R"] = 45, ["T"] = 245, ["Y"] = 246, ["U"] = 303, ["P"] = 199, ["["] = 39, ["]"] = 40, ["ENTER"] = 18,
["CAPS"] = 137, ["A"] = 34, ["S"] = 8, ["D"] = 9, ["F"] = 23, ["G"] = 47, ["H"] = 74, ["K"] = 311, ["L"] = 182,
["LEFTSHIFT"] = 21, ["Z"] = 20, ["X"] = 73, ["C"] = 26, ["V"] = 0, ["B"] = 29, ["N"] = 249, ["M"] = 244, [","] = 82, ["."] = 81,
["LEFTCTRL"] = 36, ["LEFTALT"] = 19, ["SPACE"] = 22, ["RIGHTCTRL"] = 70,
["HOME"] = 213, ["PAGEUP"] = 10, ["PAGEDOWN"] = 11, ["DELETE"] = 178,
["LEFT"] = 174, ["RIGHT"] = 175, ["TOP"] = 27, ["DOWN"] = 173,
["NENTER"] = 201, ["N4"] = 108, ["N5"] = 60, ["N6"] = 107, ["N+"] = 96, ["N-"] = 97, ["N7"] = 117, ["N8"] = 61, ["N9"] = 118
}
local PID = 0
local GUI = {}
local cokeQTE = 0
ESX = nil
GUI.Time = 0
local coke_poochQTE = 0
local weedQTE = 0
local weed_poochQTE = 0
@@ -23,299 +20,305 @@ local meth_poochQTE = 0
local opiumQTE = 0
local opium_poochQTE = 0
local myJob = nil
local PlayerData = {}
local GUI = {}
local HasAlreadyEnteredMarker = false
local LastZone = nil
local isInZone = false
local CurrentAction = nil
local CurrentActionMsg = ''
local CurrentActionData = {}
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
end)
AddEventHandler('esx_drugs:hasEnteredMarker', function(zone)
if myJob == 'police' or myJob == 'ambulance' then
return
end
ESX.UI.Menu.CloseAll()
ESX.UI.Menu.CloseAll()
if zone == 'exitMarker' then
CurrentAction = zone
CurrentActionMsg = _U('exit_marker')
CurrentActionData = {}
end
if zone == 'CokeField' then
CurrentAction = zone
CurrentActionMsg = _U('press_collect_coke')
CurrentActionData = {}
end
--coke
if zone == 'CokeFarm' then
if myJob ~= "police" then
CurrentAction = 'coke_harvest'
CurrentActionMsg = _U('press_collect_coke')
CurrentActionData = {}
end
end
if zone == 'CokeProcessing' then
if cokeQTE >= 5 then
CurrentAction = zone
CurrentActionMsg = _U('press_process_coke')
CurrentActionData = {}
end
end
if zone == 'CokeTreatment' then
if myJob ~= "police" then
if cokeQTE >= 5 then
CurrentAction = 'coke_treatment'
CurrentActionMsg = _U('press_process_coke')
CurrentActionData = {}
end
end
end
if zone == 'CokeDealer' then
if coke_poochQTE >= 1 then
CurrentAction = zone
CurrentActionMsg = _U('press_sell_coke')
CurrentActionData = {}
end
end
if zone == 'CokeResell' then
if myJob ~= "police" then
if coke_poochQTE >= 1 then
CurrentAction = 'coke_resell'
CurrentActionMsg = _U('press_sell_coke')
CurrentActionData = {}
end
end
end
if zone == 'MethField' then
CurrentAction = zone
CurrentActionMsg = _U('press_collect_meth')
CurrentActionData = {}
end
--meth
if zone == 'MethFarm' then
if myJob ~= "police" then
CurrentAction = 'meth_harvest'
CurrentActionMsg = _U('press_collect_meth')
CurrentActionData = {}
end
end
if zone == 'MethProcessing' then
if methQTE >= 5 then
CurrentAction = zone
CurrentActionMsg = _U('press_process_meth')
CurrentActionData = {}
end
end
if zone == 'MethTreatment' then
if myJob ~= "police" then
if methQTE >= 5 then
CurrentAction = 'meth_treatment'
CurrentActionMsg = _U('press_process_meth')
CurrentActionData = {}
end
end
end
if zone == 'MethDealer' then
if meth_poochQTE >= 1 then
CurrentAction = zone
CurrentActionMsg = _U('press_sell_meth')
CurrentActionData = {}
end
end
if zone == 'MethResell' then
if myJob ~= "police" then
if meth_poochQTE >= 1 then
CurrentAction = 'meth_resell'
CurrentActionMsg = _U('press_sell_meth')
CurrentActionData = {}
end
end
end
if zone == 'WeedField' then
CurrentAction = zone
CurrentActionMsg = _U('press_collect_weed')
CurrentActionData = {}
end
--weed
if zone == 'WeedFarm' then
if myJob ~= "police" then
CurrentAction = 'weed_harvest'
CurrentActionMsg = _U('press_collect_weed')
CurrentActionData = {}
end
end
if zone == 'WeedProcessing' then
if weedQTE >= 5 then
CurrentAction = zone
CurrentActionMsg = _U('press_process_weed')
CurrentActionData = {}
end
end
if zone == 'WeedTreatment' then
if myJob ~= "police" then
if weedQTE >= 5 then
CurrentAction = 'weed_treatment'
CurrentActionMsg = _U('press_process_weed')
CurrentActionData = {}
end
end
end
if zone == 'WeedDealer' then
if weed_poochQTE >= 1 then
CurrentAction = zone
CurrentActionMsg = _U('press_sell_weed')
CurrentActionData = {}
end
end
if zone == 'WeedResell' then
if myJob ~= "police" then
if weed_poochQTE >= 1 then
CurrentAction = 'weed_resell'
CurrentActionMsg = _U('press_sell_weed')
CurrentActionData = {}
end
end
end
if zone == 'OpiumField' then
CurrentAction = zone
CurrentActionMsg = _U('press_collect_opium')
CurrentActionData = {}
end
--opium
if zone == 'OpiumFarm' then
if myJob ~= "police" then
CurrentAction = 'opium_harvest'
CurrentActionMsg = _U('press_collect_opium')
CurrentActionData = {}
end
end
if zone == 'OpiumProcessing' then
if opiumQTE >= 5 then
CurrentAction = zone
CurrentActionMsg = _U('press_process_opium')
CurrentActionData = {}
end
end
if zone == 'OpiumTreatment' then
if myJob ~= "police" then
if opiumQTE >= 5 then
CurrentAction = 'opium_treatment'
CurrentActionMsg = _U('press_process_opium')
CurrentActionData = {}
end
end
end
if zone == 'OpiumResell' then
if myJob ~= "police" then
if opium_poochQTE >= 1 then
CurrentAction = 'opium_resell'
CurrentActionMsg = _U('press_sell_opium')
CurrentActionData = {}
end
end
end
if zone == 'OpiumDealer' then
if opium_poochQTE >= 1 then
CurrentAction = zone
CurrentActionMsg = _U('press_sell_opium')
CurrentActionData = {}
end
end
end)
AddEventHandler('esx_drugs:hasExitedMarker', function(zone)
CurrentAction = nil
ESX.UI.Menu.CloseAll()
CurrentAction = nil
ESX.UI.Menu.CloseAll()
TriggerServerEvent('esx_drugs:stopHarvestCoke')
TriggerServerEvent('esx_drugs:stopTransformCoke')
TriggerServerEvent('esx_drugs:stopSellCoke')
TriggerServerEvent('esx_drugs:stopHarvestMeth')
TriggerServerEvent('esx_drugs:stopTransformMeth')
TriggerServerEvent('esx_drugs:stopSellMeth')
TriggerServerEvent('esx_drugs:stopHarvestWeed')
TriggerServerEvent('esx_drugs:stopTransformWeed')
TriggerServerEvent('esx_drugs:stopSellWeed')
TriggerServerEvent('esx_drugs:stopHarvestOpium')
TriggerServerEvent('esx_drugs:stopTransformOpium')
TriggerServerEvent('esx_drugs:stopSellOpium')
TriggerServerEvent('esx_drugs:stopHarvestCoke')
TriggerServerEvent('esx_drugs:stopTransformCoke')
TriggerServerEvent('esx_drugs:stopSellCoke')
TriggerServerEvent('esx_drugs:stopHarvestMeth')
TriggerServerEvent('esx_drugs:stopTransformMeth')
TriggerServerEvent('esx_drugs:stopSellMeth')
TriggerServerEvent('esx_drugs:stopHarvestWeed')
TriggerServerEvent('esx_drugs:stopTransformWeed')
TriggerServerEvent('esx_drugs:stopSellWeed')
TriggerServerEvent('esx_drugs:stopHarvestOpium')
TriggerServerEvent('esx_drugs:stopTransformOpium')
TriggerServerEvent('esx_drugs:stopSellOpium')
end)
-- Weed Effect
RegisterNetEvent('esx_drugs:onPot')
AddEventHandler('esx_drugs:onPot', function()
RequestAnimSet("MOVE_M@DRUNK@SLIGHTLYDRUNK")
while not HasAnimSetLoaded("MOVE_M@DRUNK@SLIGHTLYDRUNK") do
Citizen.Wait(0)
end
TaskStartScenarioInPlace(GetPlayerPed(-1), "WORLD_HUMAN_SMOKING_POT", 0, true)
Citizen.Wait(5000)
DoScreenFadeOut(1000)
Citizen.Wait(1000)
ClearPedTasksImmediately(GetPlayerPed(-1))
SetTimecycleModifier("spectator5")
SetPedMotionBlur(GetPlayerPed(-1), true)
SetPedMovementClipset(GetPlayerPed(-1), "MOVE_M@DRUNK@SLIGHTLYDRUNK", true)
SetPedIsDrunk(GetPlayerPed(-1), true)
DoScreenFadeIn(1000)
Citizen.Wait(600000)
DoScreenFadeOut(1000)
Citizen.Wait(1000)
DoScreenFadeIn(1000)
ClearTimecycleModifier()
ResetScenarioTypesEnabled()
ResetPedMovementClipset(GetPlayerPed(-1), 0)
SetPedIsDrunk(GetPlayerPed(-1), false)
SetPedMotionBlur(GetPlayerPed(-1), false)
RequestAnimSet("MOVE_M@DRUNK@SLIGHTLYDRUNK")
while not HasAnimSetLoaded("MOVE_M@DRUNK@SLIGHTLYDRUNK") do
Citizen.Wait(0)
end
TaskStartScenarioInPlace(GetPlayerPed(-1), "WORLD_HUMAN_SMOKING_POT", 0, true)
Citizen.Wait(5000)
DoScreenFadeOut(1000)
Citizen.Wait(1000)
ClearPedTasksImmediately(GetPlayerPed(-1))
SetTimecycleModifier("spectator5")
SetPedMotionBlur(GetPlayerPed(-1), true)
SetPedMovementClipset(GetPlayerPed(-1), "MOVE_M@DRUNK@SLIGHTLYDRUNK", true)
SetPedIsDrunk(GetPlayerPed(-1), true)
DoScreenFadeIn(1000)
Citizen.Wait(600000)
DoScreenFadeOut(1000)
Citizen.Wait(1000)
DoScreenFadeIn(1000)
ClearTimecycleModifier()
ResetScenarioTypesEnabled()
ResetPedMovementClipset(GetPlayerPed(-1), 0)
SetPedIsDrunk(GetPlayerPed(-1), false)
SetPedMotionBlur(GetPlayerPed(-1), false)
end)
-- Render markers
Citizen.CreateThread(function()
while true do
while true do
Wait(0)
Citizen.Wait(0)
local coords = GetEntityCoords(GetPlayerPed(-1))
local coords = GetEntityCoords(GetPlayerPed(-1))
for k,v in pairs(Config.Zones) do
if(GetDistanceBetweenCoords(coords, v.x, v.y, v.z, true) < Config.DrawDistance) then
DrawMarker(Config.MarkerType, v.x, v.y, v.z, 0.0, 0.0, 0.0, 0, 0.0, 0.0, Config.ZoneSize.x, Config.ZoneSize.y, Config.ZoneSize.z, Config.MarkerColor.r, Config.MarkerColor.g, Config.MarkerColor.b, 100, false, true, 2, false, false, false, false)
end
end
for k,v in pairs(Config.Zones) do
if(GetDistanceBetweenCoords(coords, v.x, v.y, v.z, true) < Config.DrawDistance) then
DrawMarker(Config.MarkerType, v.x, v.y, v.z, 0.0, 0.0, 0.0, 0, 0.0, 0.0, Config.ZoneSize.x, Config.ZoneSize.y, Config.ZoneSize.z, Config.MarkerColor.r, Config.MarkerColor.g, Config.MarkerColor.b, 100, false, true, 2, false, false, false, false)
end
end
end
end
end)
-- Create blips
Citizen.CreateThread(function()
for k,v in pairs(Config.Zones) do
local blip = AddBlipForCoord(v.x, v.y, v.z)
SetBlipSprite (blip, v.sprite)
SetBlipDisplay(blip, 4)
SetBlipScale (blip, 0.9)
SetBlipColour (blip, v.color)
SetBlipAsShortRange(blip, true)
BeginTextCommandSetBlipName("STRING")
AddTextComponentString(v.name)
EndTextCommandSetBlipName(blip)
end
end)
-- RETURN NUMBER OF ITEMS FROM SERVER
RegisterNetEvent('esx_drugs:ReturnInventory')
AddEventHandler('esx_drugs:ReturnInventory', function(cokeNbr, cokepNbr, methNbr, methpNbr, weedNbr, weedpNbr, opiumNbr, opiumpNbr, jobName, currentZone)
cokeQTE = cokeNbr
coke_poochQTE = cokepNbr
methQTE = methNbr
meth_poochQTE = methpNbr
weedQTE = weedNbr
weed_poochQTE = weedpNbr
opiumQTE = opiumNbr
opium_poochQTE = opiumpNbr
myJob = jobName
TriggerEvent('esx_drugs:hasEnteredMarker', currentZone)
cokeQTE = cokeNbr
coke_poochQTE = cokepNbr
methQTE = methNbr
meth_poochQTE = methpNbr
weedQTE = weedNbr
weed_poochQTE = weedpNbr
opiumQTE = opiumNbr
opium_poochQTE = opiumpNbr
myJob = jobName
TriggerEvent('esx_drugs:hasEnteredMarker', currentZone)
end)
-- Activate menu when player is inside marker
Citizen.CreateThread(function()
while true do
while true do
Wait(0)
Citizen.Wait(0)
local coords = GetEntityCoords(GetPlayerPed(-1))
local isInMarker = false
local currentZone = nil
local coords = GetEntityCoords(GetPlayerPed(-1))
local isInMarker = false
local currentZone = nil
for k,v in pairs(Config.Zones) do
if(GetDistanceBetweenCoords(coords, v.x, v.y, v.z, true) < Config.ZoneSize.x / 2) then
isInMarker = true
currentZone = k
end
end
for k,v in pairs(Config.Zones) do
if(GetDistanceBetweenCoords(coords, v.x, v.y, v.z, true) < Config.ZoneSize.x / 2) then
isInMarker = true
currentZone = k
end
end
if isInMarker and not hasAlreadyEnteredMarker then
hasAlreadyEnteredMarker = true
lastZone = currentZone
TriggerServerEvent('esx_drugs:GetUserInventory', currentZone)
end
if isInMarker and not hasAlreadyEnteredMarker then
hasAlreadyEnteredMarker = true
lastZone = currentZone
TriggerServerEvent('esx_drugs:GetUserInventory', currentZone)
end
if not isInMarker and hasAlreadyEnteredMarker then
hasAlreadyEnteredMarker = false
TriggerEvent('esx_drugs:hasExitedMarker', lastZone)
end
if not isInMarker and hasAlreadyEnteredMarker then
hasAlreadyEnteredMarker = false
TriggerEvent('esx_drugs:hasExitedMarker', lastZone)
end
end
if isInMarker and isInZone then
TriggerEvent('esx_drugs:hasEnteredMarker', 'exitMarker')
end
end
end)
-- Key Controls
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if CurrentAction ~= nil then
SetTextComponentFormat('STRING')
AddTextComponentString(CurrentActionMsg)
DisplayHelpTextFromStringLabel(0, 0, 1, -1)
if IsControlJustReleased(0, 38) then
if CurrentAction == 'coke_harvest' then
TriggerServerEvent('esx_drugs:startHarvestCoke')
end
if CurrentAction == 'coke_treatment' then
TriggerServerEvent('esx_drugs:startTransformCoke')
end
if CurrentAction == 'coke_resell' then
TriggerServerEvent('esx_drugs:startSellCoke')
end
if CurrentAction == 'meth_harvest' then
TriggerServerEvent('esx_drugs:startHarvestMeth')
end
if CurrentAction == 'meth_treatment' then
TriggerServerEvent('esx_drugs:startTransformMeth')
end
if CurrentAction == 'meth_resell' then
TriggerServerEvent('esx_drugs:startSellMeth')
end
if CurrentAction == 'weed_harvest' then
TriggerServerEvent('esx_drugs:startHarvestWeed')
end
if CurrentAction == 'weed_treatment' then
TriggerServerEvent('esx_drugs:startTransformWeed')
end
if CurrentAction == 'weed_resell' then
TriggerServerEvent('esx_drugs:startSellWeed')
end
if CurrentAction == 'opium_harvest' then
TriggerServerEvent('esx_drugs:startHarvestOpium')
end
if CurrentAction == 'opium_treatment' then
TriggerServerEvent('esx_drugs:startTransformOpium')
end
if CurrentAction == 'opium_resell' then
TriggerServerEvent('esx_drugs:startSellOpium')
end
CurrentAction = nil
end
end
end
while true do
Citizen.Wait(10)
if CurrentAction ~= nil then
SetTextComponentFormat('STRING')
AddTextComponentString(CurrentActionMsg)
DisplayHelpTextFromStringLabel(0, 0, 1, -1)
if IsControlJustReleased(0, Keys['E']) then
isInZone = true -- unless we set this boolean to false, we will always freeze the user
if CurrentAction == 'exitMarker' then
isInZone = false -- do not freeze user
TriggerEvent('esx_drugs:freezePlayer', false)
TriggerEvent('esx_drugs:hasExitedMarker', lastZone)
Citizen.Wait(15000)
elseif CurrentAction == 'CokeField' then
TriggerServerEvent('esx_drugs:startHarvestCoke')
elseif CurrentAction == 'CokeProcessing' then
TriggerServerEvent('esx_drugs:startTransformCoke')
elseif CurrentAction == 'CokeDealer' then
TriggerServerEvent('esx_drugs:startSellCoke')
elseif CurrentAction == 'MethField' then
TriggerServerEvent('esx_drugs:startHarvestMeth')
elseif CurrentAction == 'MethProcessing' then
TriggerServerEvent('esx_drugs:startTransformMeth')
elseif CurrentAction == 'MethDealer' then
TriggerServerEvent('esx_drugs:startSellMeth')
elseif CurrentAction == 'WeedField' then
TriggerServerEvent('esx_drugs:startHarvestWeed')
elseif CurrentAction == 'WeedProcessing' then
TriggerServerEvent('esx_drugs:startTransformWeed')
elseif CurrentAction == 'WeedDealer' then
TriggerServerEvent('esx_drugs:startSellWeed')
elseif CurrentAction == 'OpiumField' then
TriggerServerEvent('esx_drugs:startHarvestOpium')
elseif CurrentAction == 'OpiumProcessing' then
TriggerServerEvent('esx_drugs:startTransformOpium')
elseif CurrentAction == 'OpiumDealer' then
TriggerServerEvent('esx_drugs:startSellOpium')
else
isInZone = false -- not a esx_drugs zone
end
if isInZone then
TriggerEvent('esx_drugs:freezePlayer', true)
end
CurrentAction = nil
end
end
end
end)
RegisterNetEvent('esx_drugs:freezePlayer')
AddEventHandler('esx_drugs:freezePlayer', function(freeze)
FreezeEntityPosition(GetPlayerPed(-1), freeze)
end)
+22 -16
View File
@@ -3,23 +3,29 @@ Config.MarkerType = 1
Config.DrawDistance = 100.0
Config.ZoneSize = {x = 5.0, y = 5.0, z = 3.0}
Config.MarkerColor = {r = 100, g = 204, b = 100}
Config.RequiredCopsCoke = 2
Config.RequiredCopsMeth = 2
Config.RequiredCopsWeed = 0
Config.RequiredCopsOpium = 3
Config.RequiredCopsCoke = 2
Config.RequiredCopsMeth = 2
Config.RequiredCopsWeed = 2
Config.RequiredCopsOpium = 2
Config.TimeToFarm = 17 * 1000
Config.TimeToProcess = 46 * 1000
Config.TimeToSell = 5 * 1000
Config.Locale = 'fr'
Config.Zones = {
CokeFarm = {x = 2448.92, y = -1836.80, z=51.95},
CokeTreatment = {x = -458.13, y=-2278.61, z=7.51},
CokeResell = {x = -1756.19, y=427.31, z=126.68},
MethFarm = {x = 1525.29, y=1710.02, z=109.00},
MethTreatment = {x = -1001.41, y=4848.00, z=274.00},
MethResell = {x = -63.59, y=-1224.07, z=27.76},
WeedFarm = {x = 1609.12, y=6663.59, z=20.96},
WeedTreatment = {x = 91.06, y=3750.03, z=39.77},
WeedResell = {x = -54.24, y=-1443.36, z=31.06},
OpiumFarm = {x = 1972.78, y=3819.39, z=33.42},
OpiumTreatment = {x = 971.86, y=-2157.61, z=28.47},
OpiumResell = {x = 2331.08, y = 2570.22, z=46.68}
CokeField = {x = 2448.92, y = -1836.80, z = 51.95, name = _U('coke_field'), sprite = 501, color = 40},
CokeProcessing = {x = -458.13, y = -2278.61, z = 7.51, name = _U('coke_processing'), sprite = 478, color = 40},
CokeDealer = {x = -1756.19, y = 427.31, z =126.68, name = _U('coke_dealer'), sprite = 500, color = 75},
MethField = {x = 1525.29, y = 1710.02, z = 109.00, name = _U('meth_field'), sprite = 499, color = 26},
MethProcessing = {x = -1001.41, y = 4848.00, z = 274.00, name = _U('meth_processing'), sprite = 499, color = 26},
MethDealer = {x = -63.59, y = -1224.07, z = 27.76, name = _U('meth_dealer'), sprite = 500, color = 75},
WeedField = {x = 1609.12, y = 6663.59, z = 20.96, name = _U('weed_field'), sprite = 496, color = 52},
WeedProcessing = {x = 91.06, y = 3750.03, z = 39.77, name = _U('weed_processing'), sprite = 496, color = 52},
WeedDealer = {x = -54.24, y = -1443.36, z = 31.06, name = _U('weed_dealer'), sprite = 500, color = 75},
OpiumField = {x = 1972.78, y = 3819.39, z = 32.50, name = _U('opium_field'), sprite = 51, color = 60},
OpiumProcessing = {x = 971.86, y = -2157.00, z = 28.47, name = _U('opium_processing'), sprite = 51, color = 60},
OpiumDealer = {x = 2331.08, y = 2570.22, z = 46.68, name = _U('opium_dealer'), sprite = 500, color = 75}
}
-10
View File
@@ -1,10 +0,0 @@
INSERT INTO `items` (name, label) VALUES
('weed', 'Grass'),
('weed_pooch', 'Portion Grass'),
('coke', 'Koks'),
('coke_pooch', 'Portion Koks'),
('meth', 'Meth'),
('meth_pooch', 'Portion Meth'),
('opium', 'Opium'),
('opium_pooch', 'Portion Opium')
;
+9 -9
View File
@@ -1,10 +1,10 @@
INSERT INTO `items` (name, label) VALUES
('weed', 'Weed'),
('weed_pooch', 'Pochon de weed'),
('coke', 'Coke'),
('coke_pooch', 'Pochon de coke'),
('meth', 'Meth'),
('meth_pooch', 'Pochon de meth'),
('opium', 'Opium'),
('opium_pooch', 'Pochon de opium')
INSERT INTO `items` (name, label, `limit`) VALUES
('weed', 'Weed', 50),
('weed_pooch', 'Pochon de weed', 10),
('coke', 'Coke', 50),
('coke_pooch', 'Pochon de coke', 10),
('meth', 'Meth', 50),
('meth_pooch', 'Pochon de meth', 10),
('opium', 'Opium', 50),
('opium_pooch', 'Pochon de opium', 10)
;
+44 -32
View File
@@ -1,36 +1,48 @@
Locales['br'] = {
['press_collect_coke'] = 'Pressione ~INPUT_CONTEXT~ para coletar coca',
['press_process_coke'] = 'Pressione ~INPUT_CONTEXT~ para processar a coca',
['press_sell_coke'] = 'Pressione ~INPUT_CONTEXT~ para vender coca',
['press_collect_meth'] = 'Pressione ~INPUT_CONTEXT~ para coletar metanfetamina',
['press_process_meth'] = 'Pressione ~INPUT_CONTEXT~ para processar metanfetamina',
['press_sell_meth'] = 'Pressione ~INPUT_CONTEXT~ para vender metanfetamina',
['press_collect_weed'] = 'Pressione ~INPUT_CONTEXT~ para coletar erva',
['press_process_weed'] = 'Pressione ~INPUT_CONTEXT~ para processar erva',
['press_sell_opium'] = 'Pressione ~INPUT_CONTEXT~ para vender ópio',
['press_collect_coke'] = 'Pressione ~INPUT_CONTEXT~ para coletar coca',
['press_process_coke'] = 'Pressione ~INPUT_CONTEXT~ para processar a coca',
['press_sell_coke'] = 'Pressione ~INPUT_CONTEXT~ para vender coca',
['press_collect_meth'] = 'Pressione ~INPUT_CONTEXT~ para coletar metanfetamina',
['press_process_meth'] = 'Pressione ~INPUT_CONTEXT~ para processar metanfetamina',
['press_sell_meth'] = 'Pressione ~INPUT_CONTEXT~ para vender metanfetamina',
['press_collect_weed'] = 'Pressione ~INPUT_CONTEXT~ para coletar erva',
['press_process_weed'] = 'Pressione ~INPUT_CONTEXT~ para processar erva',
['press_sell_opium'] = 'Pressione ~INPUT_CONTEXT~ para vender ópio',
['press_collect_opium'] = 'Pressione ~INPUT_CONTEXT~ para coletar ópio',
['press_process_opium'] = 'Pressione ~INPUT_CONTEXT~ para processar ópio',
['press_sell_weed'] = 'Pressione ~INPUT_CONTEXT~ para vender erva',
['act_imp_police'] = 'Ação ~r~impossivel~s~, ~b~polícia~s~: ~o~%s~s~/~y~%s~s~ online',
['inv_full_coke'] = 'Você não pode mais coletar a Cocaína, seu estoque está ~r~cheio~s~',
['pickup_in_prog'] = '~y~Colheita em progresso~s~...',
['too_many_pouches'] = 'Você tem muitas trouxinhas',
['not_enough_coke'] = 'Você não tem folha de coca suficiente para ~r~empacotar~s~',
['packing_in_prog'] = '~y~Empacotamento em progresso~s~...',
['no_pouchs_sale'] = 'Você não tem mais trouxinhas para ~r~vender~s~',
['sold_one_coke'] = 'Você vendeu ~g~x1 Trouxinha de Cocaína~s~',
['sale_in_prog'] = '~g~Venda em progresso~s~...',
['inv_full_meth'] = 'Você não pode mais coletar metanfetamina, seu inventário está ~r~cheio~s~',
['not_enough_meth'] = 'Você não tem metanfetamina suficiente para ~r~embalar~s~',
['sold_one_meth'] = 'Você vendeu ~g~x1 Trouxinha de Metanfetamina~s~',
['inv_full_weed'] = 'Você não pode mais coletar erva, seu inventário está ~r~cheio~s~',
['not_enough_weed'] = 'Você não tem erva suficiente para ~r~embalar~s~',
['sold_one_weed'] = 'Você vendeu ~g~x1 Trouxinha de erva~s~',
['used_one_weed'] = 'Você usou 1 trouxinha de ~b~erva',
['press_process_opium'] = 'Pressione ~INPUT_CONTEXT~ para processar ópio',
['press_sell_weed'] = 'Pressione ~INPUT_CONTEXT~ para vender erva',
['act_imp_police'] = 'Ação ~r~impossivel~s~, ~b~polícia~s~: ~o~%s~s~/~y~%s~s~ online',
['inv_full_coke'] = 'Você não pode mais coletar a Cocaína, seu estoque está ~r~cheio~s~',
['pickup_in_prog'] = '~y~Colheita em progresso~s~...',
['too_many_pouches'] = 'Você tem muitas trouxinhas',
['not_enough_coke'] = 'Você não tem folha de coca suficiente para ~r~empacotar~s~',
['packing_in_prog'] = '~y~Empacotamento em progresso~s~...',
['no_pouchs_sale'] = 'Você não tem mais trouxinhas para ~r~vender~s~',
['sold_one_coke'] = 'Você vendeu ~g~x1 Trouxinha de Cocaína~s~',
['sale_in_prog'] = '~g~Venda em progresso~s~...',
['inv_full_meth'] = 'Você não pode mais coletar metanfetamina, seu inventário está ~r~cheio~s~',
['not_enough_meth'] = 'Você não tem metanfetamina suficiente para ~r~embalar~s~',
['sold_one_meth'] = 'Você vendeu ~g~x1 Trouxinha de Metanfetamina~s~',
['inv_full_weed'] = 'Você não pode mais coletar erva, seu inventário está ~r~cheio~s~',
['not_enough_weed'] = 'Você não tem erva suficiente para ~r~embalar~s~',
['sold_one_weed'] = 'Você vendeu ~g~x1 Trouxinha de erva~s~',
['used_one_weed'] = 'Você usou 1 trouxinha de ~b~erva',
['inv_full_opium'] = 'Você não pode mais coletar ópio, seu inventário está ~r~cheio~s~',
['not_enough_opium'] = 'Você não tem ópio suficiente para ~r~embalar~s~',
['sold_one_opium'] = 'Você vendeu ~g~x1 Trouxinha de ópio~s~',
['used_one_opium'] = 'Você usou 1 trouxinha de ~b~ópio',
['not_enough_opium'] = 'Você não tem ópio suficiente para ~r~embalar~s~',
['sold_one_opium'] = 'Você vendeu ~g~x1 Trouxinha de ópio~s~',
['used_one_opium'] = 'Você usou 1 trouxinha de ~b~ópio',
['exit_marker'] = 'press ~INPUT_CONTEXT~ to cancel the ~y~process~s~',
-- Blips
['coke_field'] = 'cocaine Field',
['coke_processing'] = 'cocaine Processing',
['coke_dealer'] = 'cocaine Dealer',
['meth_field'] = 'meth Field',
['meth_processing'] = 'meth Processing',
['meth_dealer'] = 'meth Dealer',
['weed_field'] = 'weed Field',
['weed_processing'] = 'weed Processing',
['weed_dealer'] = 'weed Dealer',
['opium_field'] = 'opium Field',
['opium_processing'] = 'opium Processing',
['opium_dealer'] = 'opium Dealer',
}
+44 -32
View File
@@ -1,36 +1,48 @@
Locales['de'] = {
['press_collect_coke'] = 'drücke ~INPUT_CONTEXT~ um Koks zu sammeln',
['press_process_coke'] = 'drücke ~INPUT_CONTEXT~ um Koks zu verarbeiten',
['press_sell_coke'] = 'drücke ~INPUT_CONTEXT~ um Koks zu verkaufen',
['press_collect_meth'] = 'drücke ~INPUT_CONTEXT~ um Meth zu sammeln',
['press_process_meth'] = 'drücke ~INPUT_CONTEXT~ um Meth zu verarbeiten',
['press_sell_meth'] = 'drücke ~INPUT_CONTEXT~ um Meth zu verkaufen',
['press_collect_weed'] = 'drücke ~INPUT_CONTEXT~ um Grass zu sammeln',
['press_process_weed'] = 'drücke ~INPUT_CONTEXT~ um Grass zu verarbeiten',
['press_sell_weed'] = 'drücke ~INPUT_CONTEXT~ um Grass zu verkaufen',
['press_collect_coke'] = 'drücke ~INPUT_CONTEXT~ um Koks zu sammeln',
['press_process_coke'] = 'drücke ~INPUT_CONTEXT~ um Koks zu verarbeiten',
['press_sell_coke'] = 'drücke ~INPUT_CONTEXT~ um Koks zu verkaufen',
['press_collect_meth'] = 'drücke ~INPUT_CONTEXT~ um Meth zu sammeln',
['press_process_meth'] = 'drücke ~INPUT_CONTEXT~ um Meth zu verarbeiten',
['press_sell_meth'] = 'drücke ~INPUT_CONTEXT~ um Meth zu verkaufen',
['press_collect_weed'] = 'drücke ~INPUT_CONTEXT~ um Grass zu sammeln',
['press_process_weed'] = 'drücke ~INPUT_CONTEXT~ um Grass zu verarbeiten',
['press_sell_weed'] = 'drücke ~INPUT_CONTEXT~ um Grass zu verkaufen',
['press_collect_opium'] = 'drücke ~INPUT_CONTEXT~ um Opium zu sammeln',
['press_process_opium'] = 'drücke ~INPUT_CONTEXT~ um Opium zu verarbeiten',
['press_sell_opium'] = 'drücke ~INPUT_CONTEXT~ um Opium zu verkaufen',
['act_imp_police'] = 'aktion ~r~nihct möglich~s~, ~b~Polizisten~s~: ~o~%s~s~/~y~%s~s~ online',
['inv_full_coke'] = 'Du kannst nicht länger Koks sammeln, dein Inventar ist ~r~VOLL~s~',
['pickup_in_prog'] = '~y~Sammeln im gange~s~...',
['too_many_pouches'] = 'du hast zuviele Pakete',
['not_enough_coke'] = 'du hast nicht genug Koks zum ~r~verpacken~s~',
['packing_in_prog'] = '~y~Verarbeitung im gange~s~...',
['no_pouchs_sale'] = 'Du hast nicht genug Portionen zum ~r~verkaufen~s~',
['sold_one_coke'] = 'du verkaufst ~g~x1 Portion Koks~s~',
['sale_in_prog'] = '~g~Verkauf im gange~s~...',
['inv_full_meth'] = 'Du kannst nicht länger Meth sammeln, dein Inventar ist ~r~VOLL~s~',
['not_enough_meth'] = 'du hast nicht genug Meth zum ~r~verpacken~s~',
['sold_one_meth'] = 'du verkaufst ~g~x1 Portion Meth~s~',
['inv_full_weed'] = 'Du kannst nicht länger Grass sammeln, dein Inventar ist ~r~VOLL~s~',
['not_enough_weed'] = 'du hast nicht genug Grass zum ~r~verarbeiten~s~',
['sold_one_weed'] = 'du verkaufst ~g~x1 Portion Grass~s~',
['used_one_weed'] = 'du benutzt 1x ~b~Grass',
['press_process_opium'] = 'drücke ~INPUT_CONTEXT~ um Opium zu verarbeiten',
['press_sell_opium'] = 'drücke ~INPUT_CONTEXT~ um Opium zu verkaufen',
['act_imp_police'] = 'aktion ~r~nihct möglich~s~, ~b~Polizisten~s~: ~o~%s~s~/~y~%s~s~ online',
['inv_full_coke'] = 'Du kannst nicht länger Koks sammeln, dein Inventar ist ~r~VOLL~s~',
['pickup_in_prog'] = '~y~Sammeln im gange~s~...',
['too_many_pouches'] = 'du hast zuviele Pakete',
['not_enough_coke'] = 'du hast nicht genug Koks zum ~r~verpacken~s~',
['packing_in_prog'] = '~y~Verarbeitung im gange~s~...',
['no_pouchs_sale'] = 'Du hast nicht genug Portionen zum ~r~verkaufen~s~',
['sold_one_coke'] = 'du verkaufst ~g~x1 Portion Koks~s~',
['sale_in_prog'] = '~g~Verkauf im gange~s~...',
['inv_full_meth'] = 'Du kannst nicht länger Meth sammeln, dein Inventar ist ~r~VOLL~s~',
['not_enough_meth'] = 'du hast nicht genug Meth zum ~r~verpacken~s~',
['sold_one_meth'] = 'du verkaufst ~g~x1 Portion Meth~s~',
['inv_full_weed'] = 'Du kannst nicht länger Grass sammeln, dein Inventar ist ~r~VOLL~s~',
['not_enough_weed'] = 'du hast nicht genug Grass zum ~r~verarbeiten~s~',
['sold_one_weed'] = 'du verkaufst ~g~x1 Portion Grass~s~',
['used_one_weed'] = 'du benutzt 1x ~b~Grass',
['inv_full_opium'] = 'Du kannst nicht länger Opium sammeln, dein Inventar ist ~r~VOLL~s~',
['not_enough_opium'] = 'du hast nicht genug Opium zum ~r~verarbeiten~s~',
['sold_one_opium'] = 'du verkaufst ~g~x1 Portion Opium~s~',
['used_one_opium'] = 'du benutzt 1x ~b~Opium',
['not_enough_opium'] = 'du hast nicht genug Opium zum ~r~verarbeiten~s~',
['sold_one_opium'] = 'du verkaufst ~g~x1 Portion Opium~s~',
['used_one_opium'] = 'du benutzt 1x ~b~Opium',
['exit_marker'] = 'press ~INPUT_CONTEXT~ to cancel the ~y~process~s~',
-- Blips
['coke_field'] = 'cocaine Field',
['coke_processing'] = 'cocaine Processing',
['coke_dealer'] = 'cocaine Dealer',
['meth_field'] = 'meth Field',
['meth_processing'] = 'meth Processing',
['meth_dealer'] = 'meth Dealer',
['weed_field'] = 'weed Field',
['weed_processing'] = 'weed Processing',
['weed_dealer'] = 'weed Dealer',
['opium_field'] = 'opium Field',
['opium_processing'] = 'opium Processing',
['opium_dealer'] = 'opium Dealer',
}
+20 -8
View File
@@ -1,8 +1,7 @@
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_coke'] = 'press ~INPUT_CONTEXT~ to collect cocaine',
['press_process_coke'] = 'press ~INPUT_CONTEXT~ to process cocaine',
['press_sell_coke'] = 'press ~INPUT_CONTEXT~ to sell cocaine',
['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',
@@ -12,14 +11,14 @@ Locales['en'] = {
['press_collect_opium'] = 'press ~INPUT_CONTEXT~ to collect opium',
['press_process_opium'] = 'press ~INPUT_CONTEXT~ to process opium',
['press_sell_opium'] = 'press ~INPUT_CONTEXT~ to sell opium',
['act_imp_police'] = 'you cannot participate illegal activities unless there\'s enough cops online (~o~%s~s~/~y~%s~s~ online)',
['act_imp_police'] = 'you cannot participate illegal activities unless there\'s enough cops online: ~o~%s~s~/~y~%s~s~ online',
['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~',
['not_enough_coke'] = 'you do not have enough coke 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~',
['sold_one_coke'] = 'you\'ve sold ~y~x1~s~ ~y~Cocaine 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~',
@@ -32,5 +31,18 @@ Locales['en'] = {
['not_enough_opium'] = 'you do not have enough opium to ~r~pack~s~',
['sold_one_opium'] = 'you\'ve sold ~g~x1 opium Pouch~s~',
['used_one_opium'] = 'you used 1 pouch of ~b~opium',
['exit_marker'] = 'press ~INPUT_CONTEXT~ to cancel the ~y~process~s~',
-- Blips
['coke_field'] = 'cocaine Field',
['coke_processing'] = 'cocaine Processing',
['coke_dealer'] = 'cocaine Dealer',
['meth_field'] = 'meth Field',
['meth_processing'] = 'meth Processing',
['meth_dealer'] = 'meth Dealer',
['weed_field'] = 'weed Field',
['weed_processing'] = 'weed Processing',
['weed_dealer'] = 'weed Dealer',
['opium_field'] = 'opium Field',
['opium_processing'] = 'opium Processing',
['opium_dealer'] = 'opium Dealer',
}
+47 -35
View File
@@ -1,36 +1,48 @@
Locales['es'] = {
['press_collect_coke'] = 'Presiona ~INPUT_CONTEXT~ para cosechar la Coca',
['press_process_coke'] = 'Presiona ~INPUT_CONTEXT~ para tratar la Coca',
['press_sell_coke'] = 'Presiona ~INPUT_CONTEXT~ para vender la Coca',
['press_collect_meth'] = 'Presiona ~INPUT_CONTEXT~ para recoger ingredientes del LSD',
['press_process_meth'] = 'Presiona ~INPUT_CONTEXT~ para cocinar el LSD',
['press_sell_meth'] = 'Presiona ~INPUT_CONTEXT~ para vender el LSD',
['press_collect_weed'] = 'Presiona ~INPUT_CONTEXT~ para cosechar el Hierbón',
['press_process_weed'] = 'Presiona ~INPUT_CONTEXT~ para embolsar el Hierbón',
['press_sell_weed'] = 'Presiona ~INPUT_CONTEXT~ para vender el Hierbón',
['press_collect_opium'] = "Presiona ~INPUT_CONTEXT~ para cosechar el Opio",
['press_process_opium'] = "Presiona ~INPUT_CONTEXT~ para tratar el Opio",
['press_sell_opium'] = "Presiona ~INPUT_CONTEXT~ para vender el Opio",
['act_imp_police'] = 'Acción ~r~imposible~s~, ~b~policias~s~: ~o~%s~s~/~y~%s~s~ online',
['inv_full_coke'] = 'No puedes recoger mas cocaina, tu inventario está ~r~lleno~s~',
['pickup_in_prog'] = '~y~Recogida en curso~s~...',
['too_many_pouches'] = 'Tienes demasiadas bolsas',
['not_enough_coke'] = 'No tienes suficiente hoja de coca para ~r~fabricar~s~',
['packing_in_prog'] = '~y~Fabricación en curso~s~...',
['no_pouches_sale'] = 'No tienes mas bolsas para ~r~vender~s~',
['sold_one_coke'] = 'Has vendido ~g~1 Gramo de Coca~s~',
['sale_in_prog'] = '~g~Venta en curso~s~...',
['inv_full_meth'] = 'No puedes recoger mas ingredientes, tu inventario está ~r~lleno~s~',
['not_enough_meth'] = 'No tienes suficientes ingredientes para ~r~fabricar~s~ mas LSD',
['sold_one_meth'] = 'Has vendido ~g~1 Bote de LSD~s~',
['inv_full_weed'] = 'No puedes recoger mas hierba, tu inventario está ~r~lleno~s~',
['not_enough_weed'] = 'No tienes suficiente hierba para ~r~embolsar~s~',
['sold_one_weed'] = 'Has vendido ~g~1 Bolsa de Hierbón~s~',
['used_one_weed'] = 'Has gastado una bolsa de ~b~hierbón',
['inv_full_opium'] = 'No puedes recoger mas hierba, tu inventario está ~r~lleno~s~',
['not_enough_opium'] = 'No tienes sufiente Opio para ~r~fabricar~s~',
['sold_one_opium'] = 'Has vendido ~g~1 Bolsa de Opio~s~',
['used_one_opium'] = 'Has gastado una bolsa de ~b~Opio',
}
['press_collect_coke'] = 'Presiona ~INPUT_CONTEXT~ para cosechar la Coca',
['press_process_coke'] = 'Presiona ~INPUT_CONTEXT~ para tratar la Coca',
['press_sell_coke'] = 'Presiona ~INPUT_CONTEXT~ para vender la Coca',
['press_collect_meth'] = 'Presiona ~INPUT_CONTEXT~ para recoger ingredientes del LSD',
['press_process_meth'] = 'Presiona ~INPUT_CONTEXT~ para cocinar el LSD',
['press_sell_meth'] = 'Presiona ~INPUT_CONTEXT~ para vender el LSD',
['press_collect_weed'] = 'Presiona ~INPUT_CONTEXT~ para cosechar el Hierbón',
['press_process_weed'] = 'Presiona ~INPUT_CONTEXT~ para embolsar el Hierbón',
['press_sell_weed'] = 'Presiona ~INPUT_CONTEXT~ para vender el Hierbón',
['press_collect_opium'] = "Presiona ~INPUT_CONTEXT~ para cosechar el Opio",
['press_process_opium'] = "Presiona ~INPUT_CONTEXT~ para tratar el Opio",
['press_sell_opium'] = "Presiona ~INPUT_CONTEXT~ para vender el Opio",
['act_imp_police'] = 'Acción ~r~imposible~s~, ~b~policias~s~: ~o~%s~s~/~y~%s~s~ online',
['inv_full_coke'] = 'No puedes recoger mas cocaina, tu inventario está ~r~lleno~s~',
['pickup_in_prog'] = '~y~Recogida en curso~s~...',
['too_many_pouches'] = 'Tienes demasiadas bolsas',
['not_enough_coke'] = 'No tienes suficiente hoja de coca para ~r~fabricar~s~',
['packing_in_prog'] = '~y~Fabricación en curso~s~...',
['no_pouches_sale'] = 'No tienes mas bolsas para ~r~vender~s~',
['sold_one_coke'] = 'Has vendido ~g~1 Gramo de Coca~s~',
['sale_in_prog'] = '~g~Venta en curso~s~...',
['inv_full_meth'] = 'No puedes recoger mas ingredientes, tu inventario está ~r~lleno~s~',
['not_enough_meth'] = 'No tienes suficientes ingredientes para ~r~fabricar~s~ mas LSD',
['sold_one_meth'] = 'Has vendido ~g~1 Bote de LSD~s~',
['inv_full_weed'] = 'No puedes recoger mas hierba, tu inventario está ~r~lleno~s~',
['not_enough_weed'] = 'No tienes suficiente hierba para ~r~embolsar~s~',
['sold_one_weed'] = 'Has vendido ~g~1 Bolsa de Hierbón~s~',
['used_one_weed'] = 'Has gastado una bolsa de ~b~hierbón',
['inv_full_opium'] = 'No puedes recoger mas hierba, tu inventario está ~r~lleno~s~',
['not_enough_opium'] = 'No tienes sufiente Opio para ~r~fabricar~s~',
['sold_one_opium'] = 'Has vendido ~g~1 Bolsa de Opio~s~',
['used_one_opium'] = 'Has gastado una bolsa de ~b~Opio',
['exit_marker'] = 'press ~INPUT_CONTEXT~ to cancel the ~y~process~s~',
-- Blips
['coke_field'] = 'cocaine Field',
['coke_processing'] = 'cocaine Processing',
['coke_dealer'] = 'cocaine Dealer',
['meth_field'] = 'meth Field',
['meth_processing'] = 'meth Processing',
['meth_dealer'] = 'meth Dealer',
['weed_field'] = 'weed Field',
['weed_processing'] = 'weed Processing',
['weed_dealer'] = 'weed Dealer',
['opium_field'] = 'opium Field',
['opium_processing'] = 'opium Processing',
['opium_dealer'] = 'opium Dealer',
}
+44 -32
View File
@@ -1,36 +1,48 @@
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',
['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',
['press_collect_opium'] = "appuyez sur ~INPUT_CONTEXT~ pour récolter l'opium",
['press_process_opium'] = "appuyez sur ~INPUT_CONTEXT~ pour traiter l'opium",
['press_sell_opium'] = "appuyez sur ~INPUT_CONTEXT~ pour vendre l'opium",
['act_imp_police'] = 'action ~r~impossible~s~, ~b~policiers~s~: ~o~%s~s~/~y~%s~s~ online',
['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 inventaire 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',
['press_process_opium'] = "appuyez sur ~INPUT_CONTEXT~ pour traiter l'opium",
['press_sell_opium'] = "appuyez sur ~INPUT_CONTEXT~ pour vendre l'opium",
['act_imp_police'] = 'action ~r~impossible~s~, ~b~policiers~s~: ~o~%s~s~/~y~%s~s~ online',
['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 inventaire 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',
['inv_full_opium'] = 'vous ne pouvez plus ramasser de weed, votre inventaire est ~r~plein~s~',
['not_enough_opium'] = 'vous n\'avez pas assez de opium à ~r~conditionner~s~',
['sold_one_opium'] = 'vous avez vendu ~g~x1 Pochon de opium~s~',
['used_one_opium'] = 'Vous avez utilisé 1 Pochon de ~b~opium',
['not_enough_opium'] = 'vous n\'avez pas assez de opium à ~r~conditionner~s~',
['sold_one_opium'] = 'vous avez vendu ~g~x1 Pochon de opium~s~',
['used_one_opium'] = 'Vous avez utilisé 1 Pochon de ~b~opium',
['exit_marker'] = 'press ~INPUT_CONTEXT~ to cancel the ~y~process~s~',
-- Blips
['coke_field'] = 'cocaine Field',
['coke_processing'] = 'cocaine Processing',
['coke_dealer'] = 'cocaine Dealer',
['meth_field'] = 'meth Field',
['meth_processing'] = 'meth Processing',
['meth_dealer'] = 'meth Dealer',
['weed_field'] = 'weed Field',
['weed_processing'] = 'weed Processing',
['weed_dealer'] = 'weed Dealer',
['opium_field'] = 'opium Field',
['opium_processing'] = 'opium Processing',
['opium_dealer'] = 'opium Dealer',
}
+14 -2
View File
@@ -1,5 +1,4 @@
Locales['sv'] = {
['press_collect_coke'] = 'klicka ~INPUT_CONTEXT~ för att plocka kokain',
['press_process_coke'] = 'klicka ~INPUT_CONTEXT~ för att bearbeta kokain',
['press_sell_coke'] = 'klicka ~INPUT_CONTEXT~ för att sälja coke',
@@ -32,5 +31,18 @@ Locales['sv'] = {
['not_enough_opium'] = 'Du har inte tillräckligt med opium för att ~r~bearbeta~s~',
['sold_one_opium'] = 'du har sålt ~y~1x~s~ ~b~väska med opium~s~',
['used_one_opium'] = 'Du använde 1 väska ~b~opium',
['exit_marker'] = 'tryck ~INPUT_CONTEXT~ för att avbryta pågående process',
-- Blips
['coke_field'] = 'coke field',
['coke_processing'] = 'coke processing',
['coke_dealer'] = 'coke dealer',
['meth_field'] = 'meth field',
['meth_processing'] = 'meth processing',
['meth_dealer'] = 'meth dealer',
['weed_field'] = 'weed field',
['weed_processing'] = 'weed processing',
['weed_dealer'] = 'weed dealer',
['opium_field'] = 'opium field',
['opium_processing'] = 'opium processing',
['opium_dealer'] = 'opium dealer',
}
+10
View File
@@ -0,0 +1,10 @@
INSERT INTO `items` (name, label, `limit`) VALUES
('weed', 'Grass', 50),
('weed_pooch', 'Portion Grass', 10),
('coke', 'Koks', 50),
('coke_pooch', 'Portion Koks', 10),
('meth', 'Meth', 50),
('meth_pooch', 'Portion Meth', 10),
('opium', 'Opium', 50),
('opium_pooch', 'Portion Opium', 10)
;
+10
View File
@@ -0,0 +1,10 @@
INSERT INTO `items` (name, label, `limit`) VALUES
('weed', 'Weed', 50),
('weed_pooch', 'Bag of weed', 10),
('coke', 'Cocaine', 50),
('coke_pooch', 'Bag of cocaine', 10),
('meth', 'Meth', 50),
('meth_pooch', 'Bag of meth', 10),
('opium', 'Opium', 50),
('opium_pooch', 'Bag of opium', 10)
;
+10
View File
@@ -0,0 +1,10 @@
INSERT INTO `items` (name, label, `limit`) VALUES
('weed', 'Cannabis', 50),
('weed_pooch', 'Väska med cannabis', 10),
('coke', 'Kokain', 50),
('coke_pooch', 'Väska med kokain', 10),
('meth', 'Meth', 50),
('meth_pooch', 'Väska med meth', 10),
('opium', 'Opium', 50),
('opium_pooch', 'Väska med opium', 10)
;
+105 -111
View File
@@ -28,8 +28,7 @@ function CountCops()
end
end
SetTimeout(5000, CountCops)
SetTimeout(120 * 1000, CountCops)
end
CountCops()
@@ -42,7 +41,7 @@ local function HarvestCoke(source)
return
end
SetTimeout(5000, function()
SetTimeout(Config.TimeToFarm, function()
if PlayersHarvestingCoke[source] == true then
@@ -90,12 +89,12 @@ local function TransformCoke(source)
return
end
SetTimeout(10000, function()
SetTimeout(Config.TimeToProcess, function()
if PlayersTransformingCoke[source] == true then
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
local cokeQuantity = xPlayer.getInventoryItem('coke').count
local poochQuantity = xPlayer.getInventoryItem('coke_pooch').count
@@ -144,12 +143,12 @@ local function SellCoke(source)
return
end
SetTimeout(7500, function()
SetTimeout(Config.TimeToSell, function()
if PlayersSellingCoke[source] == true then
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
local poochQuantity = xPlayer.getInventoryItem('coke_pooch').count
@@ -158,24 +157,24 @@ local function SellCoke(source)
else
xPlayer.removeInventoryItem('coke_pooch', 1)
if CopsConnected == 0 then
xPlayer.addAccountMoney('black_money', 198)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_coke'))
elseif CopsConnected == 1 then
xPlayer.addAccountMoney('black_money', 258)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_coke'))
elseif CopsConnected == 2 then
xPlayer.addAccountMoney('black_money', 308)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_coke'))
elseif CopsConnected == 3 then
xPlayer.addAccountMoney('black_money', 358)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_coke'))
elseif CopsConnected == 4 then
xPlayer.addAccountMoney('black_money', 396)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_coke'))
elseif CopsConnected >= 5 then
xPlayer.addAccountMoney('black_money', 428)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_coke'))
end
xPlayer.addAccountMoney('black_money', 198)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_coke'))
elseif CopsConnected == 1 then
xPlayer.addAccountMoney('black_money', 258)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_coke'))
elseif CopsConnected == 2 then
xPlayer.addAccountMoney('black_money', 308)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_coke'))
elseif CopsConnected == 3 then
xPlayer.addAccountMoney('black_money', 358)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_coke'))
elseif CopsConnected == 4 then
xPlayer.addAccountMoney('black_money', 396)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_coke'))
elseif CopsConnected >= 5 then
xPlayer.addAccountMoney('black_money', 428)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_coke'))
end
SellCoke(source)
end
@@ -214,12 +213,12 @@ local function HarvestMeth(source)
return
end
SetTimeout(5000, function()
SetTimeout(Config.TimeToFarm, function()
if PlayersHarvestingMeth[source] == true then
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
local meth = xPlayer.getInventoryItem('meth')
@@ -263,12 +262,12 @@ local function TransformMeth(source)
return
end
SetTimeout(12000, function()
SetTimeout(Config.TimeToProcess, function()
if PlayersTransformingMeth[source] == true then
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
local methQuantity = xPlayer.getInventoryItem('meth').count
local poochQuantity = xPlayer.getInventoryItem('meth_pooch').count
@@ -317,12 +316,12 @@ local function SellMeth(source)
return
end
SetTimeout(7500, function()
SetTimeout(Config.TimeToSell, function()
if PlayersSellingMeth[source] == true then
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
local poochQuantity = xPlayer.getInventoryItem('meth_pooch').count
@@ -331,27 +330,27 @@ local function SellMeth(source)
else
xPlayer.removeInventoryItem('meth_pooch', 1)
if CopsConnected == 0 then
xPlayer.addAccountMoney('black_money', 276)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_meth'))
elseif CopsConnected == 1 then
xPlayer.addAccountMoney('black_money', 374)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_meth'))
elseif CopsConnected == 2 then
xPlayer.addAccountMoney('black_money', 474)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_meth'))
elseif CopsConnected == 3 then
xPlayer.addAccountMoney('black_money', 552)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_meth'))
elseif CopsConnected == 4 then
xPlayer.addAccountMoney('black_money', 616)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_meth'))
elseif CopsConnected == 5 then
xPlayer.addAccountMoney('black_money', 654)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_meth'))
elseif CopsConnected >= 6 then
xPlayer.addAccountMoney('black_money', 686)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_meth'))
end
xPlayer.addAccountMoney('black_money', 276)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_meth'))
elseif CopsConnected == 1 then
xPlayer.addAccountMoney('black_money', 374)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_meth'))
elseif CopsConnected == 2 then
xPlayer.addAccountMoney('black_money', 474)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_meth'))
elseif CopsConnected == 3 then
xPlayer.addAccountMoney('black_money', 552)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_meth'))
elseif CopsConnected == 4 then
xPlayer.addAccountMoney('black_money', 616)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_meth'))
elseif CopsConnected == 5 then
xPlayer.addAccountMoney('black_money', 654)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_meth'))
elseif CopsConnected >= 6 then
xPlayer.addAccountMoney('black_money', 686)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_meth'))
end
SellMeth(source)
end
@@ -390,12 +389,12 @@ local function HarvestWeed(source)
return
end
SetTimeout(5000, function()
SetTimeout(Config.TimeToFarm, function()
if PlayersHarvestingWeed[source] == true then
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
local xPlayer = ESX.GetPlayerFromId(_source)
local weed = xPlayer.getInventoryItem('weed')
@@ -439,7 +438,7 @@ local function TransformWeed(source)
return
end
SetTimeout(7500, function()
SetTimeout(Config.TimeToProcess, function()
if PlayersTransformingWeed[source] == true then
@@ -492,7 +491,7 @@ local function SellWeed(source)
return
end
SetTimeout(7500, function()
SetTimeout(Config.TimeToSell, function()
if PlayersSellingWeed[source] == true then
@@ -505,22 +504,22 @@ local function SellWeed(source)
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, _U('sold_one_weed'))
elseif CopsConnected == 1 then
xPlayer.addAccountMoney('black_money', 128)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_weed'))
elseif CopsConnected == 2 then
xPlayer.addAccountMoney('black_money', 152)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_weed'))
elseif CopsConnected == 3 then
xPlayer.addAccountMoney('black_money', 165)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_weed'))
elseif CopsConnected >= 4 then
xPlayer.addAccountMoney('black_money', 180)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_weed'))
end
if CopsConnected == 0 then
xPlayer.addAccountMoney('black_money', 108)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_weed'))
elseif CopsConnected == 1 then
xPlayer.addAccountMoney('black_money', 128)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_weed'))
elseif CopsConnected == 2 then
xPlayer.addAccountMoney('black_money', 152)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_weed'))
elseif CopsConnected == 3 then
xPlayer.addAccountMoney('black_money', 165)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_weed'))
elseif CopsConnected >= 4 then
xPlayer.addAccountMoney('black_money', 180)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_weed'))
end
SellWeed(source)
end
@@ -561,12 +560,12 @@ local function HarvestOpium(source)
return
end
SetTimeout(5000, function()
SetTimeout(Config.TimeToFarm, function()
if PlayersHarvestingOpium[source] == true then
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
local xPlayer = ESX.GetPlayerFromId(_source)
local opium = xPlayer.getInventoryItem('opium')
@@ -610,7 +609,7 @@ local function TransformOpium(source)
return
end
SetTimeout(10000, function()
SetTimeout(Config.TimeToProcess, function()
if PlayersTransformingOpium[source] == true then
@@ -664,7 +663,7 @@ local function SellOpium(source)
return
end
SetTimeout(7500, function()
SetTimeout(Config.TimeToSell, function()
if PlayersSellingOpium[source] == true then
@@ -678,24 +677,24 @@ local function SellOpium(source)
else
xPlayer.removeInventoryItem('opium_pooch', 1)
if CopsConnected == 0 then
xPlayer.addAccountMoney('black_money', 300)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_opium'))
elseif CopsConnected == 1 then
xPlayer.addAccountMoney('black_money', 500)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_opium'))
elseif CopsConnected == 2 then
xPlayer.addAccountMoney('black_money', 700)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_opium'))
elseif CopsConnected == 3 then
xPlayer.addAccountMoney('black_money', 800)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_opium'))
elseif CopsConnected == 4 then
xPlayer.addAccountMoney('black_money', 900)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_opium'))
elseif CopsConnected >= 5 then
xPlayer.addAccountMoney('black_money', 1000)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_opium'))
end
xPlayer.addAccountMoney('black_money', 300)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_opium'))
elseif CopsConnected == 1 then
xPlayer.addAccountMoney('black_money', 500)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_opium'))
elseif CopsConnected == 2 then
xPlayer.addAccountMoney('black_money', 700)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_opium'))
elseif CopsConnected == 3 then
xPlayer.addAccountMoney('black_money', 800)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_opium'))
elseif CopsConnected == 4 then
xPlayer.addAccountMoney('black_money', 900)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_opium'))
elseif CopsConnected >= 5 then
xPlayer.addAccountMoney('black_money', 1000)
TriggerClientEvent('esx:showNotification', source, _U('sold_one_opium'))
end
SellOpium(source)
end
@@ -726,15 +725,13 @@ AddEventHandler('esx_drugs:stopSellOpium', function()
end)
-- RETURN INVENTORY TO CLIENT
RegisterServerEvent('esx_drugs:GetUserInventory')
AddEventHandler('esx_drugs:GetUserInventory', function(currentZone)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
TriggerClientEvent('esx_drugs:ReturnInventory',
_source,
xPlayer.getInventoryItem('coke').count,
local xPlayer = ESX.GetPlayerFromId(_source)
TriggerClientEvent('esx_drugs:ReturnInventory',
_source,
xPlayer.getInventoryItem('coke').count,
xPlayer.getInventoryItem('coke_pooch').count,
xPlayer.getInventoryItem('meth').count,
xPlayer.getInventoryItem('meth_pooch').count,
@@ -744,18 +741,15 @@ AddEventHandler('esx_drugs:GetUserInventory', function(currentZone)
xPlayer.getInventoryItem('opium_pooch').count,
xPlayer.job.name,
currentZone
)
)
end)
-- Register Usable Item
ESX.RegisterUsableItem('weed', function(source)
local _source = source
local xPlayer = ESX.GetPlayerFromId(source)
local xPlayer = ESX.GetPlayerFromId(_source)
xPlayer.removeInventoryItem('weed', 1)
TriggerClientEvent('esx_drugs:onPot', _source)
TriggerClientEvent('esx:showNotification', _source, _U('used_one_weed'))
TriggerClientEvent('esx:showNotification', _source, _U('used_one_weed'))
end)
-10
View File
@@ -1,10 +0,0 @@
INSERT INTO `items` (name, label) VALUES
('weed', 'Cannabis'),
('weed_pooch', 'Väska med cannabis'),
('coke', 'Kokain'),
('coke_pooch', 'Väska med kokain'),
('meth', 'Meth'),
('meth_pooch', 'Väska med meth'),
('opium', 'Opium'),
('opium_pooch', 'Väska med opium')
;