English Health hudtxt

10 replies
Goto Page
To the start Previous 1 Next To the start
26.08.14 11:14:21 pm
Up
mrjackniko
User
Offline Off
Ok so I made a hud with health and money like mana.I can make it work for one player but I don't know how to make for each player.Can someone help me?

Code:
1
2
3
4
5
6
7
8
9
10
11
12
addhook("spawn","health")
function health ()
     parse ('hudtxt 0 "©000255000Health:" 30 420')
     parse ('hudtxt2 1 1 "©000255000'..player(1,"health")..'" 75 420 ')
     parse ('hudtxt 2 "©050050255Mana:" 30 430')
     parse ('hudtxt2 1 3 "©050050255'..player(1,"money")..'" 75 430 ')
end

addhook("ms100","_ms100")
function _ms100()
     health()
end
Your curiosity will be the death of you!
26.08.14 11:32:28 pm
Up
404_Monk
User
Offline Off
Genius Please.

Code:
1
2
3
4
5
6
7
8
9
10
11
12
addhook("spawn","health")
function health (id)
     parse ('hudtxt 0 "©000255000Health:" 30 420')
     parse ('hudtxt2 1 1 "©000255000'..player(id,"health")..'" 75 420 ')
     parse ('hudtxt 2 "©050050255Mana:" 30 430')
     parse ('hudtxt2 1 3 "©050050255'..player(id,"money")..'" 75 430 ')
end

addhook("ms100","_ms100")
function _ms100(id)
     health()
end
I love communication.
26.08.14 11:36:56 pm
Up
mrjackniko
User
Offline Off
lol...
Your curiosity will be the death of you!
26.08.14 11:40:17 pm
Up
Communism
Reviewer
Offline Off
His script doesn't work, don't even try it.
A thousand may fall at your side, ten thousand at your right hand, but it will not come near you. You will only look with your eyes and see the recompense of the wicked. - Psalm 91:7-8 ESV
26.08.14 11:40:52 pm
Up
Spartandu
BANNED
Offline Off
Stop copping/editing scripts! It's bad written.
cs2d cmd hudtxt2
user Bounty Hunter's brother
26.08.14 11:42:32 pm
Up
mrjackniko
User
Offline Off
well it doesn't actually work.I keep getting errors in console.
Your curiosity will be the death of you!
27.08.14 12:24:02 am
Up
JeeewNazi
User
Offline Off
add :

Code:
1
2
3
4
5
6
7
8
addhook("ms100","mss")
function mss() 
for id = 1,32 do
parse ('hudtxt2 '..id..' 0 "©000255000Health:" 30 420')
     parse ('hudtxt2 '..id..' 1 1 "©000255000'..player(id,"health")..'" 75 420 ')
     parse ('hudtxt2 '..id..' "©050050255Mana:" 30 430')
     parse ('hudtxt2 '..id..' 1 3 "©050050255'..player(id,"money")..'" 75 430 ')
end
27.08.14 01:40:19 am
Up
Admir
User
Offline Off
updating hud text using ms100 hook is bad, it's make your CS2D dropping fps, use hit hook for the health (unless you using other methods) and use buy hook for money.
My curse will sail against the wind and enrage the earth.
27.08.14 09:17:28 am
Up
Ortimh
User
Offline Off
Code:
parse ("hudtxt 0 \"\169000255000Health:\" 30 420")
parse ("hudtxt 1 \"\169050050255Mana:\" 30 430")

addhook ("always", "alwayshook")

function alwayshook ()
     for index, id in pairs (player (0, "table")) do
          parse ("hudtxt2 " .. id .. " 2 \"\169000255000" .. player (id, "health") .. "\" 75 420")
          parse ("hudtxt2 " .. id .. " 3 \"\169050050255" .. player (id, "money") .. "\" 75 430")
     end
end
I'm awesome ... and I really cookies
27.08.14 02:51:15 pm
Up
404_Monk
User
Offline Off
@user Ortimh:

Genius please again.

Code:
1
2
3
4
5
6
7
8
9
10
addhook ("always", "alwayshook")

function alwayshook ()
     for index, id in pairs (player (0, "table")) do
          parse ("hudtxt2 " .. id .. " 2 \"\169000255000" .. player (id, "health") .. "\" 75 420")
          parse ("hudtxt2 " .. id .. " 3 \"\169050050255" .. player (id, "money") .. "\" 75 430")
            parse ("hudtxt2 " .. id .. " 4 \"\169000255000Health:\" 30 420")
               parse ("hudtxt2 " .. id .. " 5 \"\169050050255Mana:\" 30 430")
     end
end
I love communication.
27.08.14 03:30:20 pm
Up
Spartandu
BANNED
Offline Off
Code:
1
2
3
4
5
6
7
function _second()
     for _, id in pairs(player(0,'table')) do
          parse('hudtxt2 '..id..' 2 "\169000255000Health: \169255255255'..player(id,'health')..'" 30 420')
          parse('hudtxt2 '..id..' 3 "\169050050255Mana: \169255255255'..player(id,'money')..'" 30 430')
     end
end
addhook ('second','_second',-5)
user Bounty Hunter's brother
To the start Previous 1 Next To the start