Raised This Month: $ Target: $400
 0% 

Zombie Plague question ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
romeo72
Member
Join Date: Oct 2021
Old 11-07-2021 , 07:01   Re: Zombie Plague question ?
Reply With Quote #1

hello supremache,

i tried again but somehow I unfortunately can't get it to work. I have now tried ZaX proposal and I am satisfied with it now. I have created a plugins-de_dust2.inc with the plugins that are activated or deactivated. I am very satisfied with that now.

Quote:
Specific Plugins
Each map can have a specific plugins.ini file for which it will load on map change. This plugins file will be loaded in addition to the standard plugins.ini file.

The file is to be located at amxmodx/configs/maps/plugins-mapname.ini For example, for de_dust you would create the file amxmodx/configs/maps/plugins-de_dust.ini

In addition, a plugin can be tagged as "disabled" which will prevent this plugin from being loaded. You accomplish this the same way you tag a plugin as debug mode, by entering the word disabled after the plugin name in the file, which will prevent it from being loaded for that map.

For example, if you wanted the map de_dust to disable the plugin ham.amxx and enable the plugin pickle.amxx you would put this in amxmodx/configs/maps/plugins-de_dust.ini:

ham.amxx disabled
pickle.amxx
However, I would like to ask you if you can make it possible that you can write the code in such a way that a forced map change to de_dust2 takes place at 7 p.m. (no matter what kind of map is currently running). and that from 6 o'clock in the morning a forced map change to de_alexandra takes place.
so the whole thing should not end with a time limit on the map.
forced map change.

if you feel like it and have time, I would be very happy about it!
I would be very, very happy and help a lot!
many, many thanks in advance!

best regards

Last edited by romeo72; 11-07-2021 at 07:27.
romeo72 is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 11-07-2021 , 20:47   Re: Zombie Plague question ?
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

enum eSettings {
    
bTime32 ],
    
bMap32 ]
}

new const 
g_szSettings][ eSettings ] =
{
    { 
"07:00:00""de_dust2" },// Disable plugin
    
"06:00:00""de_dust" //Enable plugin
}

new const 
szModFiles[ ][ ] = {  "file1.amxx""file2.amxx""file3.amxx""file4.amxx""file5.amxx" }

public 
plugin_init() 
{
    
register_pluginPLUGINVERSIONAUTHOR )
        
    for( new 
0charsmaxszModFiles ) ; i++ )
    {
        if( 
ActivateModg_szSettings][ bTime ] ) )
        {
            if( 
pause"cd"szModFiles] ) )
            {
                
log_amx"%s has been stopped!"szModFiles] )
                
server_cmd"amx_map %s"g_szSettings][ bMap ] )
                
            }
        
        }
        else if( 
ActivateModg_szSettings][ bTime ] ) )
        {
            if( 
unpause"cd"szModFiles] ) )
            {
                
log_amx"%s has been started!"szModFiles] )
                
server_cmd"amx_map %s"g_szSettings][ bMap ] )
            }
        }
    }
}

bool:ActivateMod( const szDate[ ] )
{
    return 
get_systime( ) >= parse_timeszDate"%H:%M:%S" );

__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache 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 20:45.


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