Forum

> > CS2D > Scripts > Update hud info atk def
Forums overviewCS2D overview Scripts overviewLog in to reply

English Update hud info atk def

26 replies
Page
To the start Previous 1 2 Next To the start

old Re: Update hud info atk def

Runnin
User Off Offline

Quote
user Jynxxx has written
You could always just do this...
1
2
3
4
5
6
addhook("ms100","_ms100")
function _ms100()
	for _, id in ipairs(player(0, "tableliving")) do
		updateHUD(id)
	end
end

Thanks man!
It's working now.
I edited it a bit and now it shows the speed too!
Please try it out! :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function updateHUD(id)
     for i, v in ipairs(CONFIG.STATS) do
          hudtxt2(id, #CONFIG.STATS+i, v, '255255255', 510, 407+(i-1)*CONFIG.PIXELS, 0)
          hudtxt2(id, i, PLAYERS[id][v], '255255000', 620, 407+(i-1)*CONFIG.PIXELS, 2)
		  
  	  hudtxt2(id,21, PLAYERS[id].tmp.atk, '043255001', 607,50,0)
	  hudtxt2(id,23, PLAYERS[id].tmp.def, '043255001', 607,65,0)
	  hudtxt2(id,25, PLAYERS[id].tmp.spd, '043255001', 607,80,0)
          
          hudtxt2(id,22, "Attack:", '255000000', 550,50,0)
	  hudtxt2(id,24, "Defence:", '000192224', 550,65,0)
          hudtxt2(id,26, "Speed:", '255255000', 550,80,0)
		  
	  hudtxt2(id,27, "############", '255255255', 545,40,0) --BAR TOP
	  hudtxt2(id,28, "############", '255255255', 545,92,0) --BAR BOTTOM
     end
end

old Re: Update hud info atk def

Jynxxx
User Off Offline

Quote
Look at the screen below.

The only reason people won't help you with your edits is because you don't understand clearly and will just complain about other bugs in your script. Therefore I won't post the script until you learn about the script first.

old Re: Update hud info atk def

Ryden
User Off Offline

Quote
But the problem isn't that it works But we can't see Theme because enough place give us a code for add a new Hud txt

But not in the same place

In the right Attack , speed and defence
In left Level experience and money

Thanks in advance

Enjoy

old Re: Update hud info atk def

Conscience
User Off Offline

Quote
Would you stop reviving Tibia threads please? Every one you have revived has already been answered. You are not helping anyone because no one understands you.
To the start Previous 1 2 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview