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

Wysłany: 2017-08-31, 09:42


Armus







Wiek: 43
Na forum: 3545 dni
Posty: 13
Nick w MP: Armus

Piwa: 1

Respekt: 50

Witam. Dzi? mam problem taki ?e gdy kupie pojazd jest on w przecho. Ale gdy chce go wyci?gn?? pojawia si? informacja: Pomy?lnie wyci?gni?to pojazd o id: Ale nie ma go na parkingu.
?eby nie by?o daje kod przecho

local screenW, screenH = guiGetScreenSize()

przechowalnie = {
{{1582.41, -1405.94, 13.75+0.3},setElementData(createMarker(1582.41, -1405.94, 13.75-0.9, "cylinder", 2, 255,255,255,50),"przecho:id",1),{['Automobile']=true,['Bike']=true,['BMX']=true,['Quad']=true,['Monster Truck']=true,},"Samochody i motocykle",createColCuboid(1578.7016601563, -1414.6091308594, 12.635543823242, 10.25, 5, 5.25),{1585.16, -1412.04, 13.42,0,0,270}},
{{-1329.83, -503.23, 14.17},setElementData(createMarker(-1329.83, -503.23, 14.17-0.9, "cylinder", 2, 255,255,255,50),"przecho:id",2),{['Plane']=true,['Helicopter']=true,},"Samoloty i Helikoptery", createColCuboid(-1374.84412, -523.80127, 13.17188, 32.974975585938, 60.693542480469, 8.1999992370605),{-1361.16, -493.17, 14.17,0,0,210}},
{{-1329.80, 338.39, 7.19},setElementData(createMarker(-1329.80, 338.39, 7.19-0.9, "cylinder", 2, 255,255,255,50),"przecho:id",3),{['Boat']=true},"?odzie", createColCuboid(-1322.88025, 340.98438, -1.55000, 28.96923828125, 33.127319335938, 10.200000011921),{-1313.18, 357.69, 2.65, 0.00, 0.00, 283.42}},
{{1765.17, -2020.07, 14.15+0.3},setElementData(createMarker(1765.17, -2020.07, 14.15-0.9, "cylinder", 2, 255,255,255,50),"przecho:id",4),{['Automobile']=true,['Bike']=true,['BMX']=true,['Quad']=true,['Monster Truck']=true,},"Samochody i motocykle",createColCuboid(1762.42041, -2027.75293, 13.14842, 19.55908203125, 8.8485107421875, 6.1250003814697),{1768.03, -2024.49, 14.15, -0.00, -0.00, 268.31}},
{{1766.58, -2037.49, 13.52+0.3},setElementData(createMarker(1766.58, -2037.49, 13.52-0.9, "cylinder", 2, 255,255,255,50),"przecho:id",5),{['Automobile']=true,['Bike']=true,['BMX']=true,['Quad']=true,['Monster Truck']=true,},"Samochody i motocykle",createColCuboid(1761.14673, -2036.68335, 11.82012, 15.338989257813, 9.07958984375, 6.2499994277954),{1771.64, -2032.37, 13.20, 0.26, 0.20, 272.34}},
{{1756.93, -2055.34, 13.58+0.3},setElementData(createMarker(1756.93, -2055.34, 13.58-0.9, "cylinder", 2, 255,255,255,50),"przecho:id",6),{['Automobile']=true,['Bike']=true,['BMX']=true,['Quad']=true,['Monster Truck']=true,},"Samochody i motocykle", createColCuboid(1743.94580, -2061.62891, 12.07658, 13.225219726563, 10.77734375, 6.7000001907349),{1751.41, -2057.70, 14.28, 0.00, 0.00, 180.38}},
{{1956.87, 2166.61, 10.82+0.3},setElementData(createMarker(1956.87, 2166.61, 10.82-0.9, "cylinder", 1.2, 255,0,0,30),"przecho:id",7),{['Automobile']=true,['Bike']=true,['BMX']=true,['Quad']=true,['Monster Truck']=true,},"Samochody i motocykle",createColCuboid(1958.4009, 2158.613, 9.5703125, 10.25, 8, 4.5),{1963.18, 2162.52, 10.56, 0.0, 0.0, 91.4}},

}

for i,p in pairs(przechowalnie) do
local t=createElement("text")
setElementData(t,"scale",1.2)
setElementData(t,"name",("Odbi?r\nPojazd?w"))
setElementPosition(t,p[1][1],p[1][2],p[1][3]-0.5)
end


-----


ID_PRZECHO_DO_JAKIEJ_WLAZLES = nil

local wm={}
wm.window=guiCreateWindow(0.25, 0.26, 0.51, 0.42, "Odbieranie pojazd?w", true)
guiWindowSetSizable(wm.window, false)
guiWindowSetMovable(wm.window, false)
guiSetVisible(wm.window, false)
wm.gridlist=guiCreateGridList(0.04, 0.09, 0.92, 0.65, true, wm.window)
guiGridListAddColumn(wm.gridlist, "ID", 0.2)
guiGridListAddColumn(wm.gridlist, "Model", 0.55)
guiGridListAddColumn(wm.gridlist, "Zarejestrowany", 0.2)
wm.submit=guiCreateButton(0.04, 0.76, 0.47, 0.19, "Wyjmij pojazd", true, wm.window)
wm.close=guiCreateButton(0.57, 0.75, 0.39, 0.20, "Zamknij", true, wm.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.gridlist, row, 1, v["id"], false, false)
        guiGridListSetItemText(wm.gridlist, row, 2, getVehicleNameFromModel(v["model"]), false, false)
        guiGridListSetItemText(wm.gridlist, row, 3, v["registered"], false, false)
        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(el) then return end
    if guiGetVisible(wm.window) == false then
        showCursor(true)
        guiSetVisible(wm.window,true)
        triggerServerEvent("onParkingGetRekords", root,id)
        ID_PRZECHO_DO_JAKIEJ_WLAZLES = id
        --etCameraMatrix(-2056.26, 468.77, 38.49, -2048.08, 467.73, 35.17)
    end
end)

addEventHandler("onClientGUIClick", resourceRoot, function()
    if source == wm.close then
        if guiGetVisible(wm.window) == true then
            showCursor(false)
            guiSetVisible(wm.window,false)
            setCameraTarget(localPlayer, localPlayer)
        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
            addEventHandler("onClientRender",root,render1)
            setTimer(renderstop1,4500,1)
            return
        end
        local id=guiGridListGetItemText(wm.gridlist, selectedRow, 1)
        local register=guiGridListGetItemText(wm.gridlist, selectedRow, 3)
        if register == "NIE" then
        exports["1"]:outputNotificationBox ("#0000ccZarejestruj pojazd w urz?dzie! Jego ID to #cc0000"..id)
        return end
        guiGridListRemoveRow(wm.gridlist, selectedRow)
        triggerServerEvent("onParkingVehicleSpawn", localPlayer, tonumber(id),przechowalnie[ID_PRZECHO_DO_JAKIEJ_WLAZLES][6])
        exports["1"]:outputNotificationBox ("#00cc00Pomy?lnie wyj?to pojazd o ID: #00cccc"..id)
    end
end)


function render1()
dxDrawText(" Nie ma miejsca aby wyci?gn?? pojazd", screenW * 0.3656, screenH * 0.1553, screenW * 0.6273, screenH * 0.3193, tocolor(255, 0, 0, 255), 1.50, "pricedown", "center", "center", false, false, false, false, false)
end

function renderstop1()
removeEventHandler("onClientRender",root,render1)
end

Posiadam paczke country life i nie wiem jak to naprawi?. Prosz? o szybk? pomoc

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-08-31, 09:52


NoKill1997

Online






Wiek: 29
Na forum: 3365 dni
Posty: 183
Nick w MP: Mefedroniarz.PDW

Piwa: 783

Respekt: 80,5

Czy masz wlaczony skrypt ogrpg-vehicles?

Podpis
Aktualny projekt: LSgame
Na scenie MTA od: 2015 roku.
Discord: Chwilowoo, brak
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-08-31, 09:53


Armus







Wiek: 43
Na forum: 3545 dni
Posty: 13
Nick w MP: Armus

Piwa: 1

Respekt: 50

To chyba jasne ?e mam.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-08-31, 10:01


NoKill1997

Online






Wiek: 29
Na forum: 3365 dni
Posty: 183
Nick w MP: Mefedroniarz.PDW

Piwa: 783

Respekt: 80,5

Wyskakuj? jakie? b??dy w debugscript?

Podpis
Aktualny projekt: LSgame
Na scenie MTA od: 2015 roku.
Discord: Chwilowoo, brak
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-08-31, 10:09


Armus







Wiek: 43
Na forum: 3545 dni
Posty: 13
Nick w MP: Armus

Piwa: 1

Respekt: 50

Nie dokonca wiem jak to w??czy?. Wyt?umaczysz?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-08-31, 10:18


Kalizman







Wiek: 24
Na forum: 3792 dni
Posty: 1394

Piwa: 4624

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

/debugscript 3

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-08-31, 10:40


Szymczu

Programista bo tak






Wiek: 27
Na forum: 3575 dni
Posty: 194
Nick w MP: Szymczu

Piwa: 36

Respekt: 120
Respekt: 120

Poka? stron? serwera.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-09-01, 16:53


nanKy







Wiek: 23
Na forum: 4006 dni
Posty: 498
Nick w MP: nanky

Piwa: 1775

Respekt: 239
Respekt: 239Respekt: 239

Sprawd? po stronie serwera zgodno?? exportu.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-09-03, 12:16


Demossek

Chyba ty...






Wiek: 21
Na forum: 3515 dni
Posty: 24
Nick w MP: Demossek



Respekt: 50

Kiedys tez tak mialem, cuboid ci sie nie ustawil przenosiles przechowywalnie ??

Postaw piwo autorowi tego posta
 

 
Tagi: przecho :: nie :: oddaje :: pojazdu.
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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