Hello, I have a gmod server and I'm wonder how do i make it so the server make you download a map only if it switched to it and you don't have the map.
Are you using WorkshopDL? If so,
[code]local maps = {
[ "gm_whatever" ] = "123456",
[ "ttt_whatever" ] = "123456",
}
local map = maps[ game.GetMap() ]
if ( map ) then
resource.AddWorkshop( map )
end[/code]
Run that serverside
[editline]23rd August 2015[/editline]
Also, to make it only download if the client doesn't have the map, so a clientside file.Exists check and network it serverside. I can provide some code when I get home if needed.
[QUOTE=code_gs;48526332]Are you using WorkshopDL? If so,
[code]local maps = {
[ "gm_whatever" ] = "123456",
[ "ttt_whatever" ] = "123456",
}
local map = maps[ game.GetMap() ]
if ( map ) then
resource.AddWorkshop( map )
end[/code]
Run that serverside
[editline]23rd August 2015[/editline]
Also, to make it only download if the client doesn't have the map, so a clientside file.Exists check and network it serverside. I can provide some code when I get home if needed.[/QUOTE]
now where would i put hie code you posted, and can i have that code so they only download it if they need the map to play.
Sorry, you need to Log In to post a reply to this thread.