how to make something like this?
#1



is there a released script on forums?
Reply
#2

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
Reply
#3

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
Reply
#4

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
Reply
#5

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.
Reply
#6

Quote:
Originally Posted by Arthur Kane
Посмотреть сообщение
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.
You only have to update it OnPlayerTakeDamage and you can redefine SetPlayerHealth and SetPlayerArmor (alternatively create your own functions) and that's about it!
Reply
#7

Quote:
Originally Posted by Arthur Kane
Посмотреть сообщение
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.
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)
Reply
#8

I said ShowPlayerNameTagForPlayer because the player's masked so assuming it's like this only for their masked players.
Reply
#9

thanks all
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)