Hello hello,

This is the Keep Glasses and Hats (Script) Mod, which means no matter how much damage the player takes, their hats or glasses will not fall off (similar to players in GTA Online servers).

--- REQUIREMENTS ---
- Script Hook V
- Script Hook V .NET

--- INSTALLATION ---
Drag and drop "KeepGlassesMod.cs" into your "scripts" folder.

--- HOW DOES THIS WORK? ---

Within GTA V exists the function called "SET_PED_CAN_LOSE_PROPS_ON_DAMAGE". This mod detects the player model and sets it so that props do not fall off when the player is damaged. Note that this will work for ANY ped model used by the player.

--- ATTRIBUTION ---
Got the function from https://docs.fivem.net/natives/?_0xE861D0B05C7662B8.

Because I'm barely functioning when it comes to coding, ChatGPT helped turned my stupid ideas into code - and it kinda failed adding an ini or a hotkey. 

If you want to add a hotkey or a toggle--or even have this apply to other NPCs--then be my guest.

--- UNINSTALL ---
Delete KeepGlassesMod.cs.
