[Release] Hat Removal Script

Good day all,

The other day I downloaded a script from @brickyard that involved a ‘/sg’ command to remove attach sunglasses to your ped. I thought the same should be done for hats, so using his layout, I altered some things and made a /hat script. Simple yet so necessary.

Type /hat to remove your current selected hat (obviously, you must have a hat equipped).
Type /hat again, to reattach it.

Credit goes to Brickyard and his original script located here

(Side note: Didn’t post screenshots due to the simple fact that there’s really not much to show for such a simple script.)

Download via GitHub

6 Likes

If i type /hat again it puts the same hat to the ped?

1 Like

Yes
20Characters

Great :wink: Looks well done :stuck_out_tongue:

1 Like

Great work! I’ll be taking this :slight_smile: It was on my todo list to integrate it but never got around to it.

1 Like

anyone know the animation for removing hat and applying hat? Would love to build that functionality in.

Try this

I think these would work:

local anim = "veh@common@fp_helmet@" --Parent
local anim2 = "take_off_helmet_stand" --Child
local anim3 = "put_on_helmet" --Child

Yeah those animations work well except for the sound effect of putting on a helmet. Would a animation that applied a mask be better perhaps?

is there an animation for night vision goggles? maybe that

There are a few in that List that would work without a sound, even the mask anim. The thing is, if you want to allow players to “take on/off” it in a vehicle, some of the anims make the player stand up in the driver seat or any seat, so you’d have to find or use the sitting type if in a vehicle, if it even has one. The one I posted animates the upper half of the body only, I think, so it works standing or sitting. That’s why I suggested that one. But yeah, it does sound funny when putting on a soft cap that should be silent.

1 Like

is it for vrp or esx? thx in advance for the answer

Dont think it matters, appears to be a stand alone script.

1 Like

ok, thx

hello bro can u do same for mask ? thanks i will do little donate for u if you do hard this <3

is this NPC peds or can it be used for any?

Hello everyone. Sorry, I’ve been away from FiveM for the longest. With my knowledge base, I’m not quite sure how to do the /mask one. From what I’ve tested, I can only confirm it works for MP peds.

Thanks really needed this

1 Like

it would be nice if someone can do the same thing with masks

do you have one for glasses?