Raised This Month: $51 Target: $400
 12% 

only dust2 at night


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
smixi
Junior Member
Join Date: Aug 2016
Old 11-18-2016 , 06:37   only dust2 at night
Reply With Quote #1

hi guys
i done some research before posting here
how set server only dust2 map at night (like from 00:00 to 08:00)
i use mapcycle
thank u in advanced
smixi is offline
shehzad1234
BANNED
Join Date: Jan 2016
Location: https://t.me/pump_upp
Old 11-18-2016 , 07:04   Re: only dust2 at night
Reply With Quote #2

Hey! i dont know this is right plugin but check this

MapTime
shehzad1234 is offline
Send a message via ICQ to shehzad1234 Send a message via AIM to shehzad1234 Send a message via Yahoo to shehzad1234
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 11-18-2016 , 07:32   Re: only dust2 at night
Reply With Quote #3

THIS PLUGIN WILL NOT WORK!

This is a part i made which i think could work if someone could just fill in that if check...

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Set NightMap"
#define VERSION "1.0"
#define AUTHOR "NapoleoN#"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    new 
iTime[10], mapName[20]
    
get_time("%H:%M:%S"iTimecharsmax(iTime))
    
get_mapname(mapNamecharsmax(mapName))
    
    
    if() { 
// Check if time = between 00:00:00 & 08:00:00
        
log_amx("[AMXX] Only de_dust2 allowed between 00:00:00 & 08:00:00")
        
        if(
equali(mapName"de_dust2") != 1) {
            
log_amx("[AMXX] Map already de_dust2, changing mp_timelimit to 0.")
            
server_cmd("mp_timelimit 0")
        }
        else {
            
log_amx("[AMXX] Other map detected, changing map to de_dust2.")
            
server_cmd("changelevel de_dust2")
        }
    }
    else {
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_HANDLED

__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 11-20-2016 , 15:56   Re: only dust2 at night
Reply With Quote #4

Well, napoleon had made it for u, else alternative way is
Install Task Schedular By Justin Homi (Plugin)

And Add These Lines In amxx.cfg

amx_task "00:00" "amx_map de_dust2" "tr"
amx_task "00:01" "amx_addrounds 500" "tr"
amx_task "08:00" "amx_map de_inferno" "tr"

If You Are Using TimeLimit
amx_task "00:01" "amx_cvar mp_timelimit 0" "tr"

Make Sure, You Know, Difference Between Your Server Timings And Your Country Timings, Or Ask Your Hosting About Your Server Timings, And Set Timings According To It ..!!

Last edited by Alber9091; 11-20-2016 at 16:03.
Alber9091 is offline
devilicioux
Veteran Member
Join Date: Jun 2013
Location: Delhi,India
Old 11-28-2016 , 08:03   Re: only dust2 at night
Reply With Quote #5

Rather adding another plugin.. should we be modifying the default amxx files to stop the command from work and just setting d2 at night. Adding a separate plugin will still allow admin to change map using amxmodmenu though it will be reverted back to d2 by external plugin.. Rather just hook the actual amx_map or changelevel command and stop it there itself.
No one likes map reloading.
__________________
You keep bringing ANTICHRISTUS down .. He will rise again and kick asses !

#RespectList ANTICHRISTUS fysiks Bugsy

Most Common Errors You Can Encounter Every Now and Then

Last edited by devilicioux; 11-28-2016 at 08:04. Reason: spell
devilicioux 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 07:28.


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