Raised This Month: $ Target: $400
 0% 

callfunc from another plugin [menu]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
faki
Senior Member
Join Date: Jul 2013
Old 01-05-2014 , 08:17   callfunc from another plugin [menu]
Reply With Quote #1

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
faki is offline
 


Thread Tools
Display Modes

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 10:14.


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