[Ajuda] sobe textdraw??
#9

Quote:
Originally Posted by DKDarkking
Посмотреть сообщение
poderia so me explicar se e possivel colocar pra atualizar nisso ?
PHP код:
    HUD7 TextDrawCreate(511.48590061.176670"alive_time:_00:00");
    
TextDrawLetterSize(HUD70.2351991.144533);
    
TextDrawAlignment(HUD71);
    
TextDrawColor(HUD7, -1);
    
TextDrawSetShadow(HUD70);
    
TextDrawSetOutline(HUD70);
    
TextDrawBackgroundColor(HUD7255);
    
TextDrawFont(HUD72);
    
TextDrawSetProportional(HUD71);
    
TextDrawSetShadow(HUD70); 
PHP код:
    HUD8 TextDrawCreate(527.85302773.310012"blood:_100");
    
TextDrawLetterSize(HUD80.2351991.144533);
    
TextDrawAlignment(HUD81);
    
TextDrawColor(HUD8, -1);
    
TextDrawSetShadow(HUD80);
    
TextDrawSetOutline(HUD80);
    
TextDrawBackgroundColor(HUD8255);
    
TextDrawFont(HUD82);
    
TextDrawSetProportional(HUD81);
    
TextDrawSetShadow(HUD80); 
PHP код:
    HUD9 TextDrawCreate(508.12643485.256683"name:_%s");
    
TextDrawLetterSize(HUD90.2351991.144533);
    
TextDrawAlignment(HUD91);
    
TextDrawColor(HUD9, -1);
    
TextDrawSetShadow(HUD90);
    
TextDrawSetOutline(HUD90);
    
TextDrawBackgroundColor(HUD9255);
    
TextDrawFont(HUD92);
    
TextDrawSetProportional(HUD91);
    
TextDrawSetShadow(HUD90); 
Ficaria assim!


PHP код:
//||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||BY:IgorLuiz||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
#include <a_samp>
// Definir a Player TextDraw HUDS
new PlayerText:HUD7[MAX_PLAYERS],
    
PlayerText:HUD8[MAX_PLAYERS],
    
PlayerText:HUD9[MAX_PLAYERS]
;
new 
Tempo[MAX_PLAYERS];
public 
OnPlayerConnect(playerid)
{
    
// Criar PlayerTextDraw
    
HUD7[playerid] = CreatePlayerTextDraw(playerid511.48590061.176670"_");
    
PlayerTextDrawLetterSize(playeridHUD7[playerid], 0.2351991.144533);
    
PlayerTextDrawAlignment(playeridHUD7[playerid], 1);
    
PlayerTextDrawColor(playeridHUD7[playerid], -1);
    
PlayerTextDrawSetShadow(playeridHUD7[playerid], 0);
    
PlayerTextDrawSetOutline(playeridHUD7[playerid], 0);
    
PlayerTextDrawBackgroundColor(playeridHUD7[playerid], 255);
    
PlayerTextDrawFont(playeridHUD7[playerid], 2);
    
PlayerTextDrawSetProportional(playeridHUD7[playerid], 1);
    
PlayerTextDrawSetShadow(playeridHUD7[playerid], 0);
    
HUD8[playerid] = CreatePlayerTextDraw(playerid527.85302773.310012"_");
    
PlayerTextDrawLetterSize(playeridHUD8[playerid], 0.2351991.144533);
    
PlayerTextDrawAlignment(playeridHUD8[playerid], 1);
    
PlayerTextDrawColor(playeridHUD8[playerid], -1);
    
PlayerTextDrawSetShadow(playeridHUD8[playerid], 0);
    
PlayerTextDrawSetOutline(playeridHUD8[playerid], 0);
    
PlayerTextDrawBackgroundColor(playeridHUD8[playerid], 255);
    
PlayerTextDrawFont(playeridHUD8[playerid], 2);
    
PlayerTextDrawSetProportional(playeridHUD8[playerid], 1);
    
PlayerTextDrawSetShadow(playeridHUD8[playerid], 0);
    
HUD9[playerid] = CreatePlayerTextDraw(playerid508.12643485.256683"_");
    
PlayerTextDrawLetterSize(playeridHUD9[playerid], 0.2351991.144533);
    
PlayerTextDrawAlignment(playeridHUD9[playerid], 1);
    
PlayerTextDrawColor(playeridHUD9[playerid], -1);
    
PlayerTextDrawSetShadow(playeridHUD9[playerid], 0);
    
PlayerTextDrawSetOutline(playeridHUD9[playerid], 0);
    
PlayerTextDrawBackgroundColor(playeridHUD9[playerid], 255);
    
PlayerTextDrawFont(playeridHUD9[playerid], 2);
    
PlayerTextDrawSetProportional(playeridHUD9[playerid], 1);
    
PlayerTextDrawSetShadow(playeridHUD9[playerid], 0);
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    
SetTimer("Status"10001); // Chamar a public status
    
PlayerTextDrawShow(playeridHUD7[playerid]); // Mostrar todos os HUDS quando da spawn
    
PlayerTextDrawShow(playeridHUD8[playerid]); // Mostrar todos os HUDS quando da spawn
    
PlayerTextDrawShow(playeridHUD9[playerid]); // Mostrar todos os HUDS quando da spawn
    
Tempo[playerid] = 0// Setar o tempo para 0 novamente
    
return 1;
}
public 
OnPlayerDeath(playeridkilleridreason)
{
    
PlayerTextDrawHide(playeridHUD7[playerid]); // esconder os HUDS quando morrer
    
PlayerTextDrawHide(playeridHUD8[playerid]); // esconder os HUDS quando morrer
    
PlayerTextDrawHide(playeridHUD9[playerid]); // esconder os HUDS quando morrer
    
KillTimer(Status(playerid)); // Parar de chamar a public "Status"
    
Tempo[playerid] = 0// setar o tempo para 0 novamente
    
return 1;
}
// public onde ira atualizar todos os status
forward Status(playerid);
public 
Status(playerid)
{
    new 
String[128], Float:Health;
    
GetPlayerHealth(playeridHealth);
    
//
    
format(Stringsizeof(String), "alive_time: ~w~%d"Tempo[playerid]);
    
PlayerTextDrawSetString(playeridHUD7[playerid], String);
    
//
    
format(Stringsizeof(String), "blood: ~w~%f",Health);
    
PlayerTextDrawSetString(playeridHUD8[playerid], String);
    
//
    
format(Stringsizeof(String), "name:_~w~%s",Tempo[playerid], HealthNome(playerid));
    
PlayerTextDrawSetString(playeridHUD9[playerid], String);
    
//
    
Tempo[playerid]++;
    return 
1;
}
// Stock para pegar o nome do jogador
stock Nome(playerid)
{
    new 
nome[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnomesizeof(nome));
    return 
nome;
}
//||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||BY:IgorLuiz|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 
Reply


Messages In This Thread
sobre textdraw?? - by DKDarkking - 31.08.2015, 16:34
AW: sobe textdraw?? - by cicinho - 31.08.2015, 16:44
Re: AW: sobe textdraw?? - by DKDarkking - 31.08.2015, 16:54
AW: sobe textdraw?? - by cicinho - 31.08.2015, 17:07
Re: AW: sobe textdraw?? - by DKDarkking - 31.08.2015, 17:37
Re: AW: sobe textdraw?? - by IgorLuiz - 31.08.2015, 18:31
Re: AW: sobe textdraw?? - by DKDarkking - 31.08.2015, 19:30
Re: sobe textdraw?? - by SepZ - 31.08.2015, 20:27
Re: AW: sobe textdraw?? - by IgorLuiz - 31.08.2015, 20:32
Re: sobe textdraw?? - by SepZ - 31.08.2015, 21:05

Forum Jump:


Users browsing this thread: 1 Guest(s)