I don’t think I’ve ever seen such an amount of insecure server events in one script before
RegisterServerEvent('k-dealership:owncar', function(vehicle, plate)
RegisterServerEvent('k-dealership:purchaseshop', function(name)
RegisterServerEvent('k-dealership:storevehicle', function(plate, hash, vehProperties, bodyDamage, engineDamage, totalFuel, name)
-- How many queries do you need ????
RegisterServerEvent('k-dealership:updatecarloc', function(entityid, plate, x, y, z, heading)
MySQL.query('UPDATE dealership_cars SET entityid = ? WHERE vehicleplate = ?', {entityid, plate})
MySQL.query('UPDATE dealership_cars SET x = ? WHERE vehicleplate = ?', {x, plate})
MySQL.query('UPDATE dealership_cars SET y = ? WHERE vehicleplate = ?', {y, plate})
MySQL.query('UPDATE dealership_cars SET z = ? WHERE vehicleplate = ?', {z, plate})
MySQL.query('UPDATE dealership_cars SET w = ? WHERE vehicleplate = ?', {heading, plate})
MySQL.query('UPDATE dealership_cars SET state = ? WHERE vehicleplate = ?', {3, plate})
end)
RegisterServerEvent('k-dealership:changecarstatestore', function(plate)
RegisterServerEvent('k-dealership:changecarstate', function(entityid, plate)
RegisterServerEvent('k-dealership:setoutcar', function(entry, hash, name, plate, props, body, engine, fuel)
-- My favourites
RegisterServerEvent('k-dealership:setprice', function(entry, plate)
RegisterServerEvent('k-dealership:transfer', function(source, plate)
RegisterServerEvent('k-dealership:removestock', function(plate, name, price)
RegisterServerEvent('k-dealership:setfunds', function(source, input, type, funds, name)
And all the checks are done clientside after some qb server callbacks ? Why are you trusting the client for anything ? This script is a minefield and should be put on a sticky for what NOT to do. Have you ever heard of injectors ?