Raised This Month: $ Target: $400
 0% 

plugin-to-plugin communication


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 03-30-2004 , 12:20  
Reply With Quote #6

hmm lol the function prototype actually is
Code:
native callfunc_begin(const func[], const plugin[]="");
looks like we have messed it up in the include file

anyways, here is an example:
Code:
callfunc_begin("my_function", "theplugin.amx"); callfunc_push_int(4); callfunc_push_str("Hello"); callfunc_push_float(myfloatvalue); new returnValue = callfunc_end();

this will call the public function my_function in the plugin theplugin.amx, the first parameter will be 4, the second parameter will be "Hello", the third parameter will be the value of myfloatvalue variable / constant / whatever. In returnValue, the return value will be stored ;]

callfunc_push_int: push the value of the integer
used with normal parameters
callfunc_push_intrf: push the reference to the variable
used with &prm parameters
callfunc_push_float: push the value of the float
used with Float:prm parameters
callfunc_push_floatrf: push the reference to the float variable
used with &Float:prm parameters
callfunc_push_str: push a string (an array)
used with prm[] / const prm[] parameters

A native like
callfunc(func, plugin, param1, param2, param2);
is not possible / very very hard to implement.
__________________
hello, i am pm
PM 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 21:35.


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