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

esx
esx_vehicleshop

#22

Then import his sql to create the table intended?


#23

sorry i did add his sql but as you said its not validating that the car is mine.
i was thinking it could be my bdatabase making truble


#24

Has anyone found a solution?


#25

I have the same problem, 11 vehicles issue


#26

its very odd


#27

I can’t get the error i’m trying to recieve the message “11 vehicles” it only gives me that when i dont own it or its 11 vehicles there. Make sure you have the newest vehicleshop. And if you udated esx_vehicleshop and this still doesn’t work try redownloading this. I REALLY cant get that message.


#28

server/main.lua rewrite line 40 local plate = vehicleProps[“plate”] to local plate = vehicleProps.plate


#29

Still doesn’t work…


#30

On my server, this fix works well


#31

Yes i think some people use modified garages and the vehicles get saved by plate not ID.


#32

I use esx_eden_garage


#33

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?


#34

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


#35
 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.


#36

Fixed that newest push download new server.lua.


#37

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


#38

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)

#39

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

#40

Cool. That worked for me! :point_up_2:

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


#41

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