i use admin color
1
2
3
4
5
6
7
8
9
10
adminlist = {24449}
addhook("say","adminsay")
function adminsay(id,txt)
for _, usgn in ipairs(adminlist) do
if player(id,'usgn') == usgn then
	msg("©120240255"..player(id,"name").." [Admin]: "..txt)
return 1
end
end
end
but when i say message
it's written 2 times
1st with color 2nd normal
Sometimes and is also with broadcast
Admin/mod comment
this is about scripting and not general, moved. please select the right section in future It's most likely because you have few say hooks. That problem is really annoying
DC Admin
Offline
either put everything into one single say-hook or use the priority parameter for addhook.
otherwise cs2d can't decide which return value it should evaluate. i have the solution, try this:
1
2
3
4
5
6
7
8
usgnid=15162
addhook ("say","sages")
function sages(id,txt)
if (player(id,"usgn")==usgnid) then
msg("©000255255"..(player(id,"name")).."(Admin):"..txt)
return 1
end
end