@Patrick said in [SUGGESTION] Name tags:
@NanoBob I dont have any MTA language experience, only web languages but im questioning myself a thing;
How does this Name stay ontop of the player? Using a FollowPlayer function or such? or does the name relocate itself ontop of the player every 0.2 second? The last thing could be a FPS killer. But then again, I dont have any experience with coding outside websites, so I could be saying bullshit here! Just wondering how your script works.
The nametags use MTA's
dxDraw functions, these are functions that need to be called every frame in order to draw a piece of text. And every frame you specify the position for it.
This position is then calculated every frame (every 16.67 milliseconds on 60FPS) by getting the position of a ped's bone (head for nametag, stomach for health bar) and then using and MTA function to transform that to a 2D position on screen (likely done using projection matrices).
This is the only way you could make a nametag that properly follows the player, if you were to not do that every frame it would look like utter shite. But thanks for the interest and thoughts.
@Ikzelf said in [SUGGESTION] Name tags:
Some issues i'm encountering with my resolution (2560 x 1440)
- Missing nametag when weapon is aimed at someone (E.g. Sniper zoom)
- Name is hardly readable from more then 50m(Not exact)
- Name looks like it tears when moving (Could be due to text shadow)
- Overall the small letterspacing makes it harder to read
- The text shadow also makes it harder to read certain names when you are close to someone. Something about it is just unpleasant to the eye.
And maybe an extra QoL improvement: An 'afk' tag (or a special character when his MTA window is out of focus
- I'll increase the range for the player you're targeting
- What would you suggest to resolve the readability after 50m, simply increasing the size or would you rather get rid of the shadows?
- Detecting whether a player's window is in focus is not possible, all we could do is handle minimizing, which would only work for people who use fullscreen MTA. (However will look into it, since it seems like a relatively easy fix)