how to make something like this? -
SetPlayerNameTag - 29.07.2017
is there a released script on forums?
Re: how to make something like this? -
Shinja - 29.07.2017
Maybe its a mod
I believe its possible to script but i dont know if there is a release
If not maybe i make one soon, good idea
Re: how to make something like this? -
SetPlayerNameTag - 29.07.2017
Quote:
Originally Posted by Shinja
Maybe its a mod
I believe its possible to script but i dont know if there is a release
If not maybe i make one soon, good idea
|
its not a mod
Re: how to make something like this? -
Shinja - 29.07.2017
It can done by disabling name tags
PHP код:
ShowNameTags(0);
Then create a player3dtextlabel which contain name and some bars like
PHP код:
("Name\n{white}||||||||||||||||||||\n{red}||||||||||||||||||||");
And attach it to the player, when the player's armor/health updates update the label
use some maths and change the color of the bars.
Example: player lost 50 armor, this means 10 bars out of 20 bars of armor, make em grey
PHP код:
("Name\n{white}||||||||||{grey}||||||||||\n{red}||||||||||||||||||||");
Thats just an immagination, i didnt test it but it must work i think
Re: how to make something like this? -
Kane - 30.07.2017
Not ShowNameTags but ShowPlayerNameTagForPlayer().
https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer
Must be some hard coding with a timer to keep it updated constantly with each bar.
Re: how to make something like this? -
Hansrutger - 30.07.2017
Quote:
Originally Posted by Arthur Kane
|
You only have to update it OnPlayerTakeDamage and you can redefine SetPlayerHealth and SetPlayerArmor (alternatively create your own functions) and that's about it!
Re: how to make something like this? -
Shinja - 30.07.2017
Quote:
Originally Posted by Arthur Kane
|
ShowNameTags is global version of ShowPlayerNameTagForPlayer, so it cant be better in this case
And about timer, not best idea, just like Hans said, update it on callbacks like OnPlayerTakeDamage, OnPlayerSpawn, and if you have a commands like sethp setarmour (redefine SetPlayerArmor and SetPlayerHealth)
Re: how to make something like this? -
Kane - 30.07.2017
I said ShowPlayerNameTagForPlayer because the player's masked so assuming it's like this only for their masked players.
Re: how to make something like this? -
SetPlayerNameTag - 14.08.2017
thanks all