Raised This Month: $ Target: $400
 0% 

[Request]Menu Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bat
Veteran Member
Join Date: Jul 2012
Old 12-31-2014 , 08:20   Re: [Request]Menu Help
Reply With Quote #1

Some sh*t
Code:
#include amxmodx
#include fun
#include amxmisc

new coutdownhegrenade[33]

public plugin_init(){
    register_clcmd("say test", "menu")
    register_menu("Menu Grenade", -1, "Gren")
}
public menu(id){
	new sMenu[512], iKeys = MENU_KEY_1
	new iLen = formatex (sMenu, charsmax (sMenu), "\yHe grenade menu^n")
	if(user_has_weapon(id, CSW_HEGRENADE))
	iLen += formatex(sMenu[iLen], charsmax(sMenu)-iLen, "\r1. Already have hegrenade!^n")
	else if(coutdownhegrenade[id] > 1)
	iLen += formatex(sMenu[iLen], charsmax(sMenu)-iLen, "\r1. wait: %d!^n", coutdownhegrenade[id])
	else
	iLen += formatex(sMenu[iLen], charsmax(sMenu)-iLen, "\r1. Get hegrenade!^n")
	show_menu(id, iKeys, sMenu, -1, "Menu Grenade")
}

public Gren(id, key)
{
      switch(key){
	case 0:
	{
            if(user_has_weapon(id, CSW_HEGRENADE)) return 0;
            if(coutdownhegrenade[id] > 1) return 0;

	    give_item(id, "weapon_hegrenade")
		coutdownhegrenade[id] += 120
		cout(id)	
	}
     } return PLUGIN_CONTINUE
}

public cout(id){
    if(coutdownhegrenade[id] < 0)
	{
	    return;
    }
	coutdownhegrenade[id] --
	set_task(1.0, "cout", id)
}
__________________
bat is offline
Send a message via Skype™ to bat
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode