plugin-to-plugin communication
to what extent can plugins communicate with one another?
|
xvars, cvars, vault, files, sql, tasks, ...
But to be honest; why do you need interplugin communication? I have made a lot of plugins and almost never really needed that. |
I can see that .. I'm thinking of redoing next map.. and map chooser so they track the last 5 maps.. I would like to share vars between them.
|
you can also call a public function in an another plugin using the callfunc_* natives. Check the amxmodx.inc file for details
|
hmm
Quote:
Quote:
when |
hmm lol the function prototype actually is
Code:
anyways, here is an example: Code:
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. |
Is there anything bad, to use a couple of cvars for communication? Especially slow, limited, etc...?
|
Hrm
What does it mean to "push"?
|
snd info over to that plugin
|
push and pop refer to stacks of data such as an array or list.
Push adds an item to the tail/end of a list. PM's callfunc works by pushing values onto a list of parameters and then calling the actual function once you end it. much like message_begin ... write_x.... message_end |
All times are GMT -4. The time now is 17:17. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.