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], access, callback
menu_item_getinfo(menu, item, access, choice, charsmax(choice), name, charsmax(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