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

Wysłany: 2018-10-26, 18:59


AkossPL







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

Piwa: 3

Respekt: 50

Siema problem jak wyci?gam auto z przecho i nie wyjecha?em z przecho to druga osoba te? mo?e wycionga? pomo?ecie postawie piwo

local screenWscreenH guiGetScreenSize()

przechowalnie = {
{{290.50, -1540.0624.490.40.056.4},setElementData(createMarker(290.09, -1545.5424.59-1"cylinder"1.50,102,255),"przecho:id",1),{['Automobile']=true,['Bike']=true,['BMX']=true,['Quad']=true,['Monster Truck']=true,},"Samochody i motocykle",createColCuboid(290.50, -1540.0624.490.40.056.4),{290.50, -1540.0624.490.40.056.4}},
--{{-1329.83, -503.2314.17},setElementData(createMarker(-1329.83, -503.2314.17-0.9"cylinder"1.30,102,255),"przecho:id",2),{['Plane']=true,['Helicopter']=true,},"Samoloty i Helikoptery"createColCuboid(-1374.84412, -523.8012713.1718832.97497558593860.6935424804698.1999992370605),{-1361.16, -493.1714.17,0,0,210}},
--{{1107.51,1790.99,10.82},setElementData(createMarker(1107.51,1790.99,10.82-0.9"cylinder"1255,255,255,50),"przecho:id",3),{['Boat']=true},"?odzie"createColCuboid(-2208.022417.53, -1.4810.0010.0010.07),{-2202.432421.990.820.000.0045.84}},
--{{1107.51,1790.99,10.82+0.3},setElementData(createMarker(1107.51,1790.99,10.8-0.9"cylinder"1.30,102,255),"przecho:id",3),{['Automobile']=true,['Bike']=true,['BMX']=true,['Quad']=true,['Monster Truck']=true,},"Samochody i motocykle",createColCuboid(1100.71276855471782.52270507818.82031257.256.56.1250003814697),{1101.58,1784.16,10.82, -0.00, -0.0090.31}},
--{{2478.78,2360.24,4.21+0.3},setElementData(createMarker(2478.78,2360.24,4.21-0.9"cylinder"1.30,102,255),"przecho:id",4),{['Automobile']=true,['Bike']=true,['BMX']=true,['Quad']=true,['Monster Truck']=true,},"Samochody i motocykle",createColCuboid(2477.232912351.915283.210949.207031254.2277832031254.0500000953674),{2483.01,2354.38,4.210.260.20272.34}},
--{{1756.93, -2055.3413.58+0.3},setElementData(createMarker(1756.93, -2055.3413.58-0.9"cylinder"2255,255,255,50),"przecho:id",6),{['Automobile']=true,['Bike']=true,['BMX']=true,['Quad']=true,['Monster Truck']=true,},"Samochody i motocykle"createColCuboid(1743.94580, -2061.6289112.0765813.22521972656310.777343756.7000001907349),{1751.41, -2057.7014.280.000.00180.38}},
--{{1982.612494.0710.86+0.3},setElementData(createMarker(1982.612494.0710.86-0.9"cylinder"2255,255,255,50),"przecho:id",7),{['Automobile']=true,['Bike']=true,['BMX']=true,['Quad']=true,['Monster Truck']=true,},"Samochody i motocykle",createColCuboid(1983.862484.378.845.257.505.25),{1987.012487.3010.84, -0.000.00180}},
{{213.20,-182.99,1.58359.5360.01.1},setElementData(createMarker(213.20,-182.99,1.58-1"cylinder"1.5255,255,255,50),"przecho:id",2),{['Automobile']=true,['Bike']=true,['BMX']=true,['Quad']=true,['Monster Truck']=true,},"Samochody i motocykle",createColCuboid(206.50, -183.400.505,5.75,2),{209.07, -180.531.24359.5360.01.1}}, --bb
}

for i,p in pairs(przechowalnie) do
local t=createElement("text")
setElementData(t,"scale",1.5)
setElementData(t,"name",("Odbi?r pojazd?w (%s)"):format(p[4]))
setElementPosition(t,p[1][1],p[1][2],p[1][3])
end

ID_PRZECHO_DO_JAKIEJ_WLAZLES nil

local wm={}
wm.window=guiCreateWindow(0.250.260.510.42"Odbieranie pojazd?w"true)
guiWindowSetSizable(wm.windowfalse)
guiWindowSetMovable(wm.windowfalse)
guiSetVisible(wm.windowfalse)
wm.gridlist=guiCreateGridList(0.040.090.920.65truewm.window)
guiGridListAddColumn(wm.gridlist"ID"0.2)
guiGridListAddColumn(wm.gridlist"Model"0.3)
guiGridListAddColumn(wm.gridlist"Przebieg"0.3)
guiGridListAddColumn(wm.gridlist"Paliwo"0.3)
guiGridListAddColumn(wm.gridlist"Pojemnosc"0.3)
wm.submit=guiCreateButton(0.040.760.470.19"Wyjmij pojazd"truewm.window)
wm.close=guiCreateButton(0.570.750.390.20"Zamknij"truewm.window)

addEvent("onParkingGetVehicles"true)
addEventHandler("onParkingGetVehicles"root, function(result,id)
    guiGridListClear(wm.gridlist)
    if not result then return end
    for i,v in pairs(result) do
        if v["registered"] == "false" then
        v["registered"] = "NIE"
        else
        v["registered"] = "TAK"
        end
        local row=guiGridListAddRow(wm.gridlist)
        if przechowalnie[id][3][getVehicleType(v["model"])] then
        guiGridListSetItemText(wm.gridlistrow1v["id"], falsefalse)
        guiGridListSetItemText(wm.gridlistrow2getVehicleNameFromModel(v["model"]), falsefalse)
        guiGridListSetItemText(wm.gridlistrow3v["mileage"], falsefalse)
        guiGridListSetItemText(wm.gridlistrow4v["fuel"], falsefalse)
        guiGridListSetItemText(wm.gridlistrow5v["pojemnosc"], falsefalse)
        end
    end
end)

addEventHandler("onClientMarkerHit"root, function(el,md)
    local id getElementData(source,"przecho:id")
    if not id then return end
    if el~=localPlayer then return end
    if isPedInVehicle(elthen return end
    if guiGetVisible(wm.window) == false then
        showCursor(true)
        guiSetVisible(wm.window,true)
        triggerServerEvent("onParkingGetRekords",resourceRoot,id)
        ID_PRZECHO_DO_JAKIEJ_WLAZLES id
    end
end)

addEventHandler("onClientGUIClick"resourceRoot, function()
    if source == wm.close then
        if guiGetVisible(wm.window) == true then
            showCursor(false)
            guiSetVisible(wm.window,false)
        end
    end
    if source == wm.submit then
        local selectedRow=guiGridListGetSelectedItem(wm.gridlist) or -1
        if selectedRow 0 then return end
        local vehicles=getElementsWithinColShape(przechowalnie[ID_PRZECHO_DO_JAKIEJ_WLAZLES][5],"vehicle")
        if #vehicles > 0 then
            outputChatBox("Miejsce odbioru pojazd?w jest zaj?te!"255,0,0)
            return
        end
        local id=guiGridListGetItemText(wm.gridlistselectedRow1)
        local register=guiGridListGetItemText(wm.gridlistselectedRow3)
        if register == "TAK" then
        outputChatBox("Aby zrespi? pojazd, musisz go zarejestrowa? w urz?dzie miasta. (ID pojazdu: "..id..")",255,0,0)
        return end
        guiGridListRemoveRow(wm.gridlistselectedRow)
        triggerServerEvent("onParkingVehicleSpawn"localPlayertonumber(id),przechowalnie[ID_PRZECHO_DO_JAKIEJ_WLAZLES][6])
    end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-10-26, 19:05


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

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

?le ustawi?e? cuboid.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-10-26, 19:07


AkossPL







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

Piwa: 3

Respekt: 50

Kalizman, Ale w jakim sensie bo nie wiem

[ Dodano: 2018-10-26, 19:09 ]
Kalizman, dalej nic zmieni?em cuboid

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-10-26, 19:13


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

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

W tabeli przechowalnie w ka?dej linijce na ko?cu ka?dej linijki znajduje si? createColCuboid, a w ?rodku tej funkcji znajduj? si? argumenty (koordynaty, wysoko??, szeroko?? cuboid etc). Wystarczy tam po prostu uzupe?ni? dobrze argumenty i b?dzie dzia?a?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-10-26, 19:23


AkossPL







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

Piwa: 3

Respekt: 50

Kalizman, to nie jest to

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-10-26, 22:49


Avenged

Młodszy Szkrypter






Wiek: 23
Na forum: 3510 dni
Posty: 654
Nick w MP: Avenged

Piwa: 1570

Respekt: 326,3
Respekt: 326,3Respekt: 326,3Respekt: 326,3

        local vehicles=getElementsWithinColShape(przechowalnie[ID_PRZECHO_DO_JAKIEJ_WLAZLES][5],"vehicle")



5 pozycja w tabeli i tam musisz ustawi? poprawne koordynaty cuboida.

Podpis
LUA, JS, PHP



Zapraszam do skorzystania z moich usług: Klik

Postaw piwo autorowi tego posta
 

 
Tagi: gdy :: wyciongam :: auto :: przecho
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA 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