AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Zombie Plague question ? (https://forums.alliedmods.net/showthread.php?t=334985)

romeo72 10-31-2021 16:29

Zombie Plague question ?
 
Hello, everyone.

I have a question and I hope that you can help me further. is it possible to activate the zombie plague plugin at certain times of the day? for example every day from 7 p.m. to 6 a.m. in the morning.

if so, would that also be possible with other plugins?

Thank you very much !!!

best regards

Supremache 10-31-2021 17:20

Re: Zombie Plague question ?
 
Quote:

Originally Posted by romeo72 (Post 2762150)
Hello, everyone.

I have a question and I hope that you can help me further. is it possible to activate the zombie plague plugin at certain times of the day? for example every day from 7 p.m. to 6 a.m. in the morning.

if so, would that also be possible with other plugins?

Thank you very much !!!

best regards

Yes it's possible try this way:

PHP Code:

#include <amxmodx>
#include <amxmisc>

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


new const StartTime[ ] = "07:00:00" /* Hour : Minute : Secound */
new const StopTime[ ] = "06:00:00"
new const MOD [ ] = "zombieplague.amxx";

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    if( 
ActivateModStopTime ) )
    {
        if( 
pause"cd"MOD ) )
        {
            
log_amx"%s has been stopped!"MOD )
        }
    }
    else if( 
ActivateModStartTime ) )
    {
        if( 
unpause"cd"MOD ) )
        {
            
log_amx"%s has been started!"MOD )
        }
    }
}

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



romeo72 10-31-2021 17:59

Re: Zombie Plague question ?
 
PEEERFECT.... that was exactly what I was looking for!
Thank you very very much for your quick help Supremache !

Best regards

romeo72 11-01-2021 00:18

Re: Zombie Plague question ?
 
hello supremache,

I was just trying to compile the code. unfortunately I get an error message.
can you help me again or tell me why?

Code:

Your plugin failed to compile! Read the errors below:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

/tmp/textA7uJPw.sma(9) : error 017: undefined symbol "plugin_pause"
/tmp/textA7uJPw.sma(11) : error 017: undefined symbol "log_amx"
/tmp/textA7uJPw.sma(16) : error 017: undefined symbol "plugin_unpause"
/tmp/textA7uJPw.sma(18) : error 017: undefined symbol "log_amx"
/tmp/textA7uJPw.sma(25) : error 017: undefined symbol "get_systime"

5 Errors.
Could not locate output file /home/groups/amxmodx/public_html/websc3/textA7uJPw.amx (compile failed).

best regards

Supremache 11-01-2021 13:08

Re: Zombie Plague question ?
 
Quote:

Originally Posted by romeo72 (Post 2762171)
hello supremache,

I was just trying to compile the code. unfortunately I get an error message.
can you help me again or tell me why?

Code:

Your plugin failed to compile! Read the errors below:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

/tmp/textA7uJPw.sma(9) : error 017: undefined symbol "plugin_pause"
/tmp/textA7uJPw.sma(11) : error 017: undefined symbol "log_amx"
/tmp/textA7uJPw.sma(16) : error 017: undefined symbol "plugin_unpause"
/tmp/textA7uJPw.sma(18) : error 017: undefined symbol "log_amx"
/tmp/textA7uJPw.sma(25) : error 017: undefined symbol "get_systime"

5 Errors.
Could not locate output file /home/groups/amxmodx/public_html/websc3/textA7uJPw.amx (compile failed).

best regards

Add include !!
Check!

romeo72 11-01-2021 15:50

Re: Zombie Plague question ?
 
Hello Supremache,

now it worked !! Thank you very very much for the quick help!

I still have one question though. the zombie plague mod consists of an .amxx file that is active from 7 p.m. to 6 a.m.

but if I want to install a deatchmatch mod now, for example
a deathmatch server has several .amxx files:
csdm_equip.amxx
csdm_main.amxx
and so forth...

how can I solve that?
would be very grateful if you could help me again!

best regards

Supremache 11-01-2021 17:42

Re: Zombie Plague question ?
 
Quote:

Originally Posted by romeo72 (Post 2762214)
Hello Supremache,

now it worked !! Thank you very very much for the quick help!

I still have one question though. the zombie plague mod consists of an .amxx file that is active from 7 p.m. to 6 a.m.

but if I want to install a deatchmatch mod now, for example
a deathmatch server has several .amxx files:
csdm_equip.amxx
csdm_main.amxx
and so forth...

how can I solve that?
would be very grateful if you could help me again!

best regards

PHP Code:

#include <amxmodx>
#include <amxmisc>

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


new const StartTime[ ] = "07:00:00" /* Hour : Minute : Secound */
new const StopTime[ ] = "06:00:00"
new const szModFiles[ ][ ] = {
    
"file1.amxx""file2.amxx""file3.amxx""file4.amxx""file5.amxx" 
}

public 
plugin_init() 
{
    
register_pluginPLUGINVERSIONAUTHOR )
    
    for( new 
0charsmaxszModFiles ) ; i++ )
    {
        if( 
ActivateModStopTime ) )
        {
            if( 
pause"cd"szModFiles] ) )
            {
                
log_amx"%s has been stopped!"szModFiles] )
            }
    
        }
        else if( 
ActivateModStartTime ) )
        {
            if( 
unpause"cd"szModFiles] ) )
            {
                
log_amx"%s has been started!"szModFiles] )
            }
        }
    }
}

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



romeo72 11-02-2021 00:19

Re: Zombie Plague question ?
 
hello supremache

PERFECT .... thank you very much !!!
Unfortunately, I still have one last question. does that also work with maps?
So does that also work with maps from 7 p.m. to 6 a.m.?

for example:

PHP Code:

#include <amxmodx>
#include <amxmisc>

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


new const StartTime[ ] = "07:00:00" /* Hour : Minute : Secound */
new const StopTime[ ] = "06:00:00"
new const szModFiles[ ][ ] = {
    
"map de_dust2""map de_nuke" 
}

public 
plugin_init() 
{
    
register_pluginPLUGINVERSIONAUTHOR )
    
    for( new 
0charsmaxszModFiles ) ; i++ )
    {
        if( 
ActivateModStopTime ) )
        {
            if( 
pause"cd"szModFiles] ) )
            {
                
log_amx"%s has been stopped!"szModFiles] )
            }
    
        }
        else if( 
ActivateModStartTime ) )
        {
            if( 
unpause"cd"szModFiles] ) )
            {
                
log_amx"%s has been started!"szModFiles] )
            }
        }
    }
}

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


would be nice if you could help me one last time :oops:

best regards

ZaX 11-02-2021 11:46

Re: Zombie Plague question ?
 
If you want to activate specific plugins on specific map, check this

romeo72 11-02-2021 14:14

Re: Zombie Plague question ?
 
@ZaX,

thank you for your help !! I understood that with the plugins-de_dust.ini so far. but i think that will not solve my problem or my plan.

my thought is. I set the zombie plague so that it runs from 7 p.m. to 6 a.m. I would like that only dust2 is active at this time. no other map voted. and no other map is loaded from the mapcycle after 20 minutes.
the server should then be a standard counter strike server from 6 a.m. to 7 p.m.

That's why I think that I can't get any further with your idea.

I hope you understand what i mean.

sorry for my bad English !

best regards


All times are GMT -4. The time now is 20:45.

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