Look for in your vehicleshop script, the function to give a vehicle to a player, in our case this is our function
Config.BuyFunction = function(src, xPlayer, props, model)
MySQL.Async.execute('INSERT INTO owned_vehicles (owner, plate, vehicle, state) VALUES (@owner, @plate, @vehicle, @state)',
{
['@owner'] = xPlayer.identifier,
['@plate'] = props.plate,
['@vehicle'] = json.encode(props),
['@state'] = 0,
}, function(rowsChanged)
end
Config.BuyFunction = function(src, xPlayer, props, model)
MySQL.Async.execute('INSERT INTO owned_vehicles (owner, plate, vehicle, state, cat) VALUES (@owner, @plate, @vehicle, @state, @cat)',
{
['@owner'] = xPlayer.identifier,
['@plate'] = props.plate,
['@vehicle'] = json.encode(props),
['@state'] = 0,
['@cat'] = lib.callback.await('i_garages:getVehicleCategory', source, model),
}, function(rowsChanged)
end)
end