[Pedido] Fs de Vida Digital
#1

Bom primeiramente procurei por tudo mas nao encontrei e agora venho pedir ajuda a quem encontrar postar o link ou a Fs de Vida digital, o que seria numeros na vida, ex: quanda a vida ta cheia ficasse 100, ai conforme fosse tomando dano iria retirando, mas atй hoje eu consegui uma aki mas dps de um tempo esses numeros somem,
Help Please !
Reply
#2

Nao Entendi muito

Tipo voce quer um TextDraw em Cima Da Vida Mostrando quanto % ele Tem й Isso ?
Reply
#3

Eu acho que ele quer um text drawn em no meio do sangue vermelho indicando a vida 56% 54% etc.
Reply
#4

Progress Bar
Reply
#5

Quote:
Originally Posted by felipe_mr
Посмотреть сообщение
Eu acho que ele quer um text drawn em no meio do sangue vermelho indicando a vida 56% 54% etc.
Foi o que eu disse usahusahus
Reply
#6

Bom e simples mas deve ajudar ...
pawn Код:
#include a_samp
new Text:Vida;
public OnFilterScriptInit()
{
    Vida = TextDrawCreate(507.5 ,168 , "");
    TextDrawFont(Vida , 3);
    TextDrawLetterSize(Vida , 0.6, 4.2);
    TextDrawColor(Vida , -1);
    TextDrawSetOutline(Vida , false);
    TextDrawSetProportional(Vida , true);
    TextDrawSetShadow(Vida , 1);
    TextDrawBoxColor(Vida ,0x00000066);
    TextDrawColor(Vida ,0x000000FF);
    return 1;
}
public OnFilterScriptExit(){ return 1; }
public OnPlayerConnect(playerid){ SetTimer("Recaregar", 1, true); return 1; }
public OnPlayerDisconnect(playerid, reason){ return 1; }
forward Recaregar(playerid);
public Recaregar(playerid)
{
    new Float:VidaPlayer, Don[50];
    GetPlayerHealth(playerid,VidaPlayer);
    if(VidaPlayer != 100)format(Don,sizeof(Don),"~g~Vida: %d %",VidaPlayer);
    if(VidaPlayer <= 75)format(Don,sizeof(Don),"~y~Vida: %d %",VidaPlayer);
    if(VidaPlayer <= 50)format(Don,sizeof(Don),"~b~Vida: %d %",VidaPlayer);
    if(VidaPlayer <= 25)format(Don,sizeof(Don),"~p~Vida: %d %",VidaPlayer);
    if(VidaPlayer <= 10)format(Don,sizeof(Don),"~g~Vida: %d %",VidaPlayer);
    if(VidaPlayer != 0) TextDrawHideForPlayer(playerid,Vida);
    TextDrawSetString(Vida,Don);
    TextDrawShowForPlayer(playerid, Vida);
    return true;
}

Fiz rapidao
Reply
#7

Bom Primeiramente Agradeзo a Todos que me Ajudou, mas na vdd й estilo essa, Olhem:
Reply
#8

Aquele numero й m textdraw, procura no forum que tem 30000000000000000 topicos ensinando cmo criar um
Reply
#9

Sim Ricop eu achei uma FS aki, fica igualzinha as foto acima mas dps de um tempo SOME os numeros na vida'-', Muito estranho. Olha:
FS
pawn Код:
#include <a_samp>
//news dos textdraws
new Text:Textdraw0;
new hourtwohaha, minutetwohaha;
new Text:HealthBar[MAX_PLAYERS];
new Text:ArmourBar[MAX_PLAYERS];
new Text:TextDrawDetorn;

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
AddPlayerClass(280,1594.3829,-1675.4155,5.8906,265.8557,23,9999999,25,9999999,31,9999999); //policia militar
SetTimer("AtualizarBars",1000,true);
return 1;
}

public OnPlayerConnect(playerid)
{
        HealthBar[playerid] = TextDrawCreate(548.000000, 66.000000, "100");
        TextDrawBackgroundColor(HealthBar[playerid], 255);
        TextDrawFont(HealthBar[playerid], 1);
        TextDrawLetterSize(HealthBar[playerid], 0.280000, 1.000000);
        TextDrawColor(HealthBar[playerid], -1);
        TextDrawSetOutline(HealthBar[playerid], 1);
        TextDrawSetProportional(HealthBar[playerid], 1);

        ArmourBar[playerid] = TextDrawCreate(548.000000, 43.000000, "100");
        TextDrawBackgroundColor(ArmourBar[playerid], 255);
        TextDrawFont(ArmourBar[playerid], 1);
        TextDrawLetterSize(ArmourBar[playerid], 0.290000, 1.100000);
        TextDrawColor(ArmourBar[playerid], -1);
        TextDrawSetOutline(ArmourBar[playerid], 1);
        TextDrawSetProportional(ArmourBar[playerid], 1);

        Textdraw0 = TextDrawCreate(532.000000, 405.000000, "ELEMENT OFICIAL");
        TextDrawBackgroundColor(Textdraw0, 255);
        TextDrawFont(Textdraw0, 1);
        TextDrawLetterSize(Textdraw0, 0.359998, 2.099998);
        TextDrawColor(Textdraw0, -7601921);
        TextDrawSetOutline(Textdraw0, 1);
        TextDrawSetProportional(Textdraw0, 1);
        return 1;
}

public OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playerid, TextDrawDetorn);
return 1;
}

forward AtualizarBars();
public AtualizarBars()
{

        for(new playerid; playerid<GetMaxPlayers(); playerid++)
        {
        if(IsPlayerConnected(playerid))
        {
        new Float:Health;
        new HealthString[15];
        GetPlayerHealth(playerid,Health);
        format(HealthString, 15, "       %d",floatround(Health));
        TextDrawSetString(HealthBar[playerid],HealthString);
        TextDrawShowForPlayer(playerid,HealthBar[playerid]);
        new Float:Armour;
        GetPlayerArmour(playerid,Armour);
        if(Armour > 0)
        {
        new ArmourString[15];
        format(ArmourString, 15, "       %d",floatround(Armour));
        TextDrawSetString(ArmourBar[playerid],ArmourString);
        TextDrawShowForPlayer(playerid,ArmourBar[playerid]);
        }
        else
        {
        TextDrawHideForPlayer(playerid,ArmourBar[playerid]);
        }
O que hб de Errado ?
Reply
#10

troca isso
pawn Код:
#include <a_samp>
//news dos textdraws
new Text:Textdraw0;
new hourtwohaha, minutetwohaha;
new Text:HealthBar[MAX_PLAYERS];
new Text:ArmourBar[MAX_PLAYERS];
new Text:TextDrawDetorn;

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
AddPlayerClass(280,1594.3829,-1675.4155,5.8906,265.8557,23,9999999,25,9999999,31,9999999); //policia militar
SetTimer("AtualizarBars",1000,true);
return 1;
}

public OnPlayerConnect(playerid)
{
        HealthBar[playerid] = TextDrawCreate(548.000000, 66.000000, "100");
        TextDrawBackgroundColor(HealthBar[playerid], 255);
        TextDrawFont(HealthBar[playerid], 1);
        TextDrawLetterSize(HealthBar[playerid], 0.280000, 1.000000);
        TextDrawColor(HealthBar[playerid], -1);
        TextDrawSetOutline(HealthBar[playerid], 1);
        TextDrawSetProportional(HealthBar[playerid], 1);

        ArmourBar[playerid] = TextDrawCreate(548.000000, 43.000000, "100");
        TextDrawBackgroundColor(ArmourBar[playerid], 255);
        TextDrawFont(ArmourBar[playerid], 1);
        TextDrawLetterSize(ArmourBar[playerid], 0.290000, 1.100000);
        TextDrawColor(ArmourBar[playerid], -1);
        TextDrawSetOutline(ArmourBar[playerid], 1);
        TextDrawSetProportional(ArmourBar[playerid], 1);

        Textdraw0 = TextDrawCreate(532.000000, 405.000000, "ELEMENT OFICIAL");
        TextDrawBackgroundColor(Textdraw0, 255);
        TextDrawFont(Textdraw0, 1);
        TextDrawLetterSize(Textdraw0, 0.359998, 2.099998);
        TextDrawColor(Textdraw0, -7601921);
        TextDrawSetOutline(Textdraw0, 1);
        TextDrawSetProportional(Textdraw0, 1);
        return 1;
}

public OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playerid, TextDrawDetorn);
return 1;
}

forward AtualizarBars();
public AtualizarBars()
{

        for(new playerid; playerid<GetMaxPlayers(); playerid++)
        {
        if(IsPlayerConnected(playerid))
        {
        new Float:Health;
        new HealthString[15];
        GetPlayerHealth(playerid,Health);
        format(HealthString, 15, "       %d",floatround(Health));
        TextDrawSetString(HealthBar[playerid],HealthString);
        TextDrawShowForPlayer(playerid,HealthBar[playerid]);
        new Float:Armour;
        GetPlayerArmour(playerid,Armour);
        if(Armour > 0)
        {
        new ArmourString[15];
        format(ArmourString, 15, "       %d",floatround(Armour));
        TextDrawSetString(ArmourBar[playerid],ArmourString);
        TextDrawShowForPlayer(playerid,ArmourBar[playerid]);
        }
        else
        {
        TextDrawHideForPlayer(playerid,ArmourBar[playerid]);
        }
return 1;
}
por isso
[pawn]
pawn Код:
#include <a_samp>
//news dos textdraws
new Text:Textdraw0;
new hourtwohaha, minutetwohaha;
new Text:HealthBar[MAX_PLAYERS];
new Text:ArmourBar[MAX_PLAYERS];
new Text:TextDrawDetorn;

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
AddPlayerClass(280,1594.3829,-1675.4155,5.8906,265.8557,23,9999999,25,9999999,31,9999999); //policia militar
SetTimer("AtualizarBars",1000,true);
return 1;
}

public OnPlayerConnect(playerid)
{
        HealthBar[playerid] = TextDrawCreate(548.000000, 66.000000, "100");
        TextDrawBackgroundColor(HealthBar[playerid], 255);
        TextDrawFont(HealthBar[playerid], 1);
        TextDrawLetterSize(HealthBar[playerid], 0.280000, 1.000000);
        TextDrawColor(HealthBar[playerid], -1);
        TextDrawSetOutline(HealthBar[playerid], 1);
        TextDrawSetProportional(HealthBar[playerid], 1);

        ArmourBar[playerid] = TextDrawCreate(548.000000, 43.000000, "100");
        TextDrawBackgroundColor(ArmourBar[playerid], 255);
        TextDrawFont(ArmourBar[playerid], 1);
        TextDrawLetterSize(ArmourBar[playerid], 0.290000, 1.100000);
        TextDrawColor(ArmourBar[playerid], -1);
        TextDrawSetOutline(ArmourBar[playerid], 1);
        TextDrawSetProportional(ArmourBar[playerid], 1);

        Textdraw0 = TextDrawCreate(532.000000, 405.000000, "ELEMENT OFICIAL");
        TextDrawBackgroundColor(Textdraw0, 255);
        TextDrawFont(Textdraw0, 1);
        TextDrawLetterSize(Textdraw0, 0.359998, 2.099998);
        TextDrawColor(Textdraw0, -7601921);
        TextDrawSetOutline(Textdraw0, 1);
        TextDrawSetProportional(Textdraw0, 1);
        return 1;
}

public OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playerid, TextDrawDetorn);
return 1;
}

forward AtualizarBars();
public AtualizarBars()
{

        for(new playerid; playerid<GetMaxPlayers(); playerid++)
        {
        if(IsPlayerConnected(playerid))
        {
        new Float:Health;
        new HealthString[15];
        GetPlayerHealth(playerid,Health);
        format(HealthString, 15, "       %d",floatround(Health));
        TextDrawSetString(HealthBar[playerid],HealthString);
        TextDrawShowForPlayer(playerid,HealthBar[playerid]);
        new Float:Armour;
        GetPlayerArmour(playerid,Armour);
        if(Armour > 0)
        {
        new ArmourString[15];
        format(ArmourString, 15, "       %d",floatround(Armour));
        TextDrawSetString(ArmourBar[playerid],ArmourString);
        TextDrawShowForPlayer(playerid,ArmourBar[playerid]);
        }
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)