Jump to content

ayuda como hacer que el timer empieze despues de 1 min


JuanM27

Recommended Posts

hola buenas noches..

aca tengo una pregunta, nose como hacer que el timer haga la funcion despues de 1 min.

yo tengo asi,

local Timer1 = setTimer ( triggerClientEvent(thePlayer,"Probocacion",thePlayer,Turf1MinutosPro),600000, 1) --1 min.

pero asi como esta me envia el triggerClientEvent al comenzar el timer

y yo quiero que cuando llegue al minuto recien envie el triggerClientEvent

alguien sabe como seria?

Link to comment

hola de nuevo tengo un error,

local ProbocaTimer = setTimer ( 
            function() 
            if (Turf1MinutosPro ~= 10) then 
            triggerClientEvent(thePlayer,"Probocacion",thePlayer,Turf1MinutosPro) 
            Turf1MinutosPro = Turf1MinutosPro + 1 
            end,60000, 10 ) 
            else 
            killTimer(ProbocaTimer) 
            setRadarAreaFlashing ( Turfs1, true ) 
            end 

y en debugscript 3 me sale esto

warning: loading script failed ...... : unexpeted symbol near ','

no entiendo por que..

por que si lo pongo asi, anda bien

local ProbocaTimer = setTimer ( 
            function() 
            triggerClientEvent(thePlayer,"Probocacion",thePlayer,Turf1MinutosPro) 
            Turf1MinutosPro = Turf1MinutosPro + 1 
            end,60000, 10 ) 

pero si le pongo un if me tira el error,

alguien me puede explicar donde le estoy errando

Link to comment
local ProbocaTimer = setTimer ( 
    function ( ) 
        if ( Turf1MinutosPro ~= 10 ) then 
            triggerClientEvent ( thePlayer, "Probocacion", thePlayer, Turf1MinutosPro ) 
            Turf1MinutosPro = ( Turf1MinutosPro + 1 ) 
        else 
            killTimer ( ProbocaTimer ) 
            setRadarAreaFlashing ( Turfs1, true ) 
        end 
    end 
    ,60000, 10 
) 

Link to comment

hola de nuevo, sigo con esto y ahora se me presento 2 problemas mas...

le comento primero no me funciona el killtimer.

lo tengo asi, aver si alguien me puede dar una mano.

local ProbocaTimer = setTimer ( 
            function ( ) 
            if ( Turf1MinutosPro ~= 11 ) then 
            triggerClientEvent ( thePlayer, "Probocacion", thePlayer, Turf1MinutosPro ) 
            Turf1MinutosPro = ( Turf1MinutosPro + 1 ) 
            elseif (Turf1Titila ~= 1 ) then 
            Turf1Titila = (Turf1Titila + 1) 
           elseif (Turf1MinutosGur == 0 ) then 
           triggerClientEvent ( thePlayer, "Declara", thePlayer, Turf1Due ) 
           setRadarAreaFlashing ( Turfs1, true ) 
            Turf1MinutosGur = ( Turf1MinutosGur + 1 ) 
            elseif (Turf1MinutosGur ~= 11 ) then 
            triggerClientEvent ( thePlayer, "Guerra", thePlayer, Turf1MinutosGur ) 
            Turf1MinutosGur = ( Turf1MinutosGur + 1 ) 
            elseif (Turf1MinutosGur == 11 ) then 
            setRadarAreaColor ( Turfs1, 255, 0, 0, 100 ) 
            setRadarAreaFlashing ( Turfs1, false ) 
            if (isTimer(ProbocaTimer)) then 
            killTimer (ProbocaTimer) 
            end 
            Turf1MinutosGur = 0 
            Turf1Titila = 0 
            Turf1MinutosPro = 0 
            end 
        end 
        ,15000, 24 
            ) 

y el otro problema que tengo es que nose como hacer para que a todos los jugadores que estemos en ese turf (area) nos cuente por iguales

osea si estoy yo solo me cuenta de 1 en 1 como tiene que ser, pero si somos 2 por ejemplo.

en los mensajes me cuenta en 2 en 2

ejemplo me dice .... 2/10

y despues me dice 4/10

pero igual eso es lo de menos por ahora... me interesa mas el tema de como parar el time..

saludos

Link to comment
  • Recently Browsing   0 members

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