CAN_PED_SEE_ENTITY
Returns a value indicating whether ped can see targetEntity; doFoliageCheck also accounts for vegetation blocking the view.
Signature
int CAN_PED_SEE_ENTITY(Ped ped, Entity targetEntity, BOOL p2, BOOL doFoliageCheck); // 0x7F9B9791D4CB71F6 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | ped | Ped |
| 2 | targetEntity | Entity |
| 3 | p2 | BOOL |
| 4 | doFoliageCheck | BOOL |
Facts
| Name | CAN_PED_SEE_ENTITY |
|---|---|
| Hash | 0x7F9B9791D4CB71F6 |
| Namespace | |
| Returns | int |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local result = Citizen.InvokeNative(0x7F9B9791D4CB71F6, -- CAN_PED_SEE_ENTITY
PlayerPedId(), -- Ped ped
PlayerPedId(), -- Entity targetEntity
false, -- BOOL p2
false, -- BOOL doFoliageCheck
Citizen.ResultAsInteger()
)
print(result)const result = Citizen.invokeNative("0x7F9B9791D4CB71F6", // CAN_PED_SEE_ENTITY
PlayerPedId(), // Ped ped
PlayerPedId(), // Entity targetEntity
false, // BOOL p2
false, // BOOL doFoliageCheck
Citizen.resultAsInteger()
);
console.log(result)int result = Function.Call<int>((Hash)0x7F9B9791D4CB71F6, // CAN_PED_SEE_ENTITY
API.PlayerPedId(), // Ped ped
API.PlayerPedId(), // Entity targetEntity
false, // BOOL p2
false // BOOL doFoliageCheck
);Related PED natives
- CAN_PED_SEE_PED_CACHED
- CAN_PED_IN_COMBAT_SEE_TARGET
- _CAN_PED_HEAR_TARGET_PED
- CAN_PED_BE_MOUNTED
- CAN_PED_RAGDOLL
- CAN_KNOCK_PED_OFF_VEHICLE
- _APPLY_PED_META_PED_OUTFIT
- _CAN_PED_USE_SCENARIO_POINT
- _CREATE_META_PED_OUTFIT_PED
- _DOES_META_PED_OUTFIT_EXIST_FOR_PED_MODEL
- _DOES_META_PED_SUBOUTFIT_EXIST_FOR_PED_MODEL
- _GET_FIRST_ENTITY_PED_IS_CARRYING
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.