Model Addon Doesnt Work

I’m trying to edit Prop Hunt (Fretta) to use a custom model for players but when i change the code that controls the player model, point it to the model addon and restart the server the player shows up as a huge error and the server complains of not being able to find the model … even though the model files exist on the server. The model addon is also not downloading to the client.

What’s happening? If this occuring because the model isint precached? or is it simply not possible to use a Model addon (ie i would have to use a regular model).

P.S. When i say Model Addon, i mean a model that’s packaged as an Addon, not a regular one that goes in models/materials dir’s.

  1. I noticed you said you pointed to the addon. Did you do addons/(addon name)/models/(the file path)? If you did, you just need to do models/(the file path).
  2. You might need to use
    resource.AddFile(“models/(the rest of the file path)”)
    resource.AddFile(“materials/(the rest of the file path)”)

[editline]22nd March 2011[/editline]

there is a special code snippet for adding all of the files in a directory in here:

Thanks for the fast reply.

The original code was:
player_model = “models/player/combine_super_soldier.mdl”

I changed it to:
player_model = “addons/Slimer/models/player/slow/slimer/slow.mdl”

I’ll try that code snippet too.

Yeah just make it
player_model = “models/player/slow/slimer/slow.mdl”

[editline]23rd March 2011[/editline]

And for
Addind a .mdl file will automatically add the .phy, .vvd, .xbox and all that stuff with the same name. And adding a .vmt will automatically add any .vtf with the same name.

I tried that and it doesnt work. I added the file code to the resources.lua file.

The model doesnt get downloaded and an error model shows up instead.

Did you create resources.lua? If you did you might not have included it. I would recommend putting it in init.lua.

[editline]26th March 2011[/editline]

Also, do you see the model?

resources.lua is a file that already exists in the gamemode. I just appended the model files to it. I’m unable to view the model (i spawned bots so i can see if it works).

And you have the model on your computer? With the same file path?

No. The server doesnt send the models files to the client, even though its in the resources.lua file (and the model is on server and fastdl server).