18.09.2011, 20:30
Hi , i want to show to players how Much Health+Armour they have , it will be like a textdraw , and i have no Idea
i will never forgot if you help me .
i will never forgot if you help me .
#include a_samp
new Text:Textdraw0;
new Float:vida;
forward
coisas(playerid);
public coisas(playerid)
{
vida = GetPlayerHealth(playerid,vida);
new text[20];
format(text,sizeof(text),"~g~Vida: %1.1f",vida);
TextDrawSetString(Textdraw0,text);
TextDrawShowForPlayer(playerid,Textdraw0);
return 1;
}
public OnFilterScriptInit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
Textdraw0 = TextDrawCreate(490.000000, 100.000000, "~r~vida:");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 3);
TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 0);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetShadow(Textdraw0, 1);
return 1;
}
public OnPlayerSpawn(playerid)
{
coisas(playerid);
return 1;
}
public OnFilterScriptExit()
{
TextDrawHideForAll(Textdraw0);
TextDrawDestroy(Textdraw0);
return 1;
}
format(text,sizeof(text),"~g~Vida: %.2f",vida);
public OnPlayerSpawn(playerid)
{
SetTimerEx( "coisas", 100, true, "i", playerid );
return 1;
}
new Text:Textdraw0;
new Float:vida;
forward
coisas(playerid);
public coisas(playerid)
{
vida = GetPlayerHealth(playerid,vida);
new text[20];
format(text,sizeof(text),"~g~Health: %.2f",vida);
TextDrawSetString(Textdraw0,text);
TextDrawShowForPlayer(playerid,Textdraw0);
return 1;
}
public OnPlayerConnect(playerid)
{
Textdraw0 = TextDrawCreate(490.000000, 100.000000, "~r~Health:");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 3);
TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 0);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetShadow(Textdraw0, 1);
public OnPlayerSpawn(playerid)
{
SetTimerEx( "coisas", 100, true, "i", playerid );
public OnFilterScriptExit()
{
TextDrawHideForAll(Textdraw0);
TextDrawDestroy(Textdraw0);
return 1;
}