Jump to content

Como Hacer Un Conteo?


maauroo

Recommended Posts

Posted
addCommandHandler 
setTimer 
guiCreateStaticImage 
playSound/playSound3D 

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

que esta mal ?

function delayedChat () 
    outputChatBox ( "1" ) 
end 
  
setTimer ( delayedChat, 1000, 1 ) 
  
function delayedChat1 () 
    outputChatBox ( "2" ) 
end 
  
setTimer ( delayedChat1, 3000, 1 ) 
  
function delayedChat2 () 
    outputChatBox ( "3" ) 
end 
  
setTimer ( delayedChat2, 4000, 1 ) 
  
function delayedChat3 () 
    outputChatBox ( "Go Go Go" ) 
end 
  
setTimer ( delayedChat3, 6000, 1 ) 
  
  
addCommandHandler("cuenta", delayedChat, delayedChat1, delayedChat2, delayedChat3 ) 

elMota/elFoReX De Vuelta En MTA *---------*

Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3

https://www.youtube.com/user/KillersGPs

430x73_FFFFFF_FF9900_000000_000000.png
Posted

Casi todo.

function delayedChat () 
    outputChatBox ( "1" ) 
    setTimer ( delayedChat1, 1000, 1 ) 
end 
addCommandHandler("cuenta", delayedChat ) 
  
function delayedChat1 () 
    outputChatBox ( "2" ) 
    setTimer ( delayedChat2, 2000, 1 ) 
end 
   
function delayedChat2 () 
    outputChatBox ( "3" ) 
    setTimer ( delayedChat3, 3000, 1 ) 
end 
   
function delayedChat3 () 
    outputChatBox ( "Go Go Go" ) 
end 

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

Mira Lo Hise Guiandome Con Un Resource Y El Unico Problema Es Que Cuando Inicia El Conteo Nadie Ve La Imagen y Nadie Escucha Los Sonidos Del Conteo..

function Conteo ( source ) 
    guiSetVisible ( imagen, false ) 
    sound3 = playSound( "Sonidos/3.mp3", false ) 
    imagen = guiCreateStaticImage(305,119,110,190,"imagen/3.png",false) 
    setTimer ( Conteo2, 1000, 1 ) 
    outputChatBox ( "Conteo Iniciado.", getRootElement(), 255, 255, 255, true 
end 

Cual Es El Error?

Posted
function Conteo ( ) 
    if ( isElement ( image ) ) then 
        destroyElement ( image ) 
    end 
    if ( isElement ( sound3 ) ) then 
        destroyElement ( sound3 ) 
    end 
    sound3 = playSound( "Sonidos/3.mp3", false ) 
    imagen = guiCreateStaticImage(305,119,110,190,"imagen/3.png",false) 
    setTimer ( Conteo2, 1000, 1 ) 
    outputChatBox ( "Conteo Iniciado.", 255, 255, 255, true ) -- Te falto un parentesis. 
end 

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

Lo Probe Y Nadie Lo Ve..

function Conteo ( ) 
    if ( isElement ( imagen ) ) then 
        destroyElement ( imagen ) 
    end 
    if ( isElement ( sound3 ) ) then 
        destroyElement ( sound3 ) 
    end 
    sound3 = playSound( "Sonidos/3.mp3", false ) 
    imagen = guiCreateStaticImage(305,119,110,190,"images/3.png",false) 
    setTimer ( Conteo2, 1000, 1 ) 
    outputChatBox ( "Conteo Iniciado.", 255, 255, 255, true ) -- Te falto un parentesis. 
end 
function Conteo2 ( ) 
    if ( isElement ( imagen ) ) then 
        destroyElement ( imagen ) 
    end 
    if ( isElement ( sound3 ) ) then 
        destroyElement ( sound3 ) 
    end 
    sound3 = playSound( "Sonidos/2.mp3", false ) 
    imagen = guiCreateStaticImage(305,119,110,190,"images/2.png",false) 
    setTimer ( Conteo1, 1000, 1 ) 
end 
function Conteo1 ( ) 
    if ( isElement ( imagen ) ) then 
        destroyElement ( imagen ) 
    end 
    if ( isElement ( sound3 ) ) then 
        destroyElement ( sound3 ) 
    end 
    sound3 = playSound( "Sonidos/1.mp3", false ) 
    imagen = guiCreateStaticImage(305,119,110,190,"images/1.png",false) 
    setTimer ( Conteo0, 1000, 1 ) 
end 
function Conteo0 ( ) 
    if ( isElement ( imagen ) ) then 
        destroyElement ( imagen ) 
    end 
    if ( isElement ( sound3 ) ) then 
        destroyElement ( sound3 ) 
    end 
    sound3 = playSound( "Sonidos/0.mp3", false ) 
    imagen = guiCreateStaticImage(305,119,110,190,"images/go.png",false) 
    setTimer ( ConteoEnd, 1000, 1 ) 
end 
function ConteoEnd (  ) 
    if ( isElement ( imagen ) ) then 
        destroyElement ( imagen ) 
    end 
    end 
addCommandHandler ( "conteo", Conteo ) 

Donde Esta El Problema?

Posted

Server-side:

addCommandHandler ( "conteo", function (source) 
        triggerServerEvent ( root, "conteo", source ) 
end ) 

Client-side:

function Conteo ( ) 
         if ( isElement ( imagen ) ) then 
            destroyElement ( imagen ) 
        end 
        if ( isElement ( sound3 ) ) then 
            destroyElement ( sound3 ) 
        end 
        sound3 = playSound( "Sonidos/3.mp3", false ) 
        imagen = guiCreateStaticImage(305,119,110,190,"images/3.png",false) 
        setTimer ( Conteo2, 1000, 1 ) 
        outputChatBox ( "Conteo Iniciado.", 255, 255, 255, true ) -- Te falto un parentesis. 
end 
addEvent ( "conteo", true ) 
addEventHandler ( "conteo", root, Conteo ) 
  
function Conteo2 ( ) 
        if ( isElement ( imagen ) ) then 
            destroyElement ( imagen ) 
        end 
        if ( isElement ( sound3 ) ) then 
            destroyElement ( sound3 ) 
        end 
        sound3 = playSound( "Sonidos/2.mp3", false ) 
        imagen = guiCreateStaticImage(305,119,110,190,"images/2.png",false) 
        setTimer ( Conteo1, 1000, 1 ) 
end 
function Conteo1 ( ) 
        if ( isElement ( imagen ) ) then 
            destroyElement ( imagen ) 
        end 
        if ( isElement ( sound3 ) ) then 
            destroyElement ( sound3 ) 
        end 
        sound3 = playSound( "Sonidos/1.mp3", false ) 
        imagen = guiCreateStaticImage(305,119,110,190,"images/1.png",false) 
        setTimer ( Conteo0, 1000, 1 ) 
end 
function Conteo0 ( ) 
        if ( isElement ( imagen ) ) then 
            destroyElement ( imagen ) 
        end 
        if ( isElement ( sound3 ) ) then 
            destroyElement ( sound3 ) 
        end 
        sound3 = playSound( "Sonidos/0.mp3", false ) 
        imagen = guiCreateStaticImage(305,119,110,190,"images/go.png",false) 
        setTimer ( ConteoEnd, 1000, 1 ) 
end 
function ConteoEnd (  ) 
        if ( isElement ( imagen ) ) then 
            destroyElement ( imagen ) 
        end 
end 
addCommandHandler ( "conteo", Conteo ) 

Pones /conteo en el chat y empieza a contar.

"Everything exists, because otherwise nothing would", Bob Marley, 2015.

  • Recently Browsing   0 members

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