Need help with an idea.

Okay so MoronYard has an option that will disable all hats clientside for that player. I would like to actually have the option for my servers, so that we can have tf2 hats in the pointshop, and the players that dont have tf2 installed can have the option to disable all hats clientside.

Can anyone please help me?

Here you go:

You can check to see if a client has the game mounted. If not, prevent creating the clientside model / rendering it…

So how would i code that. My coder has an the idea, but no way to get to that.

Well then he’s not a coder. All the information he needs is right there.

[lua]ITEM.Name = ‘Anger’
ITEM.Price = 124000
local HatModel = ‘models/player/items/sniper/c_bet_brinkhood.mdl’
ITEM.Attachment = ‘eyes’
if file.Exists( HatModel, “GAME”) then
ITEM.Model = HatModel
else ITEM.Model = ‘models/props/de_tides/Vending_turtle.mdl’ end

function ITEM:OnEquip(ply, modifications)

function ITEM:OnHolster(ply)

function ITEM:ModifyClientsideModel(ply, model, pos, ang)
pos = pos + (ang:Forward() * -3.75) + (ang:Up() * -2)
model:SetModelScale(1, 0)

return model, pos, ang

Something I whipped up a while back. Not quite as suggested as above but it gets the job done and returns a turtle as the hat if the player is missing the content.

What if they’re missing the turtle though

Well, this is from my TTT and a lot of that is CS:S based so I did this assuming 99% of players would have the content. If not, then they can just change the path to a HL2 model or simply download TF2

This would thrown an exception

turtle.mdl couldn’t be loaded