Adding thumnails to GLMVS mapvote (or other mapvote addons)?

I’m using this mapvote addon: GLMVS. Which works great, except for the [thumbnails:

I’ve seen no mention of them in the addmaps.lua or maplibrary.lua

How would I go about adding some thumbnails? Or, if there’s a different mapvote addon that you’re more familiar with, feel free to suggest it (and how I’d add thumbnails, if possible).

From my understanding, you just need to have a .png of the image you want to use named the same as the map, and put it in the maps directory.

Okay, going to try out:

ttt_lttp_kakariko_a4.png in /garrysmod/maps

[editline]11th October 2015[/editline]

Didn’t work.

:snip: nevermind

Bumb-erino.

It tries to search for the map images on the clients computer, but if they exist on the server it will include them and make the client download them upon joining it



for _, info in ipairs( MapList ) do
	if file.Exists( "maps/" ..info.Map.. ".png", "MOD" ) then
		resource.AddFile( "maps/" ..info.Map.. ".png" )
	end
end


This code forces the player to download the image from the server, located in the maps folder like so: “maps/MAPNAME.png”

Of course the images would have to be valid in FastDL as well otherwise your users won’t be able to download them properly

It searches for the image the following places in the users Garry’s Mod installation
download/maps/MAPNAME.png
maps/MAPNAME.png

Typically if FastDL is set up correctly the image will be downloaded to
download/maps/MAPNAME.png

If you do not have FastDL and would just like the images to appear for yourself you can test this by putting the image both in the maps folder on your server, with the same name as the map and as a .png, and the same on your client

Where is this code located? Or, if it’s not already in GLMVS, which file do I add it to?

It’s a serverside file.

lol, which one. I’ve been digging through them.

Meaning it’s serverside code… You need to place it yourself obviously, because the images have NOT been downloading.

B-but, where do I place the code QQ

You were already spoonfed some code, do some work and figure out where serverside could possibly go.

GLMVS already contains the code here for the serverside code and here for the clientside code, the map image is written to a table here then the table is written to the authors function for setting the map data here and here is the actual function

Provided you have the latest version of the addon everything should already work provided you have set up FastDL, etc correctly, there are tons of tutorials on this and I suggest you read up on how FastDL works before asking anymore questions

And to search for functions and code etc, Github is really useful