15.02.2013, 14:10
(
Last edited by Jstylezzz; 20/11/2013 at 08:31 PM.
)
Maploader
- What is 'Maploader'?
Maploader is a small and very basic filterscript, that allows you to use multiple maps in a session (without restarting the server to change the maps).
It allows you to add unlimited maps, and set your own switch time.
When a switch is initiated, the old map is removed, and a random map (fase) is loaded.
The idea was that it would be usefull on small servers with CoD/BF like maps and minigames.
The script has only one command, for RCON admins. /changenow, which will force the map change.
I know it's basic, so if you have any suggestions, tell me, and I will try to put that into the next update.
Version 1.0b and 1.1 do NOT come with any mapping, I might add maps in the future if people want that.
The Maploader is an idea from zClaw, credits to him for the idea!
- Commands
/changenow - this will initiate the map switch process (with a 10 second player warn delay).
- Requirements
- Zcmd - Credits to Zeex - Original thread (for download, use the solidfiles link, the other ones don't work).
- Incognito's Streamer plugin - Credits to Incognito - Original thread
- Slice's Timer Fix - Credits to Slice - Original thread
- Mapping.inc - More information below
- Known bugs
- None yet, please post bugs if you find some!
- Installation
After you've compiled the maploader.pwn, place the .amx file in your filterscripts folder, and add 'maploader' to your filterscripts line in your server.cfg .
Maploader will read from and write to a file located in your scriptfiles directory, so make sure your scriptfiles folder writable!
In the source, you will find some comments which explain how to add new mapping or change the switchtime.
- Changelog
Code:
[5/7/13] - Updated topic with new layout and documentation [5/7/13] - Version 1.1 released Optimized code New map loading system Timers fixed [15/02/2013] - Version 1.0b released
- Next update
- No updates/new features planned
- Download
- Full V1.1 archive - Jstylezzz.com
- V1.1 - Pastebin
- mapping.inc - Pastebin
- V1.1 - .pwn in the attachment
- V1.0b - Pastebin
- Last note
This is my first public release, so maybe some of you think it sucks, that's ok, please tell me that, and tell me what I can do better in the future!
Documentation
- Adding new mappings
Adding new mappings is easier than you might think! First, open up the mapping.inc, go to the fase you want the mapping to be in, and paste it there. Now, save the include, and recompile the script. Easy as that! If you have any problems with adding maps, post a reply and ask for help, I'll do my best to help you.
- Configurables
The following things are there for you to configure to your needs.
The change interval:
The change interval holds the value of the switch timer. Change the number before the *60000 to the time in minutes you want between the switch times.pawn Code:#define CHANGE_INTERVAL 15*60000
The max fases:
The MAX_FASES define holds the number of fases the script has. Everytime you add a fase, increase this number.pawn Code:#define MAX_FASES 3
- Adding more fases
I can understand if 3 fases are not enough for you. To add fases, do the following.
If you have any problems when adding fases, post a reply, and we'll solve it.
- Increase the MAX_FASES define at the top of the script with the amount of fases you add.
- Go to the Changemap(fase); public, and add a case.
- Inside the case, add 'Mapping_CreateFase<full number>'. Replace <full number> with the name of the number, like Four, Five or Six.
- Go to the mapping.inc, add a forward for the new fase public.
- In the mapping.inc, also add the public Mapping_CreateFase<full number>.
- Inside the callback in the mapping.inc, add the mapping for the new fase.
- Done!