- --createBlip(259.36, -297.76, 1.58, 55,2,255,0,0,255,0,100) -- Cygan Dilmore //Fabek
- createBlip(-1953.57, 273.97, 41.05, 55,2,255,0,0,255,0,100) -- Średniak sf //Fabek
- --createBlip(2377.94, -662.72, 127.98, 55,2,255,0,0,255,0,100) -- Offroady Downtown LS //Fabek
- --createBlip(2322.42, 69.97, 26.21, 55,2,255,0,0,255,0,100) -- LowRidery, skoczki PC Syf //Fabek
- createBlip(-1663.88, 1209.79, 21.16, 55,2,255,0,0,255,0,100) -- Salon Sport Luksus PC //Fabek
- --createBlip(1659.97, 2201.29, 10.82, 55,2,255,0,0,255,0,100)]]
- local positionVehicles = {
- --{'NAZWA',ID, math.random(0,10), CENA, 2886.20, 2257.11, 10.75, 359.36, 359.93, 43.58} - JEST TO PRZYKŁAD!!!,
- -- CYGAN
- {'Moonbeam', 418, math.random(51718,82719), math.random(3800,4000), 229.21, -296.09, 1.40, 0.1, 0.0, 160},
- {'Walton', 478, math.random(51718,82719), math.random(3800,4000), 242.38, -294.30, 1.40, 359.2, 360.0, 170},
- {'Sadler', 543, math.random(51718,82719), math.random(8800,9000), 258.82, -308.15, 1.40, 1.0, 0.0, 45},
- {'Perennial', 404, math.random(51718,82719), math.random(3800,4000), 262.54, -300.88, 1.40, 359.7, 0.0, 150},
- {'Manana [Mynana]', 410, math.random(51718,82719), math.random(4800,5000), 250.02, -294.73, 1.40, 359.4, 0.0, 209.5},
- {'Nebula', 516, math.random(51718,82719), math.random(10000,10200), 252.94, -290.21, 1.40, 360.0, 0.0, 269.9},
- {'Oceanic', 467, math.random(51718,82719), math.random(14800,15000), 264.24, -274.14, 1.40, 0.0, 0.0, 200.9},
- {'Glendale', 466, math.random(51718,82719), math.random(11800,12000), 252.67, -282.62, 1.40, 0.0, 360.0, -90},
- {'Bobcat', 422, math.random(51718,82719), math.random(13800,14000), 265.29, -284.85, 1.40, 359.1, 360.0, 179.5},
- {'Picador', 600, math.random(31718,52719), math.random(19800,20000), 265.41, -291.89, 1.40, 359.1, 360.0, 175},
- {'Vincent', 540, math.random(31718,52719), math.random(23000,23200), 251.42, -276.89, 1.40, 359.72, 360.00, 270.37},
- {'Clover', 542, math.random(31718,52719), math.random(15000,15200), 236.77, -299.70, 1.40, 0.04, 360.00, 171},
- {'Tampa', 549, math.random(31718,52719), math.random(16000,16200), 225.77, -312.13, 1.40, 359.97, 359.96, 80},
- -- SALON TERENOWY
- -- {'Huntley',579, math.random(0,10), 250000, 2886.20, 2257.11, 10.75, 359.36, 359.93, 43.58},
- {'Mesa', 500, math.random(0,10), 260000, 2359.21, -659.69, 127.90, 1.6, 357.0, 308.3},
- --{'Journey', 508, math.random(0,10), 500000, 2358.97, -652.81, 127.70, 359.9, 0.2, 293.5},
- {'Sandking', 495, math.random(0,10), 800000, 2351.03, -654.87, 127.77, 360.0, 360.0, 348.0},
- {'Rancher', 505, math.random(0,10), 500000, 2360.53, -646.14, 127.85, 357.1, 0.9, 239.3},
- {'Yosemite', 554, math.random(0,10), 450000, 2380.63, -640.60, 126.89, 2.4, 359.9, 135.9},
- {'BF Injection', 424, math.random(0,10), 700000, 2378.19, -662.05, 128.22, 359.1, 3.2, 24.1},
- {'Landstalker', 400, math.random(0,10), 650000, 2358.97, -652.81, 127.70, 359.9, 0.2, 293.5},
- -- SALON LOWRIDERÓW
- {'Savanna', 567, math.random(0,10), 820000, 1656.42, 2209.27, 10.91-0.3, 0.46, 360.00, 206.21},
- {'Voodoo', 412, math.random(0,10), 780000, 2315.62, 55.77, 26.18, 360.0, 0.0, 161.5},
- {'Blade', 536, math.random(0,10), 550000, 1672.26, 2209.42, 10.91-0.3, 0.00, 0.00, 206.76},
- {'Tornado', 576, math.random(0,10), 600000, 1672.84, 2193.83, 10.91-0.3, 0.29, 0.00, 45},
- {'Broadway', 575, math.random(0,10), 500000, 1663.41, 2193.38, 10.91-0.3, 359.72, 0.00, 45},
- {'Remington', 534, math.random(0,10), 700000, 2324.55, 61.47, 26.38, 7.3, 10.1, 304.6},
- {'Esperanto', 419, math.random(0,10), 550000, 2322.42, 69.97, 26.21, 359.9, 359.9, 23.6},
- {'Slamvan', 535, math.random(0,10), 700000, 2316.90, 38.04, 26.18, 360.0, 0.0, 322.5},
- -- SALON NORMALNY
- {'Premier', 426, math.random(0,10), 3500000, -1960.06, 304.55, 35.21, 0.0, 359.8, 180.0},
- {'Blista Compact', 496, math.random(0,10), 2800000, -1953.53, 303.37, 35.19, 0.0, 360.0, 181.0},
- {'Sunrise', 550, math.random(0,10), 2300000, -1962.85, 284.76, 35.29, 359.6, 359.8, 181.7},
- {'Buffalo', 402, math.random(0,10), 5500000, -1962.11, 271.26, 35.30, 0.0, 359.9, 179.7},
- {'Sabre', 475, math.random(0,10), 2600000, -1962.84, 258.99, 35.28, 359.8, 360.0, 179.8},
- {'Admiral', 445, math.random(0,10), 2500000, -1943.43, 261.46, 35.34, 0.0, 0.0, 1.0},
- {'Sentinel', 405, math.random(0,10), 2500000, -1943.45, 271.41, 35.35, 360.0, 0.0, 359.5},
- {'Phoenix', 603, math.random(0,10), 4200000, -1953.64, 255.62, 35.31, 0.2, 0.0, 270.2},
- {'Tahoma', 566, math.random(0,10), 2450000, -1944.85, 275.13, 40.83, 0.3, 360.0, 87.9},
- --{'Majestic', 517, math.random(0,10), 125000, 1987.20, 2349.71, 10.71, 360.0, 360.0, 155.0},
- --{'Cadrona', 527, math.random(0,10), 240000, 1981.18, 2349.79, 10.57, 360.0, 0.0, 154.9},
- -- SALON MOTOCYKLI
- {'Freeway', 463, math.random(0,10), 290000, 2103.88, 1398.39, 10.36, 360.0, 360.0, 180.6},
- {'Wayfarer', 586, math.random(0,10), 220000, 2113.67, 1398.09, 10.34, 359.9, 0.0, 180.6},
- {'Sanchez', 468, math.random(0,10), 260000, 2100.67, 1398.25, 10.49, 359.9, 360.0, 181.4},
- {'BF-400', 581, math.random(0,10), 380000, 2107.10, 1398.24, 10.42, 359.4, 0.0, 179.0},
- {'PCJ-600', 461, math.random(0,10), 180000, 2116.72, 1398.27, 10.40, 358.9, 360.0, 179.5},
- {'Faggio', 462, math.random(0,10), 90000, 2110.24, 1397.92, 10.42, 359.5, 0.0, 178.8},
- {'Quad', 471, math.random(0,10), 135000, 2119.98, 1398.53, 10.29, 359.2, 0.0, 179.3},
- {'FCR-900', 521, math.random(0,10), 910000, 2123.21, 1398.39, 10.38, 359.1, 360.0, 180.4},
- -- SALON DOWNTOWN
- {'Cheetah', 415, math.random(0,10), 15000000, -1663.86, 1210.19, 7.02, 0.2, 360.0, 281.9},
- {'Elegy', 562, math.random(0,10), 10000000, -1668.27, 1216.16, 6.91, 359.6, 360.0, 258.8},
- {'Sultan', 560, math.random(0,10), 15000000, -1653.74, 1215.85, 6.95, 359.9, 0.0, 224.2},
- {'Bullet', 541, math.random(0,10), 30000000, -1679.89, 1208.64, 13.30, 359.5, 360.0, 237.7},
- {'Infernus', 411, math.random(0,10), 35000000, -1664.64, 1223.81, 13.40, 0.1, 360.0, 193.6},
- {'Comet', 480, math.random(0,10), 4500000, -1647.94, 1206.58, 13.45, 359.7, 359.9, 40.8},
- {'Jester', 559, math.random(0,10), 7500000, -1671.61, 1205.83, 20.81, 360.0, 0.0, 261.4},
- {'Turismo', 451, math.random(0,10), 25000000, -1663.10, 1223.65, 20.86, 359.5, 360.0, 223.4},
- {'Super GT', 506, math.random(0,10), 15000000, -1648.01, 1204.92, 20.86, 359.8, 360.0, 88.3},
- {'ZR-350', 477, math.random(0,10), 5000000, -1679.53, 1209.79, 20.91, 359.7, 360.0, 244.4},
- {'Banshee', 429, math.random(0,10), 10000000, -1661.82, 1203.91, 20.84, 360.0, 0.0, 270.3},
- -- LOTNISKO
- --{'Maverick', 487, math.random(0,10), 5000000, 1640.73, 1534.50, 10.79, 360.00, 0.00, -20},
- --{'Urodzinowy infernus!', 411, 0, 500000, 2866.60, 2349.61, 10.5, 0.0, 0.0, 90},
- --{'Urodzinowy infernus!', 411, 0, 500000, 2826.96, 1644.32, 10.82, 0.0, 0.0, 0},
- --{'Urodzinowy infernus!', 411, 0, 500000, 2235.29, 1029.21, 10.70, 0.0, 0.0, 70},
- --{'Urodzinowy infernus!', 411, 0, 500000, 1686.06, 1305.37, 10.68, 0.0, 0.0, 0},
- --{'Urodzinowy infernus!', 411, 0, 500000, 1838.02, 2606.54, 10.70, 0.0, 0.0, 180},
- }
- 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')
- setVehicleOverrideLights(veh, 1)
- setElementFrozen(veh,true)
- setVehicleColor(veh, 0,133,226)
- setVehicleDamageProof(veh, true)
- setElementData(veh,'vehicle.selling', true)
- veh:setData('vehsell:info', {
- ['cost']=(v[4]),
- ['model']=v[2],
- ['mileage']=v[3],
- ['selling']=v[12]
- }, 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
- triggerClientEvent(plr,"addNotification",root,"#cc0000Pojazd nie jest dostępny w sprzedaży!","error")
- 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,
- }, false)
- triggerClientEvent(plr,"addNotification",root,"#00cc00Aby kupic ten pojazd wpisz #00cccc/kuppojazd","error")
- 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
- triggerClientEvent(plr,"addNotification",root,"#cc0000Nie posiadasz wystarczajacej kwoty pieniędzy!","error")
- 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 uid=getElementData(plr,'player:uid') or 0
- takePlayerMoney(plr, cost)
- if mileage <= 100 then
- exports["ogrpg-db"]:dbSet("INSERT INTO ogrpg_vehicles (model,ownedPlayer,mileage,registered,parking) VALUES (?,?,?,?,1)", model, getElementData(plr,"player:uid"),mileage,"false")
- else
- exports["ogrpg-db"]:dbSet("INSERT INTO ogrpg_vehicles (model,ownedPlayer,mileage,registered,parking) VALUES (?,?,?,?,1)", model, getElementData(plr,"player:uid"),mileage,"true")
- end
- triggerClientEvent(plr,"addNotification",root,string.format("#00cc00Kupiłeś swój pojazd "..getVehicleNameFromModel(model)..", znajdziesz go w przechowywalni."),"info")
- end)