GM online olan oyunculara direk Mesaj Göndersin Sistemi

  • Konbuyu başlatan Konbuyu başlatan Admin
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 0
  • Görüntüleme Görüntüleme 56

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
cmd_gm.cpp

Kod:
ACMD(do_gmpm) {     if (!ch || !ch->GetDesc())         return;     // GM yetkisini kontrol et     if (ch->GetGMLevel() < GM_LOW_WIZARD)     {         ch->ChatPacket(CHAT_TYPE_INFO, "Bu komutu kullanmak için yetkiniz yok.");         return;     }     if (!*argument)     {         ch->ChatPacket(CHAT_TYPE_INFO, "Kullanım: !gmpm <mesaj>");         return;     }     const char* msg = argument;     // Tüm bağlı kullanıcıları al     const DESC_MANAGER::DESC_SET& client_set = DESC_MANAGER::instance().GetClientSet();     for (DESC_MANAGER::DESC_SET::const_iterator it = client_set.begin(); it != client_set.end(); ++it)     {         LPCHARACTER target = (*it)->GetCharacter();         if (!target) continue;         // Kendisine göndermesin, istersek bu satırı da atlayabiliriz         if (target == ch) continue;         target->ChatPacket(CHAT_TYPE_WHISPER, ch->GetName(), msg);     }     ch->ChatPacket(CHAT_TYPE_INFO, "Mesajınız tüm online oyunculara whisper olarak gönderildi."); }


Kod:
{ "gmpm", do_gmpm, 0, POS_DEAD, GM_LOW_WIZARD },



game/src/cmd_gm.cpp → En sona ekle

Kod:
ACMD(do_gmpm) {     if (!ch || !ch->GetDesc())         return;     // GM yetki kontrolü     if (ch->GetGMLevel() < GM_LOW_WIZARD)     {         ch->ChatPacket(CHAT_TYPE_INFO, "Bu komutu kullanmak için yetkiniz yok.");         return;     }     if (!*argument)     {         ch->ChatPacket(CHAT_TYPE_INFO, "Kullanım: !gmpm <mesaj>");         return;     }     const char* msg = argument;     // Online oyuncuları çek     const DESC_MANAGER::DESC_SET& client_set = DESC_MANAGER::instance().GetClientSet();     for (DESC_MANAGER::DESC_SET::const_iterator it = client_set.begin(); it != client_set.end(); ++it)     {         LPCHARACTER target = (*it)->GetCharacter();         if (!target) continue;         if (target == ch) continue; // kendine gönderme         target->ChatPacket(CHAT_TYPE_WHISPER, ch->GetName(), msg);     }     ch->ChatPacket(CHAT_TYPE_INFO, "Mesajınız tüm online oyunculara whisper olarak gönderildi."); }

game/src/cmd_gm.cpp içinde ACMD tanımlamalarının olduğu yere ekle:

Kod:
ACMD(do_gmpm);

game/src/cmd_gm.cpp dosyasında GM komutları tablosuna ekle:


Kod:
{ "gmpm", do_gmpm, 0, POS_DEAD, GM_LOW_WIZARD },



Tüm online oyuncular bu mesajı özel mesaj olarak alır.

Örnek:

!gmpm Selamunaleyküm.
GM Online Olan Oyunculara Direk Mesaj Gönder Sistemi Nedir?
Metin2 özel sunucularında oyun deneyimini artırmak ve oyun içi yönetim süreçlerini kolaylaştırmak amacıyla geliştirilen GM (Game Master) sistemleri arasında, 'GM Online Olan Oyunculara Direk Mesaj Gönder Sistemi' oldukça önemli bir yere sahiptir. Bu sistem sayesinde, aktif olan oyun yöneticileri (GM'ler), belirli kriterlere göre oyunculara anlık mesaj gönderebilir. Özellikle Metin2 private server geliştirme sürecinde bu gibi sistemler, hem oyun içi güvenliği artırır hem de oyuncu memnuniyetini yükseltir.

Sistemin Amacı ve Faydaları
Bu sistem özellikle Metin2 PvP sistemlerinde aktif olarak kullanılır. Sunucuda meydana gelen olaylara hızlı müdahale edebilmek için GM'lerin oyuncularla doğrudan iletişim kurabilmesi gerekir. Örneğin, bir oyuncunun hile kullandığını düşündüğünüzde, ona mesaj atarak bilgi alabilir ya da uyarı verebilirsiniz. Ayrıca, turnuvalar, özel etkinlikler veya teknik sorunlar gibi durumlarda da tüm oyunculara anında bilgi vermek mümkündür.

C++ Kaynak Kod Tabanlı Uygulamalar
Metin2 server src üzerinde çalışan bu sistem genellikle C++ tabanlıdır. Game server programming yapılırken, client ile auth server arasında kurulan bağlantı üzerinden mesajların gönderilmesi sağlanır. Bu işlem sırasında, GM komutları doğrulanır ve hedef oyuncuya özel bir paket (packet) gönderilir. Bu paketin içeriği, mesajın türüne, kimden geldiğine ve içeriğine göre değişebilir.

Python GUI Entegrasyonu
Geliştiriciler, bu sistemi daha kullanıcı dostu hale getirmek için Python GUI (PyQt, Tkinter gibi) arayüzleriyle entegre edebilirler. Böylece GM paneli üzerinden, oyuncuların listesine erişilip, direkt mesaj gönderme işlemi grafiksel olarak yapılabilecektir. Bu tür PyRoot sistemleri, Metin2 development süreçlerinde büyük kolaylık sağlar.

Sistem Nasıl Çalışır?
Sistem çalışırken önce GM yetkisi kontrol edilir. Ardından, mesaj gönderilecek oyuncu belirlenir. Eğer oyuncu online ise, sunucu tarafından bir mesaj paketi hazırlanır ve istemciye (client src) gönderilir. Bu paket, oyuncunun ekranında belirli bir alanda (genellikle chat ekranında) görüntülenir. Bu süreçte DB Core üzerinden oyuncu verileri doğrulanır ve güvenlik önlemleri alınır.

Oyun İçinde Kullanımı
Bu sistem genellikle /gmmsg gibi bir komut üzerinden aktive edilir. GM yetkisine sahip kullanıcılar, komutu yazdıktan sonra hedef oyuncu adını ve mesaj içeriğini girer. Eğer hedef oyuncu aktifse, mesaj anında ulaşır. Bu sayede, oyun içi moderasyon ve iletişim süreçleri büyük ölçüde kolaylaşır.

Sonuç
GM online olan oyunculara direk mesaj gönderme sistemi, Metin2 özel sunucularında hem güvenlik hem de kullanıcı deneyimi açısından kritik bir rol oynar. C++ kaynak kodları üzerinde geliştirilen bu sistem, Python GUI ile daha da esnek hale getirilebilir. Bu tür core sistemlerin doğru entegrasyonu, Metin2Dev süreçlerinde büyük avantajlar sağlar.


What is the System That Allows GMs to Send Direct Messages to Online Players?
In custom Metin2 servers, one of the important systems developed to enhance gameplay experience and simplify in-game management processes is the 'System for GMs to Send Direct Messages to Online Players'. With this system, active game administrators (GMs) can send instant messages to players based on specific criteria. Especially in Metin2 private server development, such systems increase in-game security and boost player satisfaction.

Purpose and Benefits of the System
This system is particularly used in Metin2 PvP environments. To quickly respond to events occurring within the server, GMs need to communicate directly with players. For example, if you suspect a player is cheating, you can message them to gather information or issue a warning. Additionally, in cases such as tournaments, special events, or technical issues, it becomes possible to instantly inform all players.

C++ Source Code Based Applications
This system typically runs on top of Metin2 server src and is mostly based on C++. During game server programming, messages are sent via the connection established between the client and the auth server. During this process, GM commands are validated, and a special packet is sent to the target player. The content of this packet varies depending on the type of message, who sent it, and its content.

Python GUI Integration
Developers can make this system more user-friendly by integrating it with Python GUI interfaces (like PyQt or Tkinter). This way, through a GM panel, one can access the list of players and send direct messages in a graphical manner. Such PyRoot systems provide significant ease during Metin2 development processes.

How Does the System Work?
During operation, the GM authority is first checked. Then, the player to whom the message will be sent is selected. If the player is online, a message packet is prepared on the server side and sent to the client (client src). This packet appears in a specific area on the player's screen (usually in the chat window). Throughout this process, player data is verified via DB Core and security measures are implemented.

Usage In-Game
The system is usually activated via a command like /gmmsg. Users with GM privileges enter the target player's name and the message content after typing the command. If the target player is active, the message arrives instantly. Thus, in-game moderation and communication processes become significantly easier.

Conclusion
The system allowing GMs to send direct messages to online players plays a critical role in both security and user experience in custom Metin2 servers. This system, developed on C++ source codes, can be made even more flexible with Python GUI integration. Proper integration of such core systems provides significant advantages in Metin2Dev processes.
 

Şuan Bu Konuyu Görüntüleyen Kullanıcılar (Toplam : 0, Üye : 0, Misafir : 0)

Benzer konular

Geri
Üst Alt