Esx_policejob cant buy vehicle

Hello, we have the mistake of not being able to buy cars in the police job. We looked in the console and found this error.
I hope you can help me.
Thanks in advance

Error in text:
[ script:oxmysql] SCRIPT ERROR in promise (unhandled): Error: esx_policejob was unable to execute
a query!
[ script:oxmysql] Unknown column ‘type’ in ‘field list’
[ script:oxmysql] INSERT INTO owned_vehicles (owner, vehicle, plate, type, job, stored) VALUES
(‘44d31fa431c494896ae28c774d107ce617464841’, ‘{“modPlateHolder”:-1,“fuelLevel”:65.0,“modOrnaments”:-1,“modWindows”:-1,“modRearBumper”:-1,“modArchCover”:-1,“color1”:1,“pearlescentColor”:3,“modFrame”:-1,“neonEnabled”:[false,false,false,false],“modRoof”:-1,“modSideSkirt”:-1,“engineHealth”:1000.0,“modArmor”:-1,“modFrontBumper”:-1,“modExhaust”:-1,“modAerials”:-1,“modTank”:-1,“modTrunk”:-1,“wheelColor”:156,“modAPlate”:-1,“modVanityPlate”:-1,“wheels”:0,“neonColor”:[255,0,255],“modFrontWheels”:-1,“modSuspension”:-1,“modRightFender”:-1,“modDashboard”:-1,“modStruts”:-1,“modEngine”:-1,“modSteeringWheel”:-1,“modTurbo”:false,“modLivery”:-1,“modDial”:-1,“modHood”:-1,“modBrakes”:-1,“windowTint”:-1,“xenonColor”:255,“color2”:1,“dirtLevel”:10.0,“plate”:“XZO 860”,“plateIndex”:4,“modSpoilers”:-1,“modEngineBlock”:-1,“modTrimB”:-1,“modTransmission”:-1,“extras”:{“1”:false,“2”:true,“10”:false,“5”:false,“6”:false,“3”:false,“4”:false},“modXenon”:false,“modSmokeEnabled”:false,“modSeats”:-1,“modAirFilter”:-1,“modHorns”:-1,“modShifterLeavers”:-1,“modFender”:-1,“modSpeakers”:-1,“modTrimA”:-1,“modGrille”:-1,“tankHealth”:1000.0,“model”:1127131465,“tyreSmokeColor”:[255,255,255],“modDoorSpeaker”:-1,“modHydrolic”:-1,“bodyHealth”:1000.0,“modBackWheels”:-1}’, ‘XZO 860’, ‘car’, ‘police’, true)

you need to add this sql in you database.
ALTER TABLE owned_vehicles ADD type VARCHAR(20) NOT NULL DEFAULT ‘‘car’’ AFTER vehicle;

I made an sql data and now this error comes

then bro delete owned vehicles table and add new table.
don’t forgot to add your garage sql to.
you can see owned vehicles sql in esx_vehicleshop script

I did it, but we cant do it, i imported the sql from the esx_vehicleshop

Just syntax error, try this :

ALTER TABLE owned_vehicles ADD type VARCHAR(20) NOT NULL DEFAULT car AFTER vehicle ;

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.