I got the menu part to work but could someone tell me how or if its possible to make the person using the menu SAY in regular chat, something as a result of his option? Do need to predefine something or just put the command in..
Code:
/* AMX Mod script.
*
* (c) 2007, bigdickboy
* This file is provided as is (no warranties).
*
* Generated by AMX MenuMaker v1.5 (http://sniperbeamer.amxmod.info)
*/
#include <amxmod>
#include <amxmisc>
new bool:cstrik_running
public plugin_init()
{
register_plugin("Menu","1.0","bigdickboy")
register_menucmd(register_menuid("Shop"),1023,"actionMenu")
register_clcmd("shop","showMenu",0)
new modName[32]
get_modname(modName,31)
cstrik_running = equal(modName,"cstrike") ? true : false
}
public actionMenu(id,key)
{
switch(key){
case 0:{
"say /frostnade"
}
case 1:{
"say molotov"
}
}
return PLUGIN_HANDLED
}
public showMenu(id,level,cid)
{
if (!cmd_access(id,level,cid,1)) return PLUGIN_HANDLED
new menuBody[512]
new len = format(menuBody,511,cstrik_running ? "\yShop\R^n^n\w" : "Shop^n^n")
len += format(menuBody[len],511-len,"1. Frost Grenade 600$^n2. Molotov Cocktail 400$^n^n0. Exit")
show_menu(id,((1<<0)|(1<<1)|(1<<9)),menuBody)
return PLUGIN_HANDLED
}