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

Wysłany: 2018-05-10, 15:58


P.Wiśnia

Programista LUA






Wiek: 24
Na forum: 4044 dni
Posty: 568
Nick w MP: P.Wiśnia

Piwa: 376

Respekt: 100
Respekt: 100

Witam mam problem mam taki b??d po wejsciu na pojazd publiczny.

8-05-10 09:55:16] WARNING: [MXL-GLOWNE]/MXL_vehicles/s_vehbuy.lua:222: Bad argument @ 'getPedOccupiedVehicle' [Expected ped at argument 1, got vehicle]
[2018-05-10 09:55] WARNING: [MXL-GLOWNE]/MXL_vehicles/s_vehbuy.lua:223: Bad argument @ 'getElementData' [Expected element at argument 1, got boolean]


addEventHandler("onVehicleExit"root, function(plr,seat)
    if seat ~= 0 then return end 
    local veh=getPedOccupiedVehicle(source)
    if getElementData(veh,"vehicle:id"then    
       onSaveVehicle(source)
       setVehicleEngineState(sourcefalse)
    setVehicleDamageProof(sourcetrue)
    unbindKey(plr'h''down'bindHoron4)
    end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-10, 16:03


Toffiaaak.







Wiek: 23
Na forum: 4410 dni
Posty: 128
Nick w MP: Toffy.

Piwa: 1836

Respekt: 242
Respekt: 242Respekt: 242

addEventHandler("onVehicleExit"getRootElement(), function(plr,seat)
    if seat ~= 0 then return end 
    if getElementData(source,"vehicle:id"then    
       onSaveVehicle(source)
       setVehicleEngineState(sourcefalse)
       setVehicleDamageProof(sourcetrue)
       unbindKey(plr'h''down'bindHoron4)
    end
end)


Podpis

Osiągnięcia:
- wygrana w konkursie LUA (kat. średnia) - 05.02.18
- 150 reputacji - 06.02.18
- 100 postów - 06.02.18

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-10, 16:03


jagoreq







Wiek: 24
Na forum: 3221 dni
Posty: 221
Nick w MP: dwd

Piwa: 18

Respekt: 66,3

Ostrzeżeń: 20%
Source tutaj oznacza pojazd, czyli nie potrzebnie doda?e?
local veh=getPedOccupiedVehicle(source)


Powinno dzia?a?:

addEventHandler("onVehicleExit"root, function(plr,seat)
    if seat ~= 0 then return end 
    if getElementData(source,"vehicle:id"then    
       onSaveVehicle(source)
       setVehicleEngineState(sourcefalse)
    setVehicleDamageProof(sourcetrue)
    unbindKey(plr'h''down'bindHoron4)
    end
end)


Postaw piwo autorowi tego posta
 

 
Tagi: pojazdy :: publiczne :: system :: pojazdów.
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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