16.01.2019, 20:36
Where did I go wrong?
Because I use the command it works correctly, but at the time of being deleted over time it does not Add, it generates another that is duplicated in the corner!
Then what is on the Screen of the middle Deleta, but it was not to be the one on the left corner.
https://i.imgur.com/pVMhEgh.png
In the server test normal operation, in the Host already I'm bugged like this!
Because I use the command it works correctly, but at the time of being deleted over time it does not Add, it generates another that is duplicated in the corner!
Then what is on the Screen of the middle Deleta, but it was not to be the one on the left corner.
https://i.imgur.com/pVMhEgh.png
PHP код:
new Text:ANN[MAX_PLAYERS];
forward ApagarTexto(playerid);
PHP код:
for(new i=0; i<GetMaxPlayers(); i++)
{
ANN[i] = TextDrawCreate(218.000000, 235.000000, " ");
TextDrawBackgroundColor(ANN[i], 255);
TextDrawFont(ANN[i], 1);
TextDrawLetterSize(ANN[i], 0.500000, 2.099999);
TextDrawColor(ANN[i], -1);
TextDrawSetOutline(ANN[i], 1);
TextDrawSetProportional(ANN[i], 1);
}
PHP код:
if(strcmp(cmd, "/ann", true) == 0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file2, sizeof(file2), PASTA_CONTAS, aname);
strmid(tmp, cmdtext, 4, strlen(cmdtext));
if(!strlen(tmp))
{
SendClientMessage(playerid, Vermelho, " | ERRO | Digite: /Ann [Texto]");
return 1;
}
for(new i=0; i<MAX_PLAYERS; i++)
{
format(string, sizeof(string), "~r~#~w~%s ~r~#",tmp);
TextDrawSetString(ANN[i], string);
TextDrawShowForPlayer(i, ANN[i]);
SetTimerEx("ApagarTexto",5000,false,"i",i);
}
return 1;
}
PHP код:
public ApagarTexto()
{
foreach(Player,i)
{
TextDrawHideForPlayer(i, ANN[i]);
TextDrawShowForPlayer(i, ANN[i]);
}
return 1;
}