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

Wysłany: 2012-10-29, 16:08


HartHol

Log Out






Wiek: 27
Na forum: 5037 dni
Posty: 116
Nick w MP: HartHol

Piwa: 14

Respekt: 50

Witam !!

Mam problem zwi?zany z funkcj? getVehicleTowedByVehicle.


function system(hitElement)
local vehicle getPedOccupiedVehicle(hitElement)
    if destmarker then
        if vehicle then
            if rozl_licznik == 0 then
                playerPoints getElementData(hitElement"Pkt")
                local trucks_ids trucks[getElementModel(vehicle)]
                local trailers_ids trailers[getElementModel(vehicle)]
                if vehicle_ids[getElementModel(vehicle)] or getVehicleTowedByVehicletrucks_ids ) == trailers_ids then
                local jobstat getElementData(vehicle"praca2")    
                    if jobstat == false then
                        guiSetVisible(oknotowwtrue)
                        showCursor(true)
                        for kv in ipairs towary ) do
                            guiSetEnabled kupuj ], ( playerPoints >= ] ) )
                        end
                    else
                        rozladunek()
                    end
                else
                    outputChatBox("To nie jest pojazd dostawczy!"hitElement02550)
                end
            else
                outputChatBox("Jeszcze nie mo?esz za?adowa?/roz?adowa? towaru!"hitElement)
            end
        else
            outputChatBox("Aby za?adowa?/roz?adowa? towar musisz mie? pojazd!"hitElement02550)
        end
    end
end
addEventHandler"onClientMarkerHit"resourceRootsystem )


[ Dodano: 2012-10-29, 16:08 ]

local vehicle_ids = { 
                      [524] = true, -- Cement Truck
                      [578] = true, -- DFT-30
                      [414] = true, -- Mule
                      [440] = true, -- Rumpo
                      [455] = true, -- Flatbed
                      [443] = true, -- Packer
                      [408] = true, -- Trashmaster
                      [498] = true, -- Boxville
                      [499] = true, -- Benson
                      [413] = true, -- Pony
                      [482] = true, -- Burrito
                      [456] = true  -- Yankee
                    }
                    
local trucks =  {
                  [403] = true, -- Linerunner
                  [515] = true, -- RoadTrain
                  [514] = true  -- Tanker
                }
            
local trailers = {
                    [584] = true, -- Petrol Tanker
                    [591] = true, -- Artic Trailer
                    [450] = true, -- Artic Trailer 2
                    [435] = true  -- Artic Trailer 1
                 }


[ Dodano: 2012-10-29, 19:00 ]
Rozwi?zane... Gdzie ? Domy?lcie si?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-10-29, 20:19


Riot

3X






Wiek: 29
Na forum: 5729 dni
Posty: 1123
Nick w MP: Riot/3X

Piwa: 286

Respekt: 123
Respekt: 123


function system(hitElement)
local vehicle getPedOccupiedVehicle(hitElement)
    if destmarker then
        if vehicle then
            if rozl_licznik == 0 then
                playerPoints getElementData(hitElement"Pkt")
                local trucks_ids trucks[getElementModel(vehicle)]
                local trailers_ids trailers[getElementModel(vehicle)]
                if vehicle_ids[getElementModel(vehicle)] or getVehicleTowedByVehicle (vehiclethen
                local jobstat getElementData(vehicle"praca2")    
                    if jobstat == false then
                        guiSetVisible(oknotowwtrue)
                        showCursor(true)
                        for kv in ipairs towary ) do
                            guiSetEnabled kupuj ], ( playerPoints >= ] ) )
                        end
                    else
                        rozladunek()
                    end
                else
                    outputChatBox("To nie jest pojazd dostawczy!"hitElement02550)
                end
            else
                outputChatBox("Jeszcze nie mo?esz za?adowa?/roz?adowa? towaru!"hitElement)
            end
        else
            outputChatBox("Aby za?adowa?/roz?adowa? towar musisz mie? pojazd!"hitElement02550)
        end
    end
end
addEventHandler"onClientMarkerHit"resourceRootsystem )



My?l? ?e powinno pyka? ;)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-10-30, 14:14


HartHol

Log Out






Wiek: 27
Na forum: 5037 dni
Posty: 116
Nick w MP: HartHol

Piwa: 14

Respekt: 50

Nie zauwa?y?e? poprzedniej wiadomo?ci: "Rozwi?zane... Gdzie ? Domy?lcie si?." ? Jest to ju? rozwi?zane, ale postawi? ci piwo, dlatego ?e po obejrzeniu kodu s?dz?, ?e to te? mo?e dzia?a?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-10-30, 19:03


HartHol

Log Out






Wiek: 27
Na forum: 5037 dni
Posty: 116
Nick w MP: HartHol

Piwa: 14

Respekt: 50

Jednak bardzo przepraszam i zwracam honor ! Tw?j kod jest (jak zwykle) poprawny. :p

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-10-30, 19:38


Riot

3X






Wiek: 29
Na forum: 5729 dni
Posty: 1123
Nick w MP: Riot/3X

Piwa: 286

Respekt: 123
Respekt: 123

A to twoje rozwi?zanie jednak nie dzia?a? :x

Postaw piwo autorowi tego posta
 

 
Tagi: bad :: argument :: getvehicletowedbyvehicle
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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