[FilterScript] Maploader
#1

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
  • 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:

pawn Code:
#define CHANGE_INTERVAL 15*60000
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.

The max fases:

pawn Code:
#define MAX_FASES 3
The MAX_FASES define holds the number of fases the script has. Everytime you add a fase, increase this number.
  • Adding more fases

I can understand if 3 fases are not enough for you. To add fases, do the following.
  1. Increase the MAX_FASES define at the top of the script with the amount of fases you add.
  2. Go to the Changemap(fase); public, and add a case.
  3. Inside the case, add 'Mapping_CreateFase<full number>'. Replace <full number> with the name of the number, like Four, Five or Six.
  4. Go to the mapping.inc, add a forward for the new fase public.
  5. In the mapping.inc, also add the public Mapping_CreateFase<full number>.
  6. Inside the callback in the mapping.inc, add the mapping for the new fase.
  7. Done!
If you have any problems when adding fases, post a reply, and we'll solve it.
Reply


Messages In This Thread
Maploader - by Jstylezzz - 15.02.2013, 14:10
Re: Maploader - by Niko_boy - 15.02.2013, 14:27
Re: Maploader - by Jstylezzz - 15.02.2013, 14:29
Re: Maploader - by Yves - 16.02.2013, 07:13
Re: Maploader - by CrewMaster - 16.02.2013, 07:17
Re: Maploader - by Jstylezzz - 17.02.2013, 15:21
Re: Maploader - by Sting. - 17.02.2013, 15:22
Re: Maploader - by zClaw - 24.04.2013, 19:31
Re: Maploader - by tboysamp - 24.04.2013, 21:18
Re: Maploader - by punklord - 25.04.2013, 11:01
Re: Maploader - by Pottus - 25.04.2013, 16:44
Re: Maploader - by Jstylezzz - 25.04.2013, 16:57
Re: Maploader - by Pottus - 25.04.2013, 17:06
Re: Maploader - by Jstylezzz - 25.04.2013, 17:10
Re: Maploader - by Jstylezzz - 07.05.2013, 15:58
Re: Maploader - by Mark_Samp - 07.05.2013, 16:08
Re: Maploader - by ahmad95 - 07.05.2013, 16:54
Re: Maploader - by [FSaF]Jarno - 13.05.2013, 17:44
Re: Maploader - by Jstylezzz - 13.05.2013, 17:48
Re: Maploader - by iTheScripter - 08.07.2013, 18:04

Forum Jump:


Users browsing this thread: 1 Guest(s)