English life and armor show in the text hudt

7 replies
Goto Page
To the start Previous 1 Next To the start
Up
pipex
User
Offline Off
I want to create a lua hudtext above shows a bar to display the life and armor

example

life: 100
Armor: 100

plis
IMG:http://i41.tinypic.com/16gmn0w.jpg

Admin/mod comment:

scripting questions go to the scripts forum. I know, it's very hard to do that right! moved!
20.01.12 07:43:08 am
Up
Alistaire
User
Offline Off
What do you want?

You want a bar above the health and armor which shows health and armor?
IMG:http://i.imgur.com/5zhwOTP.png
20.01.12 02:09:18 pm
Up
TimeQuesT
User
Offline Off
user pipex has written:
I want to create a lua hudtext abo...

What stops you to do it?
Muh

Admin/mod comment:

Forcing someone to do something they came asking help about is pretty dumb.
20.01.12 05:53:16 pm
Up
Glix
User
Offline Off
user TimeQuesT has written:
user pipex has written:
I want to create a lua hudtext abo...

What stops you to do it?


Lol. I if knowed how to do this shit. He did't will make this thread. So shut the fuck up. You come just comment crap or shit every time to threads.
Create free website for your clan! Create server control panel webE --->http://www.000webhost.com/581961.html
20.01.12 07:26:19 pm
Up
TimeQuesT
User
Offline Off
I don't know whats your problem?
Actually I just ask myself what he wants. He should learn how to explain better.

user Glix has written:
Lol. I if knowed how to do this shit. He did't will make this thread. So shut the fuck up. You come just comment crap or shit every time to threads.


You have to learn some english...
My english isn't the best, but I think everyone can understand it.

@user pipex:
Cause I'm a very nice guy I give you a example...
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--copied from resources...

function hud2(hudid,pid,text,x,y) --global and easier function to create huds
if x== nil and y==nil then
parse ("hudtxt2 "..pid.." "..hudid.." \""..text.."\" 5 300") --default if x and y are NULL
else
parse ("hudtxt2 "..pid.." "..hudid.." \""..text.."\" "..x.." "..y)
end
end

--continue

addhook ("ms100","DuKrebskopf");
function DuKrebskopf()
for id=1,32 do -- loop every player
if (player(id,"exists")) then --check if exists
hud2(0,id,("Health:"..player(id,"health")),100,100) --display health
hud2(1,id,("Armor:"..player(id,"armor")),100,115) --display armor
end
end
end
Muh
20.01.12 11:10:30 pm
Up
Glix
User
Offline Off
Cause you are very nice guy...
Create free website for your clan! Create server control panel webE --->http://www.000webhost.com/581961.html
20.01.12 11:14:48 pm
Up
Alistaire
User
Offline Off
You'd better add a hit hook for the change in health instead of a 100ms hook.
IMG:http://i.imgur.com/5zhwOTP.png
20.01.12 11:18:55 pm
Up
TimeQuesT
User
Offline Off
What about respawn?
if you die and respawn --> hit hook?
The health stays at 0. Also it saves performance.
Imagine a update every hit.
Muh
To the start Previous 1 Next To the start