how to make health n armour textdraw
#1

how to make health n armour textdraw can any one give me any tutorial or any filterscript
Reply
#2

any pic that we define you better
Reply
#3

No Image Ex. Health: 100% And Armour: 100% i want this in textdraw.
Reply
#4

https://sampforum.blast.hk/showthread.php?tid=241026
Reply
#5

On top your scripts
pawn Код:
#define          CheckTimer           100 //The time to check for AP/HP change (1000 = 1s) >> Better leave it 100 <<
new Text:DigiHP;
new Text:DigiAP;
forward Updater(playerid);
Ongamemodeinit your scripts
pawn Код:
DigiHP = TextDrawCreate(566.000000, 68.000000, "100");
        TextDrawBackgroundColor(DigiHP, -1);
        TextDrawFont(DigiHP, 1);
        TextDrawLetterSize(DigiHP, 0.350000, 0.599999);
        TextDrawColor(DigiHP, 255);
        TextDrawSetOutline(DigiHP, 1);
        TextDrawSetProportional(DigiHP, 1);
       
        //AP Textdraw
        DigiAP = TextDrawCreate(566.000000, 47.000000, "100");
        TextDrawBackgroundColor(DigiAP, -1);
        TextDrawFont(DigiAP, 1);
        TextDrawLetterSize(DigiAP, 0.349999, 0.599999);
        TextDrawColor(DigiAP, 255);
        TextDrawSetOutline(DigiAP, 1);
        TextDrawSetProportional(DigiAP, 1);

       SetTimer("Updater", CheckTimer, true);
pawn Код:
public Updater(playerid)
{
        //HP Check
        new Float:Health, hstr[500];
        GetPlayerHealth(playerid, Health);
        format(hstr, sizeof(hstr), "%.0f", Health);
        TextDrawSetString(DigiHP, hstr);
        TextDrawShowForPlayer(playerid, DigiHP);
       
        //AP Check
        new Float:Armour, astr[500];
        GetPlayerArmour(playerid, Armour);
        if(Armour >= 1)
        {
            format(astr, sizeof(astr), "%.0f", Armour);
                TextDrawSetString(DigiAP, astr);
                TextDrawShowForPlayer(playerid, DigiHP);
            TextDrawShowForPlayer(playerid, DigiAP);
        }
        else
        {
            TextDrawHideForPlayer(playerid, DigiAP);
        }
        return 1;
}
Full script at http://pastebin.com/qeHyHVh5
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)