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.
|
All times are GMT -4. The time now is 20:18. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.