4 tab indent update

This commit is contained in:
ElPumpo
2018-11-11 12:50:48 +01:00
parent 092adc0578
commit 45e6ce5f7d
3 changed files with 647 additions and 674 deletions
+607 -638
View File
File diff suppressed because it is too large Load Diff
+32 -32
View File
@@ -16,42 +16,42 @@ Config.PlateUseSpace = true
Config.Zones = {
ShopEntering = {
Pos = { x = -33.777, y = -1102.021, z = 25.422 },
Size = { x = 1.5, y = 1.5, z = 1.0 },
Type = 1,
},
ShopEntering = {
Pos = { x = -33.777, y = -1102.021, z = 25.422 },
Size = { x = 1.5, y = 1.5, z = 1.0 },
Type = 1,
},
ShopInside = {
Pos = { x = -47.570, y = -1097.221, z = 25.422 },
Size = { x = 1.5, y = 1.5, z = 1.0 },
Heading = -20.0,
Type = -1,
},
ShopInside = {
Pos = { x = -47.570, y = -1097.221, z = 25.422 },
Size = { x = 1.5, y = 1.5, z = 1.0 },
Heading = -20.0,
Type = -1,
},
ShopOutside = {
Pos = { x = -28.637, y = -1085.691, z = 25.565 },
Size = { x = 1.5, y = 1.5, z = 1.0 },
Heading = 330.0,
Type = -1,
},
ShopOutside = {
Pos = { x = -28.637, y = -1085.691, z = 25.565 },
Size = { x = 1.5, y = 1.5, z = 1.0 },
Heading = 330.0,
Type = -1,
},
BossActions = {
Pos = { x = -32.065, y = -1114.277, z = 25.422 },
Size = { x = 1.5, y = 1.5, z = 1.0 },
Type = -1,
},
BossActions = {
Pos = { x = -32.065, y = -1114.277, z = 25.422 },
Size = { x = 1.5, y = 1.5, z = 1.0 },
Type = -1,
},
GiveBackVehicle = {
Pos = { x = -18.227, y = -1078.558, z = 25.675 },
Size = { x = 3.0, y = 3.0, z = 1.0 },
Type = (Config.EnablePlayerManagement and 1 or -1),
},
GiveBackVehicle = {
Pos = { x = -18.227, y = -1078.558, z = 25.675 },
Size = { x = 3.0, y = 3.0, z = 1.0 },
Type = (Config.EnablePlayerManagement and 1 or -1),
},
ResellVehicle = {
Pos = { x = -44.630, y = -1080.738, z = 25.683 },
Size = { x = 3.0, y = 3.0, z = 1.0 },
Type = 1,
},
ResellVehicle = {
Pos = { x = -44.630, y = -1080.738, z = 25.683 },
Size = { x = 3.0, y = 3.0, z = 1.0 },
Type = 1,
}
}
+8 -4
View File
@@ -211,12 +211,11 @@ ESX.RegisterServerCallback('esx_vehicleshop:buyVehicleSociety', function (source
TriggerEvent('esx_addonaccount:getSharedAccount', 'society_' .. society, function (account)
if account.money >= vehicleData.price then
account.removeMoney(vehicleData.price)
MySQL.Async.execute('INSERT INTO cardealer_vehicles (vehicle, price) VALUES (@vehicle, @price)',
{
['@vehicle'] = vehicleData.model,
['@price'] = vehicleData.price,
['@price'] = vehicleData.price
})
cb(true)
@@ -317,7 +316,7 @@ ESX.RegisterServerCallback('esx_vehicleshop:giveBackVehicle', function (source,
['@price'] = basePrice
})
MySQL.Async.execute('DELETE FROM rented_vehicles WHERE plate = @plate',{
MySQL.Async.execute('DELETE FROM rented_vehicles WHERE plate = @plate', {
['@plate'] = plate
})
@@ -329,7 +328,7 @@ ESX.RegisterServerCallback('esx_vehicleshop:giveBackVehicle', function (source,
end)
end)
ESX.RegisterServerCallback('esx_vehicleshop:resellVehicle', function (source, cb, plate, price)
ESX.RegisterServerCallback('esx_vehicleshop:resellVehicle', function (source, cb, plate, price) -- todo: remove price
MySQL.Async.fetchAll('SELECT * FROM rented_vehicles WHERE plate = @plate', {
['@plate'] = plate
}, function (result)
@@ -346,10 +345,14 @@ ESX.RegisterServerCallback('esx_vehicleshop:resellVehicle', function (source, cb
-- does the owner match?
if result[1] ~= nil then
-- todo: does model match?
xPlayer.addMoney(price)
RemoveOwnedVehicle(plate)
cb(true)
else
if xPlayer.job.grade_name == 'boss' then
MySQL.Async.fetchAll('SELECT * FROM owned_vehicles WHERE owner = @owner AND @plate = plate',
{
@@ -368,6 +371,7 @@ ESX.RegisterServerCallback('esx_vehicleshop:resellVehicle', function (source, cb
cb(false)
end
end
end)
end
end)