ULX

Author Topic: [SOLVED] FastDL for an addon  (Read 16368 times)

0 Members and 1 Guest are viewing this topic.

Offline emilhem

  • Newbie
  • *
  • Posts: 21
  • Karma: 3
[SOLVED] FastDL for an addon
« on: December 29, 2012, 01:25:27 PM »
So I've been trying for sometime to make FastDL work.

This is what works:
  • The Garry's Mod server.
  • The FastDL content server.
  • Automatic BZipping.

This is what's not working:
  • The files that I want the clients to download to download...

So I basically made an addon that doesn't do anything but should send an audiofile to the client.

The addon have a lua file in garrysmod/addons/test/lua/autorun/test.lua that have this content:
Code: [Select]
if SERVER then
AddCSLuaFile("autorun/test.lua")
end
resource.AddFile("sound/file_test.mp3")

The audiofile is in garrysmod/addons/sound/file_test.mp3

Anyone got a solution for my problem?

EDIT:

I found a solution myself.

File attached is a addon that does nothing but downloads a sound file to the client.

Helpful links:
http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index5809.html
http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexf8be.html
« Last Edit: December 30, 2012, 10:41:03 AM by emilhem »

Offline nathan736

  • Full Member
  • ***
  • Posts: 143
  • Karma: 4
Re: FastDL for an addon
« Reply #1 on: December 29, 2012, 02:29:56 PM »
gmod cant send  addon files to the client sorry you must move the files from the servers addon folder to the actual sound dir for it to function correctly  as adding any resource files  refers to sound model gamemode meteral or map  you cant  make clients download any addons as far as i know using fast dl
edit this is the solution that is easyer to read
Emilhem, what Nathan is trying to say but even I might misunderstand if I wasn't already educated as to the ways of addons folders being 'virtual' is highlighted in bold in our FAQ.
http://forums.ulyssesmod.net/index.php/topic,3072.0.html

Though the FAQ specifically mentions ULX's way of force downloads....the 'path' setup of lua addresource or our download.txt file is no different.
You just can't place 'addon' in the path and have it work.
Addon is a virtual path.
When nathan states unpack, it means you'd need to take
/addons/myaddon/sound/blah
/addons/myaddon/model/blah
from your game server and place
/sound/blah
/model/blah
on your FastDL server.
« Last Edit: December 29, 2012, 04:44:10 PM by nathan736 »
a person asked me how to code lua and i said this " its like building a rocket up side down then  realizing you did it all wrong."

Offline emilhem

  • Newbie
  • *
  • Posts: 21
  • Karma: 3
Re: FastDL for an addon
« Reply #2 on: December 29, 2012, 02:50:31 PM »
I don't think you read my topic. The title is misleading a bit maybe.

I just want the client to be able to download files such as sounds, models, materials, etc from a server addon. IE gamecontent for that addon.

Offline nathan736

  • Full Member
  • ***
  • Posts: 143
  • Karma: 4
Re: FastDL for an addon
« Reply #3 on: December 29, 2012, 03:26:20 PM »
you would need to unpack the addon and move the  files onto the server for them to be added to the download correctly i read it fine  i think i was misunderstood
YOU CAN NOT ADD any files in the ADDON FOLDER useing  server to client download as far as i know or have ever bothered testing unless garry changed it
 Ps: why would you do it anyways
« Last Edit: December 29, 2012, 03:28:41 PM by nathan736 »
a person asked me how to code lua and i said this " its like building a rocket up side down then  realizing you did it all wrong."

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: FastDL for an addon
« Reply #4 on: December 29, 2012, 04:37:45 PM »
Emilhem, what Nathan is trying to say but even I might misunderstand if I wasn't already educated as to the ways of addons folders being 'virtual' is highlighted in bold in our FAQ.
http://forums.ulyssesmod.net/index.php/topic,3072.0.html

Though the FAQ specifically mentions ULX's way of force downloads....the 'path' setup of lua addresource or our download.txt file is no different.
You just can't place 'addon' in the path and have it work.
Addon is a virtual path.
When nathan states unpack, it means you'd need to take
/addons/myaddon/sound/blah
/addons/myaddon/model/blah
from your game server and place
/sound/blah
/model/blah
on your FastDL server.
« Last Edit: December 29, 2012, 04:39:54 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline emilhem

  • Newbie
  • *
  • Posts: 21
  • Karma: 3
Re: FastDL for an addon
« Reply #5 on: December 30, 2012, 02:21:41 AM »
I've done that already...

The fastdl already works for the addons that have it built in. Like some wiremod stuff. I want to make this one weaponpack's models (it's not a .GMA file! It's a legacy addon.) get sent to the client when he joins.

My fastdl link: http://gangnamstylegaming.com/fastdl/

Ps: why would you do it anyways
Because people doesn't want to run around with errors as weapons.  ::)

Offline nathan736

  • Full Member
  • ***
  • Posts: 143
  • Karma: 4
Re: FastDL for an addon
« Reply #6 on: December 30, 2012, 08:12:16 AM »
emilhem you are going to need to do the following
1) shift all models and what not that  the addon uses to the normal dir
2)add resource files so fast dl will work
3) tell me when you got this all done

Ps: legacy addons are not much different from normal things you would add to a server

Pss: wire mod works in the addon folder because its assuming the users must have it for it to work.
« Last Edit: December 30, 2012, 08:14:00 AM by nathan736 »
a person asked me how to code lua and i said this " its like building a rocket up side down then  realizing you did it all wrong."

Offline emilhem

  • Newbie
  • *
  • Posts: 21
  • Karma: 3
Re: FastDL for an addon
« Reply #7 on: December 30, 2012, 10:35:12 AM »
This is what I did:
I added resource.AddFile( [filenamehere] ) for every single file I wanted to add. (Helpful link: http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexf8be.html)
The files such as model files, sound files, etc were already fixed on the fastdl server.

Now everything is working.

Updated topic title to solved.