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

Wysłany: 2017-01-06, 17:57


mis14







Wiek: 25
Na forum: 3925 dni
Posty: 185

Piwa: 73

Respekt: -149

wywala mi b??d
[2017-01-06 17ERRORprzecho\c_parking.lua:60attempt to get length of local 'vehicles' (a boolean value)


kod



local marker=createMarker(-1973.12,100.78,27.69-1.20"cylinder"2130,137,143,50)
local sphere=createColSphere(-1973.12,100.78,27.69)

local t=createElement("text")
setElementData(t,"scale",1.5)
setElementData(t,"name","Odbi?r pojazd?w")
setElementPosition(t,1541.88, -1398.9614.01)

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.4)
guiGridListAddColumn(wm.gridlist"Model"0.6)
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)
    guiGridListClear(wm.gridlist)
    if not result then return end
    for i,v in pairs(result) do
        local row=guiGridListAddRow(wm.gridlist)
        guiGridListSetItemText(wm.gridlistrow1v["id"], falsefalse)
        guiGridListSetItemText(wm.gridlistrow2getVehicleNameFromModel(v["model"]), falsefalse)
    end
end)

addEventHandler("onClientMarkerHit"marker, function(el,md)
    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"localPlayer)
    end
end)

addEventHandler("onClientGUIClick"resourceRoot, function()
    if source == wm.close then
        if guiGetVisible(wm.window) == true then
            showCursor(false)
            guiSetVisible(wm.window,false)
            setCameraTarget(localPlayerlocalPlayer)
        end
    end
    if source == wm.submit then
        local selectedRow=guiGridListGetSelectedItem(wm.gridlist) or -1
        if selectedRow 0 then return end
        local vehicles=getElementsWithinColShape(sphere,"vehicle")
        if #vehicles > 0 then  -- tu b??d 
            outputChatBox("* Nie ma miejsca aby wyci?gn?? pojazd."25500)
            return
        end
        local id=guiGridListGetItemText(wm.gridlistselectedRow1)
        guiGridListRemoveRow(wm.gridlistselectedRow)
        triggerServerEvent("onParkingVehicleSpawn"localPlayertonumber(id))
    end
end)
function render1()
dxDrawText(" Nie ma miejsca aby wyci?gn?? pojazd"screenW 0.3656screenH 0.1553screenW 0.6273screenH 0.3193tocolor(25500255), 1.50"pricedown""center""center"falsefalsefalsefalsefalse)
end

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


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-06, 18:18


_Haze

Peace Yo!






Wiek: 24
Na forum: 4185 dni
Posty: 1648
Nick w MP: Haze

Piwa: 2628

Respekt: 1020
Respekt: 1020

local sphere=createColSphere(-1973.12,100.78,27.69)


Więcej informacji znajdziesz w Wikipedii MTA:

CreateColSphere

daj
local sphere=createColSphere(-1973.12,100.78,27.69,5)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-06, 18:21


mis14







Wiek: 25
Na forum: 3925 dni
Posty: 185

Piwa: 73

Respekt: -149

dzi?ki dzia?a.

Postaw piwo autorowi tego posta
 

 
Tagi: przechowywalnia
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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