Forum
Scripts
loop for hudtxt
loop for hudtxt
7 replies
1

Re: loop for hudtxt
Deleted UserMore specific please.
Terrorist: player1
If all terrorist have 2 or more kill score so there will be thesee hudtxts
Terrorist: player1
Terrorist: player2
Terrorist: player3
Terrorist: player4
Thank you.
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
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
posX_CT = 30 'change however you like
posX_T = 270 'here too
posY_CT = 30
posY_T = 30
hudID = 0
addhook("startround","woosh")
function woosh(mode)
	posX_CT = 30 'change however you like
	posX_T = 270 'here too
	posY_CT = 30
	posY_T = 30
	hudID = 0
	for k,v in pairs (player(0,"team1living")) do
		if player(v,"score") >= 2 then
			('hudtxt '..hudID..' "\169255000000Terrorist: '..player(v,"name")..'" '..posX_T..' '..posY_T..' 0')
			posY_T = posY_T + 15
			hudID = hudID + 1
		end
	end
	for k,v in pairs (player(0,"team2living")) do
		if player(v,"score") >= 2 then
			('hudtxt '..hudID..' "\169000000255Counter-Terrorist: '..player(v,"name")..'" '..posX_CT..' '..posY_CT..' 0')
			posY_CT = posY_CT + 15
			hudID = hudID + 1
		end
	end
end
Not tested cuz I wrote in a hurry (got to go now...)
1
Line 16: posY_T = posY_T + 15
I checked the variables the are same. But there is syntax error.
Harmoni: RM forgot "parse" twice. And remove the suposed to be comments.1
parse('hudtxt '..hudID..' "\169255000000Terrorist: '..player(v,"name")..'" '..posX_T..' '..posY_T..' 0')
@
Rainoth: Thank you
edited 1×, last 31.07.14 11:37:27 am
1

Offline