Raised This Month: $ Target: $400
 0% 

[SNIPPET] Get Workshop Map Name


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 04-28-2015 , 14:24   Re: [SNIPPET] Get Workshop Map Name
Reply With Quote #1

Quote:
Originally Posted by xCoderx View Post
Am I correct to think this makes maps that look like "workshop/14235453/mapname" look like "mapname" if so, how would I go about adding this to MapChooserExtended so that it displays the clean map name in voting?

Thanks
RemoveMapPath would probably be your best bet. If you use the version in this post (or my previous post), the input string will be copied to the output string if they're the same.

Because it uses strcopy internally, I think it's safe to use the same string as the input and output.

One of my MapChooser Extended branches has this already in place, but I forget what other changes I've made to it.

I also forgot there was a separate thread for this. I've revamped this .inc file a bit since I originally posted it.

Here's a 1.7 API version that should be considerably cleaner than the version in the first post. Note that SubString has completely gone away in this version.
Attached Files
File Type: inc map_workshop_functions.inc (3.9 KB, 373 views)
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 04-28-2015 at 14:27.
Powerlord 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 18:30.


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