Forum

> > CS2D > Scripts > Announcement Script
Forums overviewCS2D overview Scripts overviewLog in to reply

English Announcement Script

4 replies
To the start Previous 1 Next To the start

old Announcement Script

kerker
User Off Offline

Quote
Hi all!
I need a script that will be used for one specific alert, something like this:

I wish the script was tuned to a particular file, but no with a chat command. It is desirable that the script not need to re-run if map is changed.

Sorry if similar posts were already written here. Bye!

old Re: Announcement Script

Rainoth
Moderator Off Offline

Quote
So basically, a script that works automatically and displays a message.

1
2
3
4
5
6
7
8
9
10
11
12
parse("hudtxt 0 'A simple text announcement' 666 69 1")

addhook("startround","_sr")
function _sr()
	parse("hudtxtmove 0 0 60000" 0 69")
end

addhook("minute","_m")
function _m()
	parse("hudtxtmove 0 0 60000" 666 69")
	parse("hudtxtmove 0 0 60000" 0 69")
end

old Re: Announcement Script

Scott
BANNED Off Offline

Quote
something like this?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
news_delay=5
news_id=36
webs = " "
webpage = "www.elitearg2d.tk"

timer(1000,"parse","lua news_bari(1)")
timer(25,"h")

function news_bari(m)
	local news = webs
	local web = webpage
	local r,g,b = math.random(0,255),math.random(0,255),math.random(0,255)
	local news_color = "©"..math.random(100,255)..""..math.random(100,255)..""..math.random(100,255)..""
	if m == 1 then
		parse('hudtxt '..news_id..' "'..news_color..news..'" 420 16 1')
		parse('hudtxtmove 0 '..news_id..' '..(news_delay*1000)..' 220 16')
		parse('hudtxtcolorfade 0 '..news_id..' '..(news_delay*1000)..' '..r..' '..g..' '..b)
		parse('hudtxt '..(news_id+1)..' "'..news_color..web..'" 420 32 1')
		parse('hudtxtmove 0 '..(news_id+1)..' '..(news_delay*1000)..' 220 32')
		parse('hudtxtcolorfade 0 '..(news_id+1)..' '..(news_delay*1000)..' '..r..' '..g..' '..b)
		timer(news_delay*1000,"parse","lua news_bari(0)")
	elseif m == 0 then
		parse('hudtxt '..news_id..' "'..news_color..news..'" 220 16 1')
		parse('hudtxtmove 0 '..news_id..' '..(news_delay*1000)..' 420 16')
		parse('hudtxtcolorfade 0 '..news_id..' '..(news_delay*1000)..' '..r..' '..g..' '..b)
		parse('hudtxt '..(news_id+1)..' "'..news_color..web..'" 220 32 1')
		parse('hudtxtmove 0 '..(news_id+1)..' '..(news_delay*1000)..' 420 32')
		parse('hudtxtcolorfade 0 '..(news_id+1)..' '..(news_delay*1000)..' '..r..' '..g..' '..b)
		timer(news_delay*1000,"parse","lua news_bari(1)")
	end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview