[Release][ESX] Give or delete owned vehicle to database (plate can custom or random generate)

you tired to remove “[’@stored’] = 1” in server.lua SQL sytax it is on line 87

every car buddy

i didnt remove anything

I want to add a space on the license plate, such as A xxxxx

How to do it

I am using the new es_extended and I also added myself as superadmin in server.cfg and in the database but I still cannot use the command.

2 Likes

does command on console work?

No it doesnt :frowning:

any errors?

I dont get any errors. I just enter the command and nothing happens.

same problem as above :frowning:

2 Likes

I’m getting the same error message. If I have time to look into it, I’ll report back if I find a solution.

thank you~

it work on my windows server. but when i change to linux server. it got me the same error as well… anyone able to fix it? i ve spent more then 6 hrs try to figure this out… i try to update my sql , phpmyadmin and everything. and also my artifact for my linux still doesnt work… please if any one have any solution… will be appreciated if u share it.

1 Like

I experienced the same thing, I tried to fix it and it worked, try changing the code line 82 in server.lua SQL sytax :

MySQL.Async.execute('INSERT INTO owned_vehicles (owner, plate, vehicle, stored) VALUES (@owner, @plate, @vehicle, @stored)',

change to :

MySQL.Async.execute('INSERT INTO owned_vehicles (owner, plate, vehicle) VALUES (@owner, @plate, @vehicle)',

and delete or disable line 87 in server.lua :

['@stored']  = 1

change to :

--['@stored']  = 1
4 Likes

thx bro :smiley:

1 Like

Does it work with esx 1.2?

you can try it and reply here

Hello! I just tried it on latest ESX and the script loads correctly and so on but there are no commands… /givecar doesn’t exist, /givecarplate doesn’t exist …
were those based on essentialmode? because esx dumped es

because ESX command does not apply to the latest version
you can change any command code to RegisterCommand to register command
Or using command on console but prefix need change to “_”, example: _givecar t20 1