[AJUDA]Relogio
#5

pawn Код:
//*************** Inicio do GM ***********
new Text:Reloginho1;
new Text:Reloginho2;
//*************** OnGameModeInit **********
SetTimer("reloginho", 1000, true);
Reloginho1 = TextDrawCreate(etc, etc, etc);
Reloginho2 = TextDrawCreate(etc, etc, etc);
//Aqui algumas informaзхes como useBox, BackgroundColor etc.
//*************** OnPlayerConnect *********
TextDrawShowForPlayer(playerid, Reloginho1);
TextDrawShowForPlayer(playerid, Reloginho2);
//*************** Final do GM ************
public reloginho(playerid)
{
    new string[20], year, month, day, hour, minute, second;
    getdate(year, month, day);
    gettime(hour, minute, second);
    format(string, sizeof string, "%d/%d/%d", day, month, year);//Atualize o 2011 quando "chegar" 2012
    TextDrawSetString(Reloginho1, string);
    format(string, sizeof string, "%d:%d:%d", hour, minute, second);
    TextDrawSetString(Reloginho2, string);
    return 1;
}
Sу uma coisa, nгo esqueзa de colocar o TextDrawCreate entre outras informaзхes no OnGameModeInit.
Reply


Messages In This Thread
[AJUDA]Relogio - by dPlaYer_ - 13.08.2011, 23:23
Re: [AJUDA]Relogio - by Josma_cmd - 13.08.2011, 23:33
Re: [AJUDA]Relogio - by ViniBorn - 13.08.2011, 23:33
Re: [AJUDA]Relogio - by dPlaYer_ - 13.08.2011, 23:37
Re: [AJUDA]Relogio - by Josma_cmd - 14.08.2011, 00:31
Re: [AJUDA]Relogio - by dPlaYer_ - 15.08.2011, 00:59

Forum Jump:


Users browsing this thread: 2 Guest(s)