Custom Map URL prompt
1 Attachment(s)
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 |
Re: Custom Map URL prompt
Good job! The only mistakes I saw:
You don't need to include file.inc, it's already included on amxmodx.inc You aren't using multilingual on the client_prints so you have to change this.. client_print(0, print_chat, "[AMXX] %L", LANG_PLAYER, "custom_maps.cfg exists") For this: client_print(0, print_chat, "[AMXX] custom_maps.cfg exists") The same with the others client_prints too.. Suggestion: Use the new file system..I think that is faster Create the file if doesn't exists and write a example on the top of it |
Re: Custom Map URL prompt
Great :D That was quick, thanks for that I'll edit and re upload.
|
Re: Custom Map URL prompt
|
Re: Custom Map URL prompt
It's the LANG_PLAYER things he added, I thought he re-uploaded a fixed version?
Well anyways, remove all LANG_PLAYER and compile and it'll work fine. |
Re: Custom Map URL prompt
tnx )
|
Re: Custom Map URL prompt
1 Attachment(s)
Ok here's the new version 0.0.2 ..
changes: - updated file access to use the newer functions - if the custom_maps.cfg file doesn't exist, it gets created with lines and instructions - removed language stuff |
Re: Custom Map URL prompt
instead of printing the map link in chat, why don't you pop up a motd containing the map download link so players can click and download it?
|
Re: Custom Map URL prompt
Nice idea, how do I format the URL so that it works as a link though?
|
Re: Custom Map URL prompt
OK it's html, I didn't know that.
|
Re: Custom Map URL prompt
1 Attachment(s)
version 0.0.3
changes: - message now shows in motd window |
Re: Custom Map URL prompt
You should update your plugin through the mainpost instead of posting your updates in new posts. Go into advanced edit of your mainpost and reupload the file there so people don't have to crawl through the thread to find your updates.
However, nice idea for the plugin the only thing I recognized is that you have some issues with string lengths. In get_map_downloadurl the declared string size is never used to it's full (both of the strings) and in search_maplist you need to change PHP Code:
PHP Code:
Some things that came up in my mind while looking at your plugin: - In the MOTD it always displays "fpsbanana", maybe you could think of a way to make this more dynamic. - I believe you should use get_pcvar_string for amx_nextmap, use get_cvar_pointer for that. - You should update your version define so it reflects the actual plugin version you advertise - Maybe a cvar for enable/disable? // edit: Does this not require ( and ) ? PHP Code:
|
Re: Custom Map URL prompt
Thanks for spotting those Nextra :)
|
Re: Custom Map URL prompt
Hello,
idk, i think i couldnt understand you.... Example : when the nextmap ist de_asdasd & i write /getmapurl, this map will be downloaded from fpsbnana..... so... on fps banana are all maps in rar/zip files. how will be this unzip/unrar this files? or this will download the maps from my server? how about the fastdownload server? when the maps will downloaded from my server, i have to know from wich serveR? fastdownload server or game server? Nice Idea +k |
Re: Custom Map URL prompt
When a server has a fast download server this plugin would be unnecessary.
|
Re: Custom Map URL prompt
Quote:
ur right.but im thinking about maps bigger as 20 MB.... when this could func with fdl, i would use it.there are many players with bad settings & low connection...imagin i have players on my server with highskill....40ping...but they need around 1.5 min to dl a knife model :-))) the code say me nothing.... |
Re: Custom Map URL prompt
Quote:
When you type /getMapUrl a link to the map's download page (on fpsbanana for instance) shows in a motd window. Downloading and installing the map is beyond my scripting ability in pawn at present. Also, obviously if you have a fast download server there would be no point installing this plugin. The servers that I usually play on aren't that quick to download from, it might take several minutes to download a map like cs_afghanistan. |
Re: Custom Map URL prompt
can you make, that when you type /getmap ,that you download the nextmap from the gameserver? And when it is fastdl then it is fastdl and when not, normal :D
|
Re: Custom Map URL prompt
Quote:
|
Re: Custom Map URL prompt
Quote:
|
Re: Custom Map URL prompt
Quote:
|
Re: Custom Map URL prompt
Quote:
thats what i cant understand.... all maps on fpsbanana are .zip or .rar. how geht this files unrared or unzipped? a map can have more files like tga or .wad or ... how can this paste the right files in right folder? hmmm :-? i cant understand. |
Re: Custom Map URL prompt
Quote:
Quote:
|
Re: Custom Map URL prompt
Quote:
i said nice idea & its a very nice idea, but , imagin when ur playing on my server & nextmap is a custom map & u need to download this, u have to say /bluh & u get the .zip file. however u have to get on desktop, go in game dir. & unzip it, when there are many files like any sounds in ambince... u have to paste this all in the right folder. imagin for a custom map with 1 extra sound, you need min. 1 min.... i think u can download the file from server & have just to wait & dont change the folder or unzip anything...however, nice idea, maybe anyone makes a host that the files arent zipped . |
Re: Custom Map URL prompt
Quote:
|
Re: Custom Map URL prompt
I've got a shortcut to C:\Program Files\Steam\steamapps\*****\counter-strike\cstrike on my desktop.
if you extract all the files into this folder and the map zip file is setup right, all files go into their proper folders without you having to extract them one folder at a time. If you remember to download it and install it when you're not involved in the game (when you got shot for example) then you shouldn't miss out on any playing time when the server starts with the next new map. Having said that, if someone wants to extend what I've done to auto install the map zips then feel free .. |
Re: Custom Map URL prompt
This plugin needs testing. If anyone can report that it does or doesn't work, please post.
If you would like any information regarding possible adjustments you could make or things you could do to make this better, please feel free to post here or PM me. Approval pending on changes. |
Re: Custom Map URL prompt
Hi it works on my standalone server :P I'm hoping to get it tested by a couple of different uk cs servers and I'll ask them to leave feedback.
|
Re: Custom Map URL prompt
Hi
The one person that I know has tried this has told me that it doesn't work. It doesn't create the custom_map.cfg file. His server runs on Linux. I have installed my script successfully twice on two of my own Windows machines with no problems. He's installed other mods and plugins without hassle before. Are there any OS related idiosyncracies or glitches that I should be aware of that would stop the script executing on Linux? |
Re: Custom Map URL prompt
I hadn't heard anything more absurd than that in a while. Each server has a fast download. It's also twice as much waste of time.
|
Re: Custom Map URL prompt
Quote:
It is like saying why you not using USB to a post talking about using floppy disk years ago. |
All times are GMT -4. The time now is 14:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.