Forum

> > CS2D > Scripts > Admin colour say.
Forums overviewCS2D overview Scripts overviewLog in to reply

English Admin colour say.

4 replies
To the start Previous 1 Next To the start

old Admin colour say.

CrazyN
User Off Offline

Quote
Hello all CS2D players.
I need a script where admin (U.S.G.N ID) will chat in a colour.
I Know there is a HC Admin Script , but i want Just a normal color say script.

old Re: Admin colour say.

bry4n730
User Off Offline

Quote
Ok, it goes something like this-

TadminList = {YOURIDHERE}
TTadminList = {YOURIDHERE}

function Array(size,value)
     local array = {}
     for i = 1, size do
          array[i]=value
     end
     return array
end

function initArray(size,value)
local t = {}
for i=1, size do
t[i] = value
end
return t
end

function isTadmin(id)
for _, usgn in ipairs(TadminList) do
if player(id,'usgn')==usgn then
return true
end
end
return false
end

function isTTadmin(id)
for _, usgn in ipairs(TTadminList) do
if player(id,'usgn')==usgn then
return true
end
end
return false
end

addhook([[say]],[[s]])
function s(id,txt)
     if isTadmin(id) then
          msg("©000250154"..player(id, "name").. " (S-ADMIN): "..txt)     
     elseif isTTadmin(id) then
          msg("©000255255"..player(id, "name").. " (ADMIN): "..txt)     
     end     
end

it does that but it will make twice a chat

old Re: Admin colour say.

DannyDeth
User Off Offline

Quote
Lol, no need for that kinf of complexity, a simpler admin chat goes as so:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
mems = {}
type_colors = { black = "000000000", green1="038127000", blue = "000101255", grey = "135135135", green2="11318300", red="188072000", purple = "147100198" }

function addMem(usgn,type,colour)
	mems[usgn] = { T = type, C = colour} -- THIS is actually not an array, it's a list (also called a table) :P, see NOTE 1 --
	local A = mems[USGN]
end

addhook("say","memTalk")
function memTalk(id,txt)
	local A = mems[player(id,"usgn")]
	if A then
		msg("©"..type_colors[string.lower(A.C)]..player(id,"name").." ["..string.upper(A.T).."] "..txt)
	end
	return(1)
end

I made this script for The Camo, and never PM'ed it to him, lol. Need to do that now

old Re: Admin colour say.

uzzi1233
User Off Offline

Quote
usgnid= yourunrealsoftwareid
addhook ("say","sages")
function sages(id,txt)
if (player(id,"usgn")==usgnid) then
msg ("©000255000"..(player(id,"name"))..":"..txt)
return 1
end
end

old Re: Admin colour say.

Caelenn
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
addhook("say","bf_say")
function bf_say(id,txt)
usgn = player(id,"usgn")
name = player(id,"name")
	if (usgn == 99999 ) then
	msg ("©000255000"..(player(id,"name"))..":"..txt) 
	return 1
	end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview