TuZaKK 1
TuZaKK
sermin 1
sermin
berkmenoo 1
berkmenoo
mannaxxx 1
mannaxxx
Agora Metin2 1
Agora Metin2
[DEV]AB 1
[DEV]AB
kaptanmikro1 1
kaptanmikro1
Hikaye Ekle

Lua İçin Zaman Uyarlaması

Türkiye'de ilk Mobil & PC Aynı Anda Metin2 Oyna. Triarchonline kalıcı ve uzun ömürlü yapısı ile 24 Temmuz'da açılıyor. | 1-99 Mobil Metin2 Triarch HEMEN TIKLA!

Kod:
service.h

ekle:



#define ENABLE_LUA_FUNCTION_TIME



questlua_global.cpp aç:



Arat:

    void RegisterGlobalFunctionTable(lua_State * L)



Üstüne ekle:



#ifdef ENABLE_LUA_FUNCTION_TIME

    #include <time.h>       /* time_t, struct tm, time, localtime */



    ALUA(_print_datetime)

    {

        time_t currentTime;

        struct tm *localTime;

      

        time(&currentTime);

        localTime = localtime(&currentTime);

        CQuestManager::Instance().GetCurrentCharacterPtr()->ChatPacket(CHAT_TYPE_NOTICE, "%s", asctime(localTime));

        return 0;

    }

#endif





Arat:

            {nullptr, nullptr    }

        };



Üstüne ekle:

#ifdef ENABLE_LUA_FUNCTION_TIME

            {"print_datetime", _print_datetime},

#endif
 
Kod:
service.h

ekle:



#define ENABLE_LUA_FUNCTION_TIME



questlua_global.cpp aç:



Arat:

    void RegisterGlobalFunctionTable(lua_State * L)



Üstüne ekle:



#ifdef ENABLE_LUA_FUNCTION_TIME

    #include <time.h>       /* time_t, struct tm, time, localtime */



    ALUA(_print_datetime)

    {

        time_t currentTime;

        struct tm *localTime;

     

        time(&currentTime);

        localTime = localtime(&currentTime);

        CQuestManager::Instance().GetCurrentCharacterPtr()->ChatPacket(CHAT_TYPE_NOTICE, "%s", asctime(localTime));

        return 0;

    }

#endif





Arat:

            {nullptr, nullptr    }

        };



Üstüne ekle:

#ifdef ENABLE_LUA_FUNCTION_TIME

            {"print_datetime", _print_datetime},

#endif
Paylaşım için teşekkürler.
 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst