Raised This Month: $ Target: $400
 0% 

show_mapcycle


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Server Management       
DA_PRIEZZZ
Junior Member
Join Date: Dec 2004
Location: Belgium
Old 12-11-2004 , 09:18   show_mapcycle
Reply With Quote #1

Hello,

This is my first amxmod (x) plugin, but it's a modified version of an other... (also my scripting )

This plugin wil show u the mapcycle. If u use $cstrike-dir/mapcycle.txt this plugin is configured! Else u have to change the pad! U find this file 4 times in the plugin-source file:

/mapcycle.txt

U have to change it to your own file! It can be:
/addons/amxmodx/mapcycle.txt
or something like that. U can use regular HTML in the file. If u use the normal mapcycle.txt file, u can't, cause the server will check this file for the maps.

This are the commands to view the mapcycle:

say /mapcycle
say mapcycle
say /viewmapcycle
say viewmapcycle
say maps
say /maps
amx_mapcycle


Good luck with this plugin!

EDIT:
It will put this text in the log-files:

[Show MapCycle]: Someone viewed the mapcycle!

If u wonna delete this, just delete this line:

log_amx("[Show MapCycle]: Someone viewed the mapcycle!")
Attached Files
File Type: sma Get Plugin or Get Source (show_mapcycle.sma - 1438 views - 2.0 KB)
__________________
DA_PRIEZZZ_(be!!!) | S.I.P.

http://www.mizone.be/
DA_PRIEZZZ is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 12-11-2004 , 14:17  
Reply With Quote #2

Don't use constant paths.

A better alternative is to find out the path to the mapcyclefile by checking the cvar with that name.

Code:
new path[128] get_cvar_string("mapcyclefile", path, 127)
Johnny got his gun is offline
TooL
Senior Member
Join Date: May 2004
Location: NC
Old 12-12-2004 , 09:56  
Reply With Quote #3

Where does it display the mapcycle? We have been trying to find an alternative to "listmaps" on our server because typing this in makes you overflow.
__________________
TooL is offline
Send a message via ICQ to TooL Send a message via AIM to TooL Send a message via MSN to TooL Send a message via Yahoo to TooL
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 12-13-2004 , 02:51  
Reply With Quote #4

Apparently in a MOTD window (doh... (well, it's not very clear in the description )), which also makes it impossible for you to overflow. I guess your clients are overflowing because you have too many maps on your server, and Valve still didn't fix this (mega doh).
Johnny got his gun is offline
TooL
Senior Member
Join Date: May 2004
Location: NC
Old 12-14-2004 , 08:49  
Reply With Quote #5

Yes - and we have trimmed back our maps to under 100 and it is still overflowing. Is there a way to disable the listmaps command?
__________________
TooL is offline
Send a message via ICQ to TooL Send a message via AIM to TooL Send a message via MSN to TooL Send a message via Yahoo to TooL
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 12-14-2004 , 09:53  
Reply With Quote #6

Try hooking listmaps like this in plugin_init:

Code:
public plugin_init() {     register_clcmd("listmaps", "hookfn") } // then in hookfn: public hookfn() {     return PLUGIN_HANDLED // or implement another way to list maps }

You could use my AMX Map Handler plugin to list maps, it lists a definable amount of maps each time. Hmm come to think of it, maybe I can make an update to that plugin.

Edit: check out this plugin http://forums.alliedmods.net/showthread.php?p=2910
Johnny got his gun is offline
TooL
Senior Member
Join Date: May 2004
Location: NC
Old 12-14-2004 , 12:16  
Reply With Quote #7

1337!

Thanks JGHG!

da_priezzz - may I use your code in DEAGS mapmanager? I'd like to add it so we can view the maps in a motd window - right now it overflows everyone trying to print to the console.
__________________
TooL is offline
Send a message via ICQ to TooL Send a message via AIM to TooL Send a message via MSN to TooL Send a message via Yahoo to TooL
slmclarengt
Veteran Member
Join Date: Jul 2004
Location: The Cookie Jar... or Pul
Old 12-15-2004 , 01:12  
Reply With Quote #8

rcon maps * is the most efficient way of displaying the maps in the maps folder (not the mapcycle) but who cares about the mapcycle :-D.
__________________
But we don’t beat the Reaper by living longer. We beat the Reaper by living well. -Dr. Randy Pausch, R.I.P.

Come play WC3:FT on BnD Clan Server! You know you want to: Connect to WC3:FT BnD - go ahead click me!
slmclarengt is offline
TooL
Senior Member
Join Date: May 2004
Location: NC
Old 12-15-2004 , 08:44  
Reply With Quote #9

Well that's fine but the average joe doesn't have rcon access
__________________
TooL is offline
Send a message via ICQ to TooL Send a message via AIM to TooL Send a message via MSN to TooL Send a message via Yahoo to TooL
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 12-13-2005 , 10:31  
Reply With Quote #10

Author PM me to have this plugin approved
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
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 07:17.


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