@nativewrappers/redm-codegen 0.0.2 → 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 +101 -101
- package/dist/classes/AnimScene.d.ts.map +1 -1
- package/dist/classes/AnimScene.js +147 -147
- package/dist/classes/BaseModel.d.ts +12 -12
- package/dist/classes/BaseModel.d.ts.map +1 -1
- package/dist/classes/BaseModel.js +18 -18
- package/dist/classes/BaseTask.d.ts +22 -22
- package/dist/classes/BaseTask.d.ts.map +1 -1
- package/dist/classes/BaseTask.js +29 -29
- package/dist/classes/Cam.d.ts +86 -86
- package/dist/classes/Cam.d.ts.map +1 -1
- package/dist/classes/Cam.js +116 -116
- package/dist/classes/Entity.d.ts +426 -425
- package/dist/classes/Entity.d.ts.map +1 -1
- package/dist/classes/Entity.js +594 -589
- package/dist/classes/Interior.d.ts +1 -1
- package/dist/classes/Interior.d.ts.map +1 -1
- package/dist/classes/Ped.d.ts +13 -12
- package/dist/classes/Ped.d.ts.map +1 -1
- package/dist/classes/Ped.js +5 -0
- package/dist/classes/PedTask.d.ts +729 -729
- package/dist/classes/PedTask.d.ts.map +1 -1
- package/dist/classes/PedTask.js +951 -951
- package/dist/classes/PersChar.d.ts +11 -11
- package/dist/classes/PersChar.d.ts.map +1 -1
- package/dist/classes/PersChar.js +17 -17
- package/dist/classes/Pickup.d.ts +3 -3
- package/dist/classes/Pickup.d.ts.map +1 -1
- package/dist/classes/Pickup.js +7 -7
- package/dist/classes/Player.d.ts +164 -164
- package/dist/classes/Player.d.ts.map +1 -1
- package/dist/classes/Player.js +218 -218
- package/dist/classes/Prop.d.ts +87 -86
- package/dist/classes/Prop.d.ts.map +1 -1
- package/dist/classes/Prop.js +131 -126
- package/dist/classes/PropSet.d.ts +18 -18
- package/dist/classes/PropSet.d.ts.map +1 -1
- package/dist/classes/PropSet.js +25 -25
- package/dist/classes/Vehicle.d.ts +1 -0
- package/dist/classes/Vehicle.d.ts.map +1 -1
- package/dist/classes/Vehicle.js +5 -0
- package/dist/classes/VehicleTask.d.ts +18 -18
- package/dist/classes/VehicleTask.d.ts.map +1 -1
- package/dist/classes/VehicleTask.js +26 -26
- package/dist/classes/Volume.d.ts +1 -1
- package/dist/classes/Volume.d.ts.map +1 -1
- package/dist/classes/Weapon.d.ts +277 -277
- package/dist/classes/Weapon.d.ts.map +1 -1
- package/dist/classes/Weapon.js +398 -398
- package/dist/namespaces/Aitransport.d.ts +77 -77
- package/dist/namespaces/Aitransport.d.ts.map +1 -1
- package/dist/namespaces/Aitransport.js +94 -94
- package/dist/namespaces/Animscene.d.ts +51 -51
- package/dist/namespaces/Animscene.d.ts.map +1 -1
- package/dist/namespaces/Animscene.js +69 -69
- package/dist/namespaces/Audio.d.ts +2 -2
- package/dist/namespaces/Audio.d.ts.map +1 -1
- 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/Brain.d.ts +15 -15
- package/dist/namespaces/Brain.d.ts.map +1 -1
- package/dist/namespaces/Brain.js +20 -20
- package/dist/namespaces/CamStatics.d.ts +317 -317
- package/dist/namespaces/CamStatics.d.ts.map +1 -1
- package/dist/namespaces/CamStatics.js +449 -449
- package/dist/namespaces/Collection.d.ts +13 -13
- package/dist/namespaces/Collection.d.ts.map +1 -1
- package/dist/namespaces/Collection.js +8 -8
- package/dist/namespaces/Companion.d.ts +22 -22
- package/dist/namespaces/Companion.d.ts.map +1 -1
- package/dist/namespaces/Companion.js +30 -30
- package/dist/namespaces/Compendium.d.ts +60 -60
- package/dist/namespaces/Compendium.d.ts.map +1 -1
- package/dist/namespaces/Compendium.js +80 -80
- 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 +173 -173
- package/dist/namespaces/Databinding.d.ts.map +1 -1
- package/dist/namespaces/Databinding.js +263 -263
- package/dist/namespaces/Dlc.d.ts +5 -5
- package/dist/namespaces/Dlc.d.ts.map +1 -1
- package/dist/namespaces/Dlc.js +9 -9
- package/dist/namespaces/EntityStatics.d.ts +178 -178
- package/dist/namespaces/EntityStatics.d.ts.map +1 -1
- package/dist/namespaces/EntityStatics.js +242 -242
- package/dist/namespaces/Event.d.ts +62 -62
- package/dist/namespaces/Event.d.ts.map +1 -1
- package/dist/namespaces/Event.js +82 -82
- package/dist/namespaces/Fire.d.ts +7 -7
- package/dist/namespaces/Fire.d.ts.map +1 -1
- package/dist/namespaces/Fire.js +9 -9
- package/dist/namespaces/Graphics.d.ts +797 -797
- package/dist/namespaces/Graphics.d.ts.map +1 -1
- package/dist/namespaces/Graphics.js +1095 -1095
- package/dist/namespaces/Hud.d.ts +477 -477
- package/dist/namespaces/Hud.d.ts.map +1 -1
- package/dist/namespaces/Hud.js +721 -721
- package/dist/namespaces/InteriorStatics.d.ts +2 -2
- package/dist/namespaces/InteriorStatics.d.ts.map +1 -1
- package/dist/namespaces/Inventory.d.ts +216 -216
- package/dist/namespaces/Inventory.d.ts.map +1 -1
- package/dist/namespaces/Inventory.js +301 -301
- package/dist/namespaces/Itemdatabase.d.ts +8 -8
- package/dist/namespaces/Itemdatabase.d.ts.map +1 -1
- package/dist/namespaces/Itemdatabase.js +7 -7
- package/dist/namespaces/Law.d.ts +2 -2
- package/dist/namespaces/Law.d.ts.map +1 -1
- package/dist/namespaces/Map.d.ts +65 -65
- package/dist/namespaces/Map.d.ts.map +1 -1
- package/dist/namespaces/Map.js +91 -91
- package/dist/namespaces/Minigame.d.ts +17 -17
- package/dist/namespaces/Minigame.d.ts.map +1 -1
- package/dist/namespaces/Minigame.js +25 -25
- package/dist/namespaces/Misc.d.ts +5 -5
- package/dist/namespaces/Misc.d.ts.map +1 -1
- package/dist/namespaces/Missiondata.d.ts +3 -3
- package/dist/namespaces/Missiondata.d.ts.map +1 -1
- package/dist/namespaces/Netshopping.d.ts +1 -1
- package/dist/namespaces/Netshopping.d.ts.map +1 -1
- package/dist/namespaces/Network.d.ts +1302 -1310
- package/dist/namespaces/Network.d.ts.map +1 -1
- package/dist/namespaces/Network.js +1910 -1918
- package/dist/namespaces/Object.d.ts +170 -170
- package/dist/namespaces/Object.d.ts.map +1 -1
- package/dist/namespaces/Object.js +232 -232
- package/dist/namespaces/Pad.d.ts +103 -103
- package/dist/namespaces/Pad.d.ts.map +1 -1
- package/dist/namespaces/Pad.js +134 -134
- package/dist/namespaces/PedStatics.d.ts +3 -3
- package/dist/namespaces/PedStatics.d.ts.map +1 -1
- package/dist/namespaces/Perschar.d.ts +71 -71
- package/dist/namespaces/Perschar.d.ts.map +1 -1
- package/dist/namespaces/Perschar.js +106 -106
- package/dist/namespaces/Persistence.d.ts +30 -30
- package/dist/namespaces/Persistence.d.ts.map +1 -1
- package/dist/namespaces/Persistence.js +42 -42
- package/dist/namespaces/PlayerStatics.d.ts +52 -52
- package/dist/namespaces/PlayerStatics.d.ts.map +1 -1
- package/dist/namespaces/PlayerStatics.js +71 -71
- package/dist/namespaces/Population.d.ts +3 -3
- package/dist/namespaces/Population.d.ts.map +1 -1
- package/dist/namespaces/Posse.d.ts +28 -28
- package/dist/namespaces/Posse.d.ts.map +1 -1
- package/dist/namespaces/Posse.js +44 -44
- 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/Scripts.d.ts +3 -3
- package/dist/namespaces/Scripts.d.ts.map +1 -1
- package/dist/namespaces/Socialclub.d.ts +1 -1
- package/dist/namespaces/Socialclub.d.ts.map +1 -1
- package/dist/namespaces/Stats.d.ts +85 -85
- package/dist/namespaces/Stats.d.ts.map +1 -1
- package/dist/namespaces/Stats.js +113 -113
- package/dist/namespaces/Streaming.d.ts +35 -35
- package/dist/namespaces/Streaming.d.ts.map +1 -1
- package/dist/namespaces/Streaming.js +53 -53
- package/dist/namespaces/Task.d.ts +367 -367
- package/dist/namespaces/Task.d.ts.map +1 -1
- package/dist/namespaces/Task.js +508 -508
- package/dist/namespaces/Telemetry.d.ts +198 -198
- package/dist/namespaces/Telemetry.d.ts.map +1 -1
- package/dist/namespaces/Telemetry.js +274 -274
- package/dist/namespaces/Uiapps.d.ts +24 -24
- package/dist/namespaces/Uiapps.d.ts.map +1 -1
- package/dist/namespaces/Uiapps.js +33 -33
- package/dist/namespaces/Uistickyfeed.d.ts +16 -16
- package/dist/namespaces/Uistickyfeed.d.ts.map +1 -1
- package/dist/namespaces/Uistickyfeed.js +21 -21
- package/dist/namespaces/VehicleStatics.d.ts +2 -2
- package/dist/namespaces/VehicleStatics.d.ts.map +1 -1
- 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 +250 -250
- package/dist/namespaces/WeaponStatics.d.ts.map +1 -1
- package/dist/namespaces/WeaponStatics.js +372 -372
- package/dist/namespaces/Zone.d.ts +8 -8
- 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 +170 -170
- package/src/classes/BaseModel.ts +21 -21
- package/src/classes/BaseTask.ts +31 -31
- package/src/classes/Cam.ts +124 -124
- package/src/classes/Entity.ts +619 -614
- package/src/classes/Interior.ts +1 -1
- package/src/classes/Ped.ts +17 -12
- package/src/classes/PedTask.ts +1011 -1011
- package/src/classes/PersChar.ts +19 -19
- package/src/classes/Pickup.ts +8 -8
- package/src/classes/Player.ts +227 -227
- package/src/classes/Prop.ts +146 -141
- package/src/classes/PropSet.ts +29 -29
- package/src/classes/Vehicle.ts +5 -0
- package/src/classes/VehicleTask.ts +30 -30
- package/src/classes/Volume.ts +1 -1
- package/src/classes/Weapon.ts +414 -414
- package/src/namespaces/Aitransport.ts +102 -102
- package/src/namespaces/Animscene.ts +78 -78
- package/src/namespaces/Audio.ts +2 -2
- package/src/namespaces/Bounty.ts +102 -102
- package/src/namespaces/Brain.ts +22 -22
- package/src/namespaces/CamStatics.ts +501 -501
- package/src/namespaces/Collection.ts +16 -16
- package/src/namespaces/Companion.ts +34 -34
- package/src/namespaces/Compendium.ts +93 -93
- package/src/namespaces/Crashlog.ts +16 -16
- package/src/namespaces/Databinding.ts +280 -280
- package/src/namespaces/Dlc.ts +9 -9
- package/src/namespaces/EntityStatics.ts +249 -249
- package/src/namespaces/Event.ts +92 -92
- package/src/namespaces/Fire.ts +10 -10
- package/src/namespaces/Graphics.ts +1155 -1155
- package/src/namespaces/Hud.ts +763 -763
- package/src/namespaces/InteriorStatics.ts +2 -2
- package/src/namespaces/Inventory.ts +321 -321
- package/src/namespaces/Itemdatabase.ts +11 -11
- package/src/namespaces/Law.ts +2 -2
- package/src/namespaces/Map.ts +104 -104
- package/src/namespaces/Minigame.ts +29 -29
- package/src/namespaces/Misc.ts +5 -5
- package/src/namespaces/Missiondata.ts +3 -3
- package/src/namespaces/Netshopping.ts +1 -1
- package/src/namespaces/Network.ts +1921 -1929
- package/src/namespaces/Object.ts +237 -237
- package/src/namespaces/Pad.ts +151 -151
- package/src/namespaces/PedStatics.ts +3 -3
- package/src/namespaces/Perschar.ts +116 -116
- package/src/namespaces/Persistence.ts +48 -48
- package/src/namespaces/PlayerStatics.ts +75 -75
- package/src/namespaces/Population.ts +3 -3
- package/src/namespaces/Posse.ts +47 -47
- package/src/namespaces/Propset.ts +92 -92
- package/src/namespaces/Scripts.ts +3 -3
- package/src/namespaces/Socialclub.ts +1 -1
- package/src/namespaces/Stats.ts +129 -129
- package/src/namespaces/Streaming.ts +62 -62
- package/src/namespaces/Task.ts +538 -538
- package/src/namespaces/Telemetry.ts +295 -295
- package/src/namespaces/Uiapps.ts +39 -39
- package/src/namespaces/Uistickyfeed.ts +23 -23
- package/src/namespaces/VehicleStatics.ts +2 -2
- package/src/namespaces/Water.ts +47 -47
- package/src/namespaces/WeaponStatics.ts +394 -394
- package/src/namespaces/Zone.ts +11 -11
|
@@ -11,36 +11,6 @@ import { createFromHandle } from '../types/HandleRegistry';
|
|
|
11
11
|
import { inv, rai, raf, ras, rav, pvi, pvf, pvv, pvii, pvfi, _h, f } from '../types/NativeAliases';
|
|
12
12
|
|
|
13
13
|
export class Inventory {
|
|
14
|
-
/**
|
|
15
|
-
* @param inventoryId
|
|
16
|
-
* @param p3
|
|
17
|
-
* @param p4
|
|
18
|
-
* @returns guid; p2
|
|
19
|
-
*/
|
|
20
|
-
static getFullInventoryItemData(inventoryId: number, p3: number, p4: number): [any, number, number] {
|
|
21
|
-
const result = inv<[number, number, number]>('0x025A1B1FB03FBF61', inventoryId, pvi(), pvi(), p3, p4);
|
|
22
|
-
return [result[0], result[1], result[2]];
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* @param inventoryId
|
|
27
|
-
*/
|
|
28
|
-
static enableWeapons(inventoryId: number): void {
|
|
29
|
-
inv<void>('0xD5D72F1624F3BA7C', inventoryId);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Params: p3 returns an int between 0 and 20 (?)
|
|
34
|
-
* Only used in R* SP Scripts
|
|
35
|
-
*
|
|
36
|
-
* @param inventoryId
|
|
37
|
-
* @returns guid; p2; p3
|
|
38
|
-
*/
|
|
39
|
-
static N_0xD08685BA892DBFAB(inventoryId: number): [boolean, number, number, number] {
|
|
40
|
-
const result = inv<[boolean, number, number, number]>('0xD08685BA892DBFAB', inventoryId, pvi(), pvi(), pvi(), rai());
|
|
41
|
-
return [!!result[0], result[1], result[2], result[3]];
|
|
42
|
-
}
|
|
43
|
-
|
|
44
14
|
/**
|
|
45
15
|
* Returns stats entry id of CatalogItemInspection container
|
|
46
16
|
*
|
|
@@ -50,7 +20,7 @@ export class Inventory {
|
|
|
50
20
|
* @param playerid
|
|
51
21
|
* @returns
|
|
52
22
|
*/
|
|
53
|
-
static getCatalogItemInspectionStatsEntry(entryId: number, name: string | null, unk1: number, playerid: Player):
|
|
23
|
+
static getCatalogItemInspectionStatsEntry(entryId: number, name: string | null, unk1: number, playerid: Player): number {
|
|
54
24
|
return (inv<number>('0x9D21B185ABC2DBC5', entryId, name, unk1, playerid.handle, rai())) & 0xFFFFFFFF;
|
|
55
25
|
}
|
|
56
26
|
|
|
@@ -151,158 +121,33 @@ export class Inventory {
|
|
|
151
121
|
}
|
|
152
122
|
|
|
153
123
|
/**
|
|
154
|
-
* collectionId is < outCollectionSize
|
|
155
|
-
*
|
|
156
|
-
* @param collectionId
|
|
157
|
-
* @param itemIndex
|
|
158
|
-
* @returns itemData
|
|
159
|
-
*/
|
|
160
|
-
static getItemFromCollectionIndex(collectionId: number, itemIndex: number): [any, number] {
|
|
161
|
-
const result = inv<[number, number]>('0x82FA24C3D3FCD9B7', collectionId, itemIndex, pvi());
|
|
162
|
-
return [result[0], result[1]];
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* @returns p0
|
|
167
|
-
*/
|
|
168
|
-
static setItemPromptInfoRequest(): number {
|
|
169
|
-
const result = inv<number>('0xFD41D1D4350F6413', pvi());
|
|
170
|
-
return result;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* @param inventoryId
|
|
175
|
-
* @param item
|
|
176
|
-
* @param quantity
|
|
177
|
-
* @param removeReason Refer to [enum: eRemoveItemReason]
|
|
178
|
-
* @returns
|
|
179
|
-
*/
|
|
180
|
-
static removeInventoryItemWithItemid(inventoryId: number, item: string | number, quantity: number, removeReason: eRemoveItemReason): any {
|
|
181
|
-
return inv<number>('0xB4158C8C9A3B5DCE', inventoryId, _h(item), quantity, removeReason);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Params: p1 = 0
|
|
186
|
-
*
|
|
187
124
|
* @param inventoryId
|
|
188
|
-
* @param
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
inv<void>('0xE3A46370F70F3607', inventoryId, p1);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* @returns guid1; guid2
|
|
125
|
+
* @param p3
|
|
126
|
+
* @param p4
|
|
127
|
+
* @returns guid; p2
|
|
196
128
|
*/
|
|
197
|
-
static
|
|
198
|
-
const result = inv<[number, number, number]>('
|
|
129
|
+
static getFullInventoryItemData(inventoryId: number, p3: number, p4: number): [any, number, number] {
|
|
130
|
+
const result = inv<[number, number, number]>('0x025A1B1FB03FBF61', inventoryId, pvi(), pvi(), p3, p4);
|
|
199
131
|
return [result[0], result[1], result[2]];
|
|
200
132
|
}
|
|
201
133
|
|
|
202
134
|
/**
|
|
203
135
|
* @param inventoryId
|
|
204
|
-
* @param bEquipped
|
|
205
|
-
* @returns guid
|
|
206
|
-
*/
|
|
207
|
-
static equipItemWithGuid(inventoryId: number, bEquipped: boolean): [any, number] {
|
|
208
|
-
const result = inv<[number, number]>('0x734311E2852760D0', inventoryId, pvi(), bEquipped);
|
|
209
|
-
return [result[0], result[1]];
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* @param item
|
|
214
|
-
* @returns
|
|
215
|
-
*/
|
|
216
|
-
static getInventoryItemIsAnimalPelt(item: string | number): any {
|
|
217
|
-
return inv<number>('0x4AEF1FB5B9011D75', _h(item));
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* @param inventoryId
|
|
222
|
-
* @param eRoleMaxLevel
|
|
223
|
-
* @returns
|
|
224
|
-
*/
|
|
225
|
-
static getItemRoleMaxLevelCount(inventoryId: number, eRoleMaxLevel: string | number): number {
|
|
226
|
-
return inv<number>('0xADDD1E7C0ECF7D95', inventoryId, _h(eRoleMaxLevel), rai());
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* Used in function SET_SHOP_BEING_ROBBED and many other shop related scripts and functions.
|
|
231
|
-
* INVENTORY_A*
|
|
232
|
-
*/
|
|
233
|
-
static N_0x9B4E793B1CB6550A(): void {
|
|
234
|
-
inv<void>('0x9B4E793B1CB6550A');
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* @returns guid
|
|
239
|
-
*/
|
|
240
|
-
static isGuidValid(): [any, number] {
|
|
241
|
-
const result = inv<[number, number]>('0xB881CA836CC4B6D4', pvi());
|
|
242
|
-
return [result[0], result[1]];
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* Max num of collections is 5, so release your unused ones.
|
|
247
|
-
*
|
|
248
|
-
* @param collectionId
|
|
249
|
-
* @returns
|
|
250
|
-
*/
|
|
251
|
-
static releaseItemCollection(collectionId: number): any {
|
|
252
|
-
return inv<number>('0x42A2F33A1942E865', collectionId);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* @param item
|
|
257
|
-
* @returns info
|
|
258
|
-
*/
|
|
259
|
-
static getInventoryItemInspectionInfo(item: string | number): [any, number] {
|
|
260
|
-
const result = inv<[number, number]>('0x0C093C1787F18519', _h(item), pvi());
|
|
261
|
-
return [result[0], result[1]];
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* p1, p2: 0
|
|
266
|
-
*
|
|
267
|
-
* @param databindingEntryId
|
|
268
|
-
* @param p1
|
|
269
|
-
* @param p2
|
|
270
|
-
*/
|
|
271
|
-
static N_0x75CFAC49301E134F(databindingEntryId: string | number, p1: boolean, p2: boolean): void {
|
|
272
|
-
inv<void>('0x75CFAC49301E134F', _h(databindingEntryId), p1, p2);
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* @param inventoryId
|
|
277
|
-
* @param slotId
|
|
278
|
-
* @returns guid
|
|
279
|
-
*/
|
|
280
|
-
static getChildrenInSlotCount(inventoryId: number, slotId: string | number): [number, number] {
|
|
281
|
-
const result = inv<[number, number]>('0x033EE4B89F3AC545', inventoryId, pvi(), _h(slotId), rai());
|
|
282
|
-
return [result[0], result[1]];
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
/**
|
|
286
|
-
* Returns item Hash to be used with _IS_SCRIPTED_AUDIO_CUSTOM and _PLAY_SOUND_FROM_ITEM (p0)
|
|
287
|
-
*
|
|
288
|
-
* @param item
|
|
289
|
-
* @param soundType Refer to [enum: eInventoryItemSound]
|
|
290
|
-
* @returns
|
|
291
136
|
*/
|
|
292
|
-
static
|
|
293
|
-
|
|
137
|
+
static enableWeapons(inventoryId: number): void {
|
|
138
|
+
inv<void>('0xD5D72F1624F3BA7C', inventoryId);
|
|
294
139
|
}
|
|
295
140
|
|
|
296
141
|
/**
|
|
142
|
+
* Params: p3 returns an int between 0 and 20 (?)
|
|
297
143
|
* Only used in R* SP Scripts
|
|
298
144
|
*
|
|
299
145
|
* @param inventoryId
|
|
300
|
-
* @
|
|
301
|
-
* @returns year; month; day; hour; minute; second
|
|
146
|
+
* @returns guid; p2; p3
|
|
302
147
|
*/
|
|
303
|
-
static
|
|
304
|
-
const result = inv<[boolean, number, number, number
|
|
305
|
-
return [!!result[0], result[1], result[2], result[3]
|
|
148
|
+
static N_0xD08685BA892DBFAB(inventoryId: number): [boolean, number, number, number] {
|
|
149
|
+
const result = inv<[boolean, number, number, number]>('0xD08685BA892DBFAB', inventoryId, pvi(), pvi(), pvi(), rai());
|
|
150
|
+
return [!!result[0], result[1], result[2], result[3]];
|
|
306
151
|
}
|
|
307
152
|
|
|
308
153
|
/**
|
|
@@ -314,7 +159,7 @@ export class Inventory {
|
|
|
314
159
|
* @param unk2
|
|
315
160
|
* @returns
|
|
316
161
|
*/
|
|
317
|
-
static getCatalogItemInspectionEffectsEntry(entryId: number, name: string | null, unk1: boolean, unk2: boolean):
|
|
162
|
+
static getCatalogItemInspectionEffectsEntry(entryId: number, name: string | null, unk1: boolean, unk2: boolean): number {
|
|
318
163
|
return (inv<number>('0x9D21B185ABC2DBC4', entryId, name, unk1, unk2, rai())) & 0xFFFFFFFF;
|
|
319
164
|
}
|
|
320
165
|
|
|
@@ -341,7 +186,7 @@ export class Inventory {
|
|
|
341
186
|
* @param item
|
|
342
187
|
* @returns
|
|
343
188
|
*/
|
|
344
|
-
static getInventoryItemDescriptionHash(item: string | number):
|
|
189
|
+
static getInventoryItemDescriptionHash(item: string | number): number {
|
|
345
190
|
return (inv<number>('0xA4550FE9C512E3DD', _h(item), rai())) & 0xFFFFFFFF;
|
|
346
191
|
}
|
|
347
192
|
|
|
@@ -477,84 +322,212 @@ export class Inventory {
|
|
|
477
322
|
}
|
|
478
323
|
|
|
479
324
|
/**
|
|
480
|
-
* @param
|
|
481
|
-
* @param
|
|
325
|
+
* @param provision
|
|
326
|
+
* @param slotId
|
|
327
|
+
* @returns
|
|
482
328
|
*/
|
|
483
|
-
static
|
|
484
|
-
inv<
|
|
329
|
+
static getItemSlotMaxCount(provision: string | number, slotId: string | number): number {
|
|
330
|
+
return inv<number>('0xE80E50BEE276A54A', _h(provision), _h(slotId), rai());
|
|
485
331
|
}
|
|
486
332
|
|
|
487
333
|
/**
|
|
334
|
+
* Params: p0 is only 0 or 1
|
|
335
|
+
* Only used in R* SP Scripts
|
|
336
|
+
*
|
|
337
|
+
* @param p0
|
|
488
338
|
* @param inventoryId
|
|
489
339
|
* @returns guid
|
|
490
340
|
*/
|
|
491
|
-
static
|
|
492
|
-
const result = inv<
|
|
493
|
-
return
|
|
341
|
+
static N_0x0349404A22736740(p0: boolean, inventoryId: number): number {
|
|
342
|
+
const result = inv<number>('0x0349404A22736740', p0, inventoryId, pvi());
|
|
343
|
+
return result;
|
|
494
344
|
}
|
|
495
345
|
|
|
496
346
|
/**
|
|
497
|
-
*
|
|
498
|
-
*
|
|
499
|
-
* @param
|
|
500
|
-
* @param soundType Refer to [enum: eInventoryItemSound]
|
|
347
|
+
* @param inventoryId
|
|
348
|
+
* @param eInventoryItem
|
|
349
|
+
* @param p2
|
|
501
350
|
* @returns
|
|
502
351
|
*/
|
|
503
|
-
static
|
|
504
|
-
return inv<number>('
|
|
352
|
+
static getInventoryItemCountWithItemid(inventoryId: number, eInventoryItem: string | number, p2: boolean): number {
|
|
353
|
+
return inv<number>('0xE787F05DFC977BDE', inventoryId, _h(eInventoryItem), p2, rai());
|
|
505
354
|
}
|
|
506
355
|
|
|
507
356
|
/**
|
|
508
|
-
*
|
|
357
|
+
* Returns collectionId
|
|
509
358
|
*
|
|
510
|
-
* @
|
|
511
|
-
* @param p3
|
|
512
|
-
* @returns guid1; guid2
|
|
359
|
+
* @returns collectionSize
|
|
513
360
|
*/
|
|
514
|
-
static
|
|
515
|
-
const result = inv<[number, number
|
|
516
|
-
return [result[0], result[1]
|
|
361
|
+
static createItemCollection2(): [number, number] {
|
|
362
|
+
const result = inv<[number, number]>('0x97A3646645727F42', pvi(), rai());
|
|
363
|
+
return [result[0], result[1]];
|
|
517
364
|
}
|
|
518
365
|
|
|
519
366
|
/**
|
|
520
|
-
* OWE_INVALID = -1,
|
|
521
|
-
* OWE_GOOD_IN_HOT
|
|
522
|
-
* OWE_GOOD_IN_NONE
|
|
523
|
-
* OWE_GOOD_IN_COLD
|
|
524
|
-
* OWE_GOOD_IN_ALL
|
|
525
|
-
*
|
|
526
367
|
* @param inventoryId
|
|
527
|
-
* @param
|
|
528
|
-
* @
|
|
368
|
+
* @param inventoryIdCloned
|
|
369
|
+
* @param p3
|
|
370
|
+
* @returns p2
|
|
529
371
|
*/
|
|
530
|
-
static
|
|
531
|
-
const result = inv<number>('
|
|
372
|
+
static copyItemToInventory(inventoryId: number, inventoryIdCloned: number, p3: any): number {
|
|
373
|
+
const result = inv<number>('0xC04F47D488EF9EBA', inventoryId, inventoryIdCloned, pvi(), p3);
|
|
532
374
|
return result;
|
|
533
375
|
}
|
|
534
376
|
|
|
535
377
|
/**
|
|
536
|
-
*
|
|
537
|
-
*
|
|
538
|
-
* @param p0
|
|
378
|
+
* @param inventoryId
|
|
379
|
+
* @returns filter; numInCollection
|
|
539
380
|
*/
|
|
540
|
-
static
|
|
541
|
-
inv<
|
|
381
|
+
static createItemCollectionWithFilter(inventoryId: number): [number, number, number] {
|
|
382
|
+
const result = inv<[number, number, number]>('0x640F890C3E5A3FFD', inventoryId, pvi(), pvi(), rai());
|
|
383
|
+
return [result[0], result[1], result[2]];
|
|
542
384
|
}
|
|
543
385
|
|
|
544
386
|
/**
|
|
545
|
-
* @param
|
|
387
|
+
* @param inventoryId
|
|
546
388
|
* @param p2
|
|
547
|
-
* @returns
|
|
389
|
+
* @returns guid
|
|
548
390
|
*/
|
|
549
|
-
static
|
|
550
|
-
const result = inv<[number, number]>('
|
|
391
|
+
static getInventoryItemCountWithGuid(inventoryId: number, p2: boolean): [number, number] {
|
|
392
|
+
const result = inv<[number, number]>('0xC97E0D2302382211', inventoryId, pvi(), p2, rai());
|
|
551
393
|
return [result[0], result[1]];
|
|
552
394
|
}
|
|
553
395
|
|
|
554
396
|
/**
|
|
555
|
-
*
|
|
556
|
-
|
|
557
|
-
|
|
397
|
+
* filterName (collections): "ALL", "ALL SATCHEL", "ALL HORSES", "ALL COACHES", "ALL MOUNTS", "ALL CLOTHING", "ALL WEAPONS", "ALL SATCHEL EXCLUDING CLOTHING", "ALL EXCLUDING CLOTHING"
|
|
398
|
+
* slotId: -1591664384
|
|
399
|
+
* p3: outCollectionSize (?)
|
|
400
|
+
* Returns collectionId
|
|
401
|
+
*
|
|
402
|
+
* @param inventoryId
|
|
403
|
+
* @param filterName
|
|
404
|
+
* @param slotId
|
|
405
|
+
* @returns size
|
|
406
|
+
*/
|
|
407
|
+
static createItemCollection(inventoryId: number, filterName: string | null, slotId: string | number): [number, number] {
|
|
408
|
+
const result = inv<[number, number]>('0x80D78BDC9D88EF07', inventoryId, filterName, _h(slotId), pvi(), rai());
|
|
409
|
+
return [result[0], result[1]];
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* p1: 32
|
|
414
|
+
* Returns collectionId
|
|
415
|
+
*
|
|
416
|
+
* @param inventoryId
|
|
417
|
+
* @param p1
|
|
418
|
+
* @returns size
|
|
419
|
+
*/
|
|
420
|
+
static createSortedCollection(inventoryId: number, p1: number): [number, number] {
|
|
421
|
+
const result = inv<[number, number]>('0xBB7F968675B34B0C', inventoryId, p1, pvi(), rai());
|
|
422
|
+
return [result[0], result[1]];
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* @param inventoryId
|
|
427
|
+
* @param item
|
|
428
|
+
* @returns guid
|
|
429
|
+
*/
|
|
430
|
+
static doesItemOwnEquipment(inventoryId: number, item: string | number): [any, number] {
|
|
431
|
+
const result = inv<[number, number]>('0x88B58B83A43A8CAB', inventoryId, pvi(), _h(item));
|
|
432
|
+
return [result[0], result[1]];
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Returns a unique inventory ID for this ped.
|
|
437
|
+
* For the local player ped, it is an eInventories value.
|
|
438
|
+
* For other peds, it is the inventory address casted to unsigned int. enum eInventories
|
|
439
|
+
* {
|
|
440
|
+
* INVENTORY_INVALID,
|
|
441
|
+
* INVENTORY_SP_PLAYER,
|
|
442
|
+
* INVENTORY_MP_PLAYER,
|
|
443
|
+
* INVENTORY_MP_MISSION,
|
|
444
|
+
* INVENTORY_SECOND_SCREEN,
|
|
445
|
+
* INVENTORY_SP_BACKUP,
|
|
446
|
+
* INVENTORY_SP_SNAPSHOT,
|
|
447
|
+
* INVENTORY_0xDE2AE452,
|
|
448
|
+
* INVENTORY_0x399D9B3A,
|
|
449
|
+
* INVENTORY_0x4BD43FA7,
|
|
450
|
+
* INVENTORY_0x9529D251,
|
|
451
|
+
* INVENTORY_0xA75776AC,
|
|
452
|
+
* INVENTORY_MAX_ID = 11,
|
|
453
|
+
* INVENTORY_IDS_COUNT
|
|
454
|
+
* };
|
|
455
|
+
*
|
|
456
|
+
* @param ped
|
|
457
|
+
* @returns
|
|
458
|
+
*/
|
|
459
|
+
static getInventoryIdFromPed(ped: Ped): number {
|
|
460
|
+
return inv<number>('0x13D234A2A3F66E63', ped.handle, rai());
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Only works on CClothingItem
|
|
465
|
+
*
|
|
466
|
+
* @param inventoryId
|
|
467
|
+
* @param inUse
|
|
468
|
+
* @returns guid
|
|
469
|
+
*/
|
|
470
|
+
static setInventoryItemInUse(inventoryId: number, inUse: boolean): number {
|
|
471
|
+
const result = inv<number>('0x65A5F70F4A292EBE', inventoryId, pvi(), inUse);
|
|
472
|
+
return result;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* @param inventoryId
|
|
477
|
+
* @param slotId
|
|
478
|
+
* @returns guid; outGuid
|
|
479
|
+
*/
|
|
480
|
+
static getInventoryItemEquippedInSlotByRef(inventoryId: number, slotId: string | number): [any, number, number] {
|
|
481
|
+
const result = inv<[number, number, number]>('0x22E590F108289A9D', inventoryId, pvi(), _h(slotId), pvi());
|
|
482
|
+
return [result[0], result[1], result[2]];
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* Apply the weapon stats to the CatalogItemInspection stats entry id. get entryId with _INVENTORY_GET_CATALOG_ITEM_INSPECTION_STATS_ENTRY
|
|
487
|
+
*
|
|
488
|
+
* @param entryId
|
|
489
|
+
* @param weapon
|
|
490
|
+
* @param ped
|
|
491
|
+
*/
|
|
492
|
+
static applyWeaponStatsToEntry(entryId: number, weapon: string | number, ped: Ped): void {
|
|
493
|
+
inv<void>('0x75CFAC49301E134E', entryId, _h(weapon), ped.handle);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* @param inventoryId
|
|
498
|
+
* @param item
|
|
499
|
+
*/
|
|
500
|
+
static enableItem(inventoryId: number, item: string | number): void {
|
|
501
|
+
inv<void>('0x6A564540FAC12211', inventoryId, _h(item));
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Returns databindingEntryId to be used with 0x951847CEF3D829FF (p0)
|
|
506
|
+
*
|
|
507
|
+
* @param data
|
|
508
|
+
* @param stats
|
|
509
|
+
* @param ped
|
|
510
|
+
* @returns guid
|
|
511
|
+
*/
|
|
512
|
+
static N_0x46DB71883EE9D5AF(data: any, stats: string | null, ped: Ped): [number, number] {
|
|
513
|
+
const result = inv<[number, number]>('0x46DB71883EE9D5AF', data, stats, pvi(), ped.handle, rai());
|
|
514
|
+
return [result[0] & 0xFFFFFFFF, result[1]];
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* @param p0
|
|
519
|
+
* @param p2
|
|
520
|
+
* @returns p1
|
|
521
|
+
*/
|
|
522
|
+
static getInventoryItemFitSlot(p0: string | number, p2: number): [any, number] {
|
|
523
|
+
const result = inv<[number, number]>('0xB991FE166FAF84FD', _h(p0), pvi(), p2);
|
|
524
|
+
return [result[0], result[1]];
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* @returns
|
|
529
|
+
*/
|
|
530
|
+
static isPlayerInventoryMirroringTransactions(): any {
|
|
558
531
|
return inv<number>('0xFC7563F482781A3D');
|
|
559
532
|
}
|
|
560
533
|
|
|
@@ -595,7 +568,7 @@ export class Inventory {
|
|
|
595
568
|
* @param p1
|
|
596
569
|
* @returns
|
|
597
570
|
*/
|
|
598
|
-
static getDefaultItemSlotInfo(item: string | number, p1: string | number):
|
|
571
|
+
static getDefaultItemSlotInfo(item: string | number, p1: string | number): number {
|
|
599
572
|
return (inv<number>('0x6452B1D357D81742', _h(item), _h(p1), rai())) & 0xFFFFFFFF;
|
|
600
573
|
}
|
|
601
574
|
|
|
@@ -707,196 +680,223 @@ export class Inventory {
|
|
|
707
680
|
}
|
|
708
681
|
|
|
709
682
|
/**
|
|
710
|
-
* @param
|
|
711
|
-
* @param
|
|
712
|
-
* @returns
|
|
683
|
+
* @param ped
|
|
684
|
+
* @param p1
|
|
713
685
|
*/
|
|
714
|
-
static
|
|
715
|
-
|
|
686
|
+
static N_0x9E58207B194488AC(ped: Ped, p1: number): void {
|
|
687
|
+
inv<void>('0x9E58207B194488AC', ped.handle, p1);
|
|
716
688
|
}
|
|
717
689
|
|
|
718
690
|
/**
|
|
719
|
-
* Params: p0 is only 0 or 1
|
|
720
|
-
* Only used in R* SP Scripts
|
|
721
|
-
*
|
|
722
|
-
* @param p0
|
|
723
691
|
* @param inventoryId
|
|
724
692
|
* @returns guid
|
|
725
693
|
*/
|
|
726
|
-
static
|
|
727
|
-
const result = inv<number>('
|
|
728
|
-
return result;
|
|
694
|
+
static getInventoryItemHidden(inventoryId: number): [any, number] {
|
|
695
|
+
const result = inv<[number, number]>('0xF9933164965533B7', inventoryId, pvi());
|
|
696
|
+
return [result[0], result[1]];
|
|
729
697
|
}
|
|
730
698
|
|
|
731
699
|
/**
|
|
732
|
-
*
|
|
733
|
-
*
|
|
734
|
-
* @param
|
|
700
|
+
* soundType: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/CItemInfoSoundsInterface__sSoundsInfo__eSoundType
|
|
701
|
+
*
|
|
702
|
+
* @param item
|
|
703
|
+
* @param soundType Refer to [enum: eInventoryItemSound]
|
|
735
704
|
* @returns
|
|
736
705
|
*/
|
|
737
|
-
static
|
|
738
|
-
return inv<number>('
|
|
706
|
+
static getIsInventoryItemSoundValid(item: string | number, soundType: eInventoryItemSound): any {
|
|
707
|
+
return inv<number>('0x2BAE4880DCDD560B', _h(item), soundType);
|
|
739
708
|
}
|
|
740
709
|
|
|
741
710
|
/**
|
|
742
|
-
*
|
|
711
|
+
* Getter: _INVENTORY_GET_FULL_INVENTORY_ITEM_DATA
|
|
743
712
|
*
|
|
744
|
-
* @
|
|
713
|
+
* @param inventoryId
|
|
714
|
+
* @param p3
|
|
715
|
+
* @returns guid1; guid2
|
|
745
716
|
*/
|
|
746
|
-
static
|
|
747
|
-
const result = inv<[number, number]>('
|
|
748
|
-
return [result[0], result[1]];
|
|
717
|
+
static updateInventoryItem(inventoryId: number, p3: number): [any, number, number] {
|
|
718
|
+
const result = inv<[number, number, number]>('0xD80A8854DB5CFBA5', inventoryId, pvi(), pvi(), p3);
|
|
719
|
+
return [result[0], result[1], result[2]];
|
|
749
720
|
}
|
|
750
721
|
|
|
751
722
|
/**
|
|
723
|
+
* OWE_INVALID = -1,
|
|
724
|
+
* OWE_GOOD_IN_HOT
|
|
725
|
+
* OWE_GOOD_IN_NONE
|
|
726
|
+
* OWE_GOOD_IN_COLD
|
|
727
|
+
* OWE_GOOD_IN_ALL
|
|
728
|
+
*
|
|
752
729
|
* @param inventoryId
|
|
753
|
-
* @param
|
|
754
|
-
* @
|
|
755
|
-
* @returns p2
|
|
730
|
+
* @param weatherEffectiveness
|
|
731
|
+
* @returns guid
|
|
756
732
|
*/
|
|
757
|
-
static
|
|
758
|
-
const result = inv<number>('
|
|
733
|
+
static setInventoryItemWeatherEffectiveness(inventoryId: number, weatherEffectiveness: number): number {
|
|
734
|
+
const result = inv<number>('0x6D2F987736A42D4C', inventoryId, pvi(), weatherEffectiveness);
|
|
759
735
|
return result;
|
|
760
736
|
}
|
|
761
737
|
|
|
762
738
|
/**
|
|
763
|
-
*
|
|
764
|
-
*
|
|
739
|
+
* Only used in R* SP Scripts
|
|
740
|
+
*
|
|
741
|
+
* @param p0
|
|
765
742
|
*/
|
|
766
|
-
static
|
|
767
|
-
|
|
768
|
-
return [result[0], result[1], result[2]];
|
|
743
|
+
static useBackupInventory(p0: boolean): void {
|
|
744
|
+
inv<void>('0xE36D4A38D28D9CFB', p0);
|
|
769
745
|
}
|
|
770
746
|
|
|
771
747
|
/**
|
|
772
|
-
*
|
|
773
|
-
*
|
|
774
|
-
* @
|
|
748
|
+
* collectionId is < outCollectionSize
|
|
749
|
+
*
|
|
750
|
+
* @param collectionId
|
|
751
|
+
* @param itemIndex
|
|
752
|
+
* @returns itemData
|
|
775
753
|
*/
|
|
776
|
-
static
|
|
777
|
-
const result = inv<[number, number]>('
|
|
754
|
+
static getItemFromCollectionIndex(collectionId: number, itemIndex: number): [any, number] {
|
|
755
|
+
const result = inv<[number, number]>('0x82FA24C3D3FCD9B7', collectionId, itemIndex, pvi());
|
|
778
756
|
return [result[0], result[1]];
|
|
779
757
|
}
|
|
780
758
|
|
|
781
759
|
/**
|
|
782
|
-
*
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
760
|
+
* @returns p0
|
|
761
|
+
*/
|
|
762
|
+
static setItemPromptInfoRequest(): number {
|
|
763
|
+
const result = inv<number>('0xFD41D1D4350F6413', pvi());
|
|
764
|
+
return result;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
/**
|
|
787
768
|
* @param inventoryId
|
|
788
|
-
* @param
|
|
789
|
-
* @param
|
|
790
|
-
* @
|
|
769
|
+
* @param item
|
|
770
|
+
* @param quantity
|
|
771
|
+
* @param removeReason Refer to [enum: eRemoveItemReason]
|
|
772
|
+
* @returns
|
|
791
773
|
*/
|
|
792
|
-
static
|
|
793
|
-
|
|
794
|
-
return [result[0], result[1]];
|
|
774
|
+
static removeInventoryItemWithItemid(inventoryId: number, item: string | number, quantity: number, removeReason: eRemoveItemReason): any {
|
|
775
|
+
return inv<number>('0xB4158C8C9A3B5DCE', inventoryId, _h(item), quantity, removeReason);
|
|
795
776
|
}
|
|
796
777
|
|
|
797
778
|
/**
|
|
798
|
-
*
|
|
799
|
-
* Returns collectionId
|
|
779
|
+
* Params: p1 = 0
|
|
800
780
|
*
|
|
801
781
|
* @param inventoryId
|
|
802
782
|
* @param p1
|
|
803
|
-
* @returns size
|
|
804
783
|
*/
|
|
805
|
-
static
|
|
806
|
-
|
|
807
|
-
|
|
784
|
+
static disableWeapons(inventoryId: number, p1: any): void {
|
|
785
|
+
inv<void>('0xE3A46370F70F3607', inventoryId, p1);
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* @returns guid1; guid2
|
|
790
|
+
*/
|
|
791
|
+
static compareGuids(): [any, number, number] {
|
|
792
|
+
const result = inv<[number, number, number]>('0x4C543D5DFCD2DAFD', pvi(), pvi());
|
|
793
|
+
return [result[0], result[1], result[2]];
|
|
808
794
|
}
|
|
809
795
|
|
|
810
796
|
/**
|
|
811
797
|
* @param inventoryId
|
|
812
|
-
* @param
|
|
798
|
+
* @param bEquipped
|
|
813
799
|
* @returns guid
|
|
814
800
|
*/
|
|
815
|
-
static
|
|
816
|
-
const result = inv<[number, number]>('
|
|
801
|
+
static equipItemWithGuid(inventoryId: number, bEquipped: boolean): [any, number] {
|
|
802
|
+
const result = inv<[number, number]>('0x734311E2852760D0', inventoryId, pvi(), bEquipped);
|
|
817
803
|
return [result[0], result[1]];
|
|
818
804
|
}
|
|
819
805
|
|
|
820
806
|
/**
|
|
821
|
-
*
|
|
822
|
-
* For the local player ped, it is an eInventories value.
|
|
823
|
-
* For other peds, it is the inventory address casted to unsigned int. enum eInventories
|
|
824
|
-
* {
|
|
825
|
-
* INVENTORY_INVALID,
|
|
826
|
-
* INVENTORY_SP_PLAYER,
|
|
827
|
-
* INVENTORY_MP_PLAYER,
|
|
828
|
-
* INVENTORY_MP_MISSION,
|
|
829
|
-
* INVENTORY_SECOND_SCREEN,
|
|
830
|
-
* INVENTORY_SP_BACKUP,
|
|
831
|
-
* INVENTORY_SP_SNAPSHOT,
|
|
832
|
-
* INVENTORY_0xDE2AE452,
|
|
833
|
-
* INVENTORY_0x399D9B3A,
|
|
834
|
-
* INVENTORY_0x4BD43FA7,
|
|
835
|
-
* INVENTORY_0x9529D251,
|
|
836
|
-
* INVENTORY_0xA75776AC,
|
|
837
|
-
* INVENTORY_MAX_ID = 11,
|
|
838
|
-
* INVENTORY_IDS_COUNT
|
|
839
|
-
* };
|
|
840
|
-
*
|
|
841
|
-
* @param ped
|
|
807
|
+
* @param item
|
|
842
808
|
* @returns
|
|
843
809
|
*/
|
|
844
|
-
static
|
|
845
|
-
return inv<number>('
|
|
810
|
+
static getInventoryItemIsAnimalPelt(item: string | number): any {
|
|
811
|
+
return inv<number>('0x4AEF1FB5B9011D75', _h(item));
|
|
846
812
|
}
|
|
847
813
|
|
|
848
814
|
/**
|
|
849
|
-
* Only works on CClothingItem
|
|
850
|
-
*
|
|
851
815
|
* @param inventoryId
|
|
852
|
-
* @param
|
|
816
|
+
* @param eRoleMaxLevel
|
|
817
|
+
* @returns
|
|
818
|
+
*/
|
|
819
|
+
static getItemRoleMaxLevelCount(inventoryId: number, eRoleMaxLevel: string | number): number {
|
|
820
|
+
return inv<number>('0xADDD1E7C0ECF7D95', inventoryId, _h(eRoleMaxLevel), rai());
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
/**
|
|
824
|
+
* Used in function SET_SHOP_BEING_ROBBED and many other shop related scripts and functions.
|
|
825
|
+
* INVENTORY_A*
|
|
826
|
+
*/
|
|
827
|
+
static N_0x9B4E793B1CB6550A(): void {
|
|
828
|
+
inv<void>('0x9B4E793B1CB6550A');
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
/**
|
|
853
832
|
* @returns guid
|
|
854
833
|
*/
|
|
855
|
-
static
|
|
856
|
-
const result = inv<number>('
|
|
857
|
-
return result;
|
|
834
|
+
static isGuidValid(): [any, number] {
|
|
835
|
+
const result = inv<[number, number]>('0xB881CA836CC4B6D4', pvi());
|
|
836
|
+
return [result[0], result[1]];
|
|
858
837
|
}
|
|
859
838
|
|
|
860
839
|
/**
|
|
861
|
-
*
|
|
862
|
-
*
|
|
863
|
-
* @
|
|
840
|
+
* Max num of collections is 5, so release your unused ones.
|
|
841
|
+
*
|
|
842
|
+
* @param collectionId
|
|
843
|
+
* @returns
|
|
864
844
|
*/
|
|
865
|
-
static
|
|
866
|
-
|
|
867
|
-
return [result[0], result[1], result[2]];
|
|
845
|
+
static releaseItemCollection(collectionId: number): any {
|
|
846
|
+
return inv<number>('0x42A2F33A1942E865', collectionId);
|
|
868
847
|
}
|
|
869
848
|
|
|
870
849
|
/**
|
|
871
|
-
*
|
|
850
|
+
* @param item
|
|
851
|
+
* @returns info
|
|
852
|
+
*/
|
|
853
|
+
static getInventoryItemInspectionInfo(item: string | number): [any, number] {
|
|
854
|
+
const result = inv<[number, number]>('0x0C093C1787F18519', _h(item), pvi());
|
|
855
|
+
return [result[0], result[1]];
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
/**
|
|
859
|
+
* p1, p2: 0
|
|
872
860
|
*
|
|
873
|
-
* @param
|
|
874
|
-
* @param
|
|
875
|
-
* @param
|
|
861
|
+
* @param databindingEntryId
|
|
862
|
+
* @param p1
|
|
863
|
+
* @param p2
|
|
876
864
|
*/
|
|
877
|
-
static
|
|
878
|
-
inv<void>('
|
|
865
|
+
static N_0x75CFAC49301E134F(databindingEntryId: string | number, p1: boolean, p2: boolean): void {
|
|
866
|
+
inv<void>('0x75CFAC49301E134F', _h(databindingEntryId), p1, p2);
|
|
879
867
|
}
|
|
880
868
|
|
|
881
869
|
/**
|
|
882
870
|
* @param inventoryId
|
|
871
|
+
* @param slotId
|
|
872
|
+
* @returns guid
|
|
873
|
+
*/
|
|
874
|
+
static getChildrenInSlotCount(inventoryId: number, slotId: string | number): [number, number] {
|
|
875
|
+
const result = inv<[number, number]>('0x033EE4B89F3AC545', inventoryId, pvi(), _h(slotId), rai());
|
|
876
|
+
return [result[0], result[1]];
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
/**
|
|
880
|
+
* Returns item Hash to be used with _IS_SCRIPTED_AUDIO_CUSTOM and _PLAY_SOUND_FROM_ITEM (p0)
|
|
881
|
+
*
|
|
883
882
|
* @param item
|
|
883
|
+
* @param soundType Refer to [enum: eInventoryItemSound]
|
|
884
|
+
* @returns
|
|
884
885
|
*/
|
|
885
|
-
static
|
|
886
|
-
inv<
|
|
886
|
+
static getInventoryItemSound(item: string | number, soundType: eInventoryItemSound): number {
|
|
887
|
+
return (inv<number>('0x2E1CDC1FF3B8473E', _h(item), soundType, rai())) & 0xFFFFFFFF;
|
|
887
888
|
}
|
|
888
889
|
|
|
889
890
|
/**
|
|
890
|
-
*
|
|
891
|
+
* Only used in R* SP Scripts
|
|
891
892
|
*
|
|
892
|
-
* @param
|
|
893
|
-
* @param
|
|
894
|
-
* @
|
|
895
|
-
* @returns guid
|
|
893
|
+
* @param inventoryId
|
|
894
|
+
* @param p1
|
|
895
|
+
* @returns year; month; day; hour; minute; second
|
|
896
896
|
*/
|
|
897
|
-
static
|
|
898
|
-
const result = inv<[number, number]>('
|
|
899
|
-
return [result[0]
|
|
897
|
+
static N_0x112BCA290D2EB53C(inventoryId: number, p1: string | number): [boolean, number, number, number, number, number, number] {
|
|
898
|
+
const result = inv<[boolean, number, number, number, number, number, number]>('0x112BCA290D2EB53C', inventoryId, _h(p1), pvi(), pvi(), pvi(), pvi(), pvi(), pvi(), rai());
|
|
899
|
+
return [!!result[0], result[1], result[2], result[3], result[4], result[5], result[6]];
|
|
900
900
|
}
|
|
901
901
|
|
|
902
902
|
}
|