I have this from second plugin:
Code:
public shop_item_selected(id,itemid)
{
if(itemid != item_id12) return PLUGIN_HANDLED
give_item(id, "weapon_ak47")
g_HasAk[id] = true
ColorChat(id,GREEN, "[VZBB]^x01 You have bought a^x04 Golden Ak47^x01!")
return PLUGIN_HANDLED
}
Here is my code:
Code:
public MenuHandler( id , menu , item )
{
if( item == MENU_EXIT )
{
return PLUGIN_HANDLED;
}
switch( item )
{
case 1: somelocal(id)
//case 2: givehp(id)
//case 3: respawn(id)
}
return PLUGIN_HANDLED
}
public somelocal(id)
{
if(callfunc_begin("shop_item_selected", "golden_ak.amxx") == 1)
{
callfunc_push_int(id)
callfunc_end()
}
}
I need to give golden ak47 when choose the item from menu