{"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>","tables":[{"id":10,"name":"Some Known Entity Proof Flags.","columns":["flagid","entity_proof_flag_action_result"],"rows":9}],"sourceUrl":"https://github.com/femga/rdr3_discoveries/tree/477aaaccadb7f0c042286611d9939009636cff12/AI/ENTITY_PROOFS","rows":[{"row":0,"cells":{"flagid":"1","entity_proof_flag_action_result":"bullet proof"},"note":null},{"row":1,"cells":{"flagid":"2","entity_proof_flag_action_result":"flame proof"},"note":null},{"row":2,"cells":{"flagid":"4","entity_proof_flag_action_result":"explosion proof"},"note":null},{"row":3,"cells":{"flagid":"8","entity_proof_flag_action_result":"collision proof"},"note":null},{"row":4,"cells":{"flagid":"16","entity_proof_flag_action_result":"melee proof"},"note":null},{"row":5,"cells":{"flagid":"32","entity_proof_flag_action_result":"steam proof"},"note":null},{"row":6,"cells":{"flagid":"64","entity_proof_flag_action_result":"smoke proof"},"note":null},{"row":7,"cells":{"flagid":"128","entity_proof_flag_action_result":"headshots proof"},"note":null},{"row":8,"cells":{"flagid":"256","entity_proof_flag_action_result":"projectile proof"},"note":null}],"table":10}