Can someone help me with a menu wich u get
250 xp + everymap.
Stealth.
Antidode once a map.
Thanks.
Menu for flag P only
test it
copy it, and paste in zombie_escape.txt
this plugin
copy it, and paste in zombie_escape.txt
Code: Select all
P_TITLE_MENU = \r[ZE] Menu P
P_EXP = +250 Exp
P_SEALTH = Stealth
P_ANTIDOTE = Antidote \r[1 Round]
Code: Select all
// Escaper Zone
// Escaper Zone
#include <zombie_escape>
#include <ze_levels>
#include <fun>
#define MP_EXP 250
#define STEALTH 150
new bool:iAntidote[33] = true
new bool:iExp[33] = true
public plugin_init()
{
register_plugin("[ZE] Menu Flag P", "0.1", "LiZou Mapper")
register_event("HLTV", "EventNewRound", "a", "1=0", "2=0")
register_clcmd("say /menup", "menu_fp")
register_clcmd("say_team /menup", "menu_fp")
register_clcmd("say /mp", "menu_fp")
register_clcmd("say_team /mp", "menu_fp")
}
public EventNewRound(id)
{
iAntidote[id] = true
}
public menu_fp(id)
{
static Lang[64]
// Create menu and give menu name
formatex(Lang, charsmax(Lang), "%L", LANG_PLAYER, "P_TITLE_MENU")
new menu = menu_create(Lang, "handler_fp")
// item 1: +250 exp
formatex(Lang, charsmax(Lang), "%L", LANG_PLAYER, "P_EXP")
// item 2: stealth
formatex(Lang, charsmax(Lang), "%L", LANG_PLAYER, "P_SEALTH")
// item 3: antidote
formatex(Lang, charsmax(Lang), "%L", LANG_PLAYER, "P_ANTIDOTE")
// set prop menu and display menu
menu_setprop(menu, MPROP_EXIT, "%L", LANG_PLAYER, "EXIT")
menu_display(id, menu, 0)
}
public handler_fp(id, menu, item)
{
switch(item)
{
case 0:
{
// item 1
if(iExp[id])
{
ze_set_user_xp(id, ze_get_user_xp(id) + MP_EXP)
iExp[id] = false
}
}
case 1:
{
// item 2
set_user_health(id, get_user_health(id) + STEALTH)
}
case 2:
{
// item 3
if(iAntidote[id])
{
if(!ze_is_user_zombie(id))
{
ze_set_user_human(id)
iAntidote[id] = false
}
else
{
ze_colored_print(id, "Antidote is once time in round, wait new round !")
}
}
}
}
menu_destroy(menu)
return PLUGIN_HANDLED
}
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