{"hash":"0xA0C683284DF027C7","ns":"PLAYER","name":"_SET_PLAYER_HAT_ACCESS","slug":"_SET_PLAYER_HAT_ACCESS","official":false,"named":true,"luaName":"SetPlayerHatAccess","game":"rdr3","apiset":"client","returnType":"void","params":[{"name":"player","type":"Player"},{"name":"flag","type":"int"},{"name":"enable","type":"BOOL"}],"summary":"Sets the player's ability to wear hats based on the specified flag.","descriptions":[{"source":"alloc8or","format":"text","body":"Sets the player's ability to wear hats based on the specified flag. The flag value determines whether the player can wear all hats or only the ones they own.\n\nIf the flag is set to 15 and `allow` is true, the player can wear all available hats. To restrict the player to wearing only owned hats (flag 1), you must first disable flag 15 by setting it to false, then set flag 1 to true.\n\nExample usage:\n\nAllow the player to wear all hats\nPLAYER::_SET_PLAYER_HAT_ACCESS(PLAYER::PLAYER_ID(), 15, true);\n\nRestrict the player to only wearing owned hats\nPLAYER::_SET_PLAYER_HAT_ACCESS(PLAYER::PLAYER_ID(), 15, false);\nPLAYER::_SET_PLAYER_HAT_ACCESS(PLAYER::PLAYER_ID(), 1, true);\n\nVideo: https://imgur.com/gallery/0xa0c683284df027c7-dhV5NAL"},{"source":"vorp","format":"text","body":"Sets the player's ability to wear hats based on the specified flag. The flag value determines whether the player can wear all hats or only the ones they own.\nIf the flag is set to 15 and `allow` is true, the player can wear all available hats. However, if you want to restrict the player to wearing only their owned hats (flag 1), you **must first** disable flag 15 by setting it to false, and then set flag 1 to true."}],"examples":[],"aliases":[],"enums":[],"related":[],"build":"1207","sources":["alloc8or","vorp"],"doc":2,"url":"https://natives.borderlinerp.com/natives/PLAYER/_SET_PLAYER_HAT_ACCESS","markdownUrl":"https://natives.borderlinerp.com/natives/PLAYER/_SET_PLAYER_HAT_ACCESS.md","snippets":{"lua":"SetPlayerHatAccess(player, flag, enable)","luaInvoke":"Citizen.InvokeNative(0xA0C683284DF027C7, player, flag, enable)","js":"SetPlayerHatAccess(player, flag, enable);","jsInvoke":"Citizen.invokeNative('0xA0C683284DF027C7', player, flag, enable);","csharp":"Function.Call((Hash)0xA0C683284DF027C7, player, flag, enable);","notes":["The name is a community guess and may change. If the named call is missing in your client build, use `InvokeNative` with the hash — it always works."]}}