@nativewrappers/redm-codegen 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/classes/AnimScene.d.ts +82 -82
- package/dist/classes/AnimScene.d.ts.map +1 -1
- package/dist/classes/AnimScene.js +124 -124
- package/dist/classes/BaseModel.d.ts +29 -29
- package/dist/classes/BaseModel.d.ts.map +1 -1
- package/dist/classes/BaseModel.js +43 -43
- package/dist/classes/BaseTask.d.ts +43 -43
- package/dist/classes/BaseTask.d.ts.map +1 -1
- package/dist/classes/BaseTask.js +53 -53
- package/dist/classes/Cam.d.ts +82 -82
- package/dist/classes/Cam.d.ts.map +1 -1
- package/dist/classes/Cam.js +115 -115
- package/dist/classes/Entity.d.ts +250 -250
- package/dist/classes/Entity.d.ts.map +1 -1
- package/dist/classes/Entity.js +350 -350
- package/dist/classes/Interior.d.ts +27 -27
- package/dist/classes/Interior.d.ts.map +1 -1
- package/dist/classes/Interior.js +42 -42
- package/dist/classes/Ped.d.ts +55 -55
- package/dist/classes/Ped.d.ts.map +1 -1
- package/dist/classes/Ped.js +76 -76
- package/dist/classes/PedTask.d.ts +797 -797
- package/dist/classes/PedTask.d.ts.map +1 -1
- package/dist/classes/PedTask.js +1023 -1023
- package/dist/classes/PersChar.d.ts +13 -13
- package/dist/classes/PersChar.d.ts.map +1 -1
- package/dist/classes/PersChar.js +27 -27
- package/dist/classes/Pickup.d.ts +8 -8
- package/dist/classes/Pickup.d.ts.map +1 -1
- package/dist/classes/Pickup.js +15 -15
- package/dist/classes/Player.d.ts +185 -185
- package/dist/classes/Player.d.ts.map +1 -1
- package/dist/classes/Player.js +251 -251
- package/dist/classes/Prop.d.ts +130 -130
- package/dist/classes/Prop.d.ts.map +1 -1
- package/dist/classes/Prop.js +188 -188
- package/dist/classes/PropSet.d.ts +17 -17
- package/dist/classes/PropSet.d.ts.map +1 -1
- package/dist/classes/PropSet.js +25 -25
- package/dist/classes/VehicleTask.d.ts +23 -23
- package/dist/classes/VehicleTask.d.ts.map +1 -1
- package/dist/classes/VehicleTask.js +30 -30
- package/dist/classes/Volume.d.ts +39 -39
- package/dist/classes/Volume.d.ts.map +1 -1
- package/dist/classes/Volume.js +54 -54
- package/dist/classes/Weapon.d.ts +291 -291
- package/dist/classes/Weapon.d.ts.map +1 -1
- package/dist/classes/Weapon.js +414 -414
- package/dist/namespaces/Animscene.d.ts +63 -63
- package/dist/namespaces/Animscene.d.ts.map +1 -1
- package/dist/namespaces/Animscene.js +83 -83
- package/dist/namespaces/Audio.d.ts +464 -464
- package/dist/namespaces/Audio.d.ts.map +1 -1
- package/dist/namespaces/Audio.js +650 -650
- package/dist/namespaces/Bounty.d.ts +57 -57
- package/dist/namespaces/Bounty.d.ts.map +1 -1
- package/dist/namespaces/Bounty.js +90 -90
- package/dist/namespaces/CamStatics.d.ts +426 -426
- package/dist/namespaces/CamStatics.d.ts.map +1 -1
- package/dist/namespaces/CamStatics.js +609 -609
- package/dist/namespaces/Collection.d.ts +81 -81
- package/dist/namespaces/Collection.d.ts.map +1 -1
- package/dist/namespaces/Collection.js +113 -113
- package/dist/namespaces/Compendium.d.ts +38 -38
- package/dist/namespaces/Compendium.d.ts.map +1 -1
- package/dist/namespaces/Compendium.js +52 -52
- package/dist/namespaces/Crashlog.d.ts +10 -10
- package/dist/namespaces/Crashlog.d.ts.map +1 -1
- package/dist/namespaces/Crashlog.js +14 -14
- package/dist/namespaces/Databinding.d.ts +174 -174
- package/dist/namespaces/Databinding.d.ts.map +1 -1
- package/dist/namespaces/Databinding.js +266 -266
- package/dist/namespaces/EntityStatics.d.ts +110 -110
- package/dist/namespaces/EntityStatics.d.ts.map +1 -1
- package/dist/namespaces/EntityStatics.js +146 -146
- package/dist/namespaces/Graphics.d.ts +547 -547
- package/dist/namespaces/Graphics.d.ts.map +1 -1
- package/dist/namespaces/Graphics.js +731 -731
- package/dist/namespaces/Hud.d.ts +395 -395
- package/dist/namespaces/Hud.d.ts.map +1 -1
- package/dist/namespaces/Hud.js +564 -564
- package/dist/namespaces/InteriorStatics.d.ts +40 -40
- package/dist/namespaces/InteriorStatics.d.ts.map +1 -1
- package/dist/namespaces/InteriorStatics.js +56 -56
- package/dist/namespaces/Inventory.d.ts +107 -107
- package/dist/namespaces/Inventory.d.ts.map +1 -1
- package/dist/namespaces/Inventory.js +149 -149
- package/dist/namespaces/Itemdatabase.d.ts +5 -5
- package/dist/namespaces/Itemdatabase.d.ts.map +1 -1
- package/dist/namespaces/Itemdatabase.js +7 -7
- package/dist/namespaces/Map.d.ts +173 -173
- package/dist/namespaces/Map.d.ts.map +1 -1
- package/dist/namespaces/Map.js +240 -240
- package/dist/namespaces/Minigame.d.ts +56 -56
- package/dist/namespaces/Minigame.d.ts.map +1 -1
- package/dist/namespaces/Minigame.js +80 -80
- package/dist/namespaces/Network.d.ts +964 -964
- package/dist/namespaces/Network.d.ts.map +1 -1
- package/dist/namespaces/Network.js +1333 -1333
- package/dist/namespaces/Object.d.ts +240 -240
- package/dist/namespaces/Object.d.ts.map +1 -1
- package/dist/namespaces/Object.js +337 -337
- package/dist/namespaces/Pad.d.ts +95 -95
- package/dist/namespaces/Pad.d.ts.map +1 -1
- package/dist/namespaces/Pad.js +127 -127
- package/dist/namespaces/PedStatics.d.ts +18 -18
- package/dist/namespaces/PedStatics.d.ts.map +1 -1
- package/dist/namespaces/PedStatics.js +26 -26
- package/dist/namespaces/Perschar.d.ts +46 -46
- package/dist/namespaces/Perschar.d.ts.map +1 -1
- package/dist/namespaces/Perschar.js +66 -66
- package/dist/namespaces/Physics.d.ts +207 -207
- package/dist/namespaces/Physics.d.ts.map +1 -1
- package/dist/namespaces/Physics.js +315 -315
- package/dist/namespaces/PlayerStatics.d.ts +68 -68
- package/dist/namespaces/PlayerStatics.d.ts.map +1 -1
- package/dist/namespaces/PlayerStatics.js +95 -95
- package/dist/namespaces/Population.d.ts +86 -86
- package/dist/namespaces/Population.d.ts.map +1 -1
- package/dist/namespaces/Population.js +116 -116
- package/dist/namespaces/Posse.d.ts +43 -43
- package/dist/namespaces/Posse.d.ts.map +1 -1
- package/dist/namespaces/Posse.js +67 -67
- package/dist/namespaces/Propset.d.ts +59 -59
- package/dist/namespaces/Propset.d.ts.map +1 -1
- package/dist/namespaces/Propset.js +81 -81
- package/dist/namespaces/Shapetest.d.ts +11 -11
- package/dist/namespaces/Shapetest.d.ts.map +1 -1
- package/dist/namespaces/Shapetest.js +13 -13
- package/dist/namespaces/Stats.d.ts +90 -90
- package/dist/namespaces/Stats.d.ts.map +1 -1
- package/dist/namespaces/Stats.js +127 -127
- package/dist/namespaces/Streaming.d.ts +127 -127
- package/dist/namespaces/Streaming.d.ts.map +1 -1
- package/dist/namespaces/Streaming.js +193 -193
- package/dist/namespaces/Task.d.ts +346 -346
- package/dist/namespaces/Task.d.ts.map +1 -1
- package/dist/namespaces/Task.js +525 -525
- package/dist/namespaces/Telemetry.d.ts +176 -176
- package/dist/namespaces/Telemetry.d.ts.map +1 -1
- package/dist/namespaces/Telemetry.js +255 -255
- package/dist/namespaces/VolumeStatics.d.ts +64 -64
- package/dist/namespaces/VolumeStatics.d.ts.map +1 -1
- package/dist/namespaces/VolumeStatics.js +85 -85
- package/dist/namespaces/Water.d.ts +27 -27
- package/dist/namespaces/Water.d.ts.map +1 -1
- package/dist/namespaces/Water.js +41 -41
- package/dist/namespaces/WeaponStatics.d.ts +234 -234
- package/dist/namespaces/WeaponStatics.d.ts.map +1 -1
- package/dist/namespaces/WeaponStatics.js +320 -320
- package/dist/namespaces/Zone.d.ts +7 -7
- package/dist/namespaces/Zone.d.ts.map +1 -1
- package/dist/namespaces/Zone.js +9 -9
- package/package.json +1 -1
- package/src/classes/AnimScene.ts +133 -133
- package/src/classes/BaseModel.ts +50 -50
- package/src/classes/BaseTask.ts +55 -55
- package/src/classes/Cam.ts +126 -126
- package/src/classes/Entity.ts +365 -365
- package/src/classes/Interior.ts +43 -43
- package/src/classes/Ped.ts +86 -86
- package/src/classes/PedTask.ts +2067 -2067
- package/src/classes/PersChar.ts +34 -34
- package/src/classes/Pickup.ts +16 -16
- package/src/classes/Player.ts +296 -296
- package/src/classes/Prop.ts +203 -203
- package/src/classes/PropSet.ts +29 -29
- package/src/classes/VehicleTask.ts +32 -32
- package/src/classes/Volume.ts +61 -61
- package/src/classes/Weapon.ts +427 -427
- package/src/namespaces/Animscene.ts +86 -86
- package/src/namespaces/Audio.ts +760 -760
- package/src/namespaces/Bounty.ts +102 -102
- package/src/namespaces/CamStatics.ts +631 -631
- package/src/namespaces/Collection.ts +114 -114
- package/src/namespaces/Compendium.ts +59 -59
- package/src/namespaces/Crashlog.ts +16 -16
- package/src/namespaces/Databinding.ts +282 -282
- package/src/namespaces/EntityStatics.ts +158 -158
- package/src/namespaces/Graphics.ts +1140 -1140
- package/src/namespaces/Hud.ts +592 -592
- package/src/namespaces/InteriorStatics.ts +64 -64
- package/src/namespaces/Inventory.ts +165 -165
- package/src/namespaces/Itemdatabase.ts +8 -8
- package/src/namespaces/Map.ts +256 -256
- package/src/namespaces/Minigame.ts +92 -92
- package/src/namespaces/Network.ts +1392 -1392
- package/src/namespaces/Object.ts +350 -350
- package/src/namespaces/Pad.ts +127 -127
- package/src/namespaces/PedStatics.ts +30 -30
- package/src/namespaces/Perschar.ts +76 -76
- package/src/namespaces/Physics.ts +327 -327
- package/src/namespaces/PlayerStatics.ts +103 -103
- package/src/namespaces/Population.ts +131 -131
- package/src/namespaces/Posse.ts +67 -67
- package/src/namespaces/Propset.ts +92 -92
- package/src/namespaces/Shapetest.ts +14 -14
- package/src/namespaces/Stats.ts +143 -143
- package/src/namespaces/Streaming.ts +226 -226
- package/src/namespaces/Task.ts +498 -498
- package/src/namespaces/Telemetry.ts +261 -261
- package/src/namespaces/VolumeStatics.ts +87 -87
- package/src/namespaces/Water.ts +47 -47
- package/src/namespaces/WeaponStatics.ts +325 -325
- package/src/namespaces/Zone.ts +10 -10
package/src/classes/Entity.ts
CHANGED
|
@@ -152,195 +152,117 @@ export class Entity implements IHandle {
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
/**
|
|
155
|
-
* @param
|
|
156
|
-
* @param
|
|
155
|
+
* @param pos1
|
|
156
|
+
* @param pos2
|
|
157
|
+
* @param p7
|
|
158
|
+
* @param p8
|
|
159
|
+
* @param p9
|
|
157
160
|
* @returns
|
|
158
161
|
*/
|
|
159
|
-
|
|
160
|
-
return
|
|
162
|
+
isInArea(pos1: Vector3, pos2: Vector3, p7: boolean, p8: boolean, p9: any): boolean {
|
|
163
|
+
return inv<boolean>('0x0C2634C40A16193E', this.handle, f(pos1.x), f(pos1.y), f(pos1.z), f(pos2.x), f(pos2.y), f(pos2.z), p7, p8, p9, rai());
|
|
161
164
|
}
|
|
162
165
|
|
|
163
166
|
/**
|
|
164
|
-
*
|
|
167
|
+
* Returns the coordinates of an entity-bone.
|
|
168
|
+
* https://github.com/femga/rdr3_discoveries/tree/master/boneNames
|
|
165
169
|
*
|
|
170
|
+
* @param boneIndex
|
|
166
171
|
* @returns
|
|
167
172
|
*/
|
|
168
|
-
|
|
169
|
-
return inv<number>('
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* @param pitch
|
|
174
|
-
* @param roll
|
|
175
|
-
* @param yaw
|
|
176
|
-
* @param rotationOrder
|
|
177
|
-
* @param p5
|
|
178
|
-
*/
|
|
179
|
-
setRotation(pitch: number, roll: number, yaw: number, rotationOrder: number, p5: boolean): void {
|
|
180
|
-
inv<void>('0x9CC8314DFEDE441E', this.handle, f(pitch), f(roll), f(yaw), rotationOrder, p5);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* @param p1
|
|
185
|
-
* @param relationshipGroup
|
|
186
|
-
*/
|
|
187
|
-
setOnlyDamagedByRelationshipGroup(p1: boolean, relationshipGroup: string | number): void {
|
|
188
|
-
inv<void>('0x6C1F6AA2F0ADD104', this.handle, p1, _h(relationshipGroup));
|
|
173
|
+
getWorldPositionOfBone(boneIndex: number): Vector3 {
|
|
174
|
+
return Vector3.fromArray(inv<number[]>('0x82CFA50E34681CA5', this.handle, boneIndex, rav()));
|
|
189
175
|
}
|
|
190
176
|
|
|
191
177
|
/**
|
|
192
|
-
* https://github.com/femga/rdr3_discoveries/tree/master/
|
|
193
|
-
* BOOL p2: handles an additional special proofs flag, so it simply indicates whether it should be enabled or disabled, not sure what exactly it proofs the entity from though
|
|
178
|
+
* https://github.com/femga/rdr3_discoveries/tree/master/animations
|
|
194
179
|
*
|
|
195
|
-
* @param
|
|
196
|
-
* @param
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
* @returns
|
|
204
|
-
*/
|
|
205
|
-
hasCollisionLoadedAroundEntity(): boolean {
|
|
206
|
-
return inv<boolean>('0xBEB1600952B9CF5C', this.handle, rai());
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* @returns
|
|
211
|
-
*/
|
|
212
|
-
getIsCarriablePelt(): any {
|
|
213
|
-
return inv<number>('0x255B6DB4E3AD3C3E', this.handle);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* @param p1
|
|
180
|
+
* @param animName
|
|
181
|
+
* @param animDict
|
|
182
|
+
* @param p3
|
|
183
|
+
* @param loop
|
|
184
|
+
* @param stayInAnim
|
|
185
|
+
* @param p6
|
|
186
|
+
* @param delta
|
|
187
|
+
* @param bitset
|
|
218
188
|
* @returns
|
|
219
189
|
*/
|
|
220
|
-
|
|
221
|
-
return
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* @param toggle
|
|
226
|
-
*/
|
|
227
|
-
setCanAutoVaultOnEntity(toggle: boolean): void {
|
|
228
|
-
inv<void>('0x80646744FA88F9D7', this.handle, toggle);
|
|
190
|
+
playAnim(animName: string | null, animDict: string | null, p3: number, loop: boolean, stayInAnim: boolean, p6: boolean, delta: number, bitset: any): boolean {
|
|
191
|
+
return inv<boolean>('0xDC6D22FAB76D4874', this.handle, animName, animDict, f(p3), loop, stayInAnim, p6, f(delta), bitset, rai());
|
|
229
192
|
}
|
|
230
193
|
|
|
231
194
|
/**
|
|
232
|
-
*
|
|
233
|
-
* https://github.com/femga/rdr3_discoveries/blob/master/AI/EVENTS/loot_rewards.lua
|
|
195
|
+
* Returns false if entity is not a ped or object.
|
|
234
196
|
*
|
|
235
|
-
* @
|
|
236
|
-
* @returns
|
|
237
|
-
*/
|
|
238
|
-
scriptOverrideLootTablePermanent(lootTable: string | number): any {
|
|
239
|
-
return inv<number>('0x8C03CD6B5E0E85E8', this.handle, _h(lootTable));
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* @returns argStruct
|
|
197
|
+
* @returns lootTable
|
|
244
198
|
*/
|
|
245
|
-
|
|
246
|
-
const result = inv<[number, number]>('
|
|
247
|
-
return [result[0]
|
|
199
|
+
getScriptOverrideLootTablePermanent(): [any, number] {
|
|
200
|
+
const result = inv<[number, number]>('0x1E804EA9B12030A4', this.handle, pvi());
|
|
201
|
+
return [result[0], result[1]];
|
|
248
202
|
}
|
|
249
203
|
|
|
250
204
|
/**
|
|
251
|
-
* @param
|
|
205
|
+
* @param animDict
|
|
206
|
+
* @param animName
|
|
207
|
+
* @param p3
|
|
252
208
|
* @returns
|
|
253
209
|
*/
|
|
254
|
-
|
|
255
|
-
return inv<boolean>('
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
/**
|
|
259
|
-
* @param p1
|
|
260
|
-
*/
|
|
261
|
-
N_0xEF259AA1E097E0AD(p1: any): void {
|
|
262
|
-
inv<void>('0xEF259AA1E097E0AD', this.handle, p1);
|
|
210
|
+
hasAnimFinished(animDict: string | null, animName: string | null, p3: number): boolean {
|
|
211
|
+
return inv<boolean>('0xAEB40615337EF1E3', this.handle, animDict, animName, p3, rai());
|
|
263
212
|
}
|
|
264
213
|
|
|
265
214
|
/**
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
* @returns
|
|
215
|
+
* @param bCanBeDamaged
|
|
216
|
+
* @param relGroup
|
|
269
217
|
*/
|
|
270
|
-
|
|
271
|
-
|
|
218
|
+
setCanBeDamagedByRelationshipGroup(bCanBeDamaged: boolean, relGroup: string | number): void {
|
|
219
|
+
inv<void>('0x0EF1AFB18649E015', this.handle, bCanBeDamaged, _h(relGroup));
|
|
272
220
|
}
|
|
273
221
|
|
|
274
222
|
/**
|
|
275
|
-
* Returns the entity that is looting a ped but only while the looting is active
|
|
276
|
-
*
|
|
277
223
|
* @returns
|
|
278
224
|
*/
|
|
279
|
-
|
|
280
|
-
return
|
|
225
|
+
getUprightValue(): number {
|
|
226
|
+
return inv<number>('0x56398BE65160C3BE', this.handle, raf());
|
|
281
227
|
}
|
|
282
228
|
|
|
283
229
|
/**
|
|
284
|
-
* @
|
|
230
|
+
* @param pos
|
|
231
|
+
* @param heading
|
|
232
|
+
* @param xAxis
|
|
233
|
+
* @param yAxis
|
|
234
|
+
* @param zAxis
|
|
285
235
|
*/
|
|
286
|
-
|
|
287
|
-
|
|
236
|
+
setCoordsAndHeading(pos: Vector3, heading: number, xAxis: boolean, yAxis: boolean, zAxis: boolean): void {
|
|
237
|
+
inv<void>('0x203BEFFDBE12E96A', this.handle, f(pos.x), f(pos.y), f(pos.z), f(heading), xAxis, yAxis, zAxis);
|
|
288
238
|
}
|
|
289
239
|
|
|
290
240
|
/**
|
|
291
|
-
*
|
|
241
|
+
* Returns zero if the entity is not a carriable
|
|
292
242
|
*
|
|
293
243
|
* @returns
|
|
294
244
|
*/
|
|
295
|
-
|
|
296
|
-
return inv<number>('
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* @returns
|
|
301
|
-
*/
|
|
302
|
-
isAPed(): boolean {
|
|
303
|
-
return inv<boolean>('0xCF8176912DDA4EA5', this.handle, rai());
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
/**
|
|
307
|
-
* @returns
|
|
308
|
-
*/
|
|
309
|
-
getPitch(): number {
|
|
310
|
-
return inv<number>('0xEF355ABEFF7F5005', this.handle, raf());
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* @returns
|
|
315
|
-
*/
|
|
316
|
-
isStatic(): boolean {
|
|
317
|
-
return inv<boolean>('0x86468ADFA0F6B861', this.handle, rai());
|
|
245
|
+
getCarryConfig(): number {
|
|
246
|
+
return (inv<number>('0x0FD25587BB306C86', this.handle, rai())) & 0xFFFFFFFF;
|
|
318
247
|
}
|
|
319
248
|
|
|
320
249
|
/**
|
|
321
|
-
*
|
|
250
|
+
* tier: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/eEntityThreatTier
|
|
322
251
|
*
|
|
323
|
-
* @
|
|
324
|
-
|
|
325
|
-
getModel(): number {
|
|
326
|
-
return (inv<number>('0xDA76A9F39210D365', this.handle, rai())) & 0xFFFFFFFF;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
/**
|
|
330
|
-
* Deletes the specified entity, then sets the handle pointed to by the pointer to NULL.
|
|
252
|
+
* @param tier
|
|
253
|
+
* @param p2
|
|
331
254
|
*/
|
|
332
|
-
|
|
333
|
-
inv<void>('
|
|
255
|
+
setThreatTier(tier: number, p2: boolean): void {
|
|
256
|
+
inv<void>('0x4B436BAC8CBE9B07', this.handle, tier, p2);
|
|
334
257
|
}
|
|
335
258
|
|
|
336
259
|
/**
|
|
337
|
-
*
|
|
338
|
-
*
|
|
339
|
-
* @param flags
|
|
260
|
+
* Returns the heading of the entity in degrees. Also know as the "Yaw" of an entity.
|
|
261
|
+
*
|
|
340
262
|
* @returns
|
|
341
263
|
*/
|
|
342
|
-
|
|
343
|
-
return
|
|
264
|
+
getHeading(): number {
|
|
265
|
+
return inv<number>('0xC230DD956E2F5507', this.handle, raf());
|
|
344
266
|
}
|
|
345
267
|
|
|
346
268
|
/**
|
|
@@ -521,179 +443,186 @@ export class Entity implements IHandle {
|
|
|
521
443
|
}
|
|
522
444
|
|
|
523
445
|
/**
|
|
524
|
-
*
|
|
525
|
-
*
|
|
526
|
-
* @returns
|
|
446
|
+
* @param p1
|
|
527
447
|
*/
|
|
528
|
-
|
|
529
|
-
|
|
448
|
+
N_0xA48E4801DEBDF7E4(p1: boolean): void {
|
|
449
|
+
inv<void>('0xA48E4801DEBDF7E4', this.handle, p1);
|
|
530
450
|
}
|
|
531
451
|
|
|
532
452
|
/**
|
|
533
|
-
* @
|
|
453
|
+
* @param toggle
|
|
454
|
+
* @param keepPhysics
|
|
534
455
|
*/
|
|
535
|
-
|
|
536
|
-
|
|
456
|
+
setCompletelyDisableCollision(toggle: boolean, keepPhysics: boolean): void {
|
|
457
|
+
inv<void>('0xE0580EC84813875A', this.handle, toggle, keepPhysics);
|
|
537
458
|
}
|
|
538
459
|
|
|
539
460
|
/**
|
|
540
|
-
* @param
|
|
541
|
-
* @param animName
|
|
542
|
-
* @param animType
|
|
543
|
-
* @returns
|
|
461
|
+
* @param p1
|
|
544
462
|
*/
|
|
545
|
-
|
|
546
|
-
|
|
463
|
+
N_0xCDB682BB47C02F0A(p1: string | number): void {
|
|
464
|
+
inv<void>('0xCDB682BB47C02F0A', this.handle, _h(p1));
|
|
547
465
|
}
|
|
548
466
|
|
|
549
467
|
/**
|
|
550
|
-
*
|
|
468
|
+
* @param volume
|
|
469
|
+
* @param p2
|
|
470
|
+
* @param p3
|
|
471
|
+
* @returns
|
|
551
472
|
*/
|
|
552
|
-
|
|
553
|
-
inv<
|
|
473
|
+
isInVolume(volume: number, p2: boolean, p3: number): boolean {
|
|
474
|
+
return inv<boolean>('0x5A5526BC09C06623', this.handle, volume, p2, p3, rai());
|
|
554
475
|
}
|
|
555
476
|
|
|
556
477
|
/**
|
|
557
|
-
* @returns
|
|
478
|
+
* @returns rightVector; forwardVector; upVector; position
|
|
558
479
|
*/
|
|
559
|
-
|
|
560
|
-
|
|
480
|
+
getMatrix(): [Vector3, Vector3, Vector3, Vector3] {
|
|
481
|
+
const result = inv<[number[], number[], number[], number[]]>('0x3A9B1120AF13FBF2', this.handle, pvv(), pvv(), pvv(), pvv());
|
|
482
|
+
return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1]), Vector3.fromArray(result[2]), Vector3.fromArray(result[3])];
|
|
561
483
|
}
|
|
562
484
|
|
|
563
485
|
/**
|
|
564
|
-
*
|
|
565
|
-
* @param animName
|
|
566
|
-
* @param speedMultiplier
|
|
486
|
+
* Called if entity is in water and submerged level is larger than 1f. If CARRYING_FLAG_FORCE_ALLOW_WARP_TO_SAFE_GROUND_LOCATION is true, it gets disabled as well.
|
|
567
487
|
*/
|
|
568
|
-
|
|
569
|
-
inv<void>('
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
unpinMapEntity(): void {
|
|
573
|
-
inv<void>('0xD2B9C78537ED5759', this.handle);
|
|
488
|
+
N_0x371D179701D9C082(): void {
|
|
489
|
+
inv<void>('0x371D179701D9C082', this.handle);
|
|
574
490
|
}
|
|
575
491
|
|
|
576
492
|
/**
|
|
577
|
-
*
|
|
578
|
-
*
|
|
493
|
+
* @param p1
|
|
579
494
|
* @returns
|
|
580
495
|
*/
|
|
581
|
-
|
|
582
|
-
return inv<number>('
|
|
496
|
+
getMaxHealth(p1: boolean): number {
|
|
497
|
+
return inv<number>('0x15D757606D170C3C', this.handle, p1, rai());
|
|
583
498
|
}
|
|
584
499
|
|
|
585
500
|
/**
|
|
586
|
-
* @
|
|
501
|
+
* @param animDict
|
|
502
|
+
* @param animName
|
|
503
|
+
* @param time
|
|
587
504
|
*/
|
|
588
|
-
|
|
589
|
-
|
|
505
|
+
setAnimCurrentTime(animDict: string | null, animName: string | null, time: number): void {
|
|
506
|
+
inv<void>('0x11CDABDC7783B2BC', this.handle, animDict, animName, f(time));
|
|
590
507
|
}
|
|
591
508
|
|
|
592
509
|
/**
|
|
593
|
-
*
|
|
510
|
+
* Gets the current coordinates for a specified entity.
|
|
511
|
+
* `entity` = The entity to get the coordinates from.
|
|
512
|
+
* `alive` = Unused by the game, potentially used by debug builds in order to assert whether or not an entity was alive. If entity is a ped and it's in a vehicle or on a mount the coords of that entity are returned. Set 'realCoords' to true when you need the true ped coords.
|
|
594
513
|
*
|
|
595
|
-
* @param
|
|
514
|
+
* @param alive
|
|
515
|
+
* @param realCoords
|
|
516
|
+
* @returns
|
|
596
517
|
*/
|
|
597
|
-
|
|
598
|
-
inv<
|
|
518
|
+
getCoords(alive?: boolean, realCoords?: boolean): Vector3 {
|
|
519
|
+
return Vector3.fromArray(inv<number[]>('0xA86D5F069399F44D', this.handle, alive, realCoords, rav()));
|
|
599
520
|
}
|
|
600
521
|
|
|
601
522
|
/**
|
|
602
|
-
* @
|
|
523
|
+
* @returns
|
|
603
524
|
*/
|
|
604
|
-
|
|
605
|
-
inv<
|
|
525
|
+
isAnObject(): boolean {
|
|
526
|
+
return inv<boolean>('0x0A27A546A375FDEF', this.handle, rai());
|
|
606
527
|
}
|
|
607
528
|
|
|
608
529
|
/**
|
|
609
530
|
* @returns
|
|
610
531
|
*/
|
|
611
|
-
|
|
612
|
-
return inv<boolean>('
|
|
532
|
+
isUpsidedown(): boolean {
|
|
533
|
+
return inv<boolean>('0x109DE3DA41AAD94A', this.handle, rai());
|
|
613
534
|
}
|
|
614
535
|
|
|
615
536
|
/**
|
|
616
537
|
* @param p1
|
|
538
|
+
* @returns
|
|
617
539
|
*/
|
|
618
|
-
|
|
619
|
-
inv<
|
|
540
|
+
doesBelongToThisScript(p1: boolean): boolean {
|
|
541
|
+
return inv<boolean>('0x622B1980CBE13332', this.handle, p1, rai());
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* Returns a hash of an entity's name. (Alternative Name: _GET_ENTITY_PROMPT_NAME_HASH)
|
|
546
|
+
*
|
|
547
|
+
* @returns
|
|
548
|
+
*/
|
|
549
|
+
getCarriableFromEntity(): number {
|
|
550
|
+
return (inv<number>('0x31FEF6A20F00B963', this.handle, rai())) & 0xFFFFFFFF;
|
|
620
551
|
}
|
|
621
552
|
|
|
622
553
|
/**
|
|
623
554
|
* @param toggle
|
|
624
555
|
* @param keepPhysics
|
|
625
556
|
*/
|
|
626
|
-
|
|
627
|
-
inv<void>('
|
|
557
|
+
setCollision(toggle: boolean, keepPhysics: boolean): void {
|
|
558
|
+
inv<void>('0xF66F820909453B8C', this.handle, toggle, keepPhysics);
|
|
628
559
|
}
|
|
629
560
|
|
|
630
561
|
/**
|
|
631
562
|
* @param p1
|
|
563
|
+
* @returns
|
|
632
564
|
*/
|
|
633
|
-
|
|
634
|
-
inv<
|
|
565
|
+
placeOnGroundProperly(p1: boolean): any {
|
|
566
|
+
return inv<number>('0x9587913B9E772D29', this.handle, p1);
|
|
635
567
|
}
|
|
636
568
|
|
|
637
569
|
/**
|
|
638
|
-
* @param volume
|
|
639
|
-
* @param p2
|
|
640
|
-
* @param p3
|
|
641
570
|
* @returns
|
|
642
571
|
*/
|
|
643
|
-
|
|
644
|
-
return inv<boolean>('
|
|
572
|
+
isInWater(): boolean {
|
|
573
|
+
return inv<boolean>('0xDDE5C125AC446723', this.handle, rai());
|
|
645
574
|
}
|
|
646
575
|
|
|
647
576
|
/**
|
|
648
|
-
* @returns
|
|
577
|
+
* @returns Returns `true` if the entity exists
|
|
649
578
|
*/
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1]), Vector3.fromArray(result[2]), Vector3.fromArray(result[3])];
|
|
579
|
+
doesExist(): boolean {
|
|
580
|
+
return inv<boolean>('0xD42BD6EB2E0F1677', this.handle, rai());
|
|
653
581
|
}
|
|
654
582
|
|
|
655
583
|
/**
|
|
656
|
-
*
|
|
584
|
+
* @returns
|
|
657
585
|
*/
|
|
658
|
-
|
|
659
|
-
inv<
|
|
586
|
+
getAlpha(): number {
|
|
587
|
+
return inv<number>('0x1BB501624FAF2BEA', this.handle, rai());
|
|
660
588
|
}
|
|
661
589
|
|
|
662
590
|
/**
|
|
663
|
-
*
|
|
591
|
+
* This native only works on `Ped` and `Object` entity types
|
|
592
|
+
*
|
|
593
|
+
* @param flagId Refer to [enum: eCarryingFlags]
|
|
664
594
|
* @returns
|
|
665
595
|
*/
|
|
666
|
-
|
|
667
|
-
return inv<number>('
|
|
596
|
+
getCarryingFlag(flagId: eCarryingFlags): number {
|
|
597
|
+
return inv<number>('0x808077647856DE62', this.handle, flagId, rai());
|
|
668
598
|
}
|
|
669
599
|
|
|
670
600
|
/**
|
|
671
|
-
* @param
|
|
672
|
-
* @param animName
|
|
673
|
-
* @param time
|
|
601
|
+
* @param p1
|
|
674
602
|
*/
|
|
675
|
-
|
|
676
|
-
inv<void>('
|
|
603
|
+
forceAiAndAnimationUpdate(p1: boolean): void {
|
|
604
|
+
inv<void>('0x4C9E96473D4F1A88', this.handle, p1);
|
|
677
605
|
}
|
|
678
606
|
|
|
679
607
|
/**
|
|
680
|
-
*
|
|
681
|
-
* `entity` = The entity to get the coordinates from.
|
|
682
|
-
* `alive` = Unused by the game, potentially used by debug builds in order to assert whether or not an entity was alive. If entity is a ped and it's in a vehicle or on a mount the coords of that entity are returned. Set 'realCoords' to true when you need the true ped coords.
|
|
608
|
+
* Axis - Invert Axis Flags
|
|
683
609
|
*
|
|
684
|
-
* @param
|
|
685
|
-
* @param
|
|
686
|
-
* @
|
|
610
|
+
* @param pos
|
|
611
|
+
* @param xAxis
|
|
612
|
+
* @param yAxis
|
|
613
|
+
* @param zAxis
|
|
687
614
|
*/
|
|
688
|
-
|
|
689
|
-
|
|
615
|
+
setCoordsNoOffset(pos: Vector3, xAxis: boolean, yAxis: boolean, zAxis: boolean): void {
|
|
616
|
+
inv<void>('0x239A3351AC1DA385', this.handle, f(pos.x), f(pos.y), f(pos.z), xAxis, yAxis, zAxis);
|
|
690
617
|
}
|
|
691
618
|
|
|
692
619
|
/**
|
|
620
|
+
* Returns (CUR_HEALTH / MAX_HEALTH)
|
|
621
|
+
*
|
|
693
622
|
* @returns
|
|
694
623
|
*/
|
|
695
|
-
|
|
696
|
-
return inv<
|
|
624
|
+
getHealthFloat(): number {
|
|
625
|
+
return inv<number>('0x96C638784DB4C815', this.handle, raf());
|
|
697
626
|
}
|
|
698
627
|
|
|
699
628
|
/**
|
|
@@ -934,117 +863,195 @@ export class Entity implements IHandle {
|
|
|
934
863
|
}
|
|
935
864
|
|
|
936
865
|
/**
|
|
937
|
-
* @param
|
|
938
|
-
* @param
|
|
939
|
-
* @param p7
|
|
940
|
-
* @param p8
|
|
941
|
-
* @param p9
|
|
866
|
+
* @param playerPedToIgnore
|
|
867
|
+
* @param flags
|
|
942
868
|
* @returns
|
|
943
869
|
*/
|
|
944
|
-
|
|
945
|
-
return inv<
|
|
870
|
+
getNearestPlayerToEntity(playerPedToIgnore: Ped, flags: number): Player | null {
|
|
871
|
+
return createFromHandle<Player>('Player', inv<number>('0x990E294FC387FB88', this.handle, playerPedToIgnore.handle, flags, rai()));
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* Gets the Y-component of the entity's forward vector.
|
|
876
|
+
*
|
|
877
|
+
* @returns
|
|
878
|
+
*/
|
|
879
|
+
getForwardY(): number {
|
|
880
|
+
return inv<number>('0x9A5C073ECBDA7EE7', this.handle, raf());
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
/**
|
|
884
|
+
* @param pitch
|
|
885
|
+
* @param roll
|
|
886
|
+
* @param yaw
|
|
887
|
+
* @param rotationOrder
|
|
888
|
+
* @param p5
|
|
889
|
+
*/
|
|
890
|
+
setRotation(pitch: number, roll: number, yaw: number, rotationOrder: number, p5: boolean): void {
|
|
891
|
+
inv<void>('0x9CC8314DFEDE441E', this.handle, f(pitch), f(roll), f(yaw), rotationOrder, p5);
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
/**
|
|
895
|
+
* @param p1
|
|
896
|
+
* @param relationshipGroup
|
|
897
|
+
*/
|
|
898
|
+
setOnlyDamagedByRelationshipGroup(p1: boolean, relationshipGroup: string | number): void {
|
|
899
|
+
inv<void>('0x6C1F6AA2F0ADD104', this.handle, p1, _h(relationshipGroup));
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
/**
|
|
903
|
+
* https://github.com/femga/rdr3_discoveries/tree/master/AI/ENTITY_PROOFS
|
|
904
|
+
* BOOL p2: handles an additional special proofs flag, so it simply indicates whether it should be enabled or disabled, not sure what exactly it proofs the entity from though
|
|
905
|
+
*
|
|
906
|
+
* @param proofsBitset
|
|
907
|
+
* @param specialFlag
|
|
908
|
+
*/
|
|
909
|
+
setProofs(proofsBitset: number, specialFlag: boolean): void {
|
|
910
|
+
inv<void>('0xFAEE099C6F890BB8', this.handle, proofsBitset, specialFlag);
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
/**
|
|
914
|
+
* @returns
|
|
915
|
+
*/
|
|
916
|
+
hasCollisionLoadedAroundEntity(): boolean {
|
|
917
|
+
return inv<boolean>('0xBEB1600952B9CF5C', this.handle, rai());
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
/**
|
|
921
|
+
* @returns
|
|
922
|
+
*/
|
|
923
|
+
getIsCarriablePelt(): any {
|
|
924
|
+
return inv<number>('0x255B6DB4E3AD3C3E', this.handle);
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
/**
|
|
928
|
+
* @param p1
|
|
929
|
+
* @returns
|
|
930
|
+
*/
|
|
931
|
+
getVelocity(p1: number): Vector3 {
|
|
932
|
+
return Vector3.fromArray(inv<number[]>('0x4805D2B1D8CF94A9', this.handle, p1, rav()));
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
/**
|
|
936
|
+
* @param toggle
|
|
937
|
+
*/
|
|
938
|
+
setCanAutoVaultOnEntity(toggle: boolean): void {
|
|
939
|
+
inv<void>('0x80646744FA88F9D7', this.handle, toggle);
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* Sets the loot table an entity will carry. Returns true if loot table has been successfully set. Returns false if entity is not a ped or object.
|
|
944
|
+
* https://github.com/femga/rdr3_discoveries/blob/master/AI/EVENTS/loot_rewards.lua
|
|
945
|
+
*
|
|
946
|
+
* @param lootTable
|
|
947
|
+
* @returns
|
|
948
|
+
*/
|
|
949
|
+
scriptOverrideLootTablePermanent(lootTable: string | number): any {
|
|
950
|
+
return inv<number>('0x8C03CD6B5E0E85E8', this.handle, _h(lootTable));
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
/**
|
|
954
|
+
* @returns argStruct
|
|
955
|
+
*/
|
|
956
|
+
getScript(): [number, number] {
|
|
957
|
+
const result = inv<[number, number]>('0x2A08A32B6D49906F', this.handle, pvi(), rai());
|
|
958
|
+
return [result[0] & 0xFFFFFFFF, result[1]];
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
/**
|
|
962
|
+
* @param actionHash
|
|
963
|
+
* @returns
|
|
964
|
+
*/
|
|
965
|
+
hasAnimEventFired(actionHash: string | number): boolean {
|
|
966
|
+
return inv<boolean>('0x5851CC48405F4A07', this.handle, _h(actionHash), rai());
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
/**
|
|
970
|
+
* @param p1
|
|
971
|
+
*/
|
|
972
|
+
N_0xEF259AA1E097E0AD(p1: any): void {
|
|
973
|
+
inv<void>('0xEF259AA1E097E0AD', this.handle, p1);
|
|
946
974
|
}
|
|
947
975
|
|
|
948
976
|
/**
|
|
949
|
-
*
|
|
950
|
-
* https://github.com/femga/rdr3_discoveries/tree/master/boneNames
|
|
977
|
+
* Getter for FREEZE_ENTITY_POSITION
|
|
951
978
|
*
|
|
952
|
-
* @param boneIndex
|
|
953
979
|
* @returns
|
|
954
980
|
*/
|
|
955
|
-
|
|
956
|
-
return
|
|
981
|
+
isFrozen(): any {
|
|
982
|
+
return inv<number>('0x083D497D57B7400F', this.handle);
|
|
957
983
|
}
|
|
958
984
|
|
|
959
985
|
/**
|
|
960
|
-
*
|
|
986
|
+
* Returns the entity that is looting a ped but only while the looting is active
|
|
961
987
|
*
|
|
962
|
-
* @param animName
|
|
963
|
-
* @param animDict
|
|
964
|
-
* @param p3
|
|
965
|
-
* @param loop
|
|
966
|
-
* @param stayInAnim
|
|
967
|
-
* @param p6
|
|
968
|
-
* @param delta
|
|
969
|
-
* @param bitset
|
|
970
988
|
* @returns
|
|
971
989
|
*/
|
|
972
|
-
|
|
973
|
-
return inv<
|
|
990
|
+
getLootingPed(): Ped | null {
|
|
991
|
+
return createFromHandle<Ped>('Ped', inv<number>('0xEF2D9ED7CE684F08', this.handle, rai()));
|
|
974
992
|
}
|
|
975
993
|
|
|
976
994
|
/**
|
|
977
|
-
*
|
|
978
|
-
*
|
|
979
|
-
* @returns lootTable
|
|
995
|
+
* @returns
|
|
980
996
|
*/
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
return [result[0], result[1]];
|
|
997
|
+
isWaitingForWorldCollision(): boolean {
|
|
998
|
+
return inv<boolean>('0x5E1CC2E8DC3111DD', this.handle, rai());
|
|
984
999
|
}
|
|
985
1000
|
|
|
986
1001
|
/**
|
|
987
|
-
*
|
|
988
|
-
*
|
|
989
|
-
* @param p3
|
|
1002
|
+
* Gets the X-component of the entity's forward vector.
|
|
1003
|
+
*
|
|
990
1004
|
* @returns
|
|
991
1005
|
*/
|
|
992
|
-
|
|
993
|
-
return inv<
|
|
1006
|
+
getForwardX(): number {
|
|
1007
|
+
return inv<number>('0xDB0954E9960F6457', this.handle, raf());
|
|
994
1008
|
}
|
|
995
1009
|
|
|
996
1010
|
/**
|
|
997
|
-
* @
|
|
998
|
-
* @param relGroup
|
|
1011
|
+
* @returns
|
|
999
1012
|
*/
|
|
1000
|
-
|
|
1001
|
-
inv<
|
|
1013
|
+
isAPed(): boolean {
|
|
1014
|
+
return inv<boolean>('0xCF8176912DDA4EA5', this.handle, rai());
|
|
1002
1015
|
}
|
|
1003
1016
|
|
|
1004
1017
|
/**
|
|
1005
1018
|
* @returns
|
|
1006
1019
|
*/
|
|
1007
|
-
|
|
1008
|
-
return inv<number>('
|
|
1020
|
+
getPitch(): number {
|
|
1021
|
+
return inv<number>('0xEF355ABEFF7F5005', this.handle, raf());
|
|
1009
1022
|
}
|
|
1010
1023
|
|
|
1011
1024
|
/**
|
|
1012
|
-
* @
|
|
1013
|
-
* @param heading
|
|
1014
|
-
* @param xAxis
|
|
1015
|
-
* @param yAxis
|
|
1016
|
-
* @param zAxis
|
|
1025
|
+
* @returns
|
|
1017
1026
|
*/
|
|
1018
|
-
|
|
1019
|
-
inv<
|
|
1027
|
+
isStatic(): boolean {
|
|
1028
|
+
return inv<boolean>('0x86468ADFA0F6B861', this.handle, rai());
|
|
1020
1029
|
}
|
|
1021
1030
|
|
|
1022
1031
|
/**
|
|
1023
|
-
* Returns
|
|
1032
|
+
* Returns the model hash from the entity
|
|
1024
1033
|
*
|
|
1025
1034
|
* @returns
|
|
1026
1035
|
*/
|
|
1027
|
-
|
|
1028
|
-
return (inv<number>('
|
|
1036
|
+
getModel(): number {
|
|
1037
|
+
return (inv<number>('0xDA76A9F39210D365', this.handle, rai())) & 0xFFFFFFFF;
|
|
1029
1038
|
}
|
|
1030
1039
|
|
|
1031
1040
|
/**
|
|
1032
|
-
*
|
|
1033
|
-
*
|
|
1034
|
-
* @param tier
|
|
1035
|
-
* @param p2
|
|
1041
|
+
* Deletes the specified entity, then sets the handle pointed to by the pointer to NULL.
|
|
1036
1042
|
*/
|
|
1037
|
-
|
|
1038
|
-
inv<void>('
|
|
1043
|
+
deleteEntity(): void {
|
|
1044
|
+
inv<void>('0x4CD38C78BD19A497', this.handle);
|
|
1039
1045
|
}
|
|
1040
1046
|
|
|
1041
1047
|
/**
|
|
1042
|
-
*
|
|
1043
|
-
*
|
|
1048
|
+
* @param team
|
|
1049
|
+
* @param playerPedToIgnore
|
|
1050
|
+
* @param flags
|
|
1044
1051
|
* @returns
|
|
1045
1052
|
*/
|
|
1046
|
-
|
|
1047
|
-
return inv<number>('
|
|
1053
|
+
getNearestPlayerToOnTeam(team: number, playerPedToIgnore: Ped, flags: number): Player | null {
|
|
1054
|
+
return createFromHandle<Player>('Player', inv<number>('0xB2C30C3B4AFF718C', this.handle, team, playerPedToIgnore.handle, flags, rai()));
|
|
1048
1055
|
}
|
|
1049
1056
|
|
|
1050
1057
|
/**
|
|
@@ -1358,193 +1365,186 @@ export class Entity implements IHandle {
|
|
|
1358
1365
|
}
|
|
1359
1366
|
|
|
1360
1367
|
/**
|
|
1361
|
-
*
|
|
1368
|
+
* Returns entityType: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/eEntityType
|
|
1362
1369
|
*
|
|
1363
|
-
* @param entity2
|
|
1364
|
-
* @param p2
|
|
1365
|
-
* @param p3
|
|
1366
1370
|
* @returns
|
|
1367
1371
|
*/
|
|
1368
|
-
|
|
1369
|
-
return inv<
|
|
1372
|
+
getType(): number {
|
|
1373
|
+
return inv<number>('0x97F696ACA466B4E0', this.handle, rai());
|
|
1370
1374
|
}
|
|
1371
1375
|
|
|
1372
1376
|
/**
|
|
1373
|
-
*
|
|
1377
|
+
* @returns
|
|
1374
1378
|
*/
|
|
1375
|
-
|
|
1376
|
-
inv<
|
|
1379
|
+
isOwnedByPersistenceSystem(): any {
|
|
1380
|
+
return inv<number>('0xA7E51B53309EAC97', this.handle);
|
|
1377
1381
|
}
|
|
1378
1382
|
|
|
1379
1383
|
/**
|
|
1380
|
-
* @param
|
|
1384
|
+
* @param animDict
|
|
1385
|
+
* @param animName
|
|
1386
|
+
* @param animType
|
|
1381
1387
|
* @returns
|
|
1382
1388
|
*/
|
|
1383
|
-
|
|
1384
|
-
return inv<boolean>('
|
|
1389
|
+
isPlayingAnim(animDict: string | null, animName: string | null, animType: number): boolean {
|
|
1390
|
+
return inv<boolean>('0xDEE49D5CA6C49148', this.handle, animDict, animName, animType, rai());
|
|
1385
1391
|
}
|
|
1386
1392
|
|
|
1387
1393
|
/**
|
|
1388
|
-
*
|
|
1394
|
+
* Marks the specified entity (ped, vehicle or object) as no longer needed, allowing the game engine to delete it whenever it sees fit.
|
|
1389
1395
|
*/
|
|
1390
|
-
|
|
1391
|
-
|
|
1396
|
+
setAsNoLongerNeeded(): void {
|
|
1397
|
+
inv<void>('0x4971D2F8162B9674', this.handle);
|
|
1392
1398
|
}
|
|
1393
1399
|
|
|
1394
1400
|
/**
|
|
1395
1401
|
* @returns
|
|
1396
1402
|
*/
|
|
1397
|
-
|
|
1398
|
-
return inv<boolean>('
|
|
1403
|
+
hasBeenDamagedByAnyVehicle(): boolean {
|
|
1404
|
+
return inv<boolean>('0x695D7C26DE65C423', this.handle, rai());
|
|
1399
1405
|
}
|
|
1400
1406
|
|
|
1401
1407
|
/**
|
|
1402
|
-
* @param
|
|
1403
|
-
* @
|
|
1408
|
+
* @param animDict
|
|
1409
|
+
* @param animName
|
|
1410
|
+
* @param speedMultiplier
|
|
1404
1411
|
*/
|
|
1405
|
-
|
|
1406
|
-
|
|
1412
|
+
setAnimSpeed(animDict: string | null, animName: string | null, speedMultiplier: number): void {
|
|
1413
|
+
inv<void>('0xEAA885BA3CEA4E4A', this.handle, animDict, animName, f(speedMultiplier));
|
|
1407
1414
|
}
|
|
1408
1415
|
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
*/
|
|
1412
|
-
hasBeenDamagedByAnyObject(): boolean {
|
|
1413
|
-
return inv<boolean>('0x73BB763880CD23A6', this.handle, rai());
|
|
1416
|
+
unpinMapEntity(): void {
|
|
1417
|
+
inv<void>('0xD2B9C78537ED5759', this.handle);
|
|
1414
1418
|
}
|
|
1415
1419
|
|
|
1416
1420
|
/**
|
|
1417
|
-
*
|
|
1421
|
+
* Get how much of the entity is submerged. 1.0f is whole entity.
|
|
1422
|
+
*
|
|
1418
1423
|
* @returns
|
|
1419
1424
|
*/
|
|
1420
|
-
|
|
1421
|
-
return
|
|
1425
|
+
getSubmergedLevel(): number {
|
|
1426
|
+
return inv<number>('0x4A77C3F73FD9E831', this.handle, raf());
|
|
1422
1427
|
}
|
|
1423
1428
|
|
|
1424
1429
|
/**
|
|
1425
|
-
* @
|
|
1430
|
+
* @returns
|
|
1426
1431
|
*/
|
|
1427
|
-
|
|
1428
|
-
inv<
|
|
1429
|
-
}
|
|
1430
|
-
|
|
1431
|
-
resetAlpha(): void {
|
|
1432
|
-
inv<void>('0x744B9EF44779D9AB', this.handle);
|
|
1432
|
+
isAttached(): boolean {
|
|
1433
|
+
return inv<boolean>('0xEE6AD63ABF59C0B7', this.handle, rai());
|
|
1433
1434
|
}
|
|
1434
1435
|
|
|
1435
1436
|
/**
|
|
1436
|
-
*
|
|
1437
|
+
* SET_ENTITY_A*
|
|
1437
1438
|
*
|
|
1438
|
-
* @param
|
|
1439
|
-
* @param xSize
|
|
1440
|
-
* @param ySize
|
|
1441
|
-
* @param zSize
|
|
1442
|
-
* @param p7
|
|
1443
|
-
* @param p8
|
|
1444
|
-
* @param p9
|
|
1445
|
-
* @returns
|
|
1439
|
+
* @param p1
|
|
1446
1440
|
*/
|
|
1447
|
-
|
|
1448
|
-
|
|
1441
|
+
N_0xC0EDEF16D90661EE(p1: number): void {
|
|
1442
|
+
inv<void>('0xC0EDEF16D90661EE', this.handle, f(p1));
|
|
1449
1443
|
}
|
|
1450
1444
|
|
|
1451
1445
|
/**
|
|
1452
|
-
* @
|
|
1446
|
+
* @param looted
|
|
1453
1447
|
*/
|
|
1454
|
-
|
|
1455
|
-
|
|
1448
|
+
setFullyLooted(looted: boolean): void {
|
|
1449
|
+
inv<void>('0x6BCF5F3D8FFE988D', this.handle, looted);
|
|
1456
1450
|
}
|
|
1457
1451
|
|
|
1458
1452
|
/**
|
|
1459
|
-
* @param p1
|
|
1460
1453
|
* @returns
|
|
1461
1454
|
*/
|
|
1462
|
-
|
|
1463
|
-
return inv<boolean>('
|
|
1455
|
+
isAttachedToAnyVehicle(): boolean {
|
|
1456
|
+
return inv<boolean>('0x12DF6E0D2E736749', this.handle, rai());
|
|
1464
1457
|
}
|
|
1465
1458
|
|
|
1466
1459
|
/**
|
|
1467
|
-
*
|
|
1460
|
+
* Used in Script Function DUELING_DID_PLAYER_DISARM_OPPONENT
|
|
1468
1461
|
*
|
|
1462
|
+
* @param entity2
|
|
1463
|
+
* @param p2
|
|
1464
|
+
* @param p3
|
|
1469
1465
|
* @returns
|
|
1470
1466
|
*/
|
|
1471
|
-
|
|
1472
|
-
return
|
|
1467
|
+
N_0x3EC28DA1FFAC9DDD(entity2: Entity, p2: any, p3: any): boolean {
|
|
1468
|
+
return inv<boolean>('0x3EC28DA1FFAC9DDD', this.handle, entity2.handle, p2, p3, rai());
|
|
1473
1469
|
}
|
|
1474
1470
|
|
|
1475
1471
|
/**
|
|
1476
|
-
*
|
|
1477
|
-
* @param keepPhysics
|
|
1472
|
+
* Must be called from a background script, otherwise it will do nothing.
|
|
1478
1473
|
*/
|
|
1479
|
-
|
|
1480
|
-
inv<void>('
|
|
1474
|
+
delete2(): void {
|
|
1475
|
+
inv<void>('0x5E94EA09E7207C16', this.handle);
|
|
1481
1476
|
}
|
|
1482
1477
|
|
|
1483
1478
|
/**
|
|
1484
1479
|
* @param p1
|
|
1485
1480
|
* @returns
|
|
1486
1481
|
*/
|
|
1487
|
-
|
|
1488
|
-
return inv<
|
|
1482
|
+
isInAir(p1: any): boolean {
|
|
1483
|
+
return inv<boolean>('0x886E37EC497200B6', this.handle, p1, rai());
|
|
1489
1484
|
}
|
|
1490
1485
|
|
|
1491
1486
|
/**
|
|
1492
1487
|
* @returns
|
|
1493
1488
|
*/
|
|
1494
|
-
|
|
1495
|
-
return inv<boolean>('
|
|
1489
|
+
isAMissionEntity(): boolean {
|
|
1490
|
+
return inv<boolean>('0x138190F64DB4BBD1', this.handle, rai());
|
|
1496
1491
|
}
|
|
1497
1492
|
|
|
1498
1493
|
/**
|
|
1499
|
-
* @returns
|
|
1494
|
+
* @returns
|
|
1500
1495
|
*/
|
|
1501
|
-
|
|
1502
|
-
return inv<boolean>('
|
|
1496
|
+
isAttachedToAnyPed(): boolean {
|
|
1497
|
+
return inv<boolean>('0xC841153DED2CA89A', this.handle, rai());
|
|
1503
1498
|
}
|
|
1504
1499
|
|
|
1505
1500
|
/**
|
|
1501
|
+
* @param to
|
|
1506
1502
|
* @returns
|
|
1507
1503
|
*/
|
|
1508
|
-
|
|
1509
|
-
return inv<
|
|
1504
|
+
isAttachedToEntity(to: Entity): boolean {
|
|
1505
|
+
return inv<boolean>('0x154A3C529497053E', this.handle, to.handle, rai());
|
|
1510
1506
|
}
|
|
1511
1507
|
|
|
1512
1508
|
/**
|
|
1513
|
-
* This native only works on `Ped` and `Object` entity types
|
|
1514
|
-
*
|
|
1515
|
-
* @param flagId Refer to [enum: eCarryingFlags]
|
|
1516
1509
|
* @returns
|
|
1517
1510
|
*/
|
|
1518
|
-
|
|
1519
|
-
return inv<
|
|
1511
|
+
hasBeenDamagedByAnyObject(): boolean {
|
|
1512
|
+
return inv<boolean>('0x73BB763880CD23A6', this.handle, rai());
|
|
1520
1513
|
}
|
|
1521
1514
|
|
|
1522
1515
|
/**
|
|
1523
|
-
* @param
|
|
1516
|
+
* @param rotationOrder
|
|
1517
|
+
* @returns
|
|
1524
1518
|
*/
|
|
1525
|
-
|
|
1526
|
-
inv<
|
|
1519
|
+
getRotation(rotationOrder: number): Vector3 {
|
|
1520
|
+
return Vector3.fromArray(inv<number[]>('0xE09CAF86C32CB48F', this.handle, rotationOrder, rav()));
|
|
1527
1521
|
}
|
|
1528
1522
|
|
|
1529
1523
|
/**
|
|
1530
|
-
*
|
|
1531
|
-
*
|
|
1532
|
-
* @param pos
|
|
1533
|
-
* @param xAxis
|
|
1534
|
-
* @param yAxis
|
|
1535
|
-
* @param zAxis
|
|
1524
|
+
* @param toggle
|
|
1536
1525
|
*/
|
|
1537
|
-
|
|
1538
|
-
inv<void>('
|
|
1526
|
+
setMotionBlur(toggle: boolean): void {
|
|
1527
|
+
inv<void>('0x516C6ABD18322B63', this.handle, toggle);
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
resetAlpha(): void {
|
|
1531
|
+
inv<void>('0x744B9EF44779D9AB', this.handle);
|
|
1539
1532
|
}
|
|
1540
1533
|
|
|
1541
1534
|
/**
|
|
1542
|
-
*
|
|
1535
|
+
* Checks if entity is within x/y/zSize distance of x/y/z. Last three are unknown ints, almost always p7 = 0, p8 = 1, p9 = 0
|
|
1543
1536
|
*
|
|
1537
|
+
* @param pos
|
|
1538
|
+
* @param xSize
|
|
1539
|
+
* @param ySize
|
|
1540
|
+
* @param zSize
|
|
1541
|
+
* @param p7
|
|
1542
|
+
* @param p8
|
|
1543
|
+
* @param p9
|
|
1544
1544
|
* @returns
|
|
1545
1545
|
*/
|
|
1546
|
-
|
|
1547
|
-
return inv<
|
|
1546
|
+
isAtCoord(pos: Vector3, xSize: number, ySize: number, zSize: number, p7: boolean, p8: boolean, p9: number): boolean {
|
|
1547
|
+
return inv<boolean>('0x5E58342602E94718', this.handle, f(pos.x), f(pos.y), f(pos.z), f(xSize), f(ySize), f(zSize), p7, p8, p9, rai());
|
|
1548
1548
|
}
|
|
1549
1549
|
|
|
1550
1550
|
/**
|