I wanted to ask how to create a script on the system of rank type :
1.SuperVip
2.Vip
3.ExtraVip
4.MegaVip
I like to set each rank could write in color .
If you helped me not insulted or ignored it thanks .
Sorry My English is NOT Perfect!
Scripts
How to create script?
How to create script?
1

Mxcd2345: This script is already exist, like @
Baloon: Gives you the link for download. hc.chat.SAY_TAGS = {
[hc.VIP] = "VIP",
[hc.MODERATOR1] = "Mod",
[hc.MODERATOR2] = "Mod",
[hc.ADMINISTRATOR] = "Adm"
}
Use the Search functions before asking!
If you wanna asking for something,just use this thread!
And ask the owner of the script if you have a problem of his/her script.
Mxcd2345: Then, let me contact you.
Mxcd2345 has written
ohaz's tutorial; Lua Scripting Tutorial (CS2D)
Starkkz's tutorial;
admin = {1}
mod = {55555}
vip = {12345}
local rnd1 = math.random(0,255)
local rnd2 = math.random(0,255)
local rnd3 = math.random(0,255)
local color =("0"):rep(3-#rnd1)..rnd1..("0"):rep(3-#rnd2)..rnd2..("0"):rep(3-#rnd3)..rnd3
addhook("say","coloredtext")
function coloredtext(id,txt)
	for k,v in ipairs(admin) do
		if player(id,"usgn") == v then
			msg("©255255255Admin "..player(id,"name").." : ©"..color.." "..txt)
			return 1
		end
	end
	for k,v in ipairs(mod) do
		if player(id,"usgn") == v then
			msg("©255255255Moderator "..player(id,"name").." : ©"..color.." "..txt)
			return 1
		end
	end
	for k,v in ipairs(vip) do
		if player(id,"usgn") == v then
			msg("©255255255Very Important Person "..player(id,"name").." : ©"..color.." "..txt)
			return 1
		end
	end
end
Rainoth: Your script will bug afterwards. Considering rnd1, rnd2 and rnd3 as numbers you cannot get the length of them with #operator since they're not strings. We gotta use
tostring()for that then.
GeoB99: I was aware of that, but I remember the script working. Maybe it didn't work as intended.
Mr_Benson has written
1
