[PROSEDÜR] Oyuna Girişte “HoşGeldiniz” Yazısı + Sunucu Saati + İsimli Karşılama Mesajı

  • Konuyu Başlatan Konuyu Başlatan Warlord
  • Başlangıç tarihi Başlangıç tarihi

Warlord

Administrator
Katılım
9 Temmuz 2025
Mesajlar
3
Reaksiyon puanı
0
Puanları
1
void CUser::GirisNotice()
{
DateTime time;
std::string GirisNotice;
std::string ServerDuyuru;
std::string Welcome;

GirisNotice = "Hoşgeldiniz";
ServerDuyuru = string_format("Server Time : %04d-%02d-%02d %02d:%02d",
time.GetYear(), time.GetMonth(), time.GetDay(),
time.GetHour(), time.GetMinute());
Welcome = string_format("Hello %s", GetName().c_str());

Packet SecurityNotice(WIZ_CHAT, uint8(GENERAL_CHAT));
SecurityNotice << GetNation() << GetSocketID() << uint8(0) << GirisNotice;
Send(&SecurityNotice);

Packet DuyuruNotice(WIZ_CHAT, uint8(PUBLIC_CHAT));
DuyuruNotice << GetNation() << GetSocketID() << uint8(0) << ServerDuyuru;
Send(&DuyuruNotice);

Packet WelcomeNotice(WIZ_CHAT, uint8(PUBLIC_CHAT));
WelcomeNotice << GetNation() << GetSocketID() << uint8(0) << Welcome;
Send(&WelcomeNotice);
}
 
Geri
Üst