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

Random Map on Server Startup


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
DataMatrix
Senior Member
Join Date: Aug 2005
Location: UK, Liverpool
Old 03-08-2007 , 21:58   Random Map on Server Startup
Reply With Quote #1

Well, I couldn't find one myself, and can't believe there isn't one (I think). So I decided to make one.

Changelog:
* v1.0.0 - Initial Release
* v1.1.0 - Optimised code greatly, and actually fixed it not changing
* v1.1.1 - Fixed again - this time, it WILL work xD
* v1.1.2 - Removed some useless crap...
* v1.2.0 - Implemented some of the changes that Hawk552 suggested (now you can't say I don't listen)
* v1.2.1 - Optimisation suggested by Hawk552
* v1.2.5 - Added a way to turn the script off with sv_randommap <0/1> (0 for off, 1 for on)

Cvars:
sv_randommap <1/0> - Set to 0 to disable the random map or set to 1 to enable it as normal.

To install:
1: Compile
2: Reference in plugins.ini
3: Start the server up (it will load your startup map then calculate a random map from maps.ini or mapcycle.txt and then change the map)

Suggestions? Problems? Let me know (IN HERE PLEASE).

For v1.2.5+ please make sure you have written the cvar sv_randommap in server.cfg or this may not work.
Attached Files
File Type: sma Get Plugin or Get Source (randommap.sma - 903 views - 1.5 KB)
__________________

Last edited by DataMatrix; 10-03-2008 at 13:10.
DataMatrix is offline
Send a message via MSN to DataMatrix
FormulaZero
BANNED
Join Date: Feb 2007
Location: Sector 7G
Old 03-08-2007 , 22:01   Re: Random Map on Server Startup
Reply With Quote #2

Problems:
Bad description
No file
Gaben?
FormulaZero is offline
DataMatrix
Senior Member
Join Date: Aug 2005
Location: UK, Liverpool
Old 03-08-2007 , 22:03   Re: Random Map on Server Startup
Reply With Quote #3

Bad description? Have you even read the title? I think that explains it all.

No file? Are you blind?
DataMatrix is offline
Send a message via MSN to DataMatrix
FormulaZero
BANNED
Join Date: Feb 2007
Location: Sector 7G
Old 03-08-2007 , 22:07   Re: Random Map on Server Startup
Reply With Quote #4

1. You need to add a description and explain and get into more detail.
2. You uploaded the file when I was typing that.
FormulaZero is offline
DataMatrix
Senior Member
Join Date: Aug 2005
Location: UK, Liverpool
Old 03-08-2007 , 22:10   Re: Random Map on Server Startup
Reply With Quote #5

1: No, I don't need to go into detail about a small plugin, it's self explanatory. Or shall I just post every function used just for a description?
2: Actually I deleted the file, and reuploaded it because I found a typo.
DataMatrix is offline
Send a message via MSN to DataMatrix
DataMatrix
Senior Member
Join Date: Aug 2005
Location: UK, Liverpool
Old 03-09-2007 , 01:04   Re: Random Map on Server Startup
Reply With Quote #6

Okay guys, I just realised that the code was messed up so I have fixed it and optimised it.
DataMatrix is offline
Send a message via MSN to DataMatrix
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-09-2007 , 06:39   Re: Random Map on Server Startup
Reply With Quote #7

I've tried too. I think it's a little more efficient & optimize. Feel free to use or not.

Cvars :
  • sv_mapchanged "1"
    // <1|0> : Enable/Disable plugin
  • sv_mapcycle "0"
    // <0|1> Mapcycle choice :
    //
    // "0" : mapcycle.txt
    // "1" : maps.ini

Attached Files
File Type: sma Get Plugin or Get Source (random_map.sma - 986 views - 2.2 KB)
__________________

Last edited by Arkshine; 03-09-2007 at 06:47.
Arkshine is offline
Binary
BANNED
Join Date: Mar 2007
Old 03-09-2007 , 07:11   Re: Random Map on Server Startup
Reply With Quote #8

cool thx!
Binary is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 03-09-2007 , 15:34   Re: Random Map on Server Startup
Reply With Quote #9

DataMatrix obviously won't be able to maintain this. Unapproved.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
DataMatrix
Senior Member
Join Date: Aug 2005
Location: UK, Liverpool
Old 03-09-2007 , 17:00   Re: Random Map on Server Startup
Reply With Quote #10

Quote:
Originally Posted by Hawk552 View Post
DataMatrix obviously won't be able to maintain this. Unapproved.
Uhh... What? Not able to maintain this? What is there to maintain? It's a complete plugin...
DataMatrix is offline
Send a message via MSN to DataMatrix
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 00:42.


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