Menu for flag P only

Unpaid Requests, Public Plugins
Post Reply
doicshoot
Member
Member
Posts: 1
Joined: 1 Month Ago
Has thanked: 0
Been thanked: 0
Contact:

Menu for flag P only

#1

Post by doicshoot » 1 Month Ago

Can someone help me with a menu wich u get

250 xp + everymap.
Stealth.
Antidode once a map.

Thanks.

User avatar
lizoumapper
Senior Member
Senior Member
Morocco
Posts: 162
Joined: 1 Year Ago
Location: Morocco
Has thanked: 9 times
Been thanked: 8 times
Age: 17
Contact:

#2

Post by lizoumapper » 1 Month Ago

you want menu like menu vip
ok
This is my blog : http://lizoumappercs.ga
GoldSource Engine :D

User avatar
lizoumapper
Senior Member
Senior Member
Morocco
Posts: 162
Joined: 1 Year Ago
Location: Morocco
Has thanked: 9 times
Been thanked: 8 times
Age: 17
Contact:

#3

Post by lizoumapper » 1 Month Ago

test it

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]
this plugin

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
}	
This is my blog : http://lizoumappercs.ga
GoldSource Engine :D

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest