Szerző Téma: setdate  (Megtekintve 921 alkalommal)

Nem elérhető divkn

  • 3259
    • Profil megtekintése
setdate
« Dátum: 2013. Október 07. - 17:39:43 »
0 Show voters
setdate


Beállítja a számítógép dátumát a megadott értékek alapján.
Paraméterei:
 
(year = -1, month = -1, day = -1)

 
yearÉv paraméter. Ha -1 az érték, akkor nem módosítja azt értéket.
monthHónap paraméter. Ha -1 az érték, akkor nem módosítja azt értéket.
dayNap paraméter. Ha -1 az érték, akkor nem módosítja azt értéket.
Visszatérése:Mindig 0-val tér vissza.


#include a_samp
main()
{
    // Jelenlegi dátum:  2013/10/7 (év/hó/nap)
    // Módosítjuk a dátumot 2013/10/15-re.
    setdate(2013,10,15);
    // vagy
    setdate(-1,-1,15);
    // vagy
    setdate(.day = 15);
    new t[3]; getdate(t[0],t[1],t[2]);
    printf(\"> %d/%d/%d\",t[0],t[1],t[2]);
    // Kiírja: \"> 2013/10/15\"
}

 
Megjegyzések.
Ez a funkció nincs itegrálva a a jelenlegi függvénykönyvtárakba.
Itt letöltheted: http://sampforum.hu/index.php?topic=47971.new#new
gettimehttp://sampforum.hu/index.php?topic=44147.0
getdatehttp://sampforum.hu/index.php?topic=44146.0
tickcounthttp://sampforum.hu/index.php?topic=44762.0
settimehttp://sampforum.hu/index.php?topic=47973.0
settimerhttp://sampforum.hu/index.php?topic=47976.0
« Utoljára szerkesztve: 2013. Október 07. - 18:15:47 írta divkn »

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal