[Ajuda] Relogio e Data Nгo Aparece !
#1

Galera Estou Com um Sistema De Relуgio e Data, Mas ele Nгo aparece Poderia Me Ajudar ?

Variбveis.
pawn Code:
new Text:Reloginho1;
new Text:Reloginho2;
new hstring[256];
Text Draw !
pawn Code:
Reloginho1 = TextDrawCreate(620.0,5.0,"  ");
    Reloginho2 = TextDrawCreate(632.0,25.0,"  ");
    TextDrawAlignment(Reloginho1,3);
    TextDrawAlignment(Reloginho2,3);
    TextDrawColor(Reloginho1,0xFFFFFFFF);
    TextDrawColor(Reloginho2,0xFFFFFFFF);
    TextDrawBackgroundColor(Reloginho1,0x000000FF);
    TextDrawBackgroundColor(Reloginho2,0x000000FF);
    TextDrawFont(Reloginho1,3);
    TextDrawLetterSize(Reloginho1,0.5,1.4);
    TextDrawFont(Reloginho2,3);
    TextDrawLetterSize(Reloginho2,0.5,1.4);
    TextDrawSetProportional(Reloginho1,1);
    TextDrawSetProportional(Reloginho2,1);
    TextDrawSetShadow(Reloginho1,1);
    TextDrawSetShadow(Reloginho2,1);
    TextDrawSetOutline(Reloginho1,2);
    TextDrawSetOutline(Reloginho2,2);
    TextDrawShowForAll(Reloginho1);
    TextDrawShowForAll(Reloginho2);
sistema !
pawn Code:
public reloginho()
{
    new
        ano,
        mes,
        dia,
        horas,
        minutos,
        segundos;
    getdate(ano, mes, dia);
    gettime(horas, minutos, segundos);
    format(hstring, sizeof hstring, "%d/%s%d/2014", dia, ((mes < 10) ? ("0") : ("")), mes);
    TextDrawSetString(Reloginho1, hstring);
    format(hstring, sizeof hstring, "%s%d:%s%d:%s%d", (horas < 10) ? ("0") : (""), horas, (minutos < 10) ? ("0") : (""), minutos, (segundos < 10) ? ("0") : (""), segundos);
    TextDrawSetString(Reloginho2, hstring);
    TextDrawShowForAll(Reloginho1);
    TextDrawShowForAll(Reloginho2);
}
Reply
#2

A callback estб sendo chamada?

Para fazer o teste, faz o seguinte:

pawn Code:
public OnPlayerConnect(playerid){
 
    TextDrawShowForAll(Reloginho1);
    TextDrawShowForAll(Reloginho2);
    return 1;
}
Se mostrar, й porque a callback nгo estб sendo chamada.
Reply
#3

Nгo Apareceu
Reply
#4

Quote:
Originally Posted by DannielCooper
View Post
A callback estб sendo chamada?

Para fazer o teste, faz o seguinte:

pawn Code:
public OnPlayerConnect(playerid){
 
    TextDrawShowForAll(Reloginho1);
    TextDrawShowForAll(Reloginho2);
    return 1;
}
Se mostrar, й porque a callback nгo estб sendo chamada.
desse modo ta errado tem de usar TextDrawShowForPlayer
Reply
#5

PT, Nгo Apareceu Tambйm !
Reply
#6

pawn Code:
public reloginho()
{
    new
        ano,
        mes,
        dia,
        horas,
        minutos,
        segundos;
    getdate(ano, mes, dia);
    gettime(horas, minutos, segundos);
    format(hstring, sizeof hstring, "%d/%s%d/2014", dia, ((mes < 10) ? ("0") : ("")), mes);
    TextDrawSetString(Reloginho1, hstring);
    format(hstring, sizeof hstring, "%s%d:%s%d:%s%d", (horas < 10) ? ("0") : (""), horas, (minutos < 10) ? ("0") : (""), minutos, (segundos < 10) ? ("0") : (""), segundos);
    TextDrawSetString(Reloginho2, hstring);
}
Em OnPlayerConnect;
pawn Code:
TextDrawShowForPlayer(playerid, Reloginho1);
    TextDrawShowForPlayer(playerid, Reloginho2);
Tem um settimer no OnGameModeInit para atualizar o relogio, e tambйm o codigo da textdraw, TextDrawCreate... ?
Reply
#7

Nem reparei que estava ShowForAll , rs. sу copiei o que estava no code dele.
Reply
#8

Nгo Entendo Nгo Esta Aparecendo, alguem poderia Me indica outro Sistema de data e hora ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)