new string[256];
format(string, 256, " ~w~Kills:~r~ %d ~w~Deaths:~r~ %d ~w~Level:~r~ %d ~w~Exp:~r~ %d ~w~Estudos:~r~ %d", pap_CarregarInt(playerid, "Matou"), pap_CarregarInt(playerid, "Morreu"), pap_CarregarInt(playerid, "Level"), pap_CarregarInt(playerid, "Experiencia"), pap_CarregarInt(playerid, "Estudos"));
Infos = TextDrawCreate(0,421.5,string);
TextDrawUseBox(Infos,1);
TextDrawBoxColor(Infos,0x00000066);
TextDrawTextSize(barra,800,400);
TextDrawAlignment(Infos,0);
TextDrawBoxColor(barra, 126); //Cor do fundo
TextDrawBackgroundColor(Infos,0x000000ff);
TextDrawFont(Infos,1);
TextDrawColor(Infos,0xffffffff);
TextDrawSetOutline(Infos,1);
TextDrawSetProportional(Infos,1);
TextDrawSetShadow(Infos,1);
forward
ChecarVelocimetro();
SetTimer("ChecarVelocimetro", 500, 1);
public ChecarVelocimetro()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInAnyVehicle(i))
{
format(string, sizeof(string), "~g~Velocidade ~r~%dKM/h", VelocidadeKM(i));
TextDrawSetString(Textdraw2[i],string);
TextDrawShowForPlayer(i,Textdraw0[i]);
TextDrawShowForPlayer(i,Textdraw1[i]);
TextDrawShowForPlayer(i,Textdraw2[i]);
}
else
{
TextDrawHideForPlayer(i,Textdraw0[i]);
TextDrawHideForPlayer(i,Textdraw1[i]);
TextDrawHideForPlayer(i,Textdraw2[i]);
}
}
}
return 1;
}
mete um timer pra ele destruir e depois recriar a textdraw, olha o FS de velocimetro do TiagoPS ele faz bem o q vc qr
|
public OnGameModeInit()
{
SetTimer("chamar",100,true);
return 1;
}
forward chamar(playerid)
public chamar(playerid)
{
new string[256];
format(string, 256, " ~w~Kills:~r~ %d ~w~Deaths:~r~ %d ~w~Level:~r~ %d ~w~Exp:~r~ %d ~w~Estudos:~r~ %d", pap_CarregarInt(playerid, "Matou"), pap_CarregarInt(playerid, "Morreu"), pap_CarregarInt(playerid, "Level"), pap_CarregarInt(playerid, "Experiencia"), pap_CarregarInt(playerid, "Estudos"));
TextDrawSetString(Infos, string);
TextDrawShowForPlayer(playerid, Infos);
return 1;
}
@Bieel ERRADO! se destroir ele nгo vai aparecer Mais!.
@topic: tenta. pawn Код:
|
public OnGameModeInit()
{
SetTimer("chamar",100,true);
return 1;
}
forward chamar(playerid)
public chamar(playerid)
{
new string[256];
format(string, 256, " ~w~Kills:~r~ %d ~w~Deaths:~r~ %d ~w~Level:~r~ %d ~w~Exp:~r~ %d ~w~Estudos:~r~ %d", pap_CarregarInt(playerid, "Matou"), pap_CarregarInt(playerid, "Morreu"), pap_CarregarInt(playerid, "Level"), pap_CarregarInt(playerid, "Experiencia"), pap_CarregarInt(playerid, "Estudos"));
TextDrawSetString(Infos, string);
TextDrawHideForPlayer(playerid, Infos);
TextDrawShowForPlayer(playerid, Infos);
return 1;
}
new string[256];
format(string, 256, " ~w~Kills:~r~ %d ~w~Deaths:~r~ %d ~w~Level:~r~ %d ~w~Exp:~r~ %d ~w~Estudos:~r~ %d", pap_CarregarInt(playerid, "Matou"), pap_CarregarInt(playerid, "Morreu"), pap_CarregarInt(playerid, "Level"), pap_CarregarInt(playerid, "Experiencia"), pap_CarregarInt(playerid, "Estudos"));
Infos = TextDrawCreate(0,421.5,string);
TextDrawUseBox(Infos,1);
TextDrawBoxColor(Infos,0x00000066);
TextDrawTextSize(barra,800,400);
TextDrawAlignment(Infos,0);
TextDrawBoxColor(barra, 126); //Cor do fundo
TextDrawBackgroundColor(Infos,0x000000ff);
TextDrawFont(Infos,1);
TextDrawColor(Infos,0xffffffff);
TextDrawSetOutline(Infos,1);
TextDrawSetProportional(Infos,1);
TextDrawSetShadow(Infos,1);
forward ATT();
public ATT()
{
TextDrawHideForPlayer(playerid, Infos);
new string[256];
format(string, 256, " ~w~Kills:~r~ %d ~w~Deaths:~r~ %d ~w~Level:~r~ %d ~w~Exp:~r~ %d ~w~Estudos:~r~ %d", pap_CarregarInt(playerid, "Matou"), pap_CarregarInt(playerid, "Morreu"), pap_CarregarInt(playerid, "Level"), pap_CarregarInt(playerid, "Experiencia"), pap_CarregarInt(playerid, "Estudos"));
TextDrawSetString(Infos, string);
TextDrawShowForPlayer(playerid, Infos);
public OnPlayerUpdate(playerid)
{
ATT();
return 1;
}
ATT();