PIN_CLOSEST_MAP_ENTITY
Pins the closest map entity of modelHash to the given coordinates so it stays loaded.
Signature
Any PIN_CLOSEST_MAP_ENTITY(Hash modelHash, float x, float y, float z, int flags); // 0x6F3068258A499E52 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | modelHash | Hash |
| 2 | x | float |
| 3 | y | float |
| 4 | z | float |
| 5 | flags | int |
Facts
| Name | PIN_CLOSEST_MAP_ENTITY |
|---|---|
| Hash | 0x6F3068258A499E52 |
| Namespace | |
| Returns | Any |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local result = Citizen.InvokeNative(0x6F3068258A499E52, -- PIN_CLOSEST_MAP_ENTITY
GetHashKey("a_c_horse_arabian_white"), -- Hash modelHash
0.0, -- float x
0.0, -- float y
0.0, -- float z
0, -- int flags
Citizen.ResultAsInteger()
)
print(result)// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const result = Citizen.invokeNative("0x6F3068258A499E52", // PIN_CLOSEST_MAP_ENTITY
GetHashKey("a_c_horse_arabian_white"), // Hash modelHash
0.0, // float x
0.0, // float y
0.0, // float z
0, // int flags
Citizen.resultAsInteger()
);
console.log(result)int result = Function.Call<int>((Hash)0x6F3068258A499E52, // PIN_CLOSEST_MAP_ENTITY
(uint)API.GetHashKey("a_c_horse_arabian_white"), // Hash modelHash
0.0f, // float x
0.0f, // float y
0.0f, // float z
0 // int flags
);Related ENTITY natives
- _PIN_MAP_ENTITY
- _GET_LAST_ENTITY_TO_DAMAGE_ENTITY
- _GET_PINNED_MAP_ENTITY
- _UNPIN_MAP_ENTITY
- ATTACH_ENTITY_TO_ENTITY
- ATTACH_ENTITY_TO_ENTITY_PHYSICALLY
- CLEAR_ENTITY_LAST_DAMAGE_ENTITY
- HAS_ENTITY_BEEN_DAMAGED_BY_ENTITY
- HAS_ENTITY_CLEAR_LOS_TO_ENTITY
- HAS_ENTITY_CLEAR_LOS_TO_ENTITY_IN_FRONT
- IS_ENTITY_A_MISSION_ENTITY
- IS_ENTITY_AT_ENTITY
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.