[HELP] Health TextDraw?
#6

Well? Im empty xD Here is the code:

pawn Code:
#include <a_samp>

new Text:HealthTD;

public OnFilterScriptInit()
{
    HealthTD = TextDrawCreate(251.000000, 434.000000, "-");
    TextDrawBackgroundColor(HealthTD, 255);
    TextDrawFont(HealthTD, 1);
    TextDrawLetterSize(HealthTD, 0.500000, 1.000000);
    TextDrawColor(HealthTD, -1);
    TextDrawSetOutline(HealthTD, 0);
    TextDrawSetProportional(HealthTD, 1);
    TextDrawSetShadow(HealthTD, 1);
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/show", cmdtext, true, 10) == 0)
    {
        TextDrawShowForPlayer(playerid,HealthTD);
        return 1;
    }

    if (strcmp("/hide", cmdtext, true, 10) == 0)
    {
        TextDrawHideForPlayer(playerid,HealthTD);
        return 1;
    }
    return 0;
}


public OnPlayerUpdate(playerid)
{
    new string[128];
    new Float:health;
    GetPlayerHealth(playerid, health);

    format(string, sizeof(string), "%f", health);
    TextDrawSetString(HealthTD, string);
    return 1;
}
Reply


Messages In This Thread
[HELP] Health TextDraw? - by Larsey123IsMe - 09.01.2011, 21:48
Re: [HELP] Health TextDraw? - by Kitten - 09.01.2011, 21:55
Re: [HELP] Health TextDraw? - by Joe Staff - 09.01.2011, 21:56
Re: [HELP] Health TextDraw? - by MrDeath537 - 09.01.2011, 22:05
Re: [HELP] Health TextDraw? - by Joe Staff - 09.01.2011, 22:17
Re: [HELP] Health TextDraw? - by Larsey123IsMe - 09.01.2011, 22:22
Re: [HELP] Health TextDraw? - by _rAped - 09.01.2011, 22:35
Re: [HELP] Health TextDraw? - by Larsey123IsMe - 09.01.2011, 22:51
Re: [HELP] Health TextDraw? - by Zamaroht - 09.01.2011, 22:56
Re: [HELP] Health TextDraw? - by Larsey123IsMe - 09.01.2011, 23:03

Forum Jump:


Users browsing this thread: 1 Guest(s)