Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2018-11-04, 19:23


AkossPL







Wiek: 25
Na forum: 4221 dni
Posty: 140
Nick w MP: AkossPL

Piwa: 3

Respekt: 50

tak jak w temacie
createBlip(949.88, -1713.13, 13.21, 55,2,0,0,0,0,0,275) ----szybkie
createBlip(978.52, -2162.24, 13.45, 55,2,0,0,0,0,0,275) ----offroad
createBlip(2344.93, -2277.75, 13.55, 55,2,0,0,0,0,0,275) ----Zwyk?e
createBlip(1889.01, -1866.62, 13.58, 55,2,0,0,0,0,0,275) ----Cygan
createBlip(198.04, -322.39, 1.58, 55,2,0,0,0,0,0,275)
createBlip(-123.30,1037.38,20.05, 55,2,0,0,0,0,0,275) --salon motorow
 
local napis=createElement("text")
status="Salon samochodowy\nJUZ OTWARTE!\nSAMOCHODY Z LEASINGIEM JU? OD 5 000 000 PLN!"
setElementData(napis, "name", ""..status.."")
setElementPosition(napis, 935.13, -1718.39, 13.55)
setElementData(napis, "scale", 1.2)
 
local napis=createElement("text")
status="Salon na bez-daszu\nOTWARTE 24/H\nSAMOCHODY NA OFFROAD, DU?O ZA MA?O!\nWJED? TUTAJ!"
setElementData(napis, "name", ""..status.."")
setElementPosition(napis, 1024.66, -2064.51, 13.10)
setElementData(napis, "scale", 1.2)
 
local napis=createElement("text")
status="Komis pana Jacka\nSAMOCHODY SPROWADZANE Z NIEMIEC\nKUP TANIO!"
setElementData(napis, "name", ""..status.."")
setElementPosition(napis, 1895.93, -1878.89, 13.50)
setElementData(napis, "scale", 1.2)
 
local napis=createElement("text")
status="Salon w Blueberry\nSAMOCHODY PRODUKOWANE NA MIEJSCU\nKUPUJ TERAZ!"
setElementData(napis, "name", ""..status.."")
setElementPosition(napis, 198.04, -322.39, 1.58)
setElementData(napis, "scale", 1.2)
 
local napis=createElement("text")
status="Salon w Fort Carson\nMotory sprowadzane z San Francisco\nOkazyjna cena!"
setElementData(napis, "name", ""..status.."")
setElementPosition(napis, -129.79,1044.99,20.05)
setElementData(napis, "scale", 1.2)
 
local positionVehicles = {
    -- SALON Sportowy
      {'Sultan', 560, 0, 26000000, 940.80, -1691.83, 13.26, 359.9, 360.0, 212.3,"3.2"},
      {'Flash', 565, 0 , 18000000, 948.66, -1691.89, 13.21, 359.5, 360.0, 152.1,"2.8"},
      {'Turismo', 451, 0, 55000000, 940.81, -1737.18, 13.26, 359.5, 360.0, 303.8,"3.5"},
      {'Infernus', 411, 0, 65000000, 957.93, -1738.53, 13.28, 0.0, 0.0, 22.1,"3.5"},
      {'Elegy', 562, 0, 38000000, 949.88, -1713.13, 13.21, 0.0, 360.0, 147.7,"3.2"},
      {'Super-GT', 506, 0, 9000000, 939.48, -1711.20, 13.26, 360.0, 360.0, 214.6,"3.2"},
      {'Bullet', 541, 0, 48000000, 957.68, -1723.20, 13.18, 359.5, 360.0, 133.9,"3.2"},
     
      -- SALON Zwyk?y
      {'Blista Compact', 496, 0, 8000000, 2333.96, -2311.38, 13.27, 0.0, 360.0, 349.3,"1.4"},
      {'Bobcat', 422, 0 , 3000000, 2329.72, -2306.64, 13.54, 359.2, 360.0, 313.9,"1.4"},
      {'Bravura', 401, 0, 4000000, 2327.22, -2302.37, 13.33, 360.0, 360.0, 281.1,"1.4"},
      {'Emperor', 585, 0, 5000000, 2337.51, -2291.65, 13.14, 359.6, 0.0, 314.2,"1.4"},
      {'Cadrona', 527, 0, 6000000, 2347.66, -2296.94, 13.27, 360.0, 360.0, 312.8,"1.4"},
      {'Fortune', 526, 0, 9000000, 2342.41, -2275.71, 13.32, 360.0, 0.0, 247.1,"1.4"},
      {'Merit', 551, 0, 2500000, 2351.19, -2267.78, 13.35, 360.0, 0.0, 248.7,"1.4"},
      {'Oceanic', 467, 0, 2000000, 2366.99, -2278.89, 13.29, 0.0, 360.0, 132.6,"1.4"},
         
     -- Offroad
      {'ZR-350', 477, 0, 1700000, 964.35, -2175.14, 13.82, 340.3, 0.3, 303.6,"2.5"},
      {'Yosemite', 554, 0, 2100000, 962.43, -2161.92, 14.10, 339.8, 0.1, 270.3,"1.4"},
      {'Rancher', 489, 0, 3100000, 962.57, -2147.49, 14.15, 340.4, 360.0, 269.9,"1.4"},
      {'Mesa', 500, 0, 21000000, 970.26, -2132.25, 14.04, 339.3, 359.9, 223.4,"1.4"},
      {'Huntley', 579, 0, 36000000, 993.90, -2198.11, 13.88, 339.9, 0.2, 3.4,"1.4"},
 
     -- Cygan
      {'Perennial', 404, 15782, 250000, 1872.25, -1872.10, 13.26, 359.6, 0.4, 239.7,"1.4"},
      {'Vincent', 540, 10427, 600000, 1872.96, -1865.23, 13.43, 359.6, 0.3, 236.5,"1.4"},
      {'Moonbeam', 418, 45430, 200000, 1878.05, -1859.62, 13.67, 0.1, 360.0, 215.7,"1.4"},
      {'Walton', 478, 76347, 250000, 1883.47, -1855.85, 13.57, 359.2, 360.0, 201.6,"1.4"},
      {'Manana', 410, 42367, 400000, 1889.19, -1852.44, 13.23, 359.4, 360.0, 194.8,"1.4"},
      {'Clover', 542, 14213, 500000, 1895.54, -1852.25, 13.31, 0.1, 360.0, 179.4,"1.4"},
 
     -- Salon Blueberry
      {'Buffalo', 402, 0, 2500000, 186.84, -340.05, 1.46, 360.0, 0.0, 359.1,"1.4"},
      {'Comet', 480, 0, 4200000, 194.80, -339.82, 1.40, 359.7, 0.0, 2.9,"1.4"},
      {'Premier', 426, 0, 1300000, 178.42, -340.19, 1.38, 0.0, 0.0, 0.4,"1.4"},
      {'Sabre', 475, 0, 1600000, 171.72, -340.17, 1.43, 359.8, 0.0, 359.6,"1.4"},
      {'Banshee', 429, 0, 59000000, 164.22, -339.90, 1.31, 360.0, 0.0, 1.7,"1.4"},
      {'Jester', 559, 0, 47000000, 156.83, -340.45, 1.45, 359.8, 0.0, 0.3,"1.4"},
 
      --motory
      {'Sanchez', 468, 0, 2300000, -119.64,1041.17,20.14-0.5, 360.0, 0.0, 180.0,"1.4"},
      {'FCR-900', 521, 0, 3000000, -119.93,1032.00,20.14-0.5, 360.0, 0.0, 180.0,"1.4"},
      {'NRG-500', 522, 0, 4500000, -119.89,1022.23,20.13-0.5, 360.0, 0.0, 180.0,"1.4"},
      {'Freeway', 463, 0, 2700000, -119.85,1012.43,20.14-0.5, 360.0, 0.0, 180.0,"1.4"},
      {'PCJ-600', 461, 0, 2400000, -119.82,1003.41,20.14-0.5, 360.0, 0.0, 180.0,"1.4"},
      {'Wayfarer', 586, 0, 3500000, -128.05,1003.04,20.14-0.5, 360.0, 0.0, 180.0,"1.4"},
      {'BF-400', 581, 0, 3000000, -127.94,1012.14,20.13-0.5, 360.0, 0.0, 180.0,"1.4"},
}
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])
    local k**** = v[4]
    setElementData(veh,'vehicle:desc','Pojazd: '..v[1]..'\nCena: '..k****..' PLN\nPrzebieg: '..v[3]..' km\nPojemno?? silnika: '..v[11]..' dm3\nAby Kupic pojazd wsiadz na F i wpisz /kuppojazd')
    setVehicleOverrideLights(veh, 1)
    setElementFrozen(veh,true)
    setVehicleColor(veh, 179, 0, 0)
    setVehiclePlateText(veh,v[1])
    setVehicleDamageProof(veh, true)
    setElementData(veh,'vehicle.selling', true)
    setElementData(veh,'vehicle.selling', true)
    addVehicleUpgrade(veh, 1079)
    setElementData(veh,"vehicle:pojemnosc",wybranapojemnosc)
    if wybranapojemnosc == "1.2" then
wybranapojemnosc = "1"
elseif wybranapojemnosc == "1.4" then
wybranapojemnosc = "2"
elseif wybranapojemnosc == "1.6" then
wybranapojemnosc = "3"
elseif wybranapojemnosc == "1.8" then
wybranapojemnosc = "4"
elseif wybranapojemnosc == "2.0" then
wybranapojemnosc = "5"
end
   local suka = v[4]
    veh:setData('vehsell:info', {
        ['cost']=(suka),
        ['model']=v[2],
        ['mileage']=v[3],
        ['selling']=v[10],
        ['pojemnosc']=v[11]
    }, false)
end
 
function wyliczpoj(name)
local poj = getElementData(name,"vehicle:pojemnosc")
if poj == "1" then
tszy = "1.2"
elseif poj == "2" then
tszy = "1.4"
elseif poj == "3" then
tszy = "1.6"
elseif poj == "4" then
tszy = "1.8"
elseif poj == "5" then
tszy = "2.0"
elseif poj == "6" then
tszy = "2.2"
elseif poj == "7" then
tszy = "2.4"
elseif poj == "8" then
tszy = "2.7"
elseif poj == "9" then
tszy = "3.0"
end
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 dostepny w sprzedazy.', 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,
        ['pojemnosc']=data.pojemnosc,
    }, false)
    plr:outputChat(' Aby zakupic 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
        triggerClientEvent(plr,"addNotification",root,"Nie posiadasz wystarczajacej kwoty pieniedzy!","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 pojemnosc=data.pojemnosc
    local uid=getElementData(plr,'player:uid') or 0
    takePlayerMoney(plr, cost)
    if mileage <= 2000 then
    exports["ogrpg-db"]:dbSet("INSERT INTO ogrpg_vehicles (model,ownedPlayer,mileage,registered,pojemnosc,parking) VALUES (?,?,?,?,?,1)", model, getElementData(plr,"player:uid"),mileage,"false",pojemnosc)
    else
    exports["ogrpg-db"]:dbSet("INSERT INTO ogrpg_vehicles (model,ownedPlayer,mileage,registered,pojemnosc,parking) VALUES (?,?,?,?,?,1)", model, getElementData(plr,"player:uid"),mileage,"true",pojemnosc)
    end
    removePedFromVehicle(plr)
    fadeCamera(plr,false,1)
            setTimer(fadeCamera,1000,1,plr,true,1)
            setTimer(setElementPosition,1001,1,plr,289.92,-1536.06,24.59)
    triggerClientEvent(plr,"addNotification",root,string.format("Zakupiles swoj pojazd "..getVehicleNameFromModel(model)..", znajdziesz go w przechowywalni."),"info")
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-04, 19:25


Xrent

-






Wiek: 22
Na forum: 3188 dni
Posty: 230
Nick w MP: Pazdam

Piwa: 535

Respekt: 295,3
Respekt: 295,3Respekt: 295,3Respekt: 295,3

Ostrzeżeń: 60%
Opisz dok?adnie czy tylko tych pojazd?w nie mo?esz naprawia? daj b??dy db3 jak pr?bujesz naprawia? lub malowa?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-04, 19:29


AkossPL







Wiek: 25
Na forum: 4221 dni
Posty: 140
Nick w MP: AkossPL

Piwa: 3

Respekt: 50

Xrent,

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-04, 19:42


Kalizman







Wiek: 24
Na forum: 3792 dni
Posty: 1394

Piwa: 4624

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

nie ma eventu montazElementu proste juz byly takie tematy to poszukaj odpowiedzi

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-05, 08:38


Xrent

-






Wiek: 22
Na forum: 3188 dni
Posty: 230
Nick w MP: Pazdam

Piwa: 535

Respekt: 295,3
Respekt: 295,3Respekt: 295,3Respekt: 295,3

Ostrzeżeń: 60%
Posiadasz skrypt o nazwie montaz albo co? takiego ? jak tak to go w??cz

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-06, 17:07


DomineQ

lua mejster






Wiek: 22
Na forum: 4101 dni
Posty: 309
Nick w MP: EZ3N

Piwa: 5189

Respekt: 85,8

og-montaz - ten zasob musisz wlaczyc.

Podpis
Postaw piwo autorowi tego posta
 

 
Tagi: jak :: kupuje :: pojazd :: nie :: mogę :: malować :: ani :: naprawiać
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Jak kupuje pojazd nie mogę go malować ani naprawiać Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku