15.12.2010, 10:14
Й o seguinte galera eu estou com problemas no textdraw de horas. Ele estava funcionando perfeitamente, mais derepente paro de aparecer ja refiz o cod, mais mesmo assim nao aparece mais.
new Text:TextHoras;
////////////////////////////////////////////////////////////
TextHoras = TextDrawCreate(548.000000,23.000000," ");
TextDrawAlignment(TextHoras,0);
TextDrawBackgroundColor(TextHoras,0xFFFFFFff);
TextDrawFont(TextHoras,3);
TextDrawLetterSize(TextHoras,0.599999,1.700000);
TextDrawColor(TextHoras,0x000000ff);
TextDrawSetOutline(TextHoras,1);
TextDrawSetProportional(TextHoras,1);
TextDrawSetShadow(TextHoras,1);
////////////////////////////////////////////////////////////
format(string,50,"%02d:%02d",hour,minute);
TextDrawSetString(TextHoras,string);
////////////////////////////////////////////////////////////
TextDrawShowForPlayer(playerid, TextHoras);
// Topo do Gamemode
new Text: TextHoras[MAX_PLAYERS];
formard AtualizarHora();
//Ongamemodeinit
SetTimer("AtualizarHora", 60000, true);
for(new i; i < GetMaxPlayers(); i ++)
{
TextHoras[i] = TextDrawCreate(548.000000,23.000000," ");
TextDrawAlignment(TextHoras[i],0);
TextDrawBackgroundColor(TextHoras[i],0xFFFFFFff);
TextDrawFont(TextHoras[i],3);
TextDrawLetterSize(TextHoras[i],0.599999,1.700000);
TextDrawColor(TextHoras[i],0x000000ff);
TextDrawSetOutline(TextHoras[i],1);
TextDrawSetProportional(TextHoras[i],1);
TextDrawSetShadow(TextHoras[i],1);
}
//no inicio de onplayerspawn
TextDrawShowForPlayer(playerid, TextHoras[playerid]);
//No inicio de onplayerdeath
TextDrawHidePlayer(playerid, TextHoras[playerid]);
//No fim do seu gamemode
public AtualizarHora()
{
new string[256];
new horas, minutos;
gettime(horas, minutos);
format(string,50,"%02d:%02d",horas, minutos);
TextDrawSetString(TextHoras[i],string);
return 1;
}
TextDrawShowForAll(Text:text);
//e
TextDrawHideForAll(Text:text);
TextDrawShowForPlayer(playerid, Text:text);
//e
TextDrawHideForPlayer(playerid, Text:text);