Forum

> > CS2D > Scripts > A message spawn in the server.
Forums overviewCS2D overview Scripts overviewLog in to reply

English A message spawn in the server.

5 replies
To the start Previous 1 Next To the start

old A message spawn in the server.

Xirot
User Off Offline

Quote
Well , I need this code.
2 message spawn in the server.
the second one : [CS2D] - with this color ©252000000.
Position :
280 10.
The second one : Public. with this color ©255255255.
Position : 320 10
Also , I want when I type !svmsg DOM for example.
The second message will be changed to DOM.
As this :
The old :
[CS2D] - Public
After typing the command :
[CS2D] - DOM
Hope you'll get this.
Ty'all.

old Re: A message spawn in the server.

Rainoth
Moderator Off Offline

Quote
~~~ EDITED ~~~ (I like "~" sign)
1
2
3
4
5
6
7
8
9
10
11
12
13
addhook("startround","meisangrynao")
function meisangrynao(mode)
	  parse("hudtxt 0 \"©252000000 [CS2D] - Public\" 280 10 1")
end
addhook ("say","potato")
function potato(id,txt)
     local tox=txt:sub(1,5)
     if tox=="svmsg" then
          local fullstring = txt:sub(7)
		  parse("hudtxt 0 \"©255255255 [CS2D] - "..fullstring.."\" 320 10 1")-- Message Number 2
          return 1
     end
end

Mind that it will change back to normal on every round (cause I made it so, cause it's unclear how you want it ._. )
edited 4×, last 10.07.13 07:16:54 pm

old Re: A message spawn in the server.

Yates
Reviewer Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
svtitle = "Public"

admopndorpls = {44770}

addhook("join","_join")
function _join(id)
	parse('hudtxt 0 "©252000000[CS2D] - ©255255255'..svtitle..'" 280 10 1')	
end

addhook("say","_say")
function _say(id,text)
	if text == "!svmsg" then
		for _,usgn in ipairs(admopndorpls) do
			if player(id,"usgn") == usgn then
				if svtitle == "Public" then
					svtitle = "DOM"
				else
					svtitle = "Public"
				end
				parse('hudtxt 0 "©252000000[CS2D] - ©255255255'..svtitle..'" 280 10 1')
			end
		end
	end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview