Forum

> > CS2D > Scripts > !say <color>
Forums overviewCS2D overview Scripts overviewLog in to reply

English !say <color>

6 replies
To the start Previous 1 Next To the start

old !say <color>

J_Lucas
User Off Offline

Quote
hey us users , i had a problem in my mind
i want make a !say <color> function

Like if say !say_blue <txt> then
[Admin] black-sheep : txt ... (in blue color)

That the script that i use
If anyone can help me , please do it

B.S Admin Script V2.2 >

old Re: !say <color>

lucaSWAT
User Off Offline

Quote
Simple.
1
2
3
4
5
6
7
8
addhook("say","say_blue")
function say_blue(id, txt)
if txt:lower():sub(1, 9) == "!say_blue" then
local txtsay=txt:sub(10)
msg("©000000255"..player(id,"name").." : "..txtsay)
return 1
end
end

old Re: !say <color>

Shawni
User Off Offline

Quote
How can you code a whole lua that has 477lines and you just can't creat a 6 easy lines ?.
Looks like your script is original.

old Re: !say <color>

Alistaire
User Off Offline

Quote
Damn it dude, use only 1 bloody say hook in your script! Also, a better way to check for USGN is this;

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
rankTable = {
	[1] = 5,
	[21732] = 3,
	[27105] = 2
}

--In the sayhook stuff
local rank = rankTable[player(id, 'usgn')]

if saycommand == '!lol' then
	if rank >= 3 then
		doStuff(id)
	else
		msg2(id, 'you\'re not epic enough, LOSER! HAHAHASHDHASJD!JHDKSJH DYHidh1ijhsncmz!#*!@)
	end
end

old Re: !say <color>

J_Lucas
User Off Offline

Quote
user Shawni has written
How can you code a whole lua that has 477lines and you just can't creat a 6 easy lines ?.
Looks like your script is original.

i want a thing like this ,
say : !blue <txt> - then happens
sheep : <txt> (blue)
later it the blue color goe away and the txt color back to normal , i dont know how do it

user lucaSWAT has written
addhook("say","say_blue")
function say_blue(id, txt)
if txt:lower():sub(1, 9) == "!say_blue" then
local txtsay=txt:sub(10)
msg("©000000255"..player(id,"name").." : "..txtsay)
return 1
end
end

thanks
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview