/* * CSB Server Info * Copyright (C) 2026 counter-strike-boost.com * * "say /info" opens a menu of server information: the rules, the online admin * list, the common chat commands, community links (Discord / website) read from * an ini, and the current match settings (friendly fire, max rounds, timelimit). * Each entry is shown as an MOTD window so links are clickable. * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. It is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See for details. */ #include new const PLUGIN[] = "CSB Server Info" new const VERSION[] = "1.0.0" new const AUTHOR[] = "counter-strike-boost.com" new g_szDiscord[128] new g_szWebsite[128] public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /info", "cmdInfo") register_clcmd("say_team /info", "cmdInfo") } public plugin_cfg() { copy(g_szDiscord, charsmax(g_szDiscord), "https://discord.gg/your-invite") copy(g_szWebsite, charsmax(g_szWebsite), "https://counter-strike-boost.com") new cfgdir[128], path[160] get_localinfo("amxx_configsdir", cfgdir, charsmax(cfgdir)) formatex(path, charsmax(path), "%s/csb_info.ini", cfgdir) if (!file_exists(path)) return new f = fopen(path, "rt") if (!f) return new line[192], key[32], value[128] while (!feof(f)) { fgets(f, line, charsmax(line)) trim(line) if (!line[0] || line[0] == ';' || line[0] == '#') continue strtok(line, key, charsmax(key), value, charsmax(value), '=') trim(key) trim(value) if (!value[0]) continue if (equali(key, "discord")) copy(g_szDiscord, charsmax(g_szDiscord), value) else if (equali(key, "website")) copy(g_szWebsite, charsmax(g_szWebsite), value) } fclose(f) } public cmdInfo(id) { new menu = menu_create("\yServer Information\w", "infoHandler") menu_additem(menu, "Server Rules", "1", 0) menu_additem(menu, "Online Admins", "2", 0) menu_additem(menu, "Chat Commands", "3", 0) menu_additem(menu, "Community Links", "4", 0) menu_additem(menu, "Current Settings", "5", 0) menu_setprop(menu, MPROP_EXIT, MEXIT_ALL) menu_display(id, menu, 0) return PLUGIN_HANDLED } public infoHandler(id, menu, item) { if (item == MENU_EXIT) { menu_destroy(menu) return PLUGIN_HANDLED } new info[8], name[32], access, callback menu_item_getinfo(menu, item, access, info, charsmax(info), name, charsmax(name), callback) menu_destroy(menu) switch (str_to_num(info)) { case 1: showRules(id) case 2: showAdmins(id) case 3: showCommands(id) case 4: showLinks(id) case 5: showSettings(id) } return PLUGIN_HANDLED } showRules(id) { show_motd(id, "1. Respect all players and admins.
2. No cheats, scripts or exploits.
3. No advertising or spam.
4. Admin decisions are final.", "Server Rules") } showAdmins(id) { new body[512] copy(body, charsmax(body), "Admins currently online:
") new players[32], num, count = 0 get_players(players, num, "ch") new name[32], line[64] for (new i = 0; i < num; i++) { new pl = players[i] if (get_user_flags(pl) & ADMIN_KICK) { get_user_name(pl, name, charsmax(name)) formatex(line, charsmax(line), "- %s
", name) add(body, charsmax(body), line) count++ } } if (!count) add(body, charsmax(body), "(none online right now)") show_motd(id, body, "Online Admins") } showCommands(id) { show_motd(id, "/rules - server rules
/info - this menu
/players - who is online
/report - report a player
/rsounds - toggle round sounds", "Chat Commands") } showLinks(id) { new body[384] formatex(body, charsmax(body), "Join our community:

Discord: %s
Website: %s", g_szDiscord, g_szWebsite) show_motd(id, body, "Community Links") } showSettings(id) { new ff = get_cvar_num("mp_friendlyfire") new maxr = get_cvar_num("mp_maxrounds") new tl = get_cvar_num("mp_timelimit") new body[384] formatex(body, charsmax(body), "Friendly fire: %s
Max rounds: %d
Time limit: %d min
Players online: %d", ff ? "ON" : "OFF", maxr, tl, get_playersnum()) show_motd(id, body, "Current Settings") }