[code]function ChatWarning()
print("ChatWarning() called.")
PrintMessage(HUD_PRINTTALK, "Maintenance mode: On\n The server may become unstable or close unexpectedly!")
end
if maintenanceon == true then
timer.Create("ChatWarning", 30, 0, ChatWarning())
end[/code]
Why isn't this working? I'm trying to make it continuously print to the chat every 30 seconds if maintenancemode == true.
where are you putting this file on the client or the server?
[QUOTE=zippy36jr;51551463]where are you putting this file on the client or the server?[/QUOTE]
lua/autorun
[CODE]function chatWarning()
print("ChatWarning() called.")
PrintMessage(HUD_PRINTTALK, "Maintenance mode: On\n The server may become unstable or close unexpectedly!")
end
if maintenanceon == true then
timer.Create("WarningMessage", 30, 0, chatWarning) -- Dont need () on functions in the timer
end
[/CODE]
This should work just tested it
[QUOTE=zippy36jr;51551483][CODE]function chatWarning()
print("ChatWarning() called.")
PrintMessage(HUD_PRINTTALK, "Maintenance mode: On\n The server may become unstable or close unexpectedly!")
end
if maintenanceon == true then
timer.Create("WarningMessage", 30, 0, chatWarning) -- Dont need () on functions in the timer
end
[/CODE]
This should work just tested it[/QUOTE]
Thank you!
Sorry, you need to Log In to post a reply to this thread.