any way to make it so off dutey police and ems can use it
using the old on
How do yo see that
Anyone with meth script?
I’m using version 1.0.2, and the problem i’m having is when cops go through their menu and try to confiscate weed, it says invalid amount, no matter how much they have. Same thing with opium. Anyone know of how to fix this, or have the same problem?
how police can see or interact with the drug zones?
Add this in your server/main.lua
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
function CountCops()
local xPlayers = ESX.GetPlayers()
CopsConnected = 0
for i=1, #xPlayers, 1 do
local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
if xPlayer.job.name == 'police' then
CopsConnected = CopsConnected + 1
end
end
SetTimeout(5000, CountCops)
end
CountCops()
then, in server/main.lua
Under :
RegisterServerEvent('esx_drugs:sellDrug')
AddEventHandler('esx_drugs:sellDrug', function(itemName, amount)
local xPlayer = ESX.GetPlayerFromId(source)
local price = Config.DrugDealerItems[itemName]
local xItem = xPlayer.getInventoryItem(itemName)
PUT
if CopsConnected < Config.RequiredCops then
TriggerClientEvent('esx:showNotification', source, _U('act_imp_police') .. CopsConnected .. '/' .. Config.RequiredCops)
return
end
In config.lua :
Config.RequiredCops = 1
change to whatever you want !
in locale/…
ADD
['act_imp_police'] = 'Pas assez de policiers',
with your language
that’s all
me too
yes please share
SO i need help about these cuz, the players can move while catching drugs… i want them to stand and still…does someone have a script for that?
Use This Script if you need a Meth,opium,etc
And You Need a little fix in this script ! try this
I have a question, where can I trim the weed in to the Weedbags?
just go to the procces weed ! , if you wan player dont have 420 weed and bag of weed 15 just go to your db and go to your items table and change the limit !
How do i remove blips [esx_drugs v1.0.2]
So im using esx_drugs and would like to remove all this blip drugs (In red) and i would like to not remove the other ones (opium) can someone help me out?
just delete it or just use – in the left , for the script is stop and the system not gonna reading the script / blip
Hello, is there a way to show sell and process notification only if the player have drug into his inventory?
when i do the weed processing i get this error
Error running call reference function for resource esx_drugs: citizen:/scripting/lua/scheduler.lua:355: @esx_drugs/server/main.lua:87: attempt to index a nil value (local ‘xMarijuana’)
stack traceback:
@esx_drugs/server/main.lua:87: in upvalue ‘ref’
citizen:/scripting/lua/scheduler.lua:341: in function citizen:/scripting/lua/scheduler.lua:340
[C]: in function ‘xpcall’
citizen:/scripting/lua/scheduler.lua:340: in function citizen:/scripting/lua/scheduler.lua:339
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:355: in function citizen:/scripting/lua/scheduler.lua:324
Error resuming coroutine: citizen:/scripting/lua/MessagePack.lua:830: missing bytes
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/MessagePack.lua:830: in method ‘underflow’
citizen:/scripting/lua/MessagePack.lua:465: in field ‘any’
citizen:/scripting/lua/MessagePack.lua:860: in field ‘unpack’
citizen:/scripting/lua/scheduler.lua:578: in upvalue ‘cb’
a:14: in function <@es_extended/server/functions.lua:10>
did you import the items in the sql ?