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: modyfikacja.
1. Skrypt respawn, drobna modyfikacja.
Witam, mam pro?b? czy m?g?by mi kto? przekszta?ci? ten ma?y skrypcik tak, ?eby pojazdy automatycznie respawnowa?y si? co 30 sekund zamiast u?ycia komendy? Oraz, ?eby nie by?o ?adnych powiadomie?, ?e ta czynno?? b?dzie/lub jest wykonywana (takie odchudzenie :P ). Z g?ry dzi?ki, pozdrawiam :)

local respawn 30
local r

addCommandHandler
("rav",function(player)
    if 
isTimer(rthen
        resetTimer
(r)
        
outputDebugString("Timer Reset")
        return
    
end
    outputChatBox
("RESPAWNING ALL UNOCCUPIED VEHICLES IN ".. respawn.."SECONDS")
    
outputDebugString("Cars Respawning")
    
setTimer(function()
        for 
_vehicle in ipairs getElementsByType "vehicle" ) ) do -- For every vehicle do the following...
            if 
isEmptyvehicle then
                resetVehicleIdleTime 
vehicle ) -- Reset the vehicle's idle time
                respawnVehicle ( vehicle )
            end
        end    
        outputDebugString("Cars Respawned")
        outputChatBox("ALL UNOCCUPIED VEHICLES RESPAWNED")
    end,respawn*1000,1)
end)

function isEmpty( vehicle )
    local passengers = getVehicleMaxPassengers( vehicle )
    if type( passengers ) == '
number' then
        for seat = 0, passengers do
            if getVehicleOccupant( vehicle, seat ) then
                return false
            end
        end
    end
    return true
end