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: sprawa.
1. Paliwo, ostatnia sprawa.
Witam, jak zmieni? ten fragment kodu, ?eby zamiast jak kto? wiedzie to ?aduje od razu do 100, tylko ?eby ?adowa?o 10.

function setTimerRefillGas(enabled)
   

setElementData(vehicle,"fuel",tostring(100))
end
addEventHandler
("onGasRefill",getRootElement(),setTimerRefillGas)

function 
timerRefillGas()
    if(
isPedInVehicle(getLocalPlayer())) then
        local player 
= getLocalPlayer()
        
local vehicle = getPedOccupiedVehicle(player)
        
local fuel = getElementData(vehicle,"fuel")
        if(
tonumber(fuel) < 100) then
        setElementData
(vehicle,"fuel",100)
            
distanceOld = distance
        end
    end
end



Za pomoc oczywi?cie, kilka piwek. Tradycyjnie :)