Hi,
Can someone either show me a plugin or show me an example fo how to "auto-fill" a menu from a file.
What I want to do is when someone types w/e cmd it shows them a menu filled with names of all the maps iin the server maps.ini
I would love to make this myself, but I have no clue how to do the "filling" part.
This is how far I've gotten, pretty sure there's a few errors already.
Code:
#include <amxmodx>
#include <amxmisc>
#define MAX_MAPS 100
new configsdir[200]
new configfile[200]
new map[MAX_MAPS][64]
new mapdir[MAX_MAPS][64]
public plugin_init()
{
register_plugin("Map List","1.0","Kensai")
register_concmd("maplist","Maplist",ADMIN_KICK,"Displays a menu, listing all maps on the server.")
register_menucmd(register_menuid("menu_Maplist"),1023,"DoMaplist");
}
public Maplist(id)
{
new menu[192]
format(menu, 191, "Maps List^n^n1. ^n^n0. Exit")
new keys = MENU_KEY_1|MENU_KEY_0
show_menu(id, keys, menu, 15, "menu_Maplist")
return PLUGIN_HANDLED
}
Thanks.