Hello everybody,
My brain don't want to tell me what I'm doing wrong here.
I just to print out the servers in a menu and console, but nothing happens.
Code:
/* Script generated by Pawn Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Server List"
#define AUTHOR "Kia"
#define VERSION "1.0.0"
#define MAXSERVER 4
new const szServerDescriptions[MAXSERVER][] =
{
"bhop_* only (Skillpoints + Ranking)",
"NightcrawlerZ",
"Slender Mod",
"Furien Mod"
}
new const szServerIPs[MAXSERVER][] =
{
"x14pwnz.tk:27016",
"x14pwnz.tk:27017",
"x14pwnz.tk:27018",
"x14pwnz.tk:27019"
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /servers", "func_OpenServerList")
register_clcmd("say servers", "func_OpenServerList")
}
public func_OpenServerList(id)
{
new menu = menu_create("Kia's Server - Server List^nServer List has been printed to your console","func_OpenServerList_handler")
client_print(id, print_console, "######################################")
client_print(id, print_console, "######################################")
client_print(id, print_console, "######################################")
for(new i; i<MAXSERVER; i++)
{
static szMenuTitle[64], szInfo[3], szConsoleString[64]
formatex(szMenuTitle, charsmax(szMenuTitle), "%s - %s",szServerDescriptions[i],szServerIPs[i])
num_to_str(i, szInfo, charsmax(szInfo))
menu_additem(menu, szMenuTitle, szInfo)
formatex(szConsoleString, charsmax(szConsoleString), "%s - connect %s", szServerDescriptions[i], szServerIPs[i])
}
client_print(id, print_console, "######################################")
client_print(id, print_console, "######################################")
client_print(id, print_console, "######################################")
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu, 0);
return PLUGIN_HANDLED
}
__________________