IS_PED_IN_COMBAT
Returns true if ped is in combat with target, or with anyone when target is 0.
Signature
BOOL IS_PED_IN_COMBAT(Ped ped, Ped target); // 0x4859F1FC66A6278E b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | ped | Ped |
| 2 | target | Ped |
Facts
| Name | IS_PED_IN_COMBAT |
|---|---|
| Hash | 0x4859F1FC66A6278E |
| Namespace | |
| Returns | BOOL |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local result = Citizen.InvokeNative(0x4859F1FC66A6278E, -- IS_PED_IN_COMBAT
PlayerPedId(), -- Ped ped
PlayerPedId() -- Ped target
)
if result then
-- ...
endconst result = Citizen.invokeNative("0x4859F1FC66A6278E", // IS_PED_IN_COMBAT
PlayerPedId(), // Ped ped
PlayerPedId(), // Ped target
Citizen.returnResultAnyway()
);
if (result) {
// ...
}bool result = Function.Call<bool>((Hash)0x4859F1FC66A6278E, // IS_PED_IN_COMBAT
API.PlayerPedId(), // Ped ped
API.PlayerPedId() // Ped target
);Related PED natives
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.