[Ajuda] Textdraw
#1

Bom Sabe aquelas Barra de vida e de colete ,Eu queria colocar uns numeros nela pra dizer o quanto tem de vida So que nгo estou consiguindo alguem pode me ajudar ?
Reply
#2

Alguem pode me ajudar
Reply
#3

Variavel global:
pawn Код:
new Text:Health[2];
OnGameModeInit:
pawn Код:
Health[0] = TextDrawCreate(566.000000, 67.000000, "100%");
TextDrawBackgroundColor(Health[0], 255);
TextDrawFont(Health[0], 1);
TextDrawLetterSize(Health[0], 0.219999, 0.899999);
TextDrawColor(Health[0], -1);
TextDrawSetOutline(Health[0], 1);
TextDrawSetProportional(Health[0], 1);

Health[1] = TextDrawCreate(566.000000, 44.000000, "100%");
TextDrawBackgroundColor(Health[1], 255);
TextDrawFont(Health[1], 1);
TextDrawLetterSize(Health[1], 0.219999, 0.899999);
TextDrawColor(Health[1], -1);
TextDrawSetOutline(Health[1], 1);
TextDrawSetProportional(Health[1], 1);
OnPlayerUpdate:
pawn Код:
new string[8], Float:Life, Float:Armour;
GetPlayerHealth(playerid, Life);
GetPlayerArmour(playerid, Armour);
format(string, sizeof(string), "%.0f%", Life);
TextDrawSetString(Health[0], string);
TextDrawShowForPlayer(playerid, Health[0]);
if(Armour >= 2){
       
    format(string, sizeof(string), "%.0f%", Armour);
    TextDrawSetString(Health[1], string);
    TextDrawShowForPlayer(playerid, Health[1]);
} else {
    TextDrawHideForPlayer(playerid, Health[1]);
}
Reply
#4

/\ pronto ele mastigou e engoliu pra vc '-'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)