Forum

> > CS2D > Scripts > Hud Txt
Forums overviewCS2D overview Scripts overviewLog in to reply

English Hud Txt

5 replies
To the start Previous 1 Next To the start

old Hud Txt

limonata
User Off Offline

Quote
Hello all I need to put this

parse('hudtxt2 '..id..' 0 " " 25 100')
parse('hudtxt2 '..id..' 1 " " 25 111')
parse('hudtxt2 '..id..' 2 " " 25 130')

for all butons but I think it will be very long for example.

if btn == 1 then

parse('hudtxt2 '..id..' 0 " " 25 100')
parse('hudtxt2 '..id..' 1 " " 25 111')
parse('hudtxt2 '..id..' 2 " " 25 130')

if btn == 2 then bla bla.

I need like this:

hud = parse('hudtxt2 '..id..' 0 " " 25 100')
parse('hudtxt2 '..id..' 1 " " 25 111')
parse('hudtxt2 '..id..' 2 " " 25 130')

if btn = 1 then
hud

this is wrong type i know. I just wanted to show it.

old Re: Hud Txt

Avo
User Off Offline

Quote
EDIT
I didn't understood it properly, too.

1
2
3
4
5
6
count = 2
if button == 1 then
	for i = 0, count do
		parse('hudtxt2 '..id..' '..i.. ' " TEXT " 25 100')
	end
end
edited 1×, last 02.03.13 11:21:20 pm

old Re: Hud Txt

Alpha Beta
User Off Offline

Quote
Maybe like this:

1
2
3
4
5
6
7
...
if (button == 1) then
	for i=0, 10 do
		parse("hudtxt "..id.." "..i.." 20 "..100+15*i)
	end
end
...

untested.

old Re: Hud Txt

mafia_man
User Off Offline

Quote
Edit: I missunderstood..
More >

old Re: Hud Txt

Dousea
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
addhook("serveraction","hudtxt_action")
function hudtxt_action(id,button)
	if button == 3 then menu(id,"YOUR MENU TITLE,BTN 1,BTN 2,BTN 3"); end
end

addhook("menu","hudtxt_menu")
function hudtxt_menu(id,title,sel)
	if title == "YOUR MENU TITLE" then
		if sel > 0 and sel <= 3 then
			for i = 0, 3 do parse('hudtxt2 '..id..' '..i..' "YOUR TEXT" 25 '..100 + (14 * i)); end
		end
	end
end

Didn't understood, but maybe like that. Didn't tested yet.

old Re: Hud Txt

limonata
User Off Offline

Quote
Thanks all for your helps.

I took theese hudtxt to hook say. Problem solved
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview