Forum

> > CS2D > Scripts > Hudtxt Error Of Death
Forums overviewCS2D overview Scripts overviewLog in to reply

English Hudtxt Error Of Death

4 replies
To the start Previous 1 Next To the start

old Hudtxt Error Of Death

SWAGSTEP
User Off Offline

Quote
Can you dudes help me with my little script?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
s=0
h=0

if player==nil then player={} end
huddd={}
atimer=0

addhook("spawn","txt")
function txt(id)
     parse('hudtxt2 '..id..' 49 "©220050050Kills '..player(id, 'score')..' : Deaths '..player(id, 'deaths')..'" 12 116')
end

addhook("second","second")
function second(player,id)
	atimer=atimer+1
	if atimer>=5 then
		atimer=0
		parse('hudtxt3 '..id..' "©220050050'..player(h,"name")..' got the '..player(id, 'score')..' score" 12 116')
	end
end

old Re: Hudtxt Error Of Death

Talented Doge
User Off Offline

Quote
what the hell is hudtxt3 can you tell me

Anyways I've written another one works similarly, but it don't use score, because score includes goal score(defuse, hostage and plant bomb)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
kill = {}
clr = "255255255"
addhook("kill", "_k")
addhook("second", "_s")
addhook("join", "_j")
addhook("spawn", "_sp")

function _j(id)
	kill[id] = 0
end

function _k(id)
	kill[id] = kill[id] + 1
end

function _sp (id)
	kill[id] = 0
end

function _s ()
	for _, id in pairs(player(0, "table")) do
		parse('hudtxt2 '..id..' 1 "\169'..clr.."Kills: "..kill[id].." Deaths: "..player(id, "deaths")..'" 577 300 1')
	end
end
edited 1×, last 14.04.15 06:37:36 am

old Re: Hudtxt Error Of Death

Raaj Nadar
User Off Offline

Quote
Hudtxt 1 goes for public hud abd hudtxt2 for private hud if you want many hud then just increase the no. after the '..id..' and change the x and y.

old Re: Hudtxt Error Of Death

Talented Doge
User Off Offline

Quote
function _k(id)
kill[id] = kill[id] + 1
     for _, ids in pairs(player(0, "table")) do
          if kill[id] > kill[ids] then
               for i = 1, 32 do
                    parse('hudtxt2 '..i..' 2 "\169'..clr.."Highest Kills: "..player(id, "name")..'" 577 250 1')
               end
          end
     end
end

not tested, there are some better ways to check, i think
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview