English Hudtxt Error Of Death

4 replies
Goto Page
To the start Previous 1 Next To the start
14.04.15 05:49:41 am
Up
SWAGSTEP
User
Offline Off
Can you dudes help me with my little script?

Code:
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
14.04.15 06:23:26 am
Up
Talented Doge
User
Offline Off
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)

Code:
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
Talented Doge
14.04.15 09:41:21 am
Up
Raaj Nadar
User
Offline Off
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.
15.04.15 06:28:26 am
Up
SWAGSTEP
User
Offline Off
@user Talented Doge can you put a hud that let you see who has the highest score?
15.04.15 07:32:45 am
Up
Talented Doge
User
Offline Off
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
Talented Doge
To the start Previous 1 Next To the start