local positionVehicles = {
-- Cygan Las Barrancas | Tierra Robada. - Krzemo
{'Vincent', 540, 69956, 5462, -882.09,1521.30,25.89, 359.6, 0.0, 90, 0},
{'Moonbeam', 418, 83222, 2143, -904.74, 1547.74, 25.91, 0.0, 0.0, 270.2, 0},
{'Manana', 410, 77222, 2456, -882.78, 1545.59, 25.55, 359.3, 0.0, 102.6, 0},
{'Perennial', 404, 71732, 1343, -881.51, 1535.06, 25.65, 359.7, 359.9, 94.3, 0},
-- Salon pojazd?w rekreacyjnych Doherty | San Fierro. - Krzemo
--Heli
{'Maverick', 487, 0, 900000, -1952.99,296.47,47.70, 0, 360.0, 35,0}, --odjabanexd
{'Sabre', 475, 0, 46000, -1945.09,258.39,40.900001525879, 359.8, 360.0, 29.71, 0}, --odjabanexd
{'Stallion', 439, 0, 24000, -1945.40,266.5,35.29, 0.1, 0.0, 90, 0}, --..
{'Glendale', 466, 0, 9500, -1945.59,274.70,35.29, 0.0, 360.0, 120, 0}, --ez
{'Tampa', 549, 0, 14000, -1961.90,256.70,35.29, 360.0, 360.0, 320, 0}, --pp
{'Clover', 542, 0, 20000, -1963.30, 287.18, 35.21, 0.1, 359.9, 181.0, 0},
{'Tahoma', 566, 0, 27500, -1954.19,298.5,40.90, 0.4, 359.8, 136, 0}, --nor,alnie
{'Admiral', 445, 0, 26000, -1961.40,273,35.29, 0.0, 0.0, 324, 0}, -- taa
{'Washington', 421, 0, 25000, -1946.69,257.39,35.29, 359.9, 360.0, 40, 0}, --oje
{'Blista Compact', 496, 0, 32000, -1953.5,291.89,40.90, 0.0, 360.0, 132.0, 0}, --yyy
{'Premier' , 426, 0, 16000, -1953.69,303.39,35.29, 0.0, 360.0, 150, 0}, --:D:D:
{'Sentinel' , 405, 0, 47000, -1954.40,257.20,40.90, 0.0, 360.0, 341, 0}, --odajbanexd
{'Sunrise' , 550, 0, 11000, -1959.30,303.39,35.29, 359.6, 360.0, 200, 0}, --prawie finish
{'Stratum' , 561, 0, 46000, -1945.5,273.89,40.90, 0.1, 0.0, 132.8, 0}, --odjabanexd
-- Salon pojazd?w sportowych Downtown | San Fierro. - Krzemo
{'Turismo', 451, 0, 850000, -1651.66, 1207.58, 20.86, 359.6, 359.9, 67.0, 0},
{'Bullet', 541, 0, 500000, -1663.24, 1206.91, 20.78, 359.5, 360.0, 294.1, 0},
{'Infernus', 411, 0, 1000000, -1661.02, 1217.49, 20.88, 0.0, 360.0, 203.8, 0},
{'Jester', 559, 0, 65000, -1665.15, 1222.88, 13.33, 0.1, 359.8, 207.7, 0},
{'Sultan', 560, 0, 250000, -1657.99, 1217.00, 13.38, 359.9, 0.1, 203.8, 0},
{'Comet', 480, 0, 230000, -1648.41, 1206.90, 13.45, 359.6, 360.0, 41.6, 0},
{'Elegy', 562, 0, 280000, -1678.13, 1208.78, 13.33, 359.6, 0.2, 254.4, 0},
{'Banshee', 429, 0, 300000, -1667.25, 1206.80, 13.33, 360.0, 0.0, 301.1, 0},
{'Buffalo', 402, 0, 70000, -1662.97, 1214.42, 7.08, 0.0, 359.9, 257.1, 0},
{'Cheetah', 415, 0, 510000, -1654.24, 1213.63, 7.02, 0.3, 359.9, 62.6, 0},
{'Savanna', 567, 0, 77530, -1678.92, 1209.90, 21.02, 0.4, 360.0, 254.1, 0},
-- Salon pojazd?w motorniczych The Panopticon | Red County. - Krzemo
{'PCJ-600', 461, 0, 75000, 2123.23,1398.47,10.55, 360, 0, 180, 0},
{'Sanchez', 468, 0, 62000, 2119.94,1398.39,10.55, 360, 0, 180, 0},
{'BF-400', 581, 0, 57000, 2135.88,1399.13,10.55, 360, 0, 180, 0},
{'FCR-900', 521, 0, 160000, 2126.51,1399.16,10.55, 360, 0, 180, 0},
{'Freeway', 463, 0, 90000, 2132.82,1398.59,10.50, 360, 0, 180, 0},
{'Faggio', 462, 0, 35000, 2117.05,1398.42,10.50, 360, 0, 180, 0},
{'Quadbike', 471, 0, 45000, 2129.56,1398.77,10.45, 360, 0, 180, 0},
}
for i,v in pairs(positionVehicles) do
local veh=createVehicle(v[2], v[5], v[6], v[7], v[8], v[9], v[10], v[11])
setElementData(veh,'vehicle:desc','Pojazd: '..v[1]..'\nCena: '..v[4]..' PLN\nPrzebieg: '..v[3]..' km\nRodzaj silnika: Benzyna\n\nAby Kupi? pojazd wsi?dz na F i wpisz /kuppojazd')
setVehicleOverrideLights(veh, 1)
setElementFrozen(veh,true)
setVehicleColor(veh,150,150,150,150,150,150)
setVehicleDamageProof(veh, true)
setElementData(veh,'recznySalonData', true)
veh:setData('vehsell:info', {
['cost']=(v[4]),
['model']=v[2],
['mileage']=v[3],
['selling']=v[12],
['engine']=v[18]
}, false)
end
addEventHandler('onVehicleEnter', resourceRoot, function(plr, seat, jacked)
if seat~=0 then return end
if source:getData('vehsell:info') and source:getData('vehsell:info').selling==1 then
plr:outputChat('* Pojazd nie jest dost?pny w sprzeda?y.', 255, 0, 0)
return
end
local data=source:getData('vehsell:info')
if not data then return end
plr:setData('vehsell:info', {
['cost']=data.cost,
['model']=data.model,
['mileage']=data.mileage,
['engine']=data.engine,
}, false)
plr:outputChat('* Aby zakupi? ten pojazd wpisz /kuppojazd')
end)
addEventHandler('onVehicleExit', resourceRoot, function(plr, seat, jacked)
if seat~=0 then return end
local data=plr:getData('vehsell:info')
if not data then return end
plr:removeData('vehsell:info')
end)
addCommandHandler('kuppojazd', function(plr, cmd)
local data=plr:getData('vehsell:info')
if not data then return end
if getPlayerMoney(plr) < data.cost then
plr:outputChat('* Nie posiadasz wystarczaj?cej kwoty pieni?dzy !')
return
end
local vehicle=plr:getOccupiedVehicle()
if vehicle then
removePedFromVehicle(vehicle)
end
local cost=data.cost
local model=data.model
local mileage=data.mileage
local engine=data.engine
local sid=getElementData(plr,'player:sid') or 0
takePlayerMoney(plr, cost)
plr:outputChat('* Zakupi?e?(a?) sw?j pojazd '..getVehicleNameFromModel(model)..', znajdziesz go w przechowywalni.')
exports["YL-db"]:dbSet("INSERT INTO YL_vehicles (model,ownedPlayer,mileage,registered,parking,engine) VALUES (?,?,?,?,1,?)", model, getElementData(plr,"player:sid"),mileage,"true","diesel")
end)