Forcing a client to download a map
-
- New to forums
- Posts: 4
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Thu Apr 12, 2012 9:03 pm
Forcing a client to download a map
Alright, so I've set up a forceDL file, and custom content like materials/models download flawless, but maps simply will not download for the client and they get disconnected. I've used resource.AddFile("maps/rp_townsend_v2.bsp") in my forceDL file and it STILL does not download, even though the rest of the files do. I have sv_allowdownload and sv_allowupload set to 1 and my net_maxfilesize set to 600. If anyone knows what the problem is, please tell me because I couldn't get this file to download for clients if my life depended on it.
-
- A regular
- Posts: 48
- Joined: Mon Apr 02, 2012 1:10 pm
- Location: Canada, British Columbia
- Contact:
Re: Forcing a client to download a map
I think I have a fix for you.
When using this make sure to make the file called download
Move this file into
garrysmod/garrysmod/lua/autorun/server/
If this does not work please post again.
This is untested btw.
Code: Select all
if SERVER then
AddCSLuaFile( "download.lua" )
resource.AddFile("maps/rp_townsend_v2.bsp")
end
Move this file into
garrysmod/garrysmod/lua/autorun/server/
If this does not work please post again.
This is untested btw.
-
- New to forums
- Posts: 4
- Joined: Thu Apr 12, 2012 9:03 pm
Re: Forcing a client to download a map
This did not work, but thanks for trying to help.
Re: Forcing a client to download a map
The map should automatically go to clients whenever it's loaded, based on the behavior of the base game itself.
Is the game trying to download and having it fail? In the access log for your webhosting, do you see the attempt?
Is the game trying to download and having it fail? In the access log for your webhosting, do you see the attempt?
-
- New to forums
- Posts: 4
- Joined: Thu Apr 12, 2012 9:03 pm
Re: Forcing a client to download a map
I don't have access to the log but when I join in the corner it says the map is downloading for a split second, then it just goes onto the next download without downloading the map.
Re: Forcing a client to download a map
Please have the renter check that log through his "File manager" page for the webhosting, right after connecting and trying to load the map. It could be that the map name needs to be renamed to have a different upper/lowercase combination and the download is failing because of this, for instance.
-
- New to forums
- Posts: 4
- Joined: Thu Apr 12, 2012 9:03 pm
Re: Forcing a client to download a map
Thanks Edge, I renamed the map files and it worked perfectly.
-
- A semi-regular
- Posts: 25
- Joined: Tue Aug 28, 2012 4:33 pm
Re: Forcing a client to download a map
There is a file size limit on gmod downloads. If a file exceeds the limit it's skipped. There's a Convar for it net_maxdownload or something. It's in kb I think. I'd set it to arround 128000
Re: Forcing a client to download a map
The setting you are thinking of is net_maxfilesize and it is in MB. For example, this will allow downloading of files up to 64MB in size: net_maxfilesize 64
TimeX
-
- A semi-regular
- Posts: 25
- Joined: Tue Aug 28, 2012 4:33 pm
Re: Forcing a client to download a map
Thanks for clarification. I think I was thinking of net max packet size from those figures.