[TTT] Detective Default Model Addon -- not working

We made this .lua: http://pastebin.com/hFUFhp0h

And this is the addon folder configuration: http://pastebin.com/2mrDmWA7

And this is the model we’re using: http://steamcommunity.com/sharedfiles/filedetails/?id=133342076

The file configuration in the folders is crazy, I know. We used simply a .mdl and that didn’t work either. We used this thread for reference: http://forum.facepunch.com/showthread.php?t=1234165

What can we do to make sure detectives have that skin we want? And put it into an addon form?

In the future provide, provide an error too! Your code is gross( no offense ) Let me help you. First, there’s no reason to AddCSLuaFile() the file, considering it’s all serverside, and we don’t need it being sent to the client. Second, let’s use resource.AddWorkshop considering it’s a workshop addon. Third, we really don’t need to wrap it in if (SERVER) then … end if we just put it in lua/autorun/server. Try this. It goes in lua/autorun/server

resource.AddWorkshop("133342076"); //Elis police model

hook.Add("TTTBeginRound", "BeginRoundDetectiveSkin", function()
    for k,v in pairs(player.GetAll()) do
        if v:IsActiveDetective() then

Thanks so much. I’ll try this when I get home.

I know my code is gross :stuck_out_tongue: however it is my first “addon” I’ve made, lol.

Will respond after I test this!

Thanks for everything, but things still aren’t quite working.

I put this .lua in my lua/autorun/server: http://pastebin.com/EbzKtuG7

We unpacked the addon and realized there was two police.mdl files, however both of them arose the same issue. Instead of having an “ERROR” as a model, now there is nothing! I noticed that there is just air in place of the player. There’s no model at all.

I appreciate all the help you’ve given this far, I just need this to work :slight_smile:

Bump, I direly need this done.

Code is fine, find a new model.

I’m kinda stuck here. I’m seen other servers with this same exact model, doing exactly what I want to do.

The code that I posted (http://pastebin.com/EbzKtuG7) is fine?

Is there any other way I can get this to work, or am I forced to use another model?

Are you sure that’s the only release of that model out there?

Pretty sure. Unless you can find a decent looking Garry’s Mod cop model (preferably that one).

Given up on this. I’ll just give it another few days and then I’ll probably mark it as solved or abandon it.

Not sure if you still really care, but in my opinion these http://steamcommunity.com/sharedfiles/filedetails/?id=121961644 look pretty nice

Just take one, grab the appropriate files for it, and set it to FastDL, or add all of them so your detective looks different every time :stuck_out_tongue:

Having the detective look different every time is beyond me and I wouldn’t know how to code that. I may give this one a shot, though.

Since no one else has done this or helped me, I decided to put in some real effort into this. I’ve done it and it works with PointShop with nothing conflicting either. Enjoy.