RedM Natives

ENTITY PROOFS

CategoryAI
Rows9

Some Entity Proof Flags

It 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).

Example

	Citizen.InvokeNative(0xFAEE099C6F890BB8, ped_id, 4 + 16, 0)  -- SET_ENTITY_PROOFS   -- make ped explosion and melee proof.

	local all_active_flags = Citizen.InvokeNative(0x6CF0DAD7FA1088EA,ped_id)   --  _GET_ENTITY_PROOFS  returns 20 in this example.

	-- To check if some flag is active use this function.

    local function is_flag_active(full_bit_mask,flag_to_check)
        return (full_bit_mask & flag_to_check) ~= 0;
    end

 	-- is_flag_active(all_active_flags,8)  -- Checking if "collision proof flag" 8 is active. Returns FALSE in this example.
<h2>Some Known Entity Proof Flags.</h2>
9 rows
#flagidentity_proof_flag_action_resultNote
11bullet proof
22flame proof
34explosion proof
48collision proof
516melee proof
632steam proof
764smoke proof
8128headshots proof
9256projectile proof