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 10-31-2021 , 16:29   Zombie Plague question ?
Reply With Quote #1

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

Last edited by romeo72; 10-31-2021 at 16:54.
romeo72 is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 10-31-2021 , 17:20   Re: Zombie Plague question ?
Reply With Quote #2

Quote:
Originally Posted by romeo72 View Post
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" );

__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.

Last edited by Supremache; 11-01-2021 at 13:13.
Supremache is offline
Old 10-31-2021, 17:44
SHIFT0
This message has been deleted by SHIFT0. Reason: not must
romeo72
Member
Join Date: Oct 2021
Old 10-31-2021 , 17:59   Re: Zombie Plague question ?
Reply With Quote #4

PEEERFECT.... that was exactly what I was looking for!
Thank you very very much for your quick help Supremache !

Best regards
romeo72 is offline
romeo72
Member
Join Date: Oct 2021
Old 11-01-2021 , 00:18   Re: Zombie Plague question ?
Reply With Quote #5

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
romeo72 is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 11-01-2021 , 13:08   Re: Zombie Plague question ?
Reply With Quote #6

Quote:
Originally Posted by romeo72 View Post
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!
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.

Last edited by Supremache; 11-01-2021 at 13:14.
Supremache is offline
romeo72
Member
Join Date: Oct 2021
Old 11-01-2021 , 15:50   Re: Zombie Plague question ?
Reply With Quote #7

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
romeo72 is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 11-01-2021 , 17:42   Re: Zombie Plague question ?
Reply With Quote #8

Quote:
Originally Posted by romeo72 View Post
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" );

__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
romeo72
Member
Join Date: Oct 2021
Old 11-02-2021 , 00:19   Re: Zombie Plague question ?
Reply With Quote #9

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

best regards
romeo72 is offline
ZaX
Senior Member
Join Date: Jan 2015
Old 11-02-2021 , 11:46   Re: Zombie Plague question ?
Reply With Quote #10

If you want to activate specific plugins on specific map, check this
ZaX 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