yep
dont see any errors. sorry im being a pain in the butt. I don’t know if it matters but I did change your items to the old limit system instead of weight. so that and my version of meth_pooch use the limit system. I don’t think that would mess with anything but It is something that I did. I did not change any other coding.
wait wait I did check my console,
[91mSCRIPT ERROR: @esx_mobilemeth/server/main.lua:28: attempt to call a nil value (field ‘canCarryItem’)e[0m
the f8 menu was not showing anything
AddEventHandler('esx_mobilemeth:server:giveMeth', function()
local sourcePlayer = ESX.GetPlayerFromId(source)
local amount = math.random(2, 5)
if sourcePlayer.canCarryItem('meth_pooch', amount) then
sourcePlayer.addInventoryItem('meth_pooch', amount)
else
sourcePlayer.showNotification("You can't carry this amount of bags...")
end
end)```
Are you running on legacy 1.2 ESX?
heck that’s probably it. Started the server back in early November 2019. Honestly I can get around a lot of different settings. Tiny bit of codeing here and there. Was to afraid to update to the newest version of es_exteneded. Was really worried i would have to start a cascade of different things that needed to be fixed.
Yeah, thats probably it, since older versions are working with a limit system. This one is working with the weight system.
If you want I can add a config option to toggle weight to limit system, then you don’t necessarily need to update your ESX version.
That would be amazing!! I know converting everything to the weight system was something I was never going to do. I been lucky enough with a lot of scripts in the past just to use items I already have in the data base. If you could make a toggle or something It would be amazing!!! Thank you 3000!
UPDATE
- Added config option to toggle between ESX limit and weight system
Config.usingWeight = true- Set to false when you’re using ESX limit system instead of weight.
Update got reverted and did it again since there was a nil value error on item count when using ESX Limit system, should be fixed now.
Bad and stolen script.
Stolen? :’) and you are? A ghost?
Hi, the script works fine except for when i start producing, it will give me an error: [script:esx_mobilemet] SCRIPT ERROR: @esx_mobilemeth/server/main.lua:36: attempt to index a nil value (local ‘sourceItem’)
i’m using the limit system and i’ve changed it in the config file but it still won’t work.
Any help? Thanks!
