Jump to content

OutPutChatbox repeating


Recommended Posts

You can also do it by random messages each 5 minutes.

  
local theMessages = { 
    'Welcome to the server!', 
    'Visit our website. [url=http://www.randomforum.com']http://www.randomforum.com'[/url], 
    'Enjoy our server.' 
} 
function outputit() 
local r,g,b = 255,0,0 
outputChatBox(theMessages[math.random(#theMessages)],ROOT,255,0,0) 
end 
setTimer(outputit,300000,0) 
  

Edited by Guest
Link to comment
You can also do it by random messages each 5 minutes.
  
local theMessages = { 
    'Welcome to the server!', 
    'Visit our website. [url=http://www.randomforum.com']http://www.randomforum.com'[/url], 
    'Enjoy our server.' 
} 
function outputit() 
local r,g,b = 255,0,0 
outputChatBox(theMessages[math.random(#theMessages)],source,255,0,0) 
end 
setTimer(outputit,300000,0) 
  

Should be root instead of source there.

Link to comment
You can also do it by random messages each 5 minutes.
  
local theMessages = { 
    'Welcome to the server!', 
    'Visit our website. [url=http://www.randomforum.com']http://www.randomforum.com'[/url], 
    'Enjoy our server.' 
} 
function outputit() 
local r,g,b = 255,0,0 
outputChatBox(theMessages[math.random(#theMessages)],ROOT,255,0,0) 
end 
setTimer(outputit,300000,0) 
  

local r,g,b = 255,0,0 

Why are you still using this line if you don't use your variables anyway ?

You could use it like this if you would like , but I find no use in it.

outputChatBox(theMessages[math.random(#theMessages)],root,r,g,b) 

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...