Quote:
Originally Posted by Nyuszy
2 - Make a .inc file
|
False, you just cannot achieve anything with an include file.
Quote:
Originally Posted by Hunter-Digital
There are various possibilities:
- includes to share various constants on compile
- natives, usefull for making functions that can be called from sub-plugins (requires a include file)
- forwards, usefull if you want to hook something from the main plugin (I think it requries includes, see tutorials to be sure)
- xvars to share variables to other plugins like pcvars, only that you set the variable in the main plugin rather than using functions, this method is fast and I think it doesn't require includes.
- callfunc_* functions to call a function from a plugin, doesn't require a include or anything but I think it's pretty slow.
And ofc server cvars and commands, but those aren't really internal.
I belive you can change/remove tasks from another plugin, didn't really try it but there's a "outside" variable in change_task(), task_exists() and remove_task().
There are tutorials for all these methods.
If you have somehing specific you want to make, please do tell so we can help you pick the most efficient methods.
|
It seems that you do not understand the concept of including a file. It just adds source code what you could write yourself, so it simply does not make any sense that something would require include file and something would not. For example using xvars you can use includes or declare the natives yourself, just how you will.
It also does not make any sense to use natives to make plugins func together, there is already natives for variables and function calls between plugins, why would you write the natives again? You would write new natives only if you needed something you could not achieve in the plugin environment.
In the end it is much easier to add the plugins to the same source code if there is a lot of common work to be done. In the other hand if the plugins are really separate and function something different forwards, functions and variables can indeed be used from and between separate plugins. ( By saying 'can be' I mean that there is available modules done already )