Raised This Month: $ Target: $400
 0% 

What do i have to do to call another plugin?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
nicolazo103
Veteran Member
Join Date: Jan 2009
Location: I have no fu*** idea
Old 01-01-2010 , 19:43   What do i have to do to call another plugin?
Reply With Quote #1

Hello everyone
Iīm trying to use callfunc, but i have no idea how to use it.
I made this

PHP Code:
new EXTRAHPLUGINS [][] =
{
    
"zp_extra_minigun.amxx",
    
"zp_extra_bazooka.amxx",
    
"zp_zmode_q.amxx",
    
"zp_m4_extra.amxx",
    
"zp_extra_lasermine.amxx"

and then, in the menu handler

PHP Code:
new choice[900], name[32], accesscallback
    
    menu_item_getinfo
(menuitemaccesschoicecharsmax(choice), namecharsmax(name), callback)
    
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
money cs_get_user_money(id)
    
    new 
ichoose str_to_num(choice)
    
//..........
    
if(callfunc_begin("zp_extra_item_selected"EXTRAZPLUGINS[ichoose]) == 1)
    {
        
callfunc_push_int(id)
        
callfunc_end()
    } 
I tested it and it doesnīt work (this part)

zp_extra_item_selected exists in listed plugins. I donīt know what is wrong (well, i think it could be because of callfunc_push_str)

Thanks for watching
Attached Files
File Type: sma Get Plugin or Get Source (zp_addon_buymenusis.sma - 441 views - 12.6 KB)
__________________
Why do they send babies to fight me? -Heavy


Last edited by nicolazo103; 01-01-2010 at 19:46.
nicolazo103 is offline
 



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 04:16.


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