Plugin Available Admin Menu [ Make Human & Zombie ]

Unpaid Requests, Public Plugins
Post Reply
User avatar
Donistroy
Member
Member
Morocco
Posts: 10
Joined: 3 Years Ago
Location: Morocco
Has thanked: 0
Been thanked: 2 times
Age: 21
Contact:

Admin Menu [ Make Human & Zombie ]

#1

Post by Donistroy » 3 Years Ago

hello , does anyone can make a plugin for zombie escape that can make zombies & humans with a menu ( Like zombie Plague ) ? .

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 2029
Joined: 3 Years Ago
Location: Egypt
Has thanked: 39 times
Been thanked: 122 times
Age: 22
Contact:

#2

Post by Raheem » 3 Years Ago

I was think about this but the problem is it need alot of work as there is alot of cases and need edits for core as if someone make before infection.

Maybe if you need i can make a menu for infection but will be vaild only after zombies appear, Which mean to convert Humans to Zombies only. The other case need some work inside the core and i don't need to do..

User avatar
Donistroy
Member
Member
Morocco
Posts: 10
Joined: 3 Years Ago
Location: Morocco
Has thanked: 0
Been thanked: 2 times
Age: 21
Contact:

#3

Post by Donistroy » 3 Years Ago

ah yes it need time , anyway , just make a infection menu as zombie plague , turn to human and zombie only , no need other case ... and thank you ;) .

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 2029
Joined: 3 Years Ago
Location: Egypt
Has thanked: 39 times
Been thanked: 122 times
Age: 22
Contact:

#4

Post by Raheem » 3 Years Ago

Ok, I make it it's Infection Menu. This will allow admin with the specific flag in the plugin to convert:
  • Zombie --> Human
  • Human --> Zombie
To note that you can only use the menu after zombies have been released. Also if there is only one player in one team and you try make him to another it won't be done.

Write in the console: ze_infec_menu and the menu will appear to you.

Code:
  • Code: Select all

    #include <zombie_escape>
    
    #define ACCESS ADMIN_RCON
    
    new bool:g_bActivate
    
    public plugin_init()
    {
    	register_plugin("[ZE] Infection Menu", "1.0", "Raheem")
    	register_clcmd("ze_infec_menu","Infection_Menu");
    }
    
    public ze_game_started()
    {
    	g_bActivate = false
    }
    
    public ze_zombie_release()
    {
    	g_bActivate = true
    }
    
    public Infection_Menu(id)
    {
    	new menu = menu_create( "\yInfection Menu\w:", "menu_handler" );
    	
    	new iPlayers[32], iNum
    	get_players(iPlayers, iNum, "c")
    	
    	new szName[32], szUserId[32], szData[200];
    	
    	for (new i = 0;i < iNum;i++)
    	{
    		if (!is_user_alive(i))
    			continue
    		
    		get_user_name(iPlayers[i], szName, charsmax(szName))
    		formatex(szUserId, charsmax(szUserId), "%d", get_user_userid(iPlayers[i]));
    		formatex(szData, charsmax(szData), "%s	%s", szName, ze_is_user_zombie(i) ? "\d[\rZombie\d]" : "\d[\rHuman\d]");
    		
    		menu_additem(menu, szData, szUserId, 0)
    	}
    	
    	if(get_user_flags(id) & ACCESS)
    	{
    		menu_display(id, menu, 0)
    	}
    	else
    	{
    		client_print(id, print_console, "[Infection Menu] You have no access to that command.")
    	}
    }
    
    public menu_handler(id, menu, item)
    {
    	if(item == MENU_EXIT || !g_bActivate || GetAlivePlayersNum(CsTeams:TEAM_CT) < 2 || GetAlivePlayersNum(CsTeams:TEAM_TERRORIST) < 2)
    	{
    		menu_destroy(menu);
    		return PLUGIN_HANDLED;
    	}
    	
    	new szData[6], szName[64];
    	new iaccess, item_callback;
    	
    	menu_item_getinfo(menu, item, iaccess, szData, charsmax(szData), szName, charsmax(szName), item_callback);
    	
    	new userid = str_to_num(szData);
    	new player = find_player("k", userid);
    	
    	if (ze_is_user_zombie(player))
    	{
    		ze_set_user_human(player)
    	}
    	else
    	{
    		ze_set_user_zombie(player)
    	}
    
    	set_task(0.1, "menu_again", id);
    	
    	menu_destroy(menu)
    	return PLUGIN_HANDLED;
    }
    
    public menu_again(id)
    {
    	client_cmd(id, "ze_infec_menu")
    }

User avatar
Donistroy
Member
Member
Morocco
Posts: 10
Joined: 3 Years Ago
Location: Morocco
Has thanked: 0
Been thanked: 2 times
Age: 21
Contact:

#5

Post by Donistroy » 3 Years Ago

Thank You Bro For Your Help ;)

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests