Raised This Month: $ Target: $400
 0% 

missed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
007asha
Member
Join Date: Mar 2010
Old 10-16-2010 , 11:37   missed
Reply With Quote #1

missed

Last edited by 007asha; 10-18-2016 at 04:49.
007asha is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 10-16-2010 , 11:40   Re: [Req] If player <9 - restart - but only once at 180 min
Reply With Quote #2

wait, does it matter if the map changes? Is it like you're staying on a map forever?
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
Old 10-16-2010, 11:47
007asha
This message has been deleted by 007asha.
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 10-16-2010 , 16:51   Re: [Req] If player <9 - restart - but only once at 180 min
Reply With Quote #3

Try that. Tell me if you have problems.

Code:
#include <amxmodx>

new bool:g_beenRestarted
new timePassed

public plugin_init()
{
    register_plugin( "Auto-Restart", "1.0", "nikhilgupta345" )
    
    set_task( 300.0, "CheckTime", 1, _, _, "b" )
}

public CheckTime()
{
    new time[32]
    get_time( "%H", time, 31 )
    new timeNum = str_to_num( time )
    if( (11 < timeNum < 24) && !g_beenRestarted )
    {
        new players[32], num
        get_players( players, num )
        if( 4 <= num < 16 )
        {
            server_cmd( "amx_map de_dust2" )
            g_beenRestarted = true;
            return;
        }
    }
    
    else
    {
        timePassed += 5;
        if( timePassed == 180 )
        {
            g_beenRestarted = false;
            return;
        }
    }
}
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
Old 10-16-2010, 19:26
007asha
This message has been deleted by 007asha.
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 09:11.


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