Forum

> > CS2D > Scripts > Hudtxt Error Of Death
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Hudtxt Error Of Death

4 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Hudtxt Error Of Death

SWAGSTEP
User Off Offline

Zitieren
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

alt Re: Hudtxt Error Of Death

Talented Doge
User Off Offline

Zitieren
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
1× editiert, zuletzt 14.04.15 06:37:36

alt Re: Hudtxt Error Of Death

Raaj Nadar
User Off Offline

Zitieren
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.

alt Re: Hudtxt Error Of Death

Talented Doge
User Off Offline

Zitieren
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
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht