SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 15/02/2013, 03:10 PM   #1
Jstylezzz
High-roller
 
Jstylezzz's Avatar
 
Join Date: Sep 2011
Location: Netherlands
Posts: 2,972
Reputation: 1549
Default Maploader

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.
Attached Files
File Type: pwn maploader.pwn (3.9 KB, 55 views)
__________________
West Side Gaming: Roleplay is looking for faction leaders/members!

WSG Discord - WSG Forum - WSG:Roleplay SA-MP Server

Working on a rewrite of the gamemode to a SampSharp version. It's starting to look very promising!

Last edited by Jstylezzz; 20/11/2013 at 09:31 PM.
Jstylezzz is offline   Reply With Quote
Old 15/02/2013, 03:27 PM   #2
Niko_boy
High-roller
 
Niko_boy's Avatar
 
Join Date: Aug 2010
Location: Somewhere i belong
Posts: 1,421
Reputation: 138
Default Re: Maploader

cool release but can we get pastebin link?
__________________
nope[IMG]http://*******/1r0SOkH_[/IMG]
•••[CLOSED]LCS•Freeroam•DM•Stunts•••AutoArena [0.3z][No SkinShot][sixtytiger.com]Want a decent Attack Defend Gamemode?
N/A176.31.229.148:7830Get This! Attack-Defend(v2.3.1)
Niko_boy is offline   Reply With Quote
Old 15/02/2013, 03:29 PM   #3
Jstylezzz
High-roller
 
Jstylezzz's Avatar
 
Join Date: Sep 2011
Location: Netherlands
Posts: 2,972
Reputation: 1549
Default Re: Maploader

Quote:
Originally Posted by Niko_boy View Post
cool release but can we get pastebin link?
Thanks
And, surething, I will upload it to pastebin in a minute.
__________________
West Side Gaming: Roleplay is looking for faction leaders/members!

WSG Discord - WSG Forum - WSG:Roleplay SA-MP Server

Working on a rewrite of the gamemode to a SampSharp version. It's starting to look very promising!
Jstylezzz is offline   Reply With Quote
Old 16/02/2013, 08:13 AM   #4
Yves
High-roller
 
Yves's Avatar
 
Join Date: Feb 2013
Location: Area 51
Posts: 1,629
Reputation: 122
Default Re: Maploader

very good release good work
__________________
Yves is offline   Reply With Quote
Old 16/02/2013, 08:17 AM   #5
CrewMaster
Big Clucker
 
Join Date: Oct 2012
Location: Earth
Posts: 148
Reputation: 12
Default Re: Maploader

Nice .. useful for derby servers ..
__________________
LOOKING FOR A PROFESSIONAL MAPPER
WILL HIRE TOP RANK IN A HOSTED SERVER HAVING HOSTED TAB
CrewMaster is offline   Reply With Quote
Old 17/02/2013, 04:21 PM   #6
Jstylezzz
High-roller
 
Jstylezzz's Avatar
 
Join Date: Sep 2011
Location: Netherlands
Posts: 2,972
Reputation: 1549
Default Re: Maploader

Thanks all
Anyone any suggestions so far?
Jstylezzz is offline   Reply With Quote
Old 17/02/2013, 04:22 PM   #7
Sting.
Gangsta
 
Sting.'s Avatar
 
Join Date: May 2011
Location: Malaysia
Posts: 867
Reputation: 122
Default Re: Maploader

Nice, good script.
Sting. is offline   Reply With Quote
Old 24/04/2013, 08:31 PM   #8
zClaw
Huge Clucker
 
zClaw's Avatar
 
Join Date: Jan 2013
Location: Earth
Posts: 342
Reputation: 12
Default Re: Maploader

EDIT: Wrong section, my bad.
zClaw is offline   Reply With Quote
Old 24/04/2013, 10:18 PM   #9
tboysamp
Huge Clucker
 
tboysamp's Avatar
 
Join Date: Dec 2010
Location: east newark nj
Posts: 203
Reputation: 42
Default Re: Maploader

nice job man
__________________
tboysamp is offline   Reply With Quote
Old 25/04/2013, 12:01 PM   #10
punklord
Gangsta
 
Join Date: Jan 2013
Posts: 678
Reputation: 346
Default Re: Maploader

Very Nice,as always
punklord is offline   Reply With Quote
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



All times are GMT. The time now is 01:33 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.