threevictor Posted January 26, 2017 Share Posted January 26, 2017 English: Hello friends, I have a problem with this script posted below, I am a beginner in the moon language, and I would like to know how I can use the setTimer function to give a 2 second delay in the outputChatBox. Portuguese: Olá amigos,Estou com um problema nesse script postado a baixo,sou iniciante na linguagem lua,e gostaria de saber como posso usufruir da função setTimer,para dar um delay de 2 segundos no outputChatBox. function HandlerWasted() valor = math.random( 170, 500 ) outputChatBox("#FFFFFFForam cobrados #FBFF00 $"..tostring ( valor )..",00 #FFFFFFpelos seus gastos no hospital",source,255,255,255,true) valor = takePlayerMoney(source, valor) end addEventHandler("onPlayerWasted",getRootElement(), HandlerWasted) Link to comment
Rose Posted January 27, 2017 Share Posted January 27, 2017 2 hours ago, #banana said: English: Hello friends, I have a problem with this script posted below, I am a beginner in the moon language, and I would like to know how I can use the setTimer function to give a 2 second delay in the outputChatBox. Portuguese: Olá amigos,Estou com um problema nesse script postado a baixo,sou iniciante na linguagem lua,e gostaria de saber como posso usufruir da função setTimer,para dar um delay de 2 segundos no outputChatBox. function HandlerWasted() valor = math.random( 170, 500 ) outputChatBox("#FFFFFFForam cobrados #FBFF00 $"..tostring ( valor )..",00 #FFFFFFpelos seus gastos no hospital",source,255,255,255,true) valor = takePlayerMoney(source, valor) end addEventHandler("onPlayerWasted",getRootElement(), HandlerWasted) setTimer(function, timer, executes, arguments...) function HandlerWasted() valor = math.random( 170, 500 ) setTimer(outputChatBox, 2000, 1, "#FFFFFFForam cobrados #FBFF00 $"..tostring ( valor )..",00 #FFFFFFpelos seus gastos no hospital",source,255,255,255,true) valor = takePlayerMoney(source, valor) end addEventHandler("onPlayerWasted",getRootElement(), HandlerWasted) Link to comment
koragg Posted January 27, 2017 Share Posted January 27, 2017 "I am a beginner in the moon language" This made my day Link to comment
itHyperoX Posted January 27, 2017 Share Posted January 27, 2017 (edited) 2 Edited January 27, 2017 by TheMOG Link to comment
threevictor Posted January 27, 2017 Author Share Posted January 27, 2017 4 hours ago, koragg said: "I am a beginner in the moon language" This made my day It's Google Translate's fault 1 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