i have error in the console ,,server.lua:55: unexpected symbol near ')'
RegisterServerEvent('eotix-vehicleshop:CheckMoneyForVeh')
AddEventHandler('eotix-vehicleshop:CheckMoneyForVeh', function(veh, price, name, vehicleProps)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
if xPlayer.getMoney() >= tonumber(price) then
xPlayer.removeMoney(tonumber(price))
local vehiclePropsjson = json.encode(vehicleProps)
if Config.SpawnVehicle then
stateVehicle = 0
else
stateVehicle = 1
end
MySQL.Async.execute('INSERT INTO owned_vehicles (owner, plate, vehicle) VALUES (
Owner, @plate, @vehicle)',
{
['
Owner'] = xPlayer.identifier,
['@plate'] = vehicleProps.plate,
['@vehicle'] = json.encode(vehicleProps)
}, function (rowsChanged)
end)
end
end)