[FilterScript] Relogio v0.1 By:Don_Speed
#1

Achei Um Tuto Na Net e Resolvi Monta Um.
Fico Legal
SS-> http://i40.tinypic.com/ejtwyr.png
Code
pawn Код:
#include <a_samp>
forward Relogio(playerid);
new Text:Textdraw0;
public OnFilterScriptInit()
{
    print("Relogio By:Don_Speed");
    SetTimer("Relogio",1000,1);

    Textdraw0 = TextDrawCreate(250.000000, 10.000000,"00/00/00 || 00:00:00");
    TextDrawBackgroundColor(Textdraw0, 255);
    TextDrawFont(Textdraw0, 1);
    TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
    TextDrawColor(Textdraw0, -1);
    TextDrawSetOutline(Textdraw0, 0);
    TextDrawSetProportional(Textdraw0, 1);
    TextDrawSetShadow(Textdraw0, 1);

    for(new i; i < MAX_PLAYERS; i ++)
    {
        if(IsPlayerConnected(i))
        {
            TextDrawShowForPlayer(i, Textdraw0);
        }
    }
    return 1;
}

public OnFilterScriptExit()
{
    TextDrawHideForAll(Textdraw0);
    TextDrawDestroy(Textdraw0);
    return 1;
}

public OnPlayerConnect(playerid)
{
    TextDrawShowForPlayer(playerid, Textdraw0);
    return 1;
}
public Relogio(playerid)
{
    new str[128], mes[12], ano, month, dia, horas, minutos, segundos;

    getdate(ano, month, dia);
    gettime(horas,minutos,segundos);

    if(month == 1) { mes = "1"; }
    else if(month == 2) {mes = "2";}
    else if(month == 3) {mes = "3";}
    else if(month == 4) {mes = "4";}
    else if(month == 5) {mes = "5";}
    else if(month == 6) {mes = "6";}
    else if(month == 7) {mes = "7";}
    else if(month == 8) {mes = "8";}
    else if(month == 9) {mes = "9";}
    else if(month == 10) {mes = "10";}
    else if(month == 11) {mes = "11";}
    else if(month == 12) {mes= "12";}


    format(str, sizeof(str), "%d/%s/%d || %d:%d:%d", dia, mes,ano,horas, minutos, segundos);
    TextDrawSetString(Text:Textdraw0, str);
}
Relogio v0.2 By: Don_Speed
Acabo De Fazer Uma outraVersao Essa Pode Ser Que Ficou + Legal HeHe
pawn Код:
#include <a_samp>
forward Relogio(playerid);
new Text:Textdraw0;
public OnFilterScriptInit()
{
    print("Relogio By:Don_Speed");
    SetTimer("Relogio",1000,1);

    Textdraw0 = TextDrawCreate( 250.000000, 10.000000,"Dia 00 de 00 de 00 [[00:00:00]]");
    TextDrawBackgroundColor(Textdraw0, 255);
    TextDrawFont(Textdraw0, 3);
    TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
    TextDrawColor(Textdraw0, 0xFFC80166);
    TextDrawSetOutline(Textdraw0, 0);
    TextDrawSetProportional(Textdraw0, 3);
    TextDrawSetShadow(Textdraw0, 1);

    for(new i; i < MAX_PLAYERS; i ++)
    {
        if(IsPlayerConnected(i))
        {
            TextDrawShowForPlayer(i, Textdraw0);
        }
    }
    return 1;
}

public OnFilterScriptExit()
{
    TextDrawHideForAll(Textdraw0);
    TextDrawDestroy(Textdraw0);
    return 1;
}

public OnPlayerConnect(playerid)
{
    TextDrawShowForPlayer(playerid, Textdraw0);
    return 1;
}
public Relogio(playerid)
{
    new str[259], mes[12], ano, month, dia, horas, minutos, segundos;

    getdate(ano, month, dia);
    gettime(horas,minutos,segundos);

    if(month == 1) { mes = "Janeiro"; }
    else if(month == 2) {mes = "Fevereiro";}
    else if(month == 3) {mes = "Marco";}
    else if(month == 4) {mes = "Abril";}
    else if(month == 5) {mes = "Maio";}
    else if(month == 6) {mes = "Junho";}
    else if(month == 7) {mes = "Julho";}
    else if(month == 8) {mes = "Agosto";}
    else if(month == 9) {mes = "Setembro";}
    else if(month == 10) {mes = "Outubro";}
    else if(month == 11) {mes = "Novembro";}
    else if(month == 12) {mes= "Dezembro";}

    format(str, sizeof(str), "Dia %d de %s de %d [[%d:%d:%d]]", dia, mes,ano,horas, minutos, segundos);
    TextDrawSetString(Text:Textdraw0, str);
}
Creditos:
Tutorial -> JOKERBOY
Ediзao -> Don_Speed
Gostou? +repu Ae Nao Custa Nada
Reply


Messages In This Thread
Relogio v0.1&v0.2 Atualizado - by Don_Speed - 09.03.2012, 16:44
Re: Relogio v0.1 By:Don_Speed - by Đeagle - 09.03.2012, 16:58
Re: Relogio v0.1 By:Don_Speed - by Don_Speed - 09.03.2012, 17:22
Re: Relogio v0.1 By:Don_Speed - by humildadeforever - 09.03.2012, 17:31
Re: Relogio v0.1 By:Don_Speed - by Đeagle - 09.03.2012, 17:45
Re: Relogio v0.1 By:Don_Speed - by Don_Speed - 09.03.2012, 17:48
Re: Relogio v0.1 By:Don_Speed - by StrondA_ - 09.03.2012, 18:53
Re: Relogio v0.1 By:Don_Speed - by mau.tito - 09.03.2012, 19:18
Re: Relogio v0.1 By:Don_Speed - by CristoferBahr - 09.03.2012, 19:25
Re: Relogio v0.1 By:Don_Speed - by humildadeforever - 09.03.2012, 19:32

Forum Jump:


Users browsing this thread: 2 Guest(s)