Jump to content

Ayuda con Time


Arsilex

Recommended Posts

Posted

Hola miren tengo este script que es de mobako y quiero hacer que cuando inicie el script el tiempo del sv sea la hora española no la hora donde esta el sv :S

local function syncTime( ) 
    local time = getRealTime( ) 
    setTime( time.hour, time.minute ) 
end 
  
addEventHandler( "onResourceStart", resourceRoot, 
    function( ) 
        setMinuteDuration( 60000 ) 
        syncTime( ) 
         
        setTimer( syncTime, 300000, 0 ) -- adjust the time every 5 minutes 
    end 
) 

rsilex.png.0e6ad382b3fdc3cbe6390e3e847572c9.png
Posted

Agregale o descontale segun la hora de España.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Obtene la hora de España, luego fijate la diferencia con la del servidor y ahi agregale o descontale la diferencia.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
local function syncTime( ) 
    local time = getRealTime( ) 
    setTime( time.hour+7, time.minute ) 
end 
  
addEventHandler( "onResourceStart", resourceRoot, 
    function( ) 
        setMinuteDuration( 60000 ) 
        syncTime( ) 
         
        setTimer( syncTime, 300000, 0 ) -- adjust the time every 5 minutes 
    end 
) 

rsilex.png.0e6ad382b3fdc3cbe6390e3e847572c9.png
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...