Posts: 4,759
Threads: 33
Joined: Dec 2013
Reputation:
0
What are you trying to do?
Posts: 477
Threads: 46
Joined: Feb 2010
Reputation:
0
textdraw that shows the health of each player's like on the screenshot
Posts: 578
Threads: 56
Joined: Sep 2013
Reputation:
0
I tried something like this before with GetPlayerHealth and SetTextDrawSize, I did not got it to work properly
Posts: 4,759
Threads: 33
Joined: Dec 2013
Reputation:
0
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.
Posts: 477
Threads: 46
Joined: Feb 2010
Reputation:
0
As it approximately will appear in the source code?
Posts: 512
Threads: 121
Joined: Sep 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.
Posts: 477
Threads: 46
Joined: Feb 2010
Reputation:
0
want to say for 20 people to create an indicator, it is necessary to create 60 textdraw?
Try to find some released A/D gamemodes, they have this function.