Admin Menu [ Make Human & Zombie ]
Admin Menu [ Make Human & Zombie ]
hello , does anyone can make a plugin for zombie escape that can make zombies & humans with a menu ( Like zombie Plague ) ? .
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..
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..
He who fails to plan is planning to fail
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 .
Ok, I make it it's Infection Menu. This will allow admin with the specific flag in the plugin to convert:
Write in the console: ze_infec_menu and the menu will appear to you.
Code:
- Zombie --> Human
- Human --> Zombie
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") }
He who fails to plan is planning to fail
Thank You Bro For Your Help
Raheem wrote: ↑6 years ago Ok, I make it it's Infection Menu. This will allow admin with the specific flag in the plugin to convert: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.
- Zombie --> Human
- Human --> Zombie
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") }
Code: Select all
register_plugin("[ZE] Infection Menu", "1.0", "Raheem")
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
Sign in
Who is online
Users browsing this forum: No registered users and 2 guests