probably a error with canCarryItem thats because you dont have the latest esx v1
aka esxv1-final
probably a error with canCarryItem thats because you dont have the latest esx v1
aka esxv1-final
Hi and first of all thank you for releasing this script, it is very nice.
From my experience seems the position of the person will stay on map forever. Police can see the position at any time, the timeout is not applied.
Using onesync.
have this problem in the server.main.lua
SCRIPT ERROR: @Lenzh_chopshop/server/main.lua:29: attempt to compare nil with number…
I’ve got an issue where I’m receiving rewards, however it’s not a true “chance” of the reward list. For example, there’s 6 possible reward items in the Config list. Therefor, you receive an item 6 times, some could be duplicates, THEN the math.random kicks in, giving X amount of said item.
Example: I chop a car and receive the following:
Rather than receiving maybe 3 steel and 2 glass. That’s IT.
Also, local vehicles aren’t deleting. However ones that I spawn will delete. Any help would be appreciated.
Anybody know a way to stop our rental vehicles from being chopped? Maybe a license plate blacklist since our rentals get assigned the plate “RENTAL”
I just deleted that code because the blip keeps showing on the map.
I also have a little problem that sometimes the cars wont chop… i restart script and have no problem with it anymore… until it stops working again.
You will see the blip on the map, but when i drive on the spot it says pres ‘‘e’’ so i do, and nothing happens… When i drive out of it, and go back it says come back in 10 minutes like it is on specific cars…
Motorbikes can be chopped but afterwards you can still drive them.
When you get to the chop check for the plate before you let the process start?
Get the plate of the vehicle that the player is in, if its equal to “RENTAL” then tell them to feck off, pretty simple.
Yeah; i looked about two Hours for a solution because i had the same Problem.
And i have a Solution:
Just rename the Resourcefolder to Lenz-Chopshop OR (what i made) just rename the Resourcefolder to “esx_chopshop” and DONT FORGET to edit ALL the Lines in the Script Client- and Serversided to Register and Trigger the right Events!!
Lines:
you there sir are a shame to the community for renaming a script without the creators name in it… the resource is called Lenzh_Chopshop… its not supposed to be calles esx_chopshop!
I didn’t mean it condescending, but i want to tell an oppertunity to solve the Problem with the selling menu, if other Members have the same Problem
Sorry for that and i am apologize for this
Hello, so i like how this script looks in the video, but i have a problem, so when he in the video starts chooping the car, the blue progress bar comes out in the middle unlike to my situation where it comes out on the left of the screen above the map, for example like gta online mission invite, and when it says let john finish up or smth like that it gives me no items, anyone help please
im getting this error when i use it ive managed to fix other errors but cant getrid of this
one. how do i fix it.
error
the code i changed but not sure i did it right because i still get the error above
try this
RegisterServerEvent("Lenzh_chopshop:ChopRewards")
AddEventHandler("Lenzh_chopshop:ChopRewards", function(rewards)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
for i= 1, 3, 1 do
local chance = math.random(1, #Config.Items)
local amount = math.random(1,3)
local myItem = Config.Items[chance]
if xPlayer.getInventoryItem(v).count >= xPlayer.getInventoryItem(v).limit then
xPlayer.addInventoryItem(myItem, amount)
TriggerClientEvent('esx:showNotification', source, '~g~Rewards has been given!')
else
TriggerClientEvent('esx:showNotification', source, '~r~You cant carry anymore!')
end
end
end)
What would you need to change in the script if in the database say you have 10 items that you want to give all the times but just a random amount of each item like a 0 3 so that way it will either give 0 1 2 or 3 items
I figure its something to do with this part that needs changing as you want to remove the chance or what items are given.
local chance = math.random(1, #Config.Items)
Reason I am looking at this as I know atm local chance you can end up with multiple lines of the same item
Or is there a way to update the script so when you random the Config.Items it doesnt allow duplicate items?
hey just wondering what line of code do i change so that you cant chop player owned cars and make so you only chop npc cars. thankyou in advance
for some reson it wont give me items
Iv got the same issue and cant work out why.