[Release] esx-qalle-sellvehicles (sell used cars)

,

I use esx_eden_garage

the script does not work because the backup in the database does not do it because I have the old version and it does not register id and not by plate how to make the script works?

You edit the script to your garage / vehicleshop, im using the newest version of esx_vehicleshop where the plate is “ABC 123”

 citizen:/scripting/lua/scheduler.lua:379: server/main.lua:97: attempt to index a nil value (field '?')
stack traceback:
        server/main.lua:97: in upvalue 'ref'
        citizen:/scripting/lua/scheduler.lua:365: in function <citizen:/scripting/lua/scheduler.lua:364>
        [C]: in function 'xpcall'
        citizen:/scripting/lua/scheduler.lua:364: in function <citizen:/scripting/lua/scheduler.lua:363>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:379: in function <citizen:/scripting/lua/scheduler.lua:348>

When someone buy my car i dont get the money and i get this error in logs.

Fixed that newest push download new server.lua.

Yes but the new version of esx_vehicleshop is bug we can not access the menu but a function error!

Maybe I found the solution:

replace this:
esx_vehicleshop/client/main.lua :1004

ESX.ShowHelpNotification(CurrentActionMsg)

with this:

SetTextComponentFormat('STRING')
AddTextComponentString(CurrentActionMsg)
 DisplayHelpTextFromStringLabel(0, 0, 1, -1)

To fix some issues you need to add

function all_trim(s)
    if s ~= nil then
		return s:match("^%s*(.-)%s*$")
	else
		return nil
    end
end

The issue is if you got a short numberplate with 7 chars insted of default 8 like GTA, the plates wont ever match, because a space is added in the end, the work around is a small trim function.

if all_trim(plate) == all_trim(v.plate) and #Config.VehiclePositions ~= VehiclesForSale then
1 Like

Cool. That worked for me! :point_up_2:

Edit:
This tho, when I put car up for sale and then reconnect :sweat_smile:

Why doesnt this happen to me :stuck_out_tongue: Easy fix do if you lower Z by - 0.985 will fix that.

Added that let’s see if it fixed it.

2 Likes

GetEntityHeightAboveGround(vehicle) and then subtract the height returned? :slight_smile:

I would also like to say thank you for the great script

really for some reason when server restarts the cars when they appear, they appear floating until someone puts some car to sell.

have to put a spawn to pick up the vehicles after removing or buying instead of going in the garage or impound search

2 Likes

hi, does anyone know where I can find the menus style that are in the picture of this script?

Hello during the testing of the script often appears such an error. The seller does not receive money for the vehicle sold. I put the same vehicle again for sale and the error did not come and the seller got his money. Unfortunately, I can not locate the problem, maybe time has an impact on this error because the vehicle was exposed about 2 hours

And you are using the latest version?

Probably not, my mistake. I will check if the error appears on the new version of the script

REALLY FİX THİS PROBLEM MAN.

https://forum.cfx.re/uploads/default/original/3X/5/7/57ec29e2a8f2e2d5ca6dfac0b349a9e41e782020.jpeg