Props.

I’ve seen alot of people do it, what is the console command or tool gun you use to get a prop stuck to your head and stay there like a hat?


(User was banned for this post ("Undiscriptive thread title" - Craptasket))

There is no toolgun or console command, you can use addons for it though like PAC, you could use “expression2” in wiremod.

Take a look at preexisting pointshop files. You’re essentially positioning a model via angles and attaching them to a bone.

I dont understand any of this, Tell me what it is, Not, “Oh JUst use this its sooo easy”

Either use PAC like the guy linked or create it yourself, it is that simple.

If you want to create it yourself then delve into PAC and learn how it works, or pointshop. Pointshop is easier to understand for just hats I guess.

If by some miracle you’re cable of doing lua it is essentially:
create client side model
hook PostPlayerDraw to update position of model everytime the player is drawn.

tada.

Alrighty, I’ll go into a bit more detail.

This link is where you can download a pointshop for your server, the main way servers give players hats. Now if you go into lua/items/headhatsmasks, you’ll find all the pre-existing hats in the store. You can also find coding for the Gmod Tower hats which are good to. Grab one of the existing hat files, preferably one that you think will be similarly placed to the model you want, copy/paste then rename. Open up the file in notepad++ and paste in the model you want to use for your hat. To get this, open up the Q sandbox menu, find a model, right click and copy to clipboard, this will give you the filepath.

Now, at the bottom of all the pointshop hat files you will see a code like



function ITEM:ModifyClientsideModel(ply, model, pos, ang)
        model:SetModelScale(0.7, 0)
        pos = pos + (ang:Forward() * -3.5) + (ang:Up() * 4)
        ang:RotateAroundAxis(ang:Right(), 10)
        
        return model, pos, ang
end


This is what you want to modify to move your hat around so it looks good and doesn’t clip. Keep in mind not all models are the same, but generally hl2 models/css models are very similar.

model:SetModelScale is fairly self explanatory, you can change the size of the model, make it bigger or smaller. Recommended to do this first if needed. Doing it later on after you’ve positioned your hat can knock it out of place.

Manual hat positioning is very tedious and the main core of it is done via ang:Forward and Ang:Up. A lot of the time it’s very trial and error-y, but generally placing a minus in front of your number will make it go back/down, while plus numbers will go forward/up. Also, keep in mind due to the way the pointshop works, you need to reload the map after every edit for it to register.

An alternative to this is to use PAC, however very little pointshops are compatible with it. One that definitely does is by Kamshak and can be found on Coderhire. If you’ve got some money and can’t be bothered with this shit, grab the pointshop item maker on that same site.

Lastly, I got the PAC 3 Thing figured out, Now is it possible to get the outfit into a darkrp server or something?

If you run the server then simply install pac?