18.07.2018, 00:59
bom galera fiz esse sistema de vida em Textdraw e tem hora que ele funciona e hora que nгo, as vez a textdraw da vida vai sу atй a metade e para de diminuir e etc alguem pode me ajudar ?? sistema abaixo
public OnGameModeInit()
{
SetTimer("carregartext", 1000, false);
return 1;
}
forward carregartext(playerid);
public carregartext(playerid)
{
Textdraw[16] = TextDrawCreate(641.529418, 1.500000, "usebox");//fundo status
TextDrawLetterSize(Textdraw[16], 0.000000, 7.797604);
TextDrawTextSize(Textdraw[16], 486.470581, 0.000000);
TextDrawAlignment(Textdraw[16], 1);
TextDrawColor(Textdraw[16], 0);
TextDrawUseBox(Textdraw[16], true);
TextDrawBoxColor(Textdraw[16], 102);
TextDrawSetShadow(Textdraw[16], 0);
TextDrawSetOutline(Textdraw[16], 0);
TextDrawFont(Textdraw[16], 0);
Textdraw[17] = TextDrawCreate(571.411743, 4.416666, "usebox");//fundo barra de vida
TextDrawLetterSize(Textdraw[17], 0.000000, 0.572984);
TextDrawTextSize(Textdraw[17], 636.117614, 0.000000);
TextDrawAlignment(Textdraw[17], 1);
TextDrawColor(Textdraw[17], 0);
TextDrawUseBox(Textdraw[17], true);
TextDrawBoxColor(Textdraw[17], -65281);
TextDrawSetShadow(Textdraw[17], 0);
TextDrawSetOutline(Textdraw[17], 0);
TextDrawFont(Textdraw[17], 0);
Textdraw[18] = TextDrawCreate(638.235290, 6.166666, "_");//barra de vida cheia 100%
TextDrawLetterSize(Textdraw[18], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[18], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[18], 1);
TextDrawColor(Textdraw[18], 0);
TextDrawUseBox(Textdraw[18], true);
TextDrawBoxColor(Textdraw[18], 8388863);
TextDrawSetShadow(Textdraw[18], 0);
TextDrawSetOutline(Textdraw[18], 0);
TextDrawFont(Textdraw[18], 0);
Textdraw[19] = TextDrawCreate(635.235290, 6.166666, "_");//barra de vida 95%
TextDrawLetterSize(Textdraw[19], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[19], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[19], 1);
TextDrawColor(Textdraw[19], 0);
TextDrawUseBox(Textdraw[19], true);
TextDrawBoxColor(Textdraw[19], INFOA);
TextDrawSetShadow(Textdraw[19], 0);
TextDrawSetOutline(Textdraw[19], 0);
TextDrawFont(Textdraw[19], 0);
Textdraw[20] = TextDrawCreate(632.235290, 6.166666, "_");//barra de vida 90%
TextDrawLetterSize(Textdraw[20], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[20], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[20], 1);
TextDrawColor(Textdraw[20], 0);
TextDrawUseBox(Textdraw[20], true);
TextDrawBoxColor(Textdraw[20], 8388863);
TextDrawSetShadow(Textdraw[20], 0);
TextDrawSetOutline(Textdraw[20], 0);
TextDrawFont(Textdraw[20], 0);
Textdraw[21] = TextDrawCreate(629.235290, 6.166666, "_");//barra de vida 85%
TextDrawLetterSize(Textdraw[21], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[21], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[21], 1);
TextDrawColor(Textdraw[21], 0);
TextDrawUseBox(Textdraw[21], true);
TextDrawBoxColor(Textdraw[21], 8388863);
TextDrawSetShadow(Textdraw[21], 0);
TextDrawSetOutline(Textdraw[21], 0);
TextDrawFont(Textdraw[21], 0);
Textdraw[22] = TextDrawCreate(626.235290, 6.166666, "_");//barra de vida 80%
TextDrawLetterSize(Textdraw[22], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[22], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[22], 1);
TextDrawColor(Textdraw[22], 0);
TextDrawUseBox(Textdraw[22], true);
TextDrawBoxColor(Textdraw[22], 8388863);
TextDrawSetShadow(Textdraw[22], 0);
TextDrawSetOutline(Textdraw[22], 0);
TextDrawFont(Textdraw[22], 0);
Textdraw[23] = TextDrawCreate(623.235290, 6.166666, "_");//barra de vida 75%
TextDrawLetterSize(Textdraw[23], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[23], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[23], 1);
TextDrawColor(Textdraw[23], 0);
TextDrawUseBox(Textdraw[23], true);
TextDrawBoxColor(Textdraw[23], 8388863);
TextDrawSetShadow(Textdraw[23], 0);
TextDrawSetOutline(Textdraw[23], 0);
TextDrawFont(Textdraw[23], 0);
Textdraw[24] = TextDrawCreate(620.235290, 6.166666, "_");//barra de vida 70%
TextDrawLetterSize(Textdraw[24], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[24], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[24], 1);
TextDrawColor(Textdraw[24], 0);
TextDrawUseBox(Textdraw[24], true);
TextDrawBoxColor(Textdraw[24], 8388863);
TextDrawSetShadow(Textdraw[24], 0);
TextDrawSetOutline(Textdraw[24], 0);
TextDrawFont(Textdraw[24], 0);
Textdraw[25] = TextDrawCreate(618.235290, 6.166666, "_");//barra de vida 65%
TextDrawLetterSize(Textdraw[25], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[25], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[25], 1);
TextDrawColor(Textdraw[25], 0);
TextDrawUseBox(Textdraw[25], true);
TextDrawBoxColor(Textdraw[25], 8388863);
TextDrawSetShadow(Textdraw[25], 0);
TextDrawSetOutline(Textdraw[25], 0);
TextDrawFont(Textdraw[25], 0);
Textdraw[26] = TextDrawCreate(615.235290, 6.166666, "_");//barra de vida 60%
TextDrawLetterSize(Textdraw[26], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[26], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[26], 1);
TextDrawColor(Textdraw[26], 0);
TextDrawUseBox(Textdraw[26], true);
TextDrawBoxColor(Textdraw[26], 8388863);
TextDrawSetShadow(Textdraw[26], 0);
TextDrawSetOutline(Textdraw[26], 0);
TextDrawFont(Textdraw[26], 0);
Textdraw[27] = TextDrawCreate(612.235290, 6.166666, "_");//barra de vida 55%
TextDrawLetterSize(Textdraw[27], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[27], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[27], 1);
TextDrawColor(Textdraw[27], 0);
TextDrawUseBox(Textdraw[27], true);
TextDrawBoxColor(Textdraw[27], 8388863);
TextDrawSetShadow(Textdraw[27], 0);
TextDrawSetOutline(Textdraw[27], 0);
TextDrawFont(Textdraw[27], 0);
Textdraw[28] = TextDrawCreate(609.235290, 6.166666, "_");//barra de vida 50%
TextDrawLetterSize(Textdraw[28], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[28], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[28], 1);
TextDrawColor(Textdraw[28], 0);
TextDrawUseBox(Textdraw[28], true);
TextDrawBoxColor(Textdraw[28], 8388863);
TextDrawSetShadow(Textdraw[28], 0);
TextDrawSetOutline(Textdraw[28], 0);
TextDrawFont(Textdraw[28], 0);
Textdraw[29] = TextDrawCreate(606.235290, 6.166666, "_");//barra de vida 45%
TextDrawLetterSize(Textdraw[29], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[29], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[29], 1);
TextDrawColor(Textdraw[29], 0);
TextDrawUseBox(Textdraw[29], true);
TextDrawBoxColor(Textdraw[29], 8388863);
TextDrawSetShadow(Textdraw[29], 0);
TextDrawSetOutline(Textdraw[29], 0);
TextDrawFont(Textdraw[29], 0);
Textdraw[30] = TextDrawCreate(603.235290, 6.166666, "_");//barra de vida 40%
TextDrawLetterSize(Textdraw[30], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[30], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[30], 1);
TextDrawColor(Textdraw[30], 0);
TextDrawUseBox(Textdraw[30], true);
TextDrawBoxColor(Textdraw[30], 8388863);
TextDrawSetShadow(Textdraw[30], 0);
TextDrawSetOutline(Textdraw[30], 0);
TextDrawFont(Textdraw[30], 0);
Textdraw[31] = TextDrawCreate(600.235290, 6.166666, "_");//barra de vida 35%
TextDrawLetterSize(Textdraw[31], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[31], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[31], 1);
TextDrawColor(Textdraw[31], 0);
TextDrawUseBox(Textdraw[31], true);
TextDrawBoxColor(Textdraw[31], 8388863);
TextDrawSetShadow(Textdraw[31], 0);
TextDrawSetOutline(Textdraw[31], 0);
TextDrawFont(Textdraw[31], 0);
Textdraw[32] = TextDrawCreate(597.235290, 6.166666, "_");//barra de vida 30%
TextDrawLetterSize(Textdraw[32], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[32], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[32], 1);
TextDrawColor(Textdraw[32], 0);
TextDrawUseBox(Textdraw[32], true);
TextDrawBoxColor(Textdraw[32], 8388863);
TextDrawSetShadow(Textdraw[32], 0);
TextDrawSetOutline(Textdraw[32], 0);
TextDrawFont(Textdraw[32], 0);
Textdraw[33] = TextDrawCreate(594.235290, 6.166666, "_");//barra de vida 25%
TextDrawLetterSize(Textdraw[33], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[33], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[33], 1);
TextDrawColor(Textdraw[33], 0);
TextDrawUseBox(Textdraw[3], true);
TextDrawBoxColor(Textdraw[33], 8388863);
TextDrawSetShadow(Textdraw[33], 0);
TextDrawSetOutline(Textdraw[33], 0);
TextDrawFont(Textdraw[33], 0);
Textdraw[34] = TextDrawCreate(591.235290, 6.166666, "_");//barra de vida 20%
TextDrawLetterSize(Textdraw[34], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[34], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[34], 1);
TextDrawColor(Textdraw[34], 0);
TextDrawUseBox(Textdraw[34], true);
TextDrawBoxColor(Textdraw[34], 8388863);
TextDrawSetShadow(Textdraw[34], 0);
TextDrawSetOutline(Textdraw[34], 0);
TextDrawFont(Textdraw[34], 0);
Textdraw[35] = TextDrawCreate(588.235290, 6.166666, "_");//barra de vida 15%
TextDrawLetterSize(Textdraw[35], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[35], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[35], 1);
TextDrawColor(Textdraw[35], 0);
TextDrawUseBox(Textdraw[35], true);
TextDrawBoxColor(Textdraw[35], 8388863);
TextDrawSetShadow(Textdraw[35], 0);
TextDrawSetOutline(Textdraw[35], 0);
TextDrawFont(Textdraw[35], 0);
Textdraw[36] = TextDrawCreate(585.235290, 6.166666, "_");//barra de vida 10%
TextDrawLetterSize(Textdraw[36], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[36], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[36], 1);
TextDrawColor(Textdraw[36], 0);
TextDrawUseBox(Textdraw[36], true);
TextDrawBoxColor(Textdraw[36], 8388863);
TextDrawSetShadow(Textdraw[36], 0);
TextDrawSetOutline(Textdraw[36], 0);
TextDrawFont(Textdraw[36], 0);
Textdraw[37] = TextDrawCreate(582.235290, 6.166666, "_");//barra de vida 5%
TextDrawLetterSize(Textdraw[37], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[37], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[37], 1);
TextDrawColor(Textdraw[37], 0);
TextDrawUseBox(Textdraw[37], true);
TextDrawBoxColor(Textdraw[37], 8388863);
TextDrawSetShadow(Textdraw[37], 0);
TextDrawSetOutline(Textdraw[37], 0);
TextDrawFont(Textdraw[37], 0);
Textdraw[38] = TextDrawCreate(574.235290, 6.166666, "_");//barra de vida vazia
TextDrawLetterSize(Textdraw[38], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[38], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[38], 1);
TextDrawColor(Textdraw[38], 0);
TextDrawUseBox(Textdraw[38], true);
TextDrawBoxColor(Textdraw[38], 8388863);
TextDrawSetShadow(Textdraw[38], 0);
TextDrawSetOutline(Textdraw[38], 0);
TextDrawFont(Textdraw[38], 0);
return 1;
}
public OnPlayerUpdate(playerid)
{
if(logado[playerid] == 2)
{
SCM(playerid, INFOA, "0");
vidaemtext(playerid);
}
return 0;
}
stock vidaemtext(playerid)
{
new Float: vida;
GetPlayerHealth(playerid, vida);
if(vida >= 100)
{
TextDrawShowForPlayer(playerid, Textdraw[18]);
}
else if(vida >= 95 && vida <= 100)
{
TextDrawDestroy(Textdraw[18]);
TextDrawShowForPlayer(playerid, Textdraw[19]);
}
else if(vida >= 90 && vida <= 95)
{
TextDrawDestroy(Textdraw[19]);
TextDrawShowForPlayer(playerid, Textdraw[20]);
}
else if(vida >= 85 && vida <= 90)
{
TextDrawDestroy(Textdraw[20]);
TextDrawShowForPlayer(playerid, Textdraw[21]);
}
else if(vida >= 80 && vida <= 85)
{
TextDrawDestroy(Textdraw[21]);
TextDrawShowForPlayer(playerid, Textdraw[22]);
}
else if(vida >= 75 && vida <= 80)
{
TextDrawDestroy(Textdraw[22]);
TextDrawShowForPlayer(playerid, Textdraw[23]);
}
else if(vida >= 70 && vida <= 75)
{
TextDrawDestroy(Textdraw[23]);
TextDrawShowForPlayer(playerid, Textdraw[24]);
}
else if(vida >= 65 && vida <= 70)
{
TextDrawDestroy(Textdraw[24]);
TextDrawShowForPlayer(playerid, Textdraw[25]);
}
else if(vida >= 60 && vida <= 65)
{
TextDrawDestroy(Textdraw[25]);
TextDrawShowForPlayer(playerid, Textdraw[26]);
}
else if(vida >= 55 && vida <= 60)
{
TextDrawDestroy(Textdraw[26]);
TextDrawShowForPlayer(playerid, Textdraw[27]);
}
else if(vida >= 50 && vida <= 55)
{
TextDrawDestroy(Textdraw[27]);
TextDrawShowForPlayer(playerid, Textdraw[28]);
}
else if(vida >= 45 && vida <= 50)
{
TextDrawDestroy(Textdraw[28]);
TextDrawShowForPlayer(playerid, Textdraw[29]);
}
else if(vida >= 40 && vida <= 45)
{
TextDrawDestroy(Textdraw[29]);
TextDrawShowForPlayer(playerid, Textdraw[30]);
}
else if(vida >= 35 && vida <= 40)
{
TextDrawDestroy(Textdraw[30]);
TextDrawShowForPlayer(playerid, Textdraw[31]);
}
else if(vida >= 30 && vida <= 35)
{
TextDrawDestroy(Textdraw[31]);
TextDrawShowForPlayer(playerid, Textdraw[32]);
}
else if(vida >= 25 && vida <= 30)
{
TextDrawDestroy(Textdraw[32]);
TextDrawShowForPlayer(playerid, Textdraw[33]);
}
else if(vida >= 20 && vida <= 25)
{
TextDrawDestroy(Textdraw[33]);
TextDrawShowForPlayer(playerid, Textdraw[34]);
}
else if(vida >= 15 && vida <= 20)
{
TextDrawDestroy(Textdraw[34]);
TextDrawShowForPlayer(playerid, Textdraw[35]);
}
else if(vida >= 10 && vida <= 15)
{
TextDrawDestroy(Textdraw[35]);
TextDrawShowForPlayer(playerid, Textdraw[36]);
}
else if(vida >= 5 && vida <= 10)
{
TextDrawDestroy(Textdraw[36]);
TextDrawShowForPlayer(playerid, Textdraw[37]);
}
else if(vida >= 0 && vida <= 5)
{
TextDrawDestroy(Textdraw[37]);
TextDrawShowForPlayer(playerid, Textdraw[38]);
}
return 1;
}
public OnGameModeInit()
{
SetTimer("carregartext", 1000, false);
return 1;
}
forward carregartext(playerid);
public carregartext(playerid)
{
Textdraw[16] = TextDrawCreate(641.529418, 1.500000, "usebox");//fundo status
TextDrawLetterSize(Textdraw[16], 0.000000, 7.797604);
TextDrawTextSize(Textdraw[16], 486.470581, 0.000000);
TextDrawAlignment(Textdraw[16], 1);
TextDrawColor(Textdraw[16], 0);
TextDrawUseBox(Textdraw[16], true);
TextDrawBoxColor(Textdraw[16], 102);
TextDrawSetShadow(Textdraw[16], 0);
TextDrawSetOutline(Textdraw[16], 0);
TextDrawFont(Textdraw[16], 0);
Textdraw[17] = TextDrawCreate(571.411743, 4.416666, "usebox");//fundo barra de vida
TextDrawLetterSize(Textdraw[17], 0.000000, 0.572984);
TextDrawTextSize(Textdraw[17], 636.117614, 0.000000);
TextDrawAlignment(Textdraw[17], 1);
TextDrawColor(Textdraw[17], 0);
TextDrawUseBox(Textdraw[17], true);
TextDrawBoxColor(Textdraw[17], -65281);
TextDrawSetShadow(Textdraw[17], 0);
TextDrawSetOutline(Textdraw[17], 0);
TextDrawFont(Textdraw[17], 0);
Textdraw[18] = TextDrawCreate(638.235290, 6.166666, "_");//barra de vida cheia 100%
TextDrawLetterSize(Textdraw[18], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[18], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[18], 1);
TextDrawColor(Textdraw[18], 0);
TextDrawUseBox(Textdraw[18], true);
TextDrawBoxColor(Textdraw[18], 8388863);
TextDrawSetShadow(Textdraw[18], 0);
TextDrawSetOutline(Textdraw[18], 0);
TextDrawFont(Textdraw[18], 0);
Textdraw[19] = TextDrawCreate(635.235290, 6.166666, "_");//barra de vida 95%
TextDrawLetterSize(Textdraw[19], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[19], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[19], 1);
TextDrawColor(Textdraw[19], 0);
TextDrawUseBox(Textdraw[19], true);
TextDrawBoxColor(Textdraw[19], INFOA);
TextDrawSetShadow(Textdraw[19], 0);
TextDrawSetOutline(Textdraw[19], 0);
TextDrawFont(Textdraw[19], 0);
Textdraw[20] = TextDrawCreate(632.235290, 6.166666, "_");//barra de vida 90%
TextDrawLetterSize(Textdraw[20], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[20], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[20], 1);
TextDrawColor(Textdraw[20], 0);
TextDrawUseBox(Textdraw[20], true);
TextDrawBoxColor(Textdraw[20], 8388863);
TextDrawSetShadow(Textdraw[20], 0);
TextDrawSetOutline(Textdraw[20], 0);
TextDrawFont(Textdraw[20], 0);
Textdraw[21] = TextDrawCreate(629.235290, 6.166666, "_");//barra de vida 85%
TextDrawLetterSize(Textdraw[21], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[21], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[21], 1);
TextDrawColor(Textdraw[21], 0);
TextDrawUseBox(Textdraw[21], true);
TextDrawBoxColor(Textdraw[21], 8388863);
TextDrawSetShadow(Textdraw[21], 0);
TextDrawSetOutline(Textdraw[21], 0);
TextDrawFont(Textdraw[21], 0);
Textdraw[22] = TextDrawCreate(626.235290, 6.166666, "_");//barra de vida 80%
TextDrawLetterSize(Textdraw[22], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[22], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[22], 1);
TextDrawColor(Textdraw[22], 0);
TextDrawUseBox(Textdraw[22], true);
TextDrawBoxColor(Textdraw[22], 8388863);
TextDrawSetShadow(Textdraw[22], 0);
TextDrawSetOutline(Textdraw[22], 0);
TextDrawFont(Textdraw[22], 0);
Textdraw[23] = TextDrawCreate(623.235290, 6.166666, "_");//barra de vida 75%
TextDrawLetterSize(Textdraw[23], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[23], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[23], 1);
TextDrawColor(Textdraw[23], 0);
TextDrawUseBox(Textdraw[23], true);
TextDrawBoxColor(Textdraw[23], 8388863);
TextDrawSetShadow(Textdraw[23], 0);
TextDrawSetOutline(Textdraw[23], 0);
TextDrawFont(Textdraw[23], 0);
Textdraw[24] = TextDrawCreate(620.235290, 6.166666, "_");//barra de vida 70%
TextDrawLetterSize(Textdraw[24], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[24], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[24], 1);
TextDrawColor(Textdraw[24], 0);
TextDrawUseBox(Textdraw[24], true);
TextDrawBoxColor(Textdraw[24], 8388863);
TextDrawSetShadow(Textdraw[24], 0);
TextDrawSetOutline(Textdraw[24], 0);
TextDrawFont(Textdraw[24], 0);
Textdraw[25] = TextDrawCreate(618.235290, 6.166666, "_");//barra de vida 65%
TextDrawLetterSize(Textdraw[25], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[25], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[25], 1);
TextDrawColor(Textdraw[25], 0);
TextDrawUseBox(Textdraw[25], true);
TextDrawBoxColor(Textdraw[25], 8388863);
TextDrawSetShadow(Textdraw[25], 0);
TextDrawSetOutline(Textdraw[25], 0);
TextDrawFont(Textdraw[25], 0);
Textdraw[26] = TextDrawCreate(615.235290, 6.166666, "_");//barra de vida 60%
TextDrawLetterSize(Textdraw[26], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[26], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[26], 1);
TextDrawColor(Textdraw[26], 0);
TextDrawUseBox(Textdraw[26], true);
TextDrawBoxColor(Textdraw[26], 8388863);
TextDrawSetShadow(Textdraw[26], 0);
TextDrawSetOutline(Textdraw[26], 0);
TextDrawFont(Textdraw[26], 0);
Textdraw[27] = TextDrawCreate(612.235290, 6.166666, "_");//barra de vida 55%
TextDrawLetterSize(Textdraw[27], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[27], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[27], 1);
TextDrawColor(Textdraw[27], 0);
TextDrawUseBox(Textdraw[27], true);
TextDrawBoxColor(Textdraw[27], 8388863);
TextDrawSetShadow(Textdraw[27], 0);
TextDrawSetOutline(Textdraw[27], 0);
TextDrawFont(Textdraw[27], 0);
Textdraw[28] = TextDrawCreate(609.235290, 6.166666, "_");//barra de vida 50%
TextDrawLetterSize(Textdraw[28], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[28], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[28], 1);
TextDrawColor(Textdraw[28], 0);
TextDrawUseBox(Textdraw[28], true);
TextDrawBoxColor(Textdraw[28], 8388863);
TextDrawSetShadow(Textdraw[28], 0);
TextDrawSetOutline(Textdraw[28], 0);
TextDrawFont(Textdraw[28], 0);
Textdraw[29] = TextDrawCreate(606.235290, 6.166666, "_");//barra de vida 45%
TextDrawLetterSize(Textdraw[29], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[29], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[29], 1);
TextDrawColor(Textdraw[29], 0);
TextDrawUseBox(Textdraw[29], true);
TextDrawBoxColor(Textdraw[29], 8388863);
TextDrawSetShadow(Textdraw[29], 0);
TextDrawSetOutline(Textdraw[29], 0);
TextDrawFont(Textdraw[29], 0);
Textdraw[30] = TextDrawCreate(603.235290, 6.166666, "_");//barra de vida 40%
TextDrawLetterSize(Textdraw[30], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[30], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[30], 1);
TextDrawColor(Textdraw[30], 0);
TextDrawUseBox(Textdraw[30], true);
TextDrawBoxColor(Textdraw[30], 8388863);
TextDrawSetShadow(Textdraw[30], 0);
TextDrawSetOutline(Textdraw[30], 0);
TextDrawFont(Textdraw[30], 0);
Textdraw[31] = TextDrawCreate(600.235290, 6.166666, "_");//barra de vida 35%
TextDrawLetterSize(Textdraw[31], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[31], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[31], 1);
TextDrawColor(Textdraw[31], 0);
TextDrawUseBox(Textdraw[31], true);
TextDrawBoxColor(Textdraw[31], 8388863);
TextDrawSetShadow(Textdraw[31], 0);
TextDrawSetOutline(Textdraw[31], 0);
TextDrawFont(Textdraw[31], 0);
Textdraw[32] = TextDrawCreate(597.235290, 6.166666, "_");//barra de vida 30%
TextDrawLetterSize(Textdraw[32], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[32], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[32], 1);
TextDrawColor(Textdraw[32], 0);
TextDrawUseBox(Textdraw[32], true);
TextDrawBoxColor(Textdraw[32], 8388863);
TextDrawSetShadow(Textdraw[32], 0);
TextDrawSetOutline(Textdraw[32], 0);
TextDrawFont(Textdraw[32], 0);
Textdraw[33] = TextDrawCreate(594.235290, 6.166666, "_");//barra de vida 25%
TextDrawLetterSize(Textdraw[33], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[33], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[33], 1);
TextDrawColor(Textdraw[33], 0);
TextDrawUseBox(Textdraw[3], true);
TextDrawBoxColor(Textdraw[33], 8388863);
TextDrawSetShadow(Textdraw[33], 0);
TextDrawSetOutline(Textdraw[33], 0);
TextDrawFont(Textdraw[33], 0);
Textdraw[34] = TextDrawCreate(591.235290, 6.166666, "_");//barra de vida 20%
TextDrawLetterSize(Textdraw[34], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[34], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[34], 1);
TextDrawColor(Textdraw[34], 0);
TextDrawUseBox(Textdraw[34], true);
TextDrawBoxColor(Textdraw[34], 8388863);
TextDrawSetShadow(Textdraw[34], 0);
TextDrawSetOutline(Textdraw[34], 0);
TextDrawFont(Textdraw[34], 0);
Textdraw[35] = TextDrawCreate(588.235290, 6.166666, "_");//barra de vida 15%
TextDrawLetterSize(Textdraw[35], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[35], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[35], 1);
TextDrawColor(Textdraw[35], 0);
TextDrawUseBox(Textdraw[35], true);
TextDrawBoxColor(Textdraw[35], 8388863);
TextDrawSetShadow(Textdraw[35], 0);
TextDrawSetOutline(Textdraw[35], 0);
TextDrawFont(Textdraw[35], 0);
Textdraw[36] = TextDrawCreate(585.235290, 6.166666, "_");//barra de vida 10%
TextDrawLetterSize(Textdraw[36], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[36], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[36], 1);
TextDrawColor(Textdraw[36], 0);
TextDrawUseBox(Textdraw[36], true);
TextDrawBoxColor(Textdraw[36], 8388863);
TextDrawSetShadow(Textdraw[36], 0);
TextDrawSetOutline(Textdraw[36], 0);
TextDrawFont(Textdraw[36], 0);
Textdraw[37] = TextDrawCreate(582.235290, 6.166666, "_");//barra de vida 5%
TextDrawLetterSize(Textdraw[37], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[37], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[37], 1);
TextDrawColor(Textdraw[37], 0);
TextDrawUseBox(Textdraw[37], true);
TextDrawBoxColor(Textdraw[37], 8388863);
TextDrawSetShadow(Textdraw[37], 0);
TextDrawSetOutline(Textdraw[37], 0);
TextDrawFont(Textdraw[37], 0);
Textdraw[38] = TextDrawCreate(574.235290, 6.166666, "_");//barra de vida vazia
TextDrawLetterSize(Textdraw[38], 0.000000, 0.195642);
TextDrawTextSize(Textdraw[38], 569.294067, 0.000000);
TextDrawAlignment(Textdraw[38], 1);
TextDrawColor(Textdraw[38], 0);
TextDrawUseBox(Textdraw[38], true);
TextDrawBoxColor(Textdraw[38], 8388863);
TextDrawSetShadow(Textdraw[38], 0);
TextDrawSetOutline(Textdraw[38], 0);
TextDrawFont(Textdraw[38], 0);
return 1;
}
public OnPlayerUpdate(playerid)
{
if(logado[playerid] == 2)
{
SCM(playerid, INFOA, "0");
vidaemtext(playerid);
}
return 0;
}
stock vidaemtext(playerid)
{
new Float: vida;
GetPlayerHealth(playerid, vida);
if(vida >= 100)
{
TextDrawShowForPlayer(playerid, Textdraw[18]);
}
else if(vida >= 95 && vida <= 100)
{
TextDrawDestroy(Textdraw[18]);
TextDrawShowForPlayer(playerid, Textdraw[19]);
}
else if(vida >= 90 && vida <= 95)
{
TextDrawDestroy(Textdraw[19]);
TextDrawShowForPlayer(playerid, Textdraw[20]);
}
else if(vida >= 85 && vida <= 90)
{
TextDrawDestroy(Textdraw[20]);
TextDrawShowForPlayer(playerid, Textdraw[21]);
}
else if(vida >= 80 && vida <= 85)
{
TextDrawDestroy(Textdraw[21]);
TextDrawShowForPlayer(playerid, Textdraw[22]);
}
else if(vida >= 75 && vida <= 80)
{
TextDrawDestroy(Textdraw[22]);
TextDrawShowForPlayer(playerid, Textdraw[23]);
}
else if(vida >= 70 && vida <= 75)
{
TextDrawDestroy(Textdraw[23]);
TextDrawShowForPlayer(playerid, Textdraw[24]);
}
else if(vida >= 65 && vida <= 70)
{
TextDrawDestroy(Textdraw[24]);
TextDrawShowForPlayer(playerid, Textdraw[25]);
}
else if(vida >= 60 && vida <= 65)
{
TextDrawDestroy(Textdraw[25]);
TextDrawShowForPlayer(playerid, Textdraw[26]);
}
else if(vida >= 55 && vida <= 60)
{
TextDrawDestroy(Textdraw[26]);
TextDrawShowForPlayer(playerid, Textdraw[27]);
}
else if(vida >= 50 && vida <= 55)
{
TextDrawDestroy(Textdraw[27]);
TextDrawShowForPlayer(playerid, Textdraw[28]);
}
else if(vida >= 45 && vida <= 50)
{
TextDrawDestroy(Textdraw[28]);
TextDrawShowForPlayer(playerid, Textdraw[29]);
}
else if(vida >= 40 && vida <= 45)
{
TextDrawDestroy(Textdraw[29]);
TextDrawShowForPlayer(playerid, Textdraw[30]);
}
else if(vida >= 35 && vida <= 40)
{
TextDrawDestroy(Textdraw[30]);
TextDrawShowForPlayer(playerid, Textdraw[31]);
}
else if(vida >= 30 && vida <= 35)
{
TextDrawDestroy(Textdraw[31]);
TextDrawShowForPlayer(playerid, Textdraw[32]);
}
else if(vida >= 25 && vida <= 30)
{
TextDrawDestroy(Textdraw[32]);
TextDrawShowForPlayer(playerid, Textdraw[33]);
}
else if(vida >= 20 && vida <= 25)
{
TextDrawDestroy(Textdraw[33]);
TextDrawShowForPlayer(playerid, Textdraw[34]);
}
else if(vida >= 15 && vida <= 20)
{
TextDrawDestroy(Textdraw[34]);
TextDrawShowForPlayer(playerid, Textdraw[35]);
}
else if(vida >= 10 && vida <= 15)
{
TextDrawDestroy(Textdraw[35]);
TextDrawShowForPlayer(playerid, Textdraw[36]);
}
else if(vida >= 5 && vida <= 10)
{
TextDrawDestroy(Textdraw[36]);
TextDrawShowForPlayer(playerid, Textdraw[37]);
}
else if(vida >= 0 && vida <= 5)
{
TextDrawDestroy(Textdraw[37]);
TextDrawShowForPlayer(playerid, Textdraw[38]);
}
return 1;
}