Raised This Month: $ Target: $400
 0% 

Call a plugin from a plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Veggetta
Member
Join Date: Mar 2008
Location: Portugal
Old 07-05-2012 , 18:11   Call a plugin from a plugin
Reply With Quote #1

I'm recoding my plugin.
And i want to use a plugin inside the main plugin.

PHP Code:
/* THIS IS THE MAIN PLUGIN*/

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta>
#include <fakemeta_util>
#include <engine>
#include <xs>
#include <csx>

#define PLUGIN "Random plugin"
#define VERSION "1.0"
#define AUTHOR "*Vegetta*"

new bool:round1[33]
new 
bool:round2[33]
new 
bool:round3[33]
/*...ETC...*/

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
//Now here is where it begin
    
RegisterHam(Ham_Spawn"player""SelectRound"1);
}

public 
SelectRound(id)
{
    
//Here is where it turn off all the sub plugins
    
round1[id]=false;
    
round2[id]=false;
    
round3[id]=false;
    
set_task(1.2"Rounds");
}

public 
Rounds(id)
{
    new 
rand random_num(1,3)
    switch(
rand)
    {
        case 
1:
        {
            
round1[id]=true;
            
//HERE THE 1šPLUGIN
            //NOW call a plugin where i've a code completly built to do something
            
plugin1.amxx // <- I don't know how to call the whole plugin. callfunc_begin it's just for one 'public'
        
}
        case 
2:
        {
            
round2[id]=true;
            
//HERE THE 2ŠPLUGIN
            
plugin2.amxx // <- THE SAME...
        
}
        
// Etc etc
    
}
}

/*I have the plugin built but it's starting to have much bugs because it's everything inside a .amxx. 
So i want to rebuilt it to have more .amxx 
It's faster and more organize*/ 

Last edited by Veggetta; 07-06-2012 at 07:10.
Veggetta 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 15:20.


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