Raised This Month: $ Target: $400
 0% 

Example of plugin with sub-plugins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
reinert
Veteran Member
Join Date: Feb 2007
Old 04-10-2011 , 11:29   Example of plugin with sub-plugins
Reply With Quote #1

Hey, can anyone share an example with head-plugin, for example, that has a MySql system, where do you identify the ADMIN, and then how to use sub-plugins, where you shouldn't identify ADMIN anymore, you could just use for example: if( iAdmin[id] ) { .. } and add a random functions... Then create more sub-plugins, with extra features. Or maybe there is a tutorial with that ? But I searched and found - nothing useful.

Like :
*ElementsMain.sma // Here will be the main plugin
-->
* FireElement.sma // Here will be everything for Fire element
* WaterElement.sma // Here will be everything for Water element
* WindElement.sma // Here will be everything for Wind element
* EarthElement.sma // Here will be everything for Earth element

Last edited by reinert; 04-10-2011 at 12:09.
reinert is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-10-2011 , 16:24   Re: Example of plugin with sub-plugins
Reply With Quote #2

You can see my JumpStats plugin for an example like that.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
reinert
Veteran Member
Join Date: Feb 2007
Old 04-10-2011 , 18:39   Re: Example of plugin with sub-plugins
Reply With Quote #3

Well it's very hard-coded (it's very hard to understand the big code) ;D. Well I think I get it, it's with .inl includes yeah ? Is it ok, to use multiple events in multiple .inl files for example I've my head plugin head.sma and there I hook round_start, and on my sub plugin numer 1, I make a public event with that round_start and do some shit, and on my sub plugin number 2, I make a public event with that round_start and do some other shit...
reinert is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-10-2011 , 19:35   Re: Example of plugin with sub-plugins
Reply With Quote #4

If you create a forward using CreateMultiForward(), then you can use that forward in more than 1 plugin.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply



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 19:54.


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