Page 1 of 1

[ZE] Other servers menu

Posted: 28 Jul 2019, 13:53
by Muhammet20
hi all,
i made this plugin when you type /servers you will see other servers menu

Info:
If You want to remove say /servers you should use this native below:

Code: Select all

native ze_open_servers_menu(id)
so here is the code:

Code: Select all

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "[ZE] Other Servers"
#define VERSION "1.0"
#define AUTHOR "Kaya Gaming"


public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)

	register_clcmd("say /server","open_server_menu")
}
public plugin_natives()
{
	register_native("ze_open_servers_menu","native_open_servers_menu",1)
}
public native_open_servers_menu(id)
{
	open_server_menu(id)
}
public open_server_menu(id)
{
	static menu, string[128]
	
	formatex(string, sizeof(string), "Servers")
	menu = menu_create(string, "servers_handle")
	
	
	/*============================================*/
	formatex(string, sizeof(string), "Server Name")
	menu_additem(menu, string, "1", 0)
	/*============================================*/
	formatex(string, sizeof(string), "Server Name")
	menu_additem(menu, string, "2", 0)
	/*============================================*/
	formatex(string, sizeof(string), "Server Name")
	menu_additem(menu, string, "3", 0)	
	/*============================================*/
	formatex(string, sizeof(string), "Server Rules")
	menu_additem(menu, string, "4", 0)
	/*============================================*/
	formatex(string, sizeof(string), "Server Name")
	menu_additem(menu, string, "5", 0)
	/*============================================*/
	formatex(string, sizeof(string), "Server Name")
	menu_additem(menu, string, "6", 0)
	
	
	// You can add or remove
	// Info: if you added or removed anyhthing you should remove their case from servers_handle
	
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
	menu_display(id, menu, 0)
	
	return ITEM_ENABLED
}
public servers_handle(id, menu, item)
{
	if(!is_user_connected(id))
		return
	
	if(item == MENU_EXIT)
	{
		menu_destroy(menu)
		return
	}
	
	new data[6], szName[64];
	new access, callback;
	
	menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
	
	new key = str_to_num(data);
	
	switch(key)
	{
		case 1:
		{
			client_cmd(id,"connect >IP<")
		}
		case 2:
		{
			client_cmd(id,"connect >IP<")
		}
		case 3:
		{
			client_cmd(id,"connect >IP<")
		}
		case 4:
		{
			client_cmd(id,"connect >IP<")
		}
		case 5:
		{
			client_cmd(id,"connect >IP<")
		}
		case 6:
		{
			client_cmd(id,"connect >IP<")
		}
	}	
	return
}

ENJOY :)

Re: [ZE] Other servers menu

Posted: 28 Jul 2019, 22:32
by Raheem
Without information queries, then it's only name+ip so xRedirect is better then.

Re: [ZE] Other servers menu

Posted: 29 Jul 2019, 07:40
by Muhammet20
@Raheem i don't understand

Re: [ZE] Other servers menu

Posted: 30 Jul 2019, 12:44
by Raheem
I mean we can't know how many players in the server or what map they play .. etc these are the queries that should be send to the server so we got these info.

xRedirect show you full server list with all information, you don't know xRedirect?

Re: [ZE] Other servers menu

Posted: 30 Jul 2019, 12:46
by Muhammet20
Raheem wrote: 4 years ago I mean we can't know how many players in the server or what map they play .. etc these are the queries that should be send to the server so we got these info.

xRedirect show you full server list with all information, you don't know xRedirect?
no i wasn't know xRedirect

Re: [ZE] Other servers menu

Posted: 30 Jul 2019, 13:04
by Raheem
Read more about it here: https://forums.alliedmods.net/showthread.php?t=29886

Sadly VALVE from 2 months blocked "connect" command to be executed in STEAM games, so redirect now is useless in steam game but still working in cracked/illegal games.

Re: [ZE] Other servers menu

Posted: 30 Jul 2019, 13:18
by Muhammet20
Raheem wrote: 4 years ago Read more about it here: https://forums.alliedmods.net/showthread.php?t=29886

Sadly VALVE from 2 months blocked "connect" command to be executed in STEAM games, so redirect now is useless in steam game but still working in cracked/illegal games.
okay thanks

Re: [ZE] Other servers menu

Posted: 31 Jul 2019, 10:41
by Muhammet20
@Raheem why you don't trash this topic?

Re: [ZE] Other servers menu

Posted: 31 Jul 2019, 10:47
by Raheem
Trashed xd