SA-MP Forums Archive
[pedido]Tempo Real - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [pedido]Tempo Real (/showthread.php?tid=338056)



[pedido]Tempo Real - .ThePro - 28.04.2012

Procurei no search q achei uns que й bugado!
Exemplo, da 18:00 o cйu comeзa a escurecer. da 6 comeзa a clarear, alguйm sabe um bom?
Os que achei comeзa a escurecer 23h .-.


Re: [pedido]Tempo Real - steeldark - 28.04.2012

tenta com esse:

o tempo nгo vai mudar exatamente igual real mais axo q ficaria maios o menos da forma que vc quer.

pawn Код:
//copia todo o codigo e salva como tempo.pwn

#include <a_samp>

// forward
forward tempo();

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Filter Tempo, By Steel (steeldark)");
    print("--------------------------------------\n");
   
    SetTimer("tempo",500,true);
   
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public tempo()
{
    new Hour, Minute, Second;
    gettime(Hour, Minute, Second);

    if(Hour >= 06 && Hour <= 18){
    SetWorldTime(12);
    SetWeather(12);
    }
    else
        {
        SetWorldTime(24);
        SetWeather(24);
        }
}
depois compila, e joga na pasta de filterscript..
depois sу da load no fs, e testar.

ou se preferir adcione os codigos diretamente no gm.

lembrando q o timer, ficaria na public OnGameModInit



Re: [pedido]Tempo Real - zbt - 28.04.2012

pawn Код:
public OnGameModeInit() {
    new t[3];
    gettime(t[0], t[1], t[2]);
    SetWorldTime(t[0]);
    SetTimer("Real", 60000, true);
}

forward Real();
public Real() {
    new t[3];
    gettime(t[0], t[1], t[2]);
    SetWorldTime(t[0]);
    return true;
}