Raised This Month: $ Target: $400
 0% 

Showing enums at menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 07-06-2013 , 11:36   Showing enums at menu
Reply With Quote #1

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
}
__________________
Kia is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode