tenarbro
Новичок
Хочу сделать Текстдрав ХП (худ делаю свой), пробовал но не получается, текстдрав отвечающий за хп "hud_PTD[playerid][2]"
Вот код можете помочь сделать код для текстдрава, чтобы значение хп менялось (думаю вы поняли меня)
Код:
//==============================HUD=============================================
HudXRADMIR(playerid)
{
hud_PTD[playerid][0] = CreatePlayerTextDraw(playerid, 89.666664, -13.688889, "hudr:fullcopyradmir");
PlayerTextDrawLetterSize(playerid, hud_PTD[playerid][0], 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, hud_PTD[playerid][0], 525.333435, 462.518676);
PlayerTextDrawAlignment(playerid, hud_PTD[playerid][0], 1);
PlayerTextDrawColor(playerid, hud_PTD[playerid][0], -1);
PlayerTextDrawSetShadow(playerid, hud_PTD[playerid][0], 0);
PlayerTextDrawSetOutline(playerid, hud_PTD[playerid][0], 0);
PlayerTextDrawFont(playerid, hud_PTD[playerid][0], 4);
hud_PTD[playerid][1] = CreatePlayerTextDraw(playerid, 519.333312, 46.044460, "1000000000");
PlayerTextDrawLetterSize(playerid, hud_PTD[playerid][1], 0.228333, 1.351110);
PlayerTextDrawAlignment(playerid, hud_PTD[playerid][1], 1);
PlayerTextDrawColor(playerid, hud_PTD[playerid][1], -1);
PlayerTextDrawSetShadow(playerid, hud_PTD[playerid][1], 0);
PlayerTextDrawSetOutline(playerid, hud_PTD[playerid][1], 1);
PlayerTextDrawBackgroundColor(playerid, hud_PTD[playerid][1], 51);
PlayerTextDrawFont(playerid, hud_PTD[playerid][1], 1);
PlayerTextDrawSetProportional(playerid, hud_PTD[playerid][1], 1);
hud_PTD[playerid][2] = CreatePlayerTextDraw(playerid, 515.666809, 60.977771, "100");
PlayerTextDrawLetterSize(playerid, hud_PTD[playerid][2], 0.262333, 1.181036);
PlayerTextDrawAlignment(playerid, hud_PTD[playerid][2], 1);
PlayerTextDrawColor(playerid, hud_PTD[playerid][2], -1);
PlayerTextDrawSetShadow(playerid, hud_PTD[playerid][2], 0);
PlayerTextDrawSetOutline(playerid, hud_PTD[playerid][2], 1);
PlayerTextDrawBackgroundColor(playerid, hud_PTD[playerid][2], 51);
PlayerTextDrawFont(playerid, hud_PTD[playerid][2], 1);
PlayerTextDrawSetProportional(playerid, hud_PTD[playerid][2], 1);
hud_PTD[playerid][3] = CreatePlayerTextDraw(playerid, 512.333374, 74.666656, "100");
PlayerTextDrawLetterSize(playerid, hud_PTD[playerid][3], 0.269333, 1.218370);
PlayerTextDrawAlignment(playerid, hud_PTD[playerid][3], 1);
PlayerTextDrawColor(playerid, hud_PTD[playerid][3], -1);
PlayerTextDrawSetShadow(playerid, hud_PTD[playerid][3], 0);
PlayerTextDrawSetOutline(playerid, hud_PTD[playerid][3], 1);
PlayerTextDrawBackgroundColor(playerid, hud_PTD[playerid][3], 51);
PlayerTextDrawFont(playerid, hud_PTD[playerid][3], 1);
PlayerTextDrawSetProportional(playerid, hud_PTD[playerid][3], 1);
return 1;
}
UpdateHud(playerid)
{
//if(!IsPlayerLogged(playerid)) return 1;
new mon[30];
format(mon,30,"%d",GetPlayerMoneyEx(playerid));
PlayerTextDrawSetString(playerid, hud_PTD[playerid][1], mon);
for(new y; y < 4; y++) PlayerTextDrawShow(playerid, hud_PTD[playerid][y]);
return 1;
}
//==============================HUD=============================================
