Poll

Is this better than the default ULX messages?

Yes
Nope.

Author Topic: Multi-Colored Server Messages  (Read 9060 times)

0 Members and 1 Guest are viewing this topic.

Offline Valgoid

  • Full Member
  • ***
  • Posts: 103
  • Karma: -15
  • Wanna Be Lua King
Multi-Colored Server Messages
« on: June 09, 2014, 04:02:58 PM »
Multi-Colored Server Messages
By Valgoid (6/9/2014) Version 1.0
Similar To ULX

Features:
  • Over millions of colors in 1 message
  • Unlimited amount of messages
  • Unlimited text in messages
  • Customizable time for messages to display
  • Works on single player!

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

« Last Edit: June 10, 2014, 10:17:28 AM by Valgoid »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Multi-Colored Server Messages
« Reply #1 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.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Valgoid

  • Full Member
  • ***
  • Posts: 103
  • Karma: -15
  • Wanna Be Lua King
Re: Multi-Colored Server Messages
« Reply #2 on: June 10, 2014, 10:14:06 AM »
Oh ok.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Multi-Colored Server Messages
« Reply #3 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!

Offline Valgoid

  • Full Member
  • ***
  • Posts: 103
  • Karma: -15
  • Wanna Be Lua King
Re: Multi-Colored Server Messages
« Reply #4 on: June 11, 2014, 09:22:45 AM »
Thanks :D

Offline KillingPigs123

  • Newbie
  • *
  • Posts: 3
  • Karma: 1
Re: Multi-Colored Server Messages
« Reply #5 on: June 11, 2014, 12:17:55 PM »
Really like it! :)

Offline Valgoid

  • Full Member
  • ***
  • Posts: 103
  • Karma: -15
  • Wanna Be Lua King
Re: Multi-Colored Server Messages
« Reply #6 on: June 11, 2014, 07:34:23 PM »
Thank you!