{"slug":"AI/ENTITY_PROOFS","category":"AI","title":"ENTITY PROOFS","kind":"markdown","intro":"","body":"## Some Entity Proof Flags\n\nIt is \"bitmask\" type of flags. You can sum it up. For example, setting flag to 15 is the same as to set to 1, 2, 4 and 8 flags together (1 + 2 + 4 + 8 = 15).\n\n## Example\n\n```lua\n\tCitizen.InvokeNative(0xFAEE099C6F890BB8, ped_id, 4 + 16, 0)  -- SET_ENTITY_PROOFS   -- make ped explosion and melee proof.\n\n\tlocal all_active_flags = Citizen.InvokeNative(0x6CF0DAD7FA1088EA,ped_id)   --  _GET_ENTITY_PROOFS  returns 20 in this example.\n\n\t-- To check if some flag is active use this function.\n\n    local function is_flag_active(full_bit_mask,flag_to_check)\n        return (full_bit_mask & flag_to_check) ~= 0;\n    end\n\n \t-- is_flag_active(all_active_flags,8)  -- Checking if \"collision proof flag\" 8 is active. Returns FALSE in this example.\n\n```\n\n<h2>Some Known Entity Proof Flags.</h2>\n\nFlagId | Entity Proof Flag Action Result\n----------- | --------------------------\n1 | bullet proof\n2 | flame proof\n4 | explosion proof\n8 | collision proof\n16 | melee proof\n32 | steam proof\n64 | smoke proof\n128 | headshots proof\n256 | projectile proof","tables":[],"sourceUrl":"https://github.com/femga/rdr3_discoveries/tree/477aaaccadb7f0c042286611d9939009636cff12/AI/ENTITY_PROOFS","rows":[]}