Models and fastDL problem!

i know how to add them but i can’t buy them for some reason.

I added mario,V and samus. Samus,mario and V is a Error and cannot be buyed why?

Here’s my script that works, dispy the teletubie:

ITEM.Name = ‘dispy’
ITEM.Price = 20000
ITEM.Model = ‘models/player/dipsy_hl2mp_player/dipsy_hl2mp_player.mdl’

function ITEM:OnEquip(ply, modifications)
if not ply._OldModel then
ply._OldModel = ply:GetModel()
end

timer.Simple(1, function() ply:SetModel(self.Model) end)

end

function ITEM:OnHolster(ply)
if ply._OldModel then
ply:SetModel(ply._OldModel)
end
end

and here is the script for Mario and it is a error and cannot be bought!:

ITEM.Name = ‘Mario’
ITEM.Price = 20000
ITEM.Model = ‘models/marioragdoll/mario/mario.mdl’

function ITEM:OnEquip(ply, modifications)
if not ply._OldModel then
ply._OldModel = ply:GetModel()
end

timer.Simple(1, function() ply:SetModel(self.Model) end)

end

function ITEM:OnHolster(ply)
if ply._OldModel then
ply:SetModel(ply._OldModel)
end
end

I have fastDL, im using 000webhost and i putted all the materials and models inside their but it didn’t remove the error, for some reason the maps work’s fine on fastDL but not models. i also don’t have a cache folde on my server why? i might need it on the fastDL.
my resource lua looks like this:

if (SERVER) then
(“models/player/dipsy_hl2mp_playerblah/dipsy_hl2mp_player.mdl”)
resource.AddFile(“models.mdl”)
resource.AddFile( “models/samus.mdl” )
resource.AddFile( “models/models/V/v.mdl” )

still don’t work, any idea’s??

it wont work like that you have to add all of the files in the models and materials for to work

example

resource.AddFile( “models/player/wolverine/slow.dx80.vtx” )
resource.AddFile( “models/player/wolverine/slow.dx90.vtx” )
resource.AddFile( “models/player/wolverine/slow.mdl” )
resource.AddFile( “models/player/wolverine/slow.phy” )
resource.AddFile( “models/player/wolverine/slow.sw.vtx” )
resource.AddFile( “models/player/wolverine/slow.vvd” )
resource.AddFile( “models/player/wolverine/slow.xbox.vtx” )

that would be for just the models then for the materials you would do the same thing just they most likely will have different names

Finally some one who has the same problem as me, and ive done what youve done, models/materials wont download to the player. and ive tryed with just putting .mdl and all the model .extensions

you need to put the models and materials in the fastdl and on your game server also need to create a resource.lua file and put it in garrysmod/lua/autorun. You also need to have this in you configuration file.


sv_downloadurl "http://youwebsitename/garrysmod/"
sv_allowupload "1"
sv_allowdownload "1"

hope this will help you guys out

Any 1 use godaddy for fastdl hosting ? So far ive noticed godaddy is pretty shit and you cant do anything on a windows host -.-

heres a good web host. http://www.hostgator.com/

Could you explain more as to what you need in the resource.lua file? Do you just put all the models/materials in the root garrysmod folder and do resource.AddFile for everything?

You need to use resource.AddFile for anything that you want a client to download that isn’t a lua script or a map. You add your files, and then the corresponding resource.AddFile for each individual file. There are programs you can use to generate the script automatically, like this. You can find a bit more info here and here

If you still need help, you can add me on steam.