Forum

> > CS2D > Scripts > Random Say color
Forums overviewCS2D overview Scripts overviewLog in to reply

English Random Say color

2 replies
To the start Previous 1 Next To the start

old Random Say color

mr_s
User Off Offline

Quote
how to have random say color in the 474 happy town lua for admin and GM
i try all things and don't work
pls help me

old Re: Random Say color

Alistaire
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
-- In your sayhook
	local r, g, b = lengthen(math.random(0, 255)), lengthen(math.random(0, 255)), lengthen(math.random(0, 255))
	msg('©'..r..g..b..player(id, 'name')..': '..msg)

function lengthen(val)
	while string.len(tostring(val)) < 3 do
		val = '0'..val
	end
	return val;
end
edited 1×, last 04.04.13 01:57:58 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview