Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

A little help with textdraws.

$
0
0
I've made some textdraws, Now I can't really find a proper tutorial so I'll just ask it here, I have made an HP, kills,deaths,ping,fps textdraws

So I'll start with the HP for now maybe I'll learn something and make the others by my self.

So the first textdraw is a transparent box, All the textdraws that I've made are on that transparent box.

Here is my transparent box

Code:

// In OnGameModeInit prefferably, we procced to create our textdraws:
Textdraw0 = TextDrawCreate(-10.000000, 431.000000, "_");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 0.500000, 6.800000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 0);
TextDrawUseBox(Textdraw0, 1);
TextDrawBoxColor(Textdraw0, 120);
TextDrawTextSize(Textdraw0, 796.000000, 28.000000);

Now as I said directly above, all the textdraws I've made are on it, For example my HP textdraw.

Code:

Textdraw1 = TextDrawCreate(8.000000, 430.000000, "HP");
TextDrawBackgroundColor(Textdraw1, 16711935);
TextDrawFont(Textdraw1, 3);
TextDrawLetterSize(Textdraw1, 0.700000, 1.800000);
TextDrawColor(Textdraw1, 712256255);
TextDrawSetOutline(Textdraw1, 1);
TextDrawSetProportional(Textdraw1, 1);

.
So basically what I want to do is make HP textdraw with the current player's HP

- example , HP 'health amount'.

So it updates every time a player gets hit and obviously resets after he dies...

Can anyone provide me a way to do so?

Thanks in advance!

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>