dromerboy

Help Socorro

Recommended Posts

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)

 

Share this post


Link to post
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)

 

Share this post


Link to post
4 hours ago, koragg said:

"I am a beginner in the moon language"

This made my day xD

 

 

It's Google Translate's fault

  • Like 1

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.