Raised This Month: $ Target: $400
 0% 

Teoretical Help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 06-20-2011 , 16:58   Re: Teoretical Help
Reply With Quote #4

Quote:
Originally Posted by Nyuszy View Post
2 - Make a .inc file
False, you just cannot achieve anything with an include file.

Quote:
Originally Posted by Hunter-Digital View Post
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 )

Last edited by SnoW; 06-20-2011 at 17:07.
SnoW is offline
Send a message via MSN to SnoW
 



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 23:35.


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