31.12.2015, 04:50
galera criei umas textdraws e eu usei setstring nelas porem so mostra pra o id 0 tipo o tanto de vida que ele tem o nome dele e tals
meu cod
meu cod
PHP код:
new PlayerText:Hudplayersvp[MAX_PLAYERS][9];
PHP код:
forward createtds(playerid);
public createtds(playerid)
{
Hudplayersvp[playerid][0] = CreatePlayerTextDraw(playerid, 554.000000, 9.000000, "MURDERS: N/A");
PlayerTextDrawAlignment(playerid, Hudplayersvp[playerid][0], 2);
PlayerTextDrawBackgroundColor(playerid, Hudplayersvp[playerid][0], 370546256);
PlayerTextDrawFont(playerid, Hudplayersvp[playerid][0], 2);
PlayerTextDrawLetterSize(playerid, Hudplayersvp[playerid][0], 0.209999, 1.000000);
PlayerTextDrawColor(playerid, Hudplayersvp[playerid][0], -1);
PlayerTextDrawSetOutline(playerid, Hudplayersvp[playerid][0], 1);
PlayerTextDrawSetProportional(playerid, Hudplayersvp[playerid][0], 1);
PlayerTextDrawSetSelectable(playerid, Hudplayersvp[playerid][0], 0);
Hudplayersvp[playerid][1] = CreatePlayerTextDraw(playerid, 554.000000, 19.000000, "HEADSHOTS: N/A");
PlayerTextDrawAlignment(playerid, Hudplayersvp[playerid][1], 2);
PlayerTextDrawBackgroundColor(playerid, Hudplayersvp[playerid][1], 370546256);
PlayerTextDrawFont(playerid, Hudplayersvp[playerid][1], 2);
PlayerTextDrawLetterSize(playerid, Hudplayersvp[playerid][1], 0.219999, 1.000000);
PlayerTextDrawColor(playerid, Hudplayersvp[playerid][1], -1);
PlayerTextDrawSetOutline(playerid, Hudplayersvp[playerid][1], 1);
PlayerTextDrawSetProportional(playerid, Hudplayersvp[playerid][1], 1);
PlayerTextDrawSetSelectable(playerid, Hudplayersvp[playerid][1], 0);
Hudplayersvp[playerid][2] = CreatePlayerTextDraw(playerid, 552.000000, 30.000000, "BANDITS KILLED: N/A");
PlayerTextDrawAlignment(playerid, Hudplayersvp[playerid][2], 2);
PlayerTextDrawBackgroundColor(playerid, Hudplayersvp[playerid][2], 370546256);
PlayerTextDrawFont(playerid, Hudplayersvp[playerid][2], 2);
PlayerTextDrawLetterSize(playerid, Hudplayersvp[playerid][2], 0.209999, 1.000000);
PlayerTextDrawColor(playerid, Hudplayersvp[playerid][2], -1);
PlayerTextDrawSetOutline(playerid, Hudplayersvp[playerid][2], 1);
PlayerTextDrawSetProportional(playerid, Hudplayersvp[playerid][2], 1);
PlayerTextDrawSetSelectable(playerid, Hudplayersvp[playerid][2], 0);
Hudplayersvp[playerid][3] = CreatePlayerTextDraw(playerid, 554.000000, 41.000000, "TEMPERATURE: N/A");
PlayerTextDrawAlignment(playerid, Hudplayersvp[playerid][3], 2);
PlayerTextDrawBackgroundColor(playerid, Hudplayersvp[playerid][3], 370546256);
PlayerTextDrawFont(playerid, Hudplayersvp[playerid][3], 2);
PlayerTextDrawLetterSize(playerid, Hudplayersvp[playerid][3], 0.200000, 1.000000);
PlayerTextDrawColor(playerid, Hudplayersvp[playerid][3], -1);
PlayerTextDrawSetOutline(playerid, Hudplayersvp[playerid][3], 1);
PlayerTextDrawSetProportional(playerid, Hudplayersvp[playerid][3], 1);
PlayerTextDrawSetSelectable(playerid, Hudplayersvp[playerid][3], 0);
Hudplayersvp[playerid][4] = CreatePlayerTextDraw(playerid, 552.000000, 51.000000, "ALIVE TIME: N/A");
PlayerTextDrawAlignment(playerid, Hudplayersvp[playerid][4], 2);
PlayerTextDrawBackgroundColor(playerid, Hudplayersvp[playerid][4], 370546256);
PlayerTextDrawFont(playerid, Hudplayersvp[playerid][4], 2);
PlayerTextDrawLetterSize(playerid, Hudplayersvp[playerid][4], 0.209999, 1.000000);
PlayerTextDrawColor(playerid, Hudplayersvp[playerid][4], -1);
PlayerTextDrawSetOutline(playerid, Hudplayersvp[playerid][4], 0);
PlayerTextDrawSetProportional(playerid, Hudplayersvp[playerid][4], 1);
PlayerTextDrawSetShadow(playerid, Hudplayersvp[playerid][4], 1);
PlayerTextDrawSetSelectable(playerid, Hudplayersvp[playerid][4], 0);
Hudplayersvp[playerid][5] = CreatePlayerTextDraw(playerid, 552.000000, 61.000000, "BLOOD: N/A");
PlayerTextDrawAlignment(playerid, Hudplayersvp[playerid][5], 2);
PlayerTextDrawBackgroundColor(playerid, Hudplayersvp[playerid][5], 370546256);
PlayerTextDrawFont(playerid, Hudplayersvp[playerid][5], 2);
PlayerTextDrawLetterSize(playerid, Hudplayersvp[playerid][5], 0.209999, 1.000000);
PlayerTextDrawColor(playerid, Hudplayersvp[playerid][5], -1);
PlayerTextDrawSetOutline(playerid, Hudplayersvp[playerid][5], 1);
PlayerTextDrawSetProportional(playerid, Hudplayersvp[playerid][5], 1);
PlayerTextDrawSetSelectable(playerid, Hudplayersvp[playerid][5], 0);
Hudplayersvp[playerid][6] = CreatePlayerTextDraw(playerid, 552.000000, 71.000000, "NAME: N/A");
PlayerTextDrawAlignment(playerid, Hudplayersvp[playerid][6], 2);
PlayerTextDrawBackgroundColor(playerid, Hudplayersvp[playerid][6], 370546256);
PlayerTextDrawFont(playerid, Hudplayersvp[playerid][6], 2);
PlayerTextDrawLetterSize(playerid, Hudplayersvp[playerid][6], 0.209999, 1.000000);
PlayerTextDrawColor(playerid, Hudplayersvp[playerid][6], -1);
PlayerTextDrawSetOutline(playerid, Hudplayersvp[playerid][6], 1);
PlayerTextDrawSetProportional(playerid, Hudplayersvp[playerid][6], 1);
PlayerTextDrawSetSelectable(playerid, Hudplayersvp[playerid][6], 0);
Hudplayersvp[playerid][7] = CreatePlayerTextDraw(playerid, 559.000000, 86.000000, "DayZ Best Member");
PlayerTextDrawAlignment(playerid, Hudplayersvp[playerid][7], 2);
PlayerTextDrawBackgroundColor(playerid, Hudplayersvp[playerid][7], -2113927896);
PlayerTextDrawFont(playerid, Hudplayersvp[playerid][7], 2);
PlayerTextDrawLetterSize(playerid, Hudplayersvp[playerid][7], 0.209999, 1.000000);
PlayerTextDrawColor(playerid, Hudplayersvp[playerid][7], -1);
PlayerTextDrawSetOutline(playerid, Hudplayersvp[playerid][7], 1);
PlayerTextDrawSetProportional(playerid, Hudplayersvp[playerid][7], 1);
PlayerTextDrawSetSelectable(playerid, Hudplayersvp[playerid][7], 0);
Hudplayersvp[playerid][8] = CreatePlayerTextDraw(playerid, 24.000000, 308.000000, "N/A");
PlayerTextDrawAlignment(playerid, Hudplayersvp[playerid][8], 2);
PlayerTextDrawBackgroundColor(playerid, Hudplayersvp[playerid][8], 370546276);
PlayerTextDrawFont(playerid, Hudplayersvp[playerid][8], 2);
PlayerTextDrawLetterSize(playerid, Hudplayersvp[playerid][8], 0.219999, 2.099999);
PlayerTextDrawColor(playerid, Hudplayersvp[playerid][8], -1);
PlayerTextDrawSetProportional(playerid, Hudplayersvp[playerid][8], 1);
PlayerTextDrawSetShadow(playerid, Hudplayersvp[playerid][8], 1);
BLOOD[playerid] = CreateProgressBar(586.00, 431.00, 52.50, 4.19, -14538766, 100.0);
SetProgressBarMaxValue(BLOOD[playerid], 100);
return 1;
}
PHP код:
forward Status(playerid);
public Status(playerid)
{
new String[128], Float:Health, murders[30];
GetPlayerHealth(playerid, Health);
format(murders, sizeof(murders), "MURDERS: %d", Killer[playerid],Die,pInfo[playerid][Murders]); // Murders
PlayerTextDrawSetString(playerid, Hudplayersvp[playerid][0], murders);
//
format(String, sizeof(String), "ALIVE TIME: ~w~%s",TimeConvert(pInfo[playerid][pTempo]));
PlayerTextDrawSetString(playerid, Hudplayersvp[playerid][4], String);
//
format(String, sizeof(String), "BLOOD: ~w~%0.0f",Health);
PlayerTextDrawSetString(playerid, Hudplayersvp[playerid][5], String);
//
format(String, sizeof(String), "NAME: %s",Nome(playerid));
PlayerTextDrawSetString(playerid, Hudplayersvp[playerid][6], String);
//
return 1;
}