Ulysses

Ulysses Stuff => Releases => Topic started by: Valgoid on June 09, 2014, 04:02:58 PM

Title: Multi-Colored Server Messages
Post by: Valgoid on June 09, 2014, 04:02:58 PM
Multi-Colored Server Messages
By Valgoid (6/9/2014) Version 1.0
Similar To ULX

Features:

How To Use:
To make a multi-colored message see the code below:
Code: [Select]
{Color(0,255,0), "Feel free to join our steam group, type !join in chat", Color(255,0,0), " please join!"}How This Code Comes Out: "Feel free to join our steam group, type !join in chat please join!"

To make a single-colored message see the code below:
Code: [Select]
{Color(255,155,0), "Feel free to join our steam group, type !join in chat"}How This Code Comes Out: "Feel free to join our steam group, type !join in chat!"

Requirements:
None

Get The Script:
Code: [Select]
--[[----------------------------------
Multi-Colored Server Messages
By Valgoid
Version 1.0
----------------------------------]]--

if SERVER then AddCSLuaFile() return end

local adverts = { -- Add messages here in new line
{Color(255,255,255), "Feel free to join our steam group, type !join in chat"},
{Color(255,255,255), "Please make sure to read the rules, type !motd in chat"},
}
local index = 0
local function advertise()
timer.Simple( 180, advertise ) -- Edit time here (in seconds)
chat.AddText( unpack( adverts[ index % #adverts + 1 ] ) )
index = index + 1;
end
advertise()

How To Install:
Name the script something like "messages.lua"
Place it into your autorun folder

Title: Re: Multi-Colored Server Messages
Post by: JamminR on June 09, 2014, 11:12:07 PM
ULX can be set up for multi-color messages.
They would simply need to be grouped together. First in one color, second in the next.
Yes, perhaps I'm a bit biased, but this seems to duplicate what adverts in ULX can do - just in a different, perhaps not as readable, configuration method.
Title: Re: Multi-Colored Server Messages
Post by: Valgoid on June 10, 2014, 10:14:06 AM
Oh ok.
Title: Re: Multi-Colored Server Messages
Post by: MrPresident on June 10, 2014, 09:53:08 PM
Don't let that keep you from continuing to learn.

Not everything you make will be the new must-have addon for servers and certainly not your first scripts, but the best way to learn is to keep doing and by posting them here you can get valuable feedback from the community that will help you to learn and grow!
Title: Re: Multi-Colored Server Messages
Post by: Valgoid on June 11, 2014, 09:22:45 AM
Thanks :D
Title: Re: Multi-Colored Server Messages
Post by: KillingPigs123 on June 11, 2014, 12:17:55 PM
Really like it! :)
Title: Re: Multi-Colored Server Messages
Post by: Valgoid on June 11, 2014, 07:34:23 PM
Thank you!