Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: tankuje
1. Nie tankuje paliwa
Witam, czemu nie tankuje mi paliwa? nie wiem co jest problemem, bad argument z getElementDaty gracz:stacja

addEventHandler("onClientMarkerHit"resourceRoot, function()
    
local pojazd getPedOccupiedVehicle(localPlayer)
    if 
not pojazd then return end
    
    setElementData
(localPlayer"gracz:stacja"true)
    
outputChatBox("* Wci?nij SPACJ? aby uzupe?ni? poziom paliwa w poje?dzie.")
end)

bindKey("SPACE""down", function(plr)
    if 
getElementData(plr"gracz:stacja"then
        local pojazd 
getPedOccupiedVehicle(plr)
        if 
not pojazd then return end
        local stan 
getElementData(pojazd"pojazd_paliwo")
        if 
not stan then return end -- nie powinno siwydarzy?
        
        
local ile stan 2
        local koszt 
2
        
        
if getPlayerMoney(plr) > koszt then
            setElementData
(pojazd"pojazd_paliwo"tonumber(ile))
            
takePlayerMoney("takePlayerMoney"plrkoszt)
        else
            
outputChatBox("* Nie posiadasz wystarczaj?cej ilo?ci pieni?dzy"plr)
        
end
    end
end
)