Facebook
From Kulegg, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 279
  1. --createBlip(259.36, -297.76, 1.58, 55,2,255,0,0,255,0,100) -- Cygan Dilmore //Fabek
  2. createBlip(-1953.57, 273.97, 41.05, 55,2,255,0,0,255,0,100) -- Średniak sf //Fabek
  3. --createBlip(2377.94, -662.72, 127.98, 55,2,255,0,0,255,0,100) -- Offroady Downtown LS //Fabek
  4. --createBlip(2322.42, 69.97, 26.21, 55,2,255,0,0,255,0,100) -- LowRidery, skoczki PC Syf //Fabek
  5. createBlip(-1663.88, 1209.79, 21.16, 55,2,255,0,0,255,0,100) -- Salon Sport Luksus PC //Fabek
  6. --createBlip(1659.97, 2201.29, 10.82, 55,2,255,0,0,255,0,100)]]
  7.  
  8. local positionVehicles = {
  9.  
  10.           --{'NAZWA',ID, math.random(0,10), CENA, 2886.20, 2257.11, 10.75, 359.36, 359.93, 43.58} - JEST TO PRZYKŁAD!!!,
  11.  
  12. --        CYGAN
  13.       {'Moonbeam', 418, math.random(51718,82719), math.random(3800,4000), 229.21, -296.09, 1.40, 0.1, 0.0, 160},
  14.       {'Walton', 478, math.random(51718,82719), math.random(3800,4000), 242.38, -294.30, 1.40, 359.2, 360.0, 170},
  15.       {'Sadler', 543, math.random(51718,82719), math.random(8800,9000), 258.82, -308.15, 1.40, 1.0, 0.0, 45},
  16.       {'Perennial', 404, math.random(51718,82719), math.random(3800,4000), 262.54, -300.88, 1.40, 359.7, 0.0, 150},
  17.       {'Manana [Mynana]', 410, math.random(51718,82719), math.random(4800,5000), 250.02, -294.73, 1.40, 359.4, 0.0, 209.5},
  18.       {'Nebula', 516, math.random(51718,82719), math.random(10000,10200), 252.94, -290.21, 1.40, 360.0, 0.0, 269.9},
  19.       {'Oceanic', 467, math.random(51718,82719), math.random(14800,15000), 264.24, -274.14, 1.40, 0.0, 0.0, 200.9},
  20.       {'Glendale', 466, math.random(51718,82719), math.random(11800,12000), 252.67, -282.62, 1.40, 0.0, 360.0, -90},
  21.       {'Bobcat', 422, math.random(51718,82719), math.random(13800,14000), 265.29, -284.85, 1.40, 359.1, 360.0, 179.5},
  22.       {'Picador', 600, math.random(31718,52719), math.random(19800,20000), 265.41, -291.89, 1.40, 359.1, 360.0, 175},
  23.       {'Vincent', 540, math.random(31718,52719), math.random(23000,23200), 251.42, -276.89, 1.40, 359.72, 360.00, 270.37},
  24.           {'Clover', 542, math.random(31718,52719), math.random(15000,15200), 236.77, -299.70, 1.40, 0.04, 360.00, 171},       
  25.           {'Tampa', 549, math.random(31718,52719), math.random(16000,16200), 225.77, -312.13, 1.40, 359.97, 359.96, 80},                 
  26.      
  27. --        SALON TERENOWY
  28. --        {'Huntley',579, math.random(0,10), 250000, 2886.20, 2257.11, 10.75, 359.36, 359.93, 43.58},
  29.           {'Mesa', 500, math.random(0,10), 260000, 2359.21, -659.69, 127.90, 1.6, 357.0, 308.3},
  30.           --{'Journey', 508, math.random(0,10), 500000,  2358.97, -652.81, 127.70, 359.9, 0.2, 293.5},
  31.           {'Sandking', 495, math.random(0,10), 800000,  2351.03, -654.87, 127.77, 360.0, 360.0, 348.0},        
  32.       {'Rancher', 505, math.random(0,10), 500000,  2360.53, -646.14, 127.85, 357.1, 0.9, 239.3},
  33.       {'Yosemite', 554, math.random(0,10), 450000,  2380.63, -640.60, 126.89, 2.4, 359.9, 135.9},
  34.       {'BF Injection', 424, math.random(0,10), 700000,  2378.19, -662.05, 128.22, 359.1, 3.2, 24.1},
  35.           {'Landstalker', 400, math.random(0,10), 650000,  2358.97, -652.81, 127.70, 359.9, 0.2, 293.5},
  36.          
  37. --        SALON LOWRIDERÓW
  38.           {'Savanna', 567, math.random(0,10), 820000,  1656.42, 2209.27, 10.91-0.3, 0.46, 360.00, 206.21},
  39.           {'Voodoo', 412, math.random(0,10), 780000,   2315.62, 55.77, 26.18, 360.0, 0.0, 161.5},
  40.           {'Blade', 536, math.random(0,10), 550000, 1672.26, 2209.42, 10.91-0.3, 0.00, 0.00, 206.76},
  41.           {'Tornado', 576, math.random(0,10), 600000, 1672.84, 2193.83, 10.91-0.3, 0.29, 0.00, 45},
  42.           {'Broadway', 575, math.random(0,10), 500000, 1663.41, 2193.38, 10.91-0.3, 359.72, 0.00, 45},
  43.           {'Remington', 534, math.random(0,10), 700000,  2324.55, 61.47, 26.38, 7.3, 10.1, 304.6},
  44.           {'Esperanto', 419, math.random(0,10), 550000,  2322.42, 69.97, 26.21, 359.9, 359.9, 23.6},
  45.     {'Slamvan', 535, math.random(0,10), 700000,  2316.90, 38.04, 26.18, 360.0, 0.0, 322.5},
  46.  
  47. --        SALON NORMALNY
  48.       {'Premier', 426, math.random(0,10), 3500000, -1960.06, 304.55, 35.21, 0.0, 359.8, 180.0},
  49.       {'Blista Compact', 496, math.random(0,10), 2800000, -1953.53, 303.37, 35.19, 0.0, 360.0, 181.0},
  50.           {'Sunrise', 550, math.random(0,10), 2300000, -1962.85, 284.76, 35.29, 359.6, 359.8, 181.7},
  51.           {'Buffalo', 402, math.random(0,10), 5500000, -1962.11, 271.26, 35.30, 0.0, 359.9, 179.7},
  52.           {'Sabre', 475, math.random(0,10), 2600000, -1962.84, 258.99, 35.28, 359.8, 360.0, 179.8},
  53.       {'Admiral', 445, math.random(0,10), 2500000, -1943.43, 261.46, 35.34, 0.0, 0.0, 1.0},
  54.       {'Sentinel', 405, math.random(0,10), 2500000, -1943.45, 271.41, 35.35, 360.0, 0.0, 359.5},
  55.           {'Phoenix', 603, math.random(0,10), 4200000, -1953.64, 255.62, 35.31, 0.2, 0.0, 270.2},  
  56.       {'Tahoma', 566, math.random(0,10), 2450000, -1944.85, 275.13, 40.83, 0.3, 360.0, 87.9},
  57.       --{'Majestic', 517, math.random(0,10), 125000, 1987.20, 2349.71, 10.71, 360.0, 360.0, 155.0},
  58.           --{'Cadrona', 527, math.random(0,10), 240000, 1981.18, 2349.79, 10.57, 360.0, 0.0, 154.9},      
  59.          
  60.          
  61. --       SALON MOTOCYKLI
  62.           {'Freeway', 463, math.random(0,10), 290000,  2103.88, 1398.39, 10.36, 360.0, 360.0, 180.6},
  63.           {'Wayfarer', 586, math.random(0,10), 220000, 2113.67, 1398.09, 10.34, 359.9, 0.0, 180.6},
  64.           {'Sanchez', 468, math.random(0,10), 260000, 2100.67, 1398.25, 10.49, 359.9, 360.0, 181.4},
  65.           {'BF-400', 581, math.random(0,10), 380000,  2107.10, 1398.24, 10.42, 359.4, 0.0, 179.0},       
  66.           {'PCJ-600', 461, math.random(0,10), 180000, 2116.72, 1398.27, 10.40, 358.9, 360.0, 179.5},
  67.           {'Faggio', 462, math.random(0,10), 90000, 2110.24, 1397.92, 10.42, 359.5, 0.0, 178.8},
  68.           {'Quad', 471, math.random(0,10), 135000, 2119.98, 1398.53, 10.29, 359.2, 0.0, 179.3},
  69.           {'FCR-900', 521, math.random(0,10), 910000, 2123.21, 1398.39, 10.38, 359.1, 360.0, 180.4},      
  70.          
  71. --       SALON DOWNTOWN
  72.           {'Cheetah', 415, math.random(0,10), 15000000, -1663.86, 1210.19, 7.02, 0.2, 360.0, 281.9},
  73.       {'Elegy', 562, math.random(0,10), 10000000, -1668.27, 1216.16, 6.91, 359.6, 360.0, 258.8},
  74.           {'Sultan', 560, math.random(0,10), 15000000, -1653.74, 1215.85, 6.95, 359.9, 0.0, 224.2},
  75.           {'Bullet', 541, math.random(0,10), 30000000, -1679.89, 1208.64, 13.30, 359.5, 360.0, 237.7},
  76.           {'Infernus', 411, math.random(0,10), 35000000, -1664.64, 1223.81, 13.40, 0.1, 360.0, 193.6},
  77.           {'Comet', 480, math.random(0,10), 4500000, -1647.94, 1206.58, 13.45, 359.7, 359.9, 40.8},
  78.           {'Jester', 559, math.random(0,10), 7500000, -1671.61, 1205.83, 20.81, 360.0, 0.0, 261.4},
  79.           {'Turismo', 451, math.random(0,10), 25000000, -1663.10, 1223.65, 20.86, 359.5, 360.0, 223.4},
  80.           {'Super GT', 506, math.random(0,10), 15000000, -1648.01, 1204.92, 20.86, 359.8, 360.0, 88.3},
  81.           {'ZR-350', 477, math.random(0,10), 5000000, -1679.53, 1209.79, 20.91, 359.7, 360.0, 244.4},    
  82.           {'Banshee', 429, math.random(0,10), 10000000, -1661.82, 1203.91, 20.84, 360.0, 0.0, 270.3},
  83.  
  84. --   LOTNISKO
  85.     --{'Maverick', 487, math.random(0,10), 5000000, 1640.73, 1534.50, 10.79, 360.00, 0.00, -20},
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.           --{'Urodzinowy infernus!', 411, 0, 500000, 2866.60, 2349.61, 10.5, 0.0, 0.0, 90},      
  93.           --{'Urodzinowy infernus!', 411, 0, 500000, 2826.96, 1644.32, 10.82, 0.0, 0.0, 0},
  94.           --{'Urodzinowy infernus!', 411, 0, 500000, 2235.29, 1029.21, 10.70, 0.0, 0.0, 70},
  95.           --{'Urodzinowy infernus!', 411, 0, 500000, 1686.06, 1305.37, 10.68, 0.0, 0.0, 0},
  96.           --{'Urodzinowy infernus!', 411, 0, 500000, 1838.02, 2606.54, 10.70, 0.0, 0.0, 180},
  97. }
  98. for i,v in pairs(positionVehicles) do
  99.     local veh=createVehicle(v[2], v[5], v[6], v[7], v[8], v[9], v[10], v[11])
  100.     setElementData(veh,'vehicle:desc','Pojazd: '..v[1]..'\nCena: '..v[4]..' PLN\nPrzebieg: '..v[3]..' km')
  101.     setVehicleOverrideLights(veh, 1)
  102.     setElementFrozen(veh,true)
  103.         setVehicleColor(veh, 0,133,226)
  104.     setVehicleDamageProof(veh, true)
  105.     setElementData(veh,'vehicle.selling', true)
  106.  
  107.     veh:setData('vehsell:info', {
  108.         ['cost']=(v[4]),
  109.         ['model']=v[2],
  110.         ['mileage']=v[3],
  111.         ['selling']=v[12]
  112.     }, false)
  113. end
  114.  
  115. addEventHandler('onVehicleEnter', resourceRoot, function(plr, seat, jacked)
  116.     if seat~=0 then return end
  117.     if source:getData('vehsell:info') and source:getData('vehsell:info').selling==1 then
  118.                 triggerClientEvent(plr,"addNotification",root,"#cc0000Pojazd nie jest dostępny w sprzedaży!","error")
  119.         return
  120.     end
  121.  
  122.     local data=source:getData('vehsell:info')
  123.     if not data then return end
  124.  
  125.     plr:setData('vehsell:info', {
  126.         ['cost']=data.cost,
  127.         ['model']=data.model,
  128.         ['mileage']=data.mileage,
  129.     }, false)
  130.        
  131.         triggerClientEvent(plr,"addNotification",root,"#00cc00Aby kupic ten pojazd wpisz #00cccc/kuppojazd","error")
  132. end)
  133.  
  134. addEventHandler('onVehicleExit', resourceRoot, function(plr, seat, jacked)
  135.     if seat~=0 then return end
  136.  
  137.     local data=plr:getData('vehsell:info')
  138.     if not data then return end
  139.  
  140.     plr:removeData('vehsell:info')
  141. end)
  142.  
  143. addCommandHandler('kuppojazd', function(plr, cmd)
  144.     local data=plr:getData('vehsell:info')
  145.     if not data then return end
  146.  
  147.     if getPlayerMoney(plr) < data.cost then
  148.                 triggerClientEvent(plr,"addNotification",root,"#cc0000Nie posiadasz wystarczajacej kwoty pieniędzy!","error")
  149.         return
  150.     end
  151.  
  152.     local vehicle=plr:getOccupiedVehicle()
  153.     if vehicle then
  154.         removePedFromVehicle(vehicle)
  155.     end
  156.  
  157.     local cost=data.cost
  158.     local model=data.model
  159.     local mileage=data.mileage
  160.     local uid=getElementData(plr,'player:uid') or 0
  161.     takePlayerMoney(plr, cost)
  162.     if mileage <= 100 then
  163.     exports["ogrpg-db"]:dbSet("INSERT INTO ogrpg_vehicles (model,ownedPlayer,mileage,registered,parking) VALUES (?,?,?,?,1)", model, getElementData(plr,"player:uid"),mileage,"false")
  164.         else
  165.     exports["ogrpg-db"]:dbSet("INSERT INTO ogrpg_vehicles (model,ownedPlayer,mileage,registered,parking) VALUES (?,?,?,?,1)", model, getElementData(plr,"player:uid"),mileage,"true")
  166.         end
  167.         triggerClientEvent(plr,"addNotification",root,string.format("#00cc00Kupiłeś swój pojazd "..getVehicleNameFromModel(model)..", znajdziesz go w przechowywalni."),"info")
  168. end)