Zafire Posted July 25, 2011 Share Posted July 25, 2011 I need help here, because my first function works, but the second is a Delayed function, so when i use it star a timer for use the first function before X seconds ---------------------------------------- Dialogo Usuario ----------------------------------------- function crearDialogoUsuario(texto, duracion) triggerClientEvent(client, "formatearDialogo", getRootElement(), texto, duracion) end -------------------------------------------------------------------------------------------------- ----------------------------------- Dialogo Usuario con Delay ------------------------------------ function crearDialogoUsuarioDelay(texto, duracion, delay) setTimer(crearDialogoUsuario, delay, 1, texto, duracion) end -------------------------------------------------------------------------------------------------- but in my SetTimer function, i cant export the vars there.. .. if i use my first function vars "texto", "duracion" works perfect.. but in the second one i have setTimer so i dont know to use the vars there.. dont works because the delayed function dont take the vars.. Link to comment
Castillo Posted July 25, 2011 Share Posted July 25, 2011 Uhm, you sent me a PM about this already, could you explain me what do you mean? I seriously don't understand. Link to comment
Zafire Posted July 25, 2011 Author Share Posted July 25, 2011 Uhm, you sent me a PM about this already, could you explain me what do you mean? I seriously don't understand. i use crearDialogoUsuario(text, time) for create a dialog, and show it X time.. It works.. but if i use this function 2 times at the same time example crearDialogoUsuario("Hi, how are you", 4000) crearDialogoUsuario("Bye", 4000) that 2 dialog will appear at the same time, and i dont want that.. i want the second appears when the first finish.. before 4 seconds.. so i create crearDialogoUsuario(text, time, delay) this function supose will white the "delay" i use for show the dialog.. but it doesnt works using this crearDialogoUsuario("Hi, how are you", 4000) crearDialogoUsuarioDelay("Bye", 4000, 4000) and my function is ----------------------------------- Dialogo Usuario con Delay ------------------------------------ function crearDialogoUsuarioDelay(text, time, delay) setTimer(crearDialogoUsuario, delay, 1, text, time) end -------------------------------------------------------------------------------------------------------- when i use it.. say Bad Argumen @ in triggerclientevent here ---------------------------------------- Dialogo Usuario ----------------------------------------- function crearDialogoUsuario(text, time) triggerClientEvent(client, "formatearDialogo", getRootElement(), text, time) end -------------------------------------------------------------------------------------------------- Link to comment
Castillo Posted July 25, 2011 Share Posted July 25, 2011 As I told you in the last PM I sent you about 30 seconds ago, you forgot the 'player' element, in your function you trigger 'client', but you never added such argument in the function. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now