Jump to content

setTimer


Recommended Posts

Shok non ho avuto tempo per farlo ma vorrei delle info.

1. dove hai visto questa script?

2. nel server dove hai visto questa scritta c'era il random map o il vote manager?

se cè il random map e molto semplice farlo,basta settare il comando /random a 3 minuti.

se invece cè il vote manager e totalmente diverso.

Fammi sapere :wink:

Link to comment

Prima di tutto non ti e chiaro il setTimer.

Il setTimer non server per settare il tempo di una partita,ma serve per settare il tempo ad una funzione.

Ad esempio vuoi far partire una funzione dopo 3 secondi allora "setTimer"nome funzione"3000"0/1"

3000 = 3 secondi

0/1 = loop funzione 0 = niente loop 1 = la funzione gira sempre

Per fare questa script dell hunter time hai bisogno di ben altro.

Prima di tutto nella script che ti ho dato server-side devi chiamare la funzione "updateTime" tramite trigger .

ovvero questa :

  
function updateTime() 
    local tick = getTickCount() 
    local msPassed = tick - g_StartTick 
    if not isPlayerFinished(g_Me) then 
        guiSetText(g_GUI.timepassed, msToTimeStr(msPassed)) 
    end 
    local timeLeft = g_Duration - msPassed 
    guiSetText(g_GUI.timeleft, msToTimeStr(timeLeft > 0 and timeLeft or 0)) 
    if g_HurryDuration and g_GUI.hurry == nil and timeLeft <= g_HurryDuration then 
        startHurry() 
    end 
end 
  

Dopo di che devi settare il comando /random con il setTimer.

in piu devi fare la funzione client side dxText o dxImage.

Credo di crearla anche io questa script,se attendi che la faccio oppure ora hai tutte le info.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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