Jump to content

Help me!


Phoenixx

Recommended Posts

  
messages = {"msg1","msg2","msg3","msg4"} 
setTimer(function() 
    local randomMsg = math.random(1,#messages) 
    outputChatBox(messages[randomMsg],root,255,255,255,true) 
end 
,3600000,0) 
  

This displays one of those 4 messages every one hour in an infinite loop.

Link to comment

I guess he wanted to shout the player every hour, he can use this as well.

messages = {"msg1","msg2","msg3","msg4"} --[[ You can add you're message here like example "Hello World" and dont forget to add a "," ]] 
setTimer(function() 
    local randomMsg = math.random(1,#messages) 
        textDisplay = textCreateDisplay ( ) 
        textItem = textCreateTextItem ( messages, 0.5, 0.5, 2, 255, 255, 255, 255, 3, "center", "center" ) 
        textDisplayAddText ( textDisplay, textItem ) 
        for _, thePlayer in ipairs ( getElementsByType ( "player" ) ) do 
            textDisplayAddObserver ( textDisplay, thePlayer ) 
        end 
end 
,3600000,0) 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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