Raised This Month: $114 Target: $400
 28% 

List all maps installed on server v0.16


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   General Purpose        Approver:   devicenull (200)
Downtown1
Veteran Member
Join Date: Mar 2004
Old 07-01-2004 , 18:02   List all maps installed on server v0.16
Reply With Quote #1

Displays all installed maps on the server starting with map #1, intended to replace 'listmaps' but can be used as an extra plugin if the amx_listmaps command is commented out in plugin_init().

Usage:
amx_listmaps [# map to start] [# maps to list at once]
listmaps [# map to start] [# maps to list at once]

Both parameters are optional. If the two are omitted, it will display maps 1-10, if the second is omitted it will display 10 maps.

Suggestions are welcome.
Code:
Some of you may remember OLO's amx_listmaps plugin. I thought it was the best thing since god knows what, and I've been using it ever since he released it. 

Sadly, I was dismayed that nobody had ported it. I tried to simply "port" it myself, but I realized that there was a bug with read_dir() .. it displayed some files more than once! So while I decided to go and whip up a workaround for that, I pretty much rehauled OLO's code as well as adding an option to display more than 10 maps at once.
Attached Files
File Type: sma Get Plugin or Get Source (listmaps.sma - 5732 views - 4.5 KB)
Downtown1 is offline
kingpin
Veteran Member
Join Date: Apr 2004
Location: kpsforum.com
Old 07-01-2004 , 18:07  
Reply With Quote #2

wasnt this done already... lol if not then gj and that also means I'm going crazy....
__________________
kingpin is offline
Send a message via ICQ to kingpin Send a message via AIM to kingpin Send a message via MSN to kingpin Send a message via Yahoo to kingpin Send a message via Skype™ to kingpin
Downtown1
Veteran Member
Join Date: Mar 2004
Old 07-01-2004 , 18:08  
Reply With Quote #3

No, I used search menu and I didn't find anything. Why would I spend time reinventing the wheel?
Downtown1 is offline
kingpin
Veteran Member
Join Date: Apr 2004
Location: kpsforum.com
Old 07-01-2004 , 18:10  
Reply With Quote #4

lol as I said there is a big possibility that im going crazy.
__________________
kingpin is offline
Send a message via ICQ to kingpin Send a message via AIM to kingpin Send a message via MSN to kingpin Send a message via Yahoo to kingpin Send a message via Skype™ to kingpin
Downtown1
Veteran Member
Join Date: Mar 2004
Old 07-01-2004 , 18:14  
Reply With Quote #5

Maybe you are, but until you download it and try it you can't be sure
Downtown1 is offline
kingpin
Veteran Member
Join Date: Apr 2004
Location: kpsforum.com
Old 07-01-2004 , 18:17  
Reply With Quote #6

lol I rarely ever change maps on any of my servers from inside anyways I always have HLSW open so I can see a list and do it but it might be nice as a stock plugin for my customers who are always complaining till I link them to hlsw.net.
__________________
kingpin is offline
Send a message via ICQ to kingpin Send a message via AIM to kingpin Send a message via MSN to kingpin Send a message via Yahoo to kingpin Send a message via Skype™ to kingpin
Downtown1
Veteran Member
Join Date: Mar 2004
Old 07-01-2004 , 18:20  
Reply With Quote #7

This is meant for the players on your server, it's very useful with a map nomination plugin.

You type in "listmaps" and you see all the maps installed, then you see there's a cool map you want to play (i.e. helms_deep) and you start a vote for it.
Downtown1 is offline
kingpin
Veteran Member
Join Date: Apr 2004
Location: kpsforum.com
Old 07-01-2004 , 18:32  
Reply With Quote #8

o0o0o thats not bad atall player level map list... hmm damnit this brings back memories of another plugin like this maybe was on amx... I need a vacation...lol.
__________________
kingpin is offline
Send a message via ICQ to kingpin Send a message via AIM to kingpin Send a message via MSN to kingpin Send a message via Yahoo to kingpin Send a message via Skype™ to kingpin
Downtown1
Veteran Member
Join Date: Mar 2004
Old 07-01-2004 , 18:37  
Reply With Quote #9

That's right kingpin, OLO made a plugin called amx_listmaps for AMX that did the same thing.
Downtown1 is offline
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 07-01-2004 , 20:03  
Reply With Quote #10

http://forums.alliedmods.net/showthread.php?t=2026

I have the read_dir bug in mine though, but mine can also read from a file. I am going to see what you did to get around the bug.

----

I already HAD that workaround in mine, but on a server with 300+ maps it makes it hang for about 1 full miute on server startup because it is filtering through all the dupes caused by read_dir.

I guess this plugin is usefull if you like its output style better than mine/Luds but otherwise this has been done already.
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
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 11:59.


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