So I'm having a problem on my server, I want when the player chooses the zombie class it only comes into effect after his death as a zombie
I want to let him make his first choice after being infected, but the moment he opens the menu again, his selection will only take effect only when he revives
***CODE BELOW***
Spoiler
// menu class zombie
public show_menu_class_zombie(id)
{
if (!g_zombie[id]) return PLUGIN_HANDLED
// create menu wpn
new menuwpn_title[64]
format(menuwpn_title, 63, "[NST Zombie] %L:", LANG_PLAYER, "ZB3_MENU_CLASSZOMBIE_TITLE")
new mHandleID = menu_create(menuwpn_title, "select_class_zombie")
new class_name[32], class_id[32]
for (new i = 0; i < class_count; i++)
{
ArrayGetString(zombie_name, i, class_name, charsmax(class_name))
formatex(class_id, charsmax(class_name), "%i", i)
menu_additem(mHandleID, class_name, class_id, 0)
}
menu_display(id, mHandleID, 0)
return PLUGIN_HANDLED
}
public select_class_zombie(id, menu, item)
{
if (!g_zombie[id]) return PLUGIN_HANDLED
if (item == MENU_EXIT)
{
menu_destroy(menu)
give_zombiebom(id)