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

Day and night mapcycles?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bizu
Junior Member
Join Date: Feb 2009
Old 02-08-2009 , 16:42   Day and night mapcycles?
Reply With Quote #1

Can some one create this for me? I need day mapcycle and night mapcycle for my zombiemod server
And Server CronTabs don't work at this time
bizu is offline
Tramp
Senior Member
Join Date: Aug 2005
Old 02-08-2009 , 18:40   Re: Day and night mapcycles?
Reply With Quote #2

PHP Code:
#include <sourcemod>

public Plugin:myinfo 
{
    
name "day and night",
    
author "Tramp",
    
description "Day and night mapcycle",
    
version "1.0",
    
url "sourcemod.pl"
}

public 
OnPluginStart()
{
    
MapCycle();
}

public 
OnMapStart()
{    
    
MapCycle();
}

public 
MapCycle()
{

    new 
String:x[4];     
    
FormatTime(x,sizeof(x),"%H",GetTime());
    new 
time;
    
time StringToInt(x);
    
    if ( 
time >= 20 || time <= 12 )
    {
        
//Load night MC between 20 and 12
        
ServerCommand("mapcyclefile nightmapcycle.txt");
        
//PrintToChatAll("We are playing night MC");
    
}
    else
    {
        
//Load day MC
        
ServerCommand("mapcyclefile mapcycle.txt");
        
//PrintToChatAll("We are playing day MC");
    
}
    

__________________
STER-Gaming.pl - The Best Multigaming Club, CS 1.6, CS:S, ET, COD 2 more and more ! Check forum forum.ster-gaming.pl

amxmodx - Polish support about amxx.
Tramp is offline
illbill_rotterdam
Senior Member
Join Date: Sep 2012
Old 11-30-2012 , 04:00   Re: Day and night mapcycles?
Reply With Quote #3

could someone create a smx and sp file for this, or the file i need?
btw i am playing cs:go...

Thanks!
illbill_rotterdam is offline
Sheepdude
SourceMod Donor
Join Date: Aug 2012
Location: Chicago
Old 11-30-2012 , 17:58   Re: Day and night mapcycles?
Reply With Quote #4

Illbill, you can literally just copy the above code, save it to a .sp file, and upload it. Then the web compiler will make the .smx for you. Unless you wanted to do some modifications to it?
__________________
Sheepdude is offline
captaindeterprimary
AlliedModders Donor
Join Date: Sep 2012
Old 12-02-2012 , 11:16   Re: Day and night mapcycles?
Reply With Quote #5

Does this work with tf2, also did you just copy some code from http://forums.alliedmods.net/showthread.php?t=105608 ?
__________________
Last edited by ; Today at 08:20 AM. Reason: Get rid of s
captaindeterprimary is offline
illbill_rotterdam
Senior Member
Join Date: Sep 2012
Old 12-02-2012 , 16:58   Re: Day and night mapcycles?
Reply With Quote #6

I've created the daynight.sp, uploaded on the gameserver's folder, but there has not been created a smx file....Must i name the sp file different? Cause you said that wil be done automaticly by the server.

Last edited by illbill_rotterdam; 12-02-2012 at 16:59.
illbill_rotterdam is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 12-02-2012 , 17:27   Re: Day and night mapcycles?
Reply With Quote #7

I should point out that Ultimate MapChooser has a module for only allowing maps at certain times of day.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Sheepdude
SourceMod Donor
Join Date: Aug 2012
Location: Chicago
Old 12-02-2012 , 17:33   Re: Day and night mapcycles?
Reply With Quote #8

Quote:
Originally Posted by illbill_rotterdam View Post
I've created the daynight.sp, uploaded on the gameserver's folder, but there has not been created a smx file....Must i name the sp file different? Cause you said that wil be done automaticly by the server.
Insert facepalm, and also I meant upload it HERE, as in when you reply to a post, choose Go Advanced, under "Attach Files" you attach the .sp file. Then you will be able to get the compiled .smx. I only suggested because it's a simple way to compile, but I didn't mean to confuse you. Sorry.
__________________
Sheepdude is offline
illbill_rotterdam
Senior Member
Join Date: Sep 2012
Old 12-06-2012 , 11:30   Re: Day and night mapcycles?
Reply With Quote #9

@Sheepdude: You meant like this?

Kind regards!
Attached Files
File Type: sp Get Plugin or Get Source (daynight.sp - 515 views - 850 Bytes)

Last edited by illbill_rotterdam; 12-06-2012 at 11:31.
illbill_rotterdam is offline
Sheepdude
SourceMod Donor
Join Date: Aug 2012
Location: Chicago
Old 12-06-2012 , 11:41   Re: Day and night mapcycles?
Reply With Quote #10

Yes sir. =P
__________________
Sheepdude 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:21.


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