Raised This Month: $100 Target: $400
 25% 

Easy Map Rotation 1.025


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management        Approver:   Hawk552 (427)
CubicVirtuoso
Senior Member
Join Date: Sep 2004
Location: Canada
Old 01-17-2007 , 20:38   Easy Map Rotation 1.025
Reply With Quote #1

About

Okey dokie guys. I'm back from a very long 2 year hiatus of plugin making. So... yesterday I posted a request for someone to make me a plugin, no one filled it so I made it myself.

My programming skills in PAWN were a little rusty so I decided I would give it a shot. I apologize if something like this is already made, it was really for my specific server (even though it will work on anything and maybe people will like it) and also for me to polish my pawn skills. If someone already made something like this then I ask not to approve it, but if someone didn't by all means please

So without further adue, I present Easy Map rotation.

Here WAS my dilemma. I host svencoop servers, and if any of you know svencoop has two types of maps... horde and completable. Sometimes horde maps would have a time limit of 0 (meaning they would last til infinity) and some completable maps would have areas where only two players can get past. This really didn't make the map rotation smooth; I once had a map on my server for a full day because no body joined that day so nobody beat the map.

This plugin solves the problem. You can set your mp_timelimit to 0... why would you do this you might ask? Well because there is a new time limit... what I call the interval time. After set interval time the server will ask the players if they wish to continue on this map. If 50 percent or more of the people vote yes the map will stay and then ask on the next interval. If less than 50 percent OR NO ONE votes then it will switch. The key here is no one... so if no one is in your server the map will stay at most interval time.

A couple of commands and cvars which make this plugin unique:

COMMANDS:

amx_easymaprot_usingnextmap <1/0> : This may seem really complicated but its not. Essentially its asking if your using the AMXX nextmap plugin. If you are it won't repeat the next map. If you aren't then it will put the next map when you say next map.

say nextmap : This displays the next map and some information about the plugin.

say timeleft : This displays the timeleft and some information about the plugin

amx_easymaprot <1/0> : Enables/disables the plugin. If the plugin is disabled in the middle of an interval it will pick up where the interval left off when it is re-enabled. Think of this as a sort of pause.

amx_easymaprot_nextmap : will force the server to switch to the nextmap

amx_easymaprot_time : Sets the interval time dynamically. The new interval time will take affect after the current interval is counting down. Essentially it stores the new time in another variable until its ready to be applied.

CVARS:

amx_emr_enable <1/0> : Enable/disable the plugin
amx_emr_time x : Sets the interval time to x default is 15
amx_emr_usingnextmap <1/0> : read above

NOTES:
- You can use the core nextmap plugin if you wish, but make sure you define if you are or not in the cvars or commands
- It's not suggested you use the timeleft plugin since it says x mp_timeleft + whatever my plugin says. However, if you don't use the timeleft plugin you will loose that crazy speak number stuff so if enough people complain I will integrate that into this.
- The interval number must be an integer and is always in mins.

Known Bugs:
- I don't think amx_easymaprot_nextmap works. if anyone can help me find out why that would be awesome
- When you use the cvar to set a specific time you have to change the map directly after. I'm not sure why this happens either Sorry. Example if you set the cvar to 30 in your server.cfg then start your server it will say time left is 15 mins (default) but once the server changes the level it will go to 30.

Updates:
- 1.00 : Initial release.
- 1.01 : Fixes for dead players voting, pcvars, enable toggle
- 1.02 : Reverted 1.01 because it was crashing.
- 1.025 : Fixed check user error, includes dead players voting, pcvars and enable toggle

Any comments/suggestions/hatemail/love/etc feel free to share.

Catch ya on the flip side ganstas

PS. Like always my code is insanely commented and referenced. Good for new scripters to check out.
Attached Files
File Type: sma Get Plugin or Get Source (amx_easymaprot.sma - 1170 views - 12.4 KB)
__________________
Sig Under Construction.

Last edited by CubicVirtuoso; 01-18-2007 at 03:14. Reason: Update
CubicVirtuoso is offline
Send a message via ICQ to CubicVirtuoso Send a message via AIM to CubicVirtuoso Send a message via MSN to CubicVirtuoso Send a message via Yahoo to CubicVirtuoso
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 01-17-2007 , 20:55   Re: Easy Map Rotation
Reply With Quote #2

talked to you on mirc, pointed out some things. sounds good otherwise.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
CubicVirtuoso
Senior Member
Join Date: Sep 2004
Location: Canada
Old 01-17-2007 , 20:59   Re: Easy Map Rotation
Reply With Quote #3

Thanks working on them now. Still pondering about pcvar but I'll figure it out I hope.
__________________
Sig Under Construction.
CubicVirtuoso is offline
Send a message via ICQ to CubicVirtuoso Send a message via AIM to CubicVirtuoso Send a message via MSN to CubicVirtuoso Send a message via Yahoo to CubicVirtuoso
Zenith77
Veteran Member
Join Date: Aug 2005
Old 01-17-2007 , 22:38   Re: Easy Map Rotation
Reply With Quote #4

Welcome back (not even sure if you know me ;) ).
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
CubicVirtuoso
Senior Member
Join Date: Sep 2004
Location: Canada
Old 01-17-2007 , 22:44   Re: Easy Map Rotation 1.01
Reply With Quote #5

Did a quick update on the initial release. Fixes are: Fixes for dead players voting, pcvars, enable toggle

And sorry Zenith77 I don't remember you but thanks for the kind words
__________________
Sig Under Construction.
CubicVirtuoso is offline
Send a message via ICQ to CubicVirtuoso Send a message via AIM to CubicVirtuoso Send a message via MSN to CubicVirtuoso Send a message via Yahoo to CubicVirtuoso
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 01-17-2007 , 22:55   Re: Easy Map Rotation 1.01
Reply With Quote #6

There's a few very small things but nothing really important.

Approved
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
CubicVirtuoso
Senior Member
Join Date: Sep 2004
Location: Canada
Old 01-17-2007 , 23:00   Re: Easy Map Rotation 1.01
Reply With Quote #7

Please share, I would love to hear your input! Thanks hawk btw.
__________________
Sig Under Construction.
CubicVirtuoso is offline
Send a message via ICQ to CubicVirtuoso Send a message via AIM to CubicVirtuoso Send a message via MSN to CubicVirtuoso Send a message via Yahoo to CubicVirtuoso
CubicVirtuoso
Senior Member
Join Date: Sep 2004
Location: Canada
Old 01-17-2007 , 23:12   Re: Easy Map Rotation 1.01
Reply With Quote #8

Had to revert the changes it kept crashing the server :S Back to 1.00
__________________
Sig Under Construction.
CubicVirtuoso is offline
Send a message via ICQ to CubicVirtuoso Send a message via AIM to CubicVirtuoso Send a message via MSN to CubicVirtuoso Send a message via Yahoo to CubicVirtuoso
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 01-18-2007 , 01:22   Re: Easy Map Rotation 1.01
Reply With Quote #9

Moved back to New Submissions until the changes have been fixed.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
CubicVirtuoso
Senior Member
Join Date: Sep 2004
Location: Canada
Old 01-18-2007 , 03:15   Re: Easy Map Rotation 1.025
Reply With Quote #10

There you go EMP`. All fixed. Thanks for unapproving it; I didn't want anyone downloading crap code, but its all good now.
__________________
Sig Under Construction.
CubicVirtuoso is offline
Send a message via ICQ to CubicVirtuoso Send a message via AIM to CubicVirtuoso Send a message via MSN to CubicVirtuoso Send a message via Yahoo to CubicVirtuoso
Reply


Thread Tools
Display Modes

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 17:51.


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