Raised This Month: $ Target: $400
 0% 

Workshop maps support


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
selax
AlliedModders Donor
Join Date: Apr 2008
Location: Moscow
Old 01-31-2016 , 09:13   Workshop maps support
Reply With Quote #1

Hey!
I wan't use only workshop maps, but how to delete workshop prefix?
I wan't delete it in all menu maplists (nominate,mapvote,admin) and in mapvote hint.

I use search, but can't find how to do this.

__________________

Last edited by selax; 01-31-2016 at 09:14.
selax is offline
selax
AlliedModders Donor
Join Date: Apr 2008
Location: Moscow
Old 01-31-2016 , 10:28   Re: Workshop maps support
Reply With Quote #2

Problem fixed.
I rewrite some standart smx files with this include https://raw.githubusercontent.com/po..._functions.inc

Now all seen normally. Thanks all.
__________________
selax is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 01-31-2016 , 10:59   Re: Workshop maps support
Reply With Quote #3

If you're using a fairly recent build, you can probably use FindMap GetMapDisplayName as well (see Powerlord's response)

It's part of the halflife include.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)

Last edited by nosoop; 01-31-2016 at 18:03.
nosoop is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 01-31-2016 , 17:50   Re: Workshop maps support
Reply With Quote #4

Quote:
Originally Posted by nosoop View Post
If you're using a fairly recent build, you can probably use FindMap as well:

Code:
/**
 * Returns whether a full or partial map name is found or can be resolved
 * 
 * @param map             Map name (usually same as map path relative to maps/ dir,
 *                        excluding .bsp extension).
 * @param foundmap        Resolved map name. If the return is FindMap_FuzzyMatch
 *                        or FindMap_NonCanonical the buffer will be the full path.
 * @param maxlen        Maximum length to write to map var.
 * @return                Result of the find operation. Not all result types are supported on all games.
 */
native FindMapResult FindMap(const char[] map, char[] foundmap, int maxlen);
It's part of the halflife include.
You meant GetMapDisplayName, right?

Code:
/**
 * Get the display name of a workshop map.
 * 
 * Note: You do not need to call FindMap first.  This native will call FindMap internally.
 * 
 * @param map 			Map name (usually same as map path relative to maps/ dir,
 *						excluding .bsp extension).
 * @param displayName	Map's display name, i.e. cp_mymapname or de_mymapname.
 *						If FindMap returns FindMap_PossiblyAvailable or FindMap_NotFound,
 *						the map cannot be resolved and this native will return false,
 *						but displayName will be a copy of map.
 * @param maxlen		Maximum length to write to displayName var.
 * @return				true if FindMap returns FindMap_Found, FindMap_FuzzyMatch, or
 * 						FindMap_NonCanonical.
 * 						false if FindMap returns FindMap_PossiblyAvailable or FindMap_NotFound.
 */
native bool GetMapDisplayName(const char[] map, char[] displayName, int maxlen);
Having said that, the SourceMod 1.8 MapChooser and its plugin already use this function, as does a test version of MapChooser Extended.

Ultimate MapChooser's use of KeyValues is mucking things up a bit for a fix there as certain KeyValues commands are not liking / in the map name on CS:GO Linux and TF2 all platforms.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 01-31-2016 at 17:51.
Powerlord is offline
selax
AlliedModders Donor
Join Date: Apr 2008
Location: Moscow
Old 02-02-2016 , 05:49   Re: Workshop maps support
Reply With Quote #5

Thanks for answers!

But i have new problem with workshop maps on my servers. In CS:GO server browser showing only 12 symbols of map. Original map names is deathrun_roadkill and dr_ecliptic_v2.

Some ways for fix this? I have no ideas..
Attached Thumbnails
Click image for larger version

Name:	1.png
Views:	227
Size:	16.4 KB
ID:	151632  
__________________
selax is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 02-02-2016 , 09:21   Re: Workshop maps support
Reply With Quote #6

Quote:
Originally Posted by selax View Post
Thanks for answers!

But i have new problem with workshop maps on my servers. In CS:GO server browser showing only 12 symbols of map. Original map names is deathrun_roadkill and dr_ecliptic_v2.

Some ways for fix this? I have no ideas..
Increase the size the variable you're storing the map name in. We've already done this for the SourceMod 1.8 MapChooser, Nominations, Rock the Vote, etc...
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
selax
AlliedModders Donor
Join Date: Apr 2008
Location: Moscow
Old 02-02-2016 , 13:51   Re: Workshop maps support
Reply With Quote #7

Quote:
Originally Posted by Powerlord View Post
Increase the size the variable you're storing the map name in. We've already done this for the SourceMod 1.8 MapChooser, Nominations, Rock the Vote, etc...
All ingame features - menu, chat, etc all already seen normally.
This problem in server browser on csgo menu.
__________________
selax is offline
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 14:17.


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