[HELP] The health of all players -
Nikid - 10.12.2013
Player 1
Player 2
Player 3
Player 4
Player 5
How can it be done?
Re: [HELP] The health of all players -
SickAttack - 10.12.2013
What are you trying to do?
Re: [HELP] The health of all players -
Nikid - 10.12.2013
textdraw that shows the health of each player's like on the screenshot
Re: [HELP] The health of all players -
Voxel - 10.12.2013
I tried something like this before with GetPlayerHealth and SetTextDrawSize, I did not got it to work properly
Re: [HELP] The health of all players -
SickAttack - 10.12.2013
Its eazy but it might take time to make. You can create multiple textdraws acording to the players health then on OnPlayerUpdate or on a Timer you get the players health and at the certain amount of health show the textdraw, and hide the rest textdraws.
Re: [HELP] The health of all players -
Nikid - 10.12.2013
As it approximately will appear in the source code?
Re: [HELP] The health of all players -
gotwarzone - 10.12.2013
It's kinda bit easy.
For the textdraw use this
Zamaroht's Textdraw Editor
Place the textdraw in designated place you like for the kills,deaths,ratio etc.. you are going to use OnPlayerUpdate.
E.G..
Код:
public OnPlayerUpdate(playerid)
{
new string[30], string2[30], string3[30], string4[30], string5[30], string6[30];
format(string, sizeof (string), "Kills: ~g~%d", pStats[playerid][Kills]);
format(string2, sizeof (string2), "Deaths: ~g~%d", pStats[playerid][Deaths]);
format(string3, sizeof (string3), "Total Rapes: ~g~%d", pStats[playerid][Rapes]);
format(string4, sizeof (string4), "Drugs Taken: ~g~%d", pStats[playerid][DrugsTaken]);
format(string5, sizeof (string5), "~g~%d ~b~Game Days", pStats[playerid][DaysPlayed]);
format(string6, sizeof (string6), "Score: ~g~%d", pStats[playerid][Score]);
// pStats[playerid][Score] = GetPlayerScore(playerid);
// pStats[playerid][Money] = GetPlayerMoney(playerid);
return 1;
}
Above is only a sample. Note: This is not a textdraw but a string. And this is for OnPlayerUpdate.
Re: [HELP] The health of all players -
Nikid - 10.12.2013
want to say for 20 people to create an indicator, it is necessary to create 60 textdraw?
Re: [HELP] The health of all players -
Jebster - 10.12.2013
Create a box, then you must destroy your box and create new in new position and size(Use timer). But you must make
mathematical formula which will calculate new coordinates of your box.
Or you can you can use include <ProgressBar>
https://sampforum.blast.hk/showthread.php?tid=113443
Re: [HELP] The health of all players - Astralis - 10.12.2013
Try to find some released A/D gamemodes, they have this function.