_CREATE_VOLUME_LOCK_ATTACHED_TO_ENTITY
Creates a volume lock of radius that follows entity and returns its handle.
Signature
Volume _CREATE_VOLUME_LOCK_ATTACHED_TO_ENTITY(Entity entity, float radius, int flag, Any p3); // 0xF383E96C4904DF0C b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | entity | Entity |
| 2 | radius | float |
| 3 | flag | int |
| 4 | p3 | Any |
Facts
| Name | _CREATE_VOLUME_LOCK_ATTACHED_TO_ENTITY |
|---|---|
| Hash | 0xF383E96C4904DF0C |
| Namespace | |
| Returns | Volume |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local volume = Citizen.InvokeNative(0xF383E96C4904DF0C, -- _CREATE_VOLUME_LOCK_ATTACHED_TO_ENTITY
PlayerPedId(), -- Entity entity
0.0, -- float radius
0, -- int flag
0, -- Any p3
Citizen.ResultAsInteger()
)
print(volume)// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const volume = Citizen.invokeNative("0xF383E96C4904DF0C", // _CREATE_VOLUME_LOCK_ATTACHED_TO_ENTITY
PlayerPedId(), // Entity entity
0.0, // float radius
0, // int flag
0, // Any p3
Citizen.resultAsInteger()
);
console.log(volume)int volume = Function.Call<int>((Hash)0xF383E96C4904DF0C, // _CREATE_VOLUME_LOCK_ATTACHED_TO_ENTITY
API.PlayerPedId(), // Entity entity
0.0f, // float radius
0, // int flag
0 // Any p3
);Related VOLUME natives
- _CREATE_VOLUME_LOCK
- _CREATE_VOLUME_AGGREGATE_WITH_CUSTOM_NAME
- _CREATE_VOLUME_BOX_WITH_CUSTOM_NAME
- _CREATE_VOLUME_BY_HASH
- _CREATE_VOLUME_BY_HASH_WITH_CUSTOM_NAME
- _CREATE_VOLUME_CYLINDER_WITH_CUSTOM_NAME
- _CREATE_VOLUME_SPHERE_WITH_CUSTOM_NAME
- _ADD_BOX_VOLUME_TO_VOLUME_AGGREGATE
- _ADD_CYLINDER_VOLUME_TO_VOLUME_AGGREGATE
- _ADD_SPHERE_VOLUME_TO_VOLUME_AGGREGATE
- _ADD_VOLUME_TO_VOLUME_AGGREGATE
- _CREATE_ANTI_GRIEF_VOLUME
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.