[ZE] Other servers menu

Useless Stuffs, Spam ... etc
Post Reply
Muhammet20
Veteran Member
Veteran Member
Posts: 408
Joined: 5 years ago
Contact:

[ZE] Other servers menu

#1

Post by Muhammet20 » 4 years ago

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 :)

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#2

Post by Raheem » 4 years ago

Without information queries, then it's only name+ip so xRedirect is better then.
He who fails to plan is planning to fail

Muhammet20
Veteran Member
Veteran Member
Posts: 408
Joined: 5 years ago
Contact:

#3

Post by Muhammet20 » 4 years ago

@Raheem i don't understand

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#4

Post by Raheem » 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?
He who fails to plan is planning to fail

Muhammet20
Veteran Member
Veteran Member
Posts: 408
Joined: 5 years ago
Contact:

#5

Post by Muhammet20 » 4 years ago

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

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#6

Post by Raheem » 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.
He who fails to plan is planning to fail

Muhammet20
Veteran Member
Veteran Member
Posts: 408
Joined: 5 years ago
Contact:

#7

Post by Muhammet20 » 4 years ago

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

Muhammet20
Veteran Member
Veteran Member
Posts: 408
Joined: 5 years ago
Contact:

#8

Post by Muhammet20 » 4 years ago

@Raheem why you don't trash this topic?

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#9

Post by Raheem » 4 years ago

Trashed xd
He who fails to plan is planning to fail

Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Who is online

Users browsing this forum: No registered users and 3 guests