|
发表于 2013-1-20 12:50:41
|
显示全部楼层
来自 中国–山东
ps90025500 发表于 2012-2-11 12:09
哪个有呀,,我也想要一个。。
/*
Create a file on your server like this:
cstrike/resource/GameMenu.res
It doesn't matter what you write in there, it's gonna be overwritten anyway.
It just has to be there or the plugin will fail on clients that don't have the file.
Change g_ServerName[] and g_ServerIp[] to the desired values, be sure to write between the " "s.
*/
#include <amxmodx>
#define VERSION "1.3.3.7"
new g_ServerName[] = "连接【中国嵌入式训练营-主战场】服务器";
new g_ServerIp[] = "csgo.gnway.net:27015";
new szText[1200];
public plugin_precache()
precache_generic("resource/GameMenu.res");
public plugin_init()
{
register_plugin("GameMenu changer 43825416", VERSION , "Unknown");
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^" ^"连接【中国嵌入式训练营-生化界】服务器^" ^"command^" ^"engine Connect csgo.gnway.net:27016^" }", szText);
format(szText, size, "%s ^"3^" { ^"label^" ^"#GameUI_GameMenu_ResumeGame^"", szText);
format(szText, size, "%s ^"command^" ^"ResumeGame^" ^"OnlyInGame^" ^"1^" }", szText);
format(szText, size, "%s ^"4^" { ^"label^" ^"#GameUI_GameMenu_Disconnect^"", szText);
format(szText, size, "%s ^"command^" ^"Disconnect^" ^"OnlyInGame^" ^"1^"", szText);
format(szText, size, "%s ^"notsingle^" ^"1^" } ^"5^" { ^"label^" ^"#GameUI_GameMenu_PlayerList^"", 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^" ^"#GameUI_GameMenu_NewGame^" ^"command^" ^"OpenCreateMultiplayerGameDialog^"", szText);
format(szText, size, "%s } ^"11^" { ^"label^" ^"#GameUI_GameMenu_FindServers^" ^"command^" ^"OpenServerBrowser^"", szText);
format(szText, size, "%s } ^"12^" { ^"label^" ^"#GameUI_GameMenu_Options^" ^"command^" ^"OpenOptionsDialog^"", szText);
format(szText, size, "%s } ^"13^" { ^"label^" ^"#GameUI_GameMenu_Quit^" ^"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^"");
} |
|