View Single Post
Plugin Info:     Modification:          Category:          Approver:   Exolent[jNr] (178)
Hupio
Junior Member
Join Date: Feb 2009
Location: York, UK
Old 02-08-2009 , 14:25   Custom Map URL prompt
Reply With Quote #1

Hi

This is my first effort at a amxx script.

The idea is that the player can type in /getMapUrl and get a url to download the map from. When the next map is a non standard map, this gives the player the opportunity to download and install it before the current level ends, hopefully minimising drop outs due to players not having the map and not wanting to waste time downloading from the game server.

How it works:
When someone types in /getMapUrl, my script:

- gets the name of the next map
- searches through a file called 'custom_maps.cfg' (which needs to be in the configs directory)
if the next map name matches an entry in the custom_maps.cfg, the url is returned


sample lines from custom_maps.cfg
cs_afghanistan http://www.fpsbanana.com/maps/download/1165
de_karachi_v32 http://www.fpsbanana.com/maps/download/1693

I'd be grateful if someone could have a look at this and point out any dumb mistakes or make suggestions for improvements. I have checked to see if someone else's done the same thing but it didn't look like they had.

Cheers
Attached Files
File Type: sma Get Plugin or Get Source (getMapDownloadURL.sma - 1689 views - 3.2 KB)

Last edited by Hupio; 02-21-2009 at 15:54. Reason: changed categories
Hupio is offline