So we all know the feeling of joining a server for the first time, and having to wait for all the downloads to finish so we can play right? Well I want to cut that down on my server, and I know that a big portion of that is just player models.
So what I want to do is I want the player who are connecting to still get all the addons, EXCEPT for all the playermodels. They can download the playermodels later by choice in game by using a command such as !workshop (code is at the bottom) which will take them to a steam collection and they are able to click subscribe to all. Otherwise, they could just not download the playermodels, otherwise having some players appear as bright red "errors".
I have seen this done on an old server I played on, so I attempted it for myself. I removed all of the playermodels from the workshop collection linked to the startup, and also from addons folder but still however keeping the playermodels in the pointshop, and then deleted all my addons and tried to join the server. I only downloaded the addons that were required and not the playermodels, so far so good. So I went into game, and someone appeared as an error, so i typed !workshop, subscribed, got all the models, then it was fine. HOWEVER, whenever a player with a custom playermodel died, their body would just disappear into thin air, hence you not being able to identify them, hence ruining the game.
From that, I tried to fix it by adding the playermodel folders back into my addons folder, but however now i would just be downloading the playermodels while starting up, so that may have fixed the body disspearing problem, but that did require me to download all the playermodels from the host itself making things even slower. So I next tried to keep only the lua folder of the playermodel folder that would contain the file called "modelname.lua" (example ironman.lua) while deleting the materials and models section of the playermodel folder, this did not require me to download the playermodel at the start, but the body would still dissapear at the end.
For anyone that does know how, could you please guide me on the right path? If this is too long of a process that you do not want to type out, feel free to pm me and ill send you my steam/skype.
Thanks in advance,
dharmvir
function workshopCommand( pl, text, teamonly )
if (text == "!workshop") then
pl:SendLua([[gui.OpenURL("http://steamcommunity.com/sharedfiles/filedetails/?id=366697947")]]) -- Change ADDRESS to your chosen page.
for k, v in pairs(player.GetAll()) do v:ChatPrint( "Player " .. pl:Nick() .. " is looking at OMENS TTT Workshop" )
end
end
end
hook.Add( "PlayerSay", "Chat", workshopCommand )