I might get dumb-rated on this but I don't think you need the if (SERVER) just have resource.AddFile
[QUOTE=addemod;39518734]I might get dumb-rated on this but I don't think you need the if (SERVER) just have resource.AddFile[/QUOTE]
Ok i will try that.
[editline]8th February 2013[/editline]
Didnt work.
There's still no need to do the if server check since you placed it in autorun/server
[QUOTE=LewisUK;39518924]Ok i will try that.
[editline]8th February 2013[/editline]
Didnt work.[/QUOTE]
What exactly doesn't work?
Do you get an error in console, or does it just not download?
Remove the () around it, it should look like this:
[LUA]
if Server then
resource.AddFile("Things you want")
end
[/LUA]
And for everyone that was wondering when you put "if server then" it is saying if its a server then do such n' such command, so in turn it will always do that it will run anything below it.
[QUOTE=addemod;39519425]What exactly doesn't work?
Do you get an error in console, or does it just not download?[/QUOTE]
Doesnt download
[QUOTE=TryHardCoder;39519489]Remove the () around it, it should look like this:
[LUA]
if Server then
resource.AddFile("Things you want")
end
[/LUA]
And for everyone that was wondering when you put "if server then" it is saying if its a server then do such n' such command, so in turn it will always do that it will run anything below it.[/QUOTE]
No. There's no reason to make the serverside check when you place it in autorun/server as he did. And the surrounding () doesn't make a difference.
[QUOTE=LewisUK;39519526]Doesnt download[/QUOTE]
Backup that one so you don't have to retype.
Then remove everything inside.
And now add:
resource.AddSingleFile("Blabla")
Try put just a model in there and see if it downloads.
[QUOTE=ms333;39519594]No. There's no reason to make the serverside check when you place it in autorun/server as he did. And the surrounding () doesn't make a difference.[/QUOTE]
Yeah it does has he tried it yet and i think the server is in all caps my bad heres an example from one of the servers in coding for, this is for the gold deagle
[LUA]
if SERVER then
AddCSLuaFile( "shared.lua" )
resource.AddFile("models/weapons/v_pist_geagle.dx80.vtx")
resource.AddFile("models/weapons/v_pist_geagle.dx90.vtx")
resource.AddFile("models/weapons/v_pist_geagle.mdl")
resource.AddFile("models/weapons/v_pist_geagle.sw.vtx")
resource.AddFile("models/weapons/v_pist_geagle.vvd")
resource.AddFile("models/weapons/w_pist_geagle.phy")
resource.AddFile("models/weapons/w_pist_geagle.dx80.vtx")
resource.AddFile("models/weapons/w_pist_geagle.dx90.vtx")
resource.AddFile("models/weapons/w_pist_geagle.mdl")
resource.AddFile("models/weapons/w_pist_geagle.sw.vtx")
resource.AddFile("models/weapons/w_pist_geagle.vvd")
resource.AddFile("materials/models/weapons/v_models/Havoc Deagle/bullet.vmt")
resource.AddFile("materials/models/weapons/v_models/Havoc Deagle/bullet.vtf")
resource.AddFile("materials/models/weapons/v_models/Havoc Deagle/Golden 2 toned norm.vtf")
resource.AddFile("materials/models/weapons/v_models/Havoc Deagle/Golden 2 toned.vtf")
resource.AddFile("materials/models/weapons/v_models/Havoc Deagle/grip.vmt")
resource.AddFile("materials/models/weapons/v_models/Havoc Deagle/grip.vtf")
resource.AddFile("materials/models/weapons/v_models/Havoc Deagle/grip_normal.vtf")
resource.AddFile("materials/models/weapons/v_models/Havoc Deagle/main.vmt")
resource.AddFile("materials/models/weapons/w_models/Havoc Deagle/bullet.vmt")
resource.AddFile("materials/models/weapons/v_models/Havoc Deagle/grip.vmt")
resource.AddFile("materials/models/weapons/v_models/Havoc Deagle/main.vmt")
end
[/LUA]
Simple as that
[QUOTE=TryHardCoder;39519668]Yeah it does has he tried it yet and i think the server is in all caps my bad heres an example from one of the servers in coding for, this is for the gold deagle
[/QUOTE]
Don't be stupid. The check makes sure it's only being ran serverside. When you put scripts in lua/autorun/server it's only being ran serverside. If you put it in lua/autorun you can make the check...
[QUOTE=ms333;39519700]Don't be stupid. The check makes sure it's only being ran serverside. When you put scripts in lua/autorun/server it's only being ran serverside. If you put it in lua/autorun you can make the check...[/QUOTE]
Really I didn't think it made a difference but you may be right
Has the owner of this thread this yet?
[QUOTE=addemod;39519603]Backup that one so you don't have to retype.
Then remove everything inside.
And now add:
resource.AddSingleFile("Blabla")
Try put just a model in there and see if it downloads.[/QUOTE]
Nope. Doesnt download
[QUOTE=TryHardCoder;39519792]
Has the owner of this thread this yet?[/QUOTE]
[QUOTE=LewisUK;39518453]
/orangebox/garrysmod/lua/autorun/server/fastdl.lua is my server filepath
[/QUOTE]
[QUOTE=LewisUK;39519829]Nope. Doesnt download[/QUOTE]
I meant removing the () I just want to see if it works or not
[QUOTE=TryHardCoder;39519914]I meant removing the () I just want to see if it works or not[/QUOTE]
No it doesnt.
[QUOTE=LewisUK;39519991]No it doesnt.[/QUOTE]
ok
[editline]8th February 2013[/editline]
Actually why do you have the spaces between the resouce.AddFile and the (material/watever)
I think there shouldnt be a space in there
[QUOTE=TryHardCoder;39520017]ok
[editline]8th February 2013[/editline]
Actually why do you have the spaces between the resouce.AddFile and the (material/watever)
I think there shouldnt be a space in there[/QUOTE]
It works and downloads the model (But it still shows an error ingame) Until i add it to the fastdl URL, which makes it not an error, but no one now downloads it.
What's your downloadurl being set to? If it doesn't have "http://" in front, it might not work. That was the case with my fastdl problems?
[QUOTE=LewisUK;39520207]It works and downloads the model (But it still shows an error ingame) Until i add it to the fastdl URL, which makes it not an error, but no one now downloads it.[/QUOTE]
Okey, good.
Now do as TryHardCoder did with adding all files but with resource.AddSingleFile("") and with you models or whatevet you want
[QUOTE=Aaron113;39520280]What's your downloadurl being set to? If it doesn't have "http://" in front, it might not work. That was the case with my fastdl problems?[/QUOTE]
It has the http://
[editline]8th February 2013[/editline]
[QUOTE=addemod;39520311]Okey, good.
Now do as TryHardCoder did with adding all files but with resource.AddSingleFile("") and with you models or whatevet you want[/QUOTE]
The thing is, when i use that it works but the model is still an error.
[QUOTE=LewisUK;39520207]It works and downloads the model (But it still shows an error ingame) Until i add it to the fastdl URL, which makes it not an error, but no one now downloads it.[/QUOTE]
So wait did u do this?
[LUA]
if (SERVER) then
resource.AddFile("models/fluttershy_npc.mdl")
resource.AddFile("models/fluttershy_player.mdl")
resource.AddFile("models/player/fc_jack.mdl")
resource.AddFile("materials/models/player/hero/Estuche.vmt")
resource.AddFile("materials/models/player/hero/Estuche.vtf")
resource.AddFile("materials/models/player/hero/hero_hair.vmt")
resource.AddFile("materials/models/player/hero/hero_hair.vtf")
resource.AddFile("materials/models/player/hero/hero_hair_nor.vtf")
resource.AddFile("materials/models/player/hero/s_herobody2.vmt")
resource.AddFile("materials/models/player/hero/s_herobody2.vtf")
resource.AddFile("materials/models/player/hero/s_herobody2_nor.vtf")
resource.AddFile("materials/models/player/hero/s_hero_tornsleev.vmt")
resource.AddFile("materials/models/player/hero/s_hero_tornsleev.vtf")
resource.AddFile("materials/models/player/hero/s_hero_tornsleev_nor.vtf")
resource.AddFile("materials/models/player/hero/s_JC_head.vmt")
resource.AddFile("materials/models/player/hero/s_JC_head.vtf")
resource.AddFile("materials/models/player/hero/s_JC_head_nor.vtf")
resource.AddFile("materials/models/player/hero/s_mscoutlegl.vmt")
resource.AddFile("materials/models/player/hero/s_mscoutlegl.vtf")
resource.AddFile("materials/models/player/hero/s_mscoutlegl_nor.vtf")
resource.AddFile("models/player/danboard.mdl")
resource.AddFile("materials/models/player/danboard_head_sheet.vtf")
resource.AddFile("materials/models/player/danboard_head_sheet.vmt")
resource.AddFile("materials/models/player/danboard_body_sheet.vtf")
resource.AddFile("materials/models/player/danboard_body_sheet.vmt")
resource.AddFile("materials/models/player/danboard_arm_leg_sheet.vtf")
resource.AddFile("materials/models/player/danboard_arm_leg_sheet.vmt")
resource.AddFile("materials/models/player/b4p/vader/alnewhope.vmt" )
resource.AddFile("materials/models/player/b4p/vader/alnewhope.vtf" )
resource.AddFile("materials/models/player/b4p/vader/beltxtras.vmt" )
resource.AddFile("materials/models/player/b4p/vader/beltxtras.vtf" )
resource.AddFile("materials/models/player/b4p/vader/darthshing.vmt" )
resource.AddFile("materials/models/player/b4p/vader/darthshing.vtf" )
resource.AddFile("materials/models/player/b4p/vader/dbreather.vmt" )
resource.AddFile("materials/models/player/b4p/vader/dbreather.vtf" )
resource.AddFile("materials/models/player/b4p/vader/dcape.vmt" )
resource.AddFile("materials/models/player/b4p/vader/dcape.vtf" )
resource.AddFile("materials/models/player/b4p/vader/handhope.vmt" )
resource.AddFile("materials/models/player/b4p/vader/handhope.vtf" )
resource.AddFile("materials/models/player/b4p/vader/headhope.vmt" )
resource.AddFile("materials/models/player/b4p/vader/headhope.vtf" )
resource.AddFile("materials/models/player/b4p/vader/helmethope.vmt" )
resource.AddFile("materials/models/player/b4p/vader/helmethope.vtf" )
resource.AddFile("materials/models/player/b4p/vader/hipsvader.vmt" )
resource.AddFile("materials/models/player/b4p/vader/hipsvader.vtf" )
resource.AddFile("materials/models/player/b4p/vader/legsvader.vmt" )
resource.AddFile("materials/models/player/b4p/vader/legsvader.vtf" )
resource.AddFile("materials/models/player/b4p/vader/shoulderhope.vmt" )
resource.AddFile("materials/models/player/b4p/vader/shoulderhope.vtf" )
resource.AddFile("materials/models/player/b4p/vader/torsovader.vmt" )
resource.AddFile("materials/models/player/b4p/vader/torsovader.vtf" )
resource.AddFile("materials/models/player/b4p/vader/vaderface.vmt" )
resource.AddFile("materials/models/player/b4p/vader/vaderface.vtf" )
resource.AddFile("models/player/b4p/b4p_vader.mdl" )
end
[/LUA]
If not try this
[QUOTE=LewisUK;39520841]Yes i did that.[/QUOTE]
Look in my thread how I did:
[url]http://facepunch.com/showthread.php?t=1245861[/url]
[editline]edit[/editline]
What I meant was this
[lua]resource.AddSingleFile("models/bobcat.mdl")
resource.AddSingleFile("models/bobcat.dx80.vtx")
resource.AddSingleFile("models/bobcat.dx90.vtx")
resource.AddSingleFile("models/bobcat.phy")
resource.AddSingleFile("models/bobcat.sw.vtx")
resource.AddSingleFile("models/bobcat.vvd")[/lua]
I added every singel .vvd, .vtx, .phy, .vtx and .mdl.
Try to do that to only one, delete everything and put that but with your liking.
[QUOTE=addemod;39520875]Look in my thread how I did:
[url]http://facepunch.com/showthread.php?t=1245861[/url]
[editline]edit[/editline]
What I meant was this
[lua]resource.AddSingleFile("models/bobcat.mdl")
resource.AddSingleFile("models/bobcat.dx80.vtx")
resource.AddSingleFile("models/bobcat.dx90.vtx")
resource.AddSingleFile("models/bobcat.phy")
resource.AddSingleFile("models/bobcat.sw.vtx")
resource.AddSingleFile("models/bobcat.vvd")[/lua]
I added every singel .vvd, .vtx, .phy, .vtx and .mdl.
Try to do that to only one, delete everything and put that but with your liking.[/QUOTE]
I'm pretty sure you just add the .mdl and it downloads the .dx80.vtx etc.
[QUOTE=mib999;39526590]I'm pretty sure you just add the .mdl and it downloads the .dx80.vtx etc.[/QUOTE]
Yeah but it didn't work for me and it looks like it didn't work for him either
[QUOTE=addemod;39526682]Yeah but it didn't work for me and it looks like it didn't work for him either[/QUOTE]
Then something's wrong with the file casing.
So anyone got a fix, like i have said before it does download but only when NOT synced to fastdl and only in the fastdl.lua inside autorun/server. But the model shows as an error. As soon as i sync it. It will fix the model for the peoplewho have downloaded it. But itno longer downloads for others.
Sorry, you need to Log In to post a reply to this thread.