Hikayeler

Reklam vermek için turkmmo@gmail.com

Level Duyuru Sistemi

Metin2 EP, Valorant VP dahil tüm oyun ürünlerini en uygun fiyatlarla bulabilir, Item ve Karakterlerinizi hızlıca satabilirsiniz. HEMEN TIKLA!

Artık oyuncular belirlediğiniz seviyelere ulaştığında, otomatik olarak tüm sunucuda duyuru yapılacak.


“Lv.75 olmuşum, kimsenin haberi yok” dönemi sona erdi.



Arat:
Kod:
        case POINT_LEVEL:
            if ((GetLevel() + amount) > gPlayerMaxLevel)
                return;

            SetLevel(GetLevel() + amount);
            val = GetLevel();

            sys_log(0, "LEVELUP: %s %d NEXT EXP %d", GetName(), GetLevel(), GetNextExp());

            PointChange(POINT_NEXT_EXP,    GetNextExp(), false);

Altına ekle
Kod:
#ifdef LEVEL_DUYURU_SISTEMI
std::set<int> notifyLevels = {15, 30, 55, 75, 99};
if (notifyLevels.count(val))
{
    char levelduyuru[QUERY_MAX_LEN];
    snprintf(levelduyuru, sizeof(levelduyuru), "<Bilgi>: %s isimli oyuncumuz %u seviye olmuştur, tebrikler!", GetName(), GetLevel());
    BroadcastNotice(levelduyuru);
}
#endif


Ekli dosyayı görüntüle 150047
Eline sağlık
 
Kod:
//1.) Search: 
        case POINT_LEVEL:
            if ((GetLevel() + amount) > gPlayerMaxLevel)
                return;
        
            SetLevel(GetLevel() + amount);
            val = GetLevel();

            sys_log(0, "LEVELUP: %s %d NEXT EXP %d", GetName(), GetLevel(), GetNextExp());

            PointChange(POINT_NEXT_EXP,    GetNextExp(), false);
//2.) Add bellow:
#ifdef ENABLE_ANNOUNCEMENT_LEVELUP   
//functionTestvegas746
            switch (val)
            {
                case 10:    case 15:    case 20:    case 25:    case 30:    case 35:
                case 40:    case 45:    case 50:    case 55:    case 60:    case 65:
                case 70:    case 75:    case 80:    case 85:    case 90:    case 95:
                case 100:    case 105:
                    char szNoticeLevelUp[QUERY_MAX_LEN];
                    snprintf(szNoticeLevelUp, sizeof(szNoticeLevelUp), "<Informations> [CH%d]: [%s] reached level [%u]. Congratulations!", g_bChannel, GetName(), GetLevel());
                    BroadcastNotice(szNoticeLevelUp);
                    break;
                    
                default:
                    break;
            }   
#endif

ah m2dev üzümlü kekim özlemişim şu troll kafalarını.
 
Teşekkürler emre
 

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

Geri
Üst