import type { eWeaponHash } from '../enums/eWeaponHash'; import type { Entity } from '../classes/Entity'; import type { ItemSet } from '../classes/ItemSet'; import type { Ped } from '../classes/Ped'; import type { Player } from '../classes/Player'; import type { Prop } from '../classes/Prop'; import type { Vehicle } from '../classes/Vehicle'; import type { Volume } from '../classes/Volume'; import type { Prompt, ScrHandle } from '../types/NativeAliases'; import { Vector2 } from '../types/Vector2'; import { Vector3 } from '../types/Vector3'; import { Vector4 } from '../types/Vector4'; import { Color } from '../types/Color'; import { createFromHandle } from '../types/HandleRegistry'; import { inv, rai, raf, ras, rav, pvi, pvf, pvv, pvii, pvfi, _h, f, int, uint, float, Hash, u8, u16, u32, u64, i8, i16, i32, i64 } from '../types/NativeAliases'; export class Misc { /** * @param value * @param digits * @returns */ static getStringFromFloat(value: float, digits: int): string { return inv('0x2B6846401D68E563', f(value), digits, ras()); } /** * Computes a hash for the given string. It is hashed using Jenkins' One-at-a-Time hash algorithm (https://en.wikipedia.org/wiki/Jenkins_hash_function) * Note: this implementation is case-insensitive. * * @param string * @returns */ static getHashKey(string: string): number { return (inv('0xFD340785ADF8CFB7', string, rai())) & 0xFFFFFFFF; } /** * @param startRange * @param endRange * @returns */ static getRandomIntInRange(startRange: int, endRange: int): int { return inv('0xD53343AA4FB7DD28', startRange, endRange, rai()); } /** * @returns */ static getRainLevel(): float { return inv('0x931B5F4CC130224B', raf()); } /** * @param toggle */ static setFadeInAfterLoad(toggle: boolean): void { inv('0xAC806C4CAB973517', toggle); } /** * @param p0 * @param p1 * @param p2 * @param p3 * @param p4 * @param p5 * @returns */ static N_0xDC416CA762BC4F43(p0: any, p1: any, p2: any, p3: any, p4: any, p5: any): any { return inv('0xDC416CA762BC4F43', p0, p1, p2, p3, p4, p5); } /** * Begins with START_*. Next character in the name is either D or E. Old name: _START_BENCHMARK_RECORDING */ static startEndUserBenchmark(): void { inv('0x29D1F6DF864A094E'); } /** * @param p0 * @param p1 * @param p2 * @param p3 * @param p4 * @param p5 * @param p6 * @param p7 */ static clearAngledAreaOfVehicles(p0: any, p1: any, p2: any, p3: any, p4: any, p5: any, p6: any, p7: any): void { inv('0xA4D83115C1E02F8A', p0, p1, p2, p3, p4, p5, p6, p7); } /** * @param override * @param pos * @param heading * @param isAutosave * @returns returnCoords; returnHeading */ static overrideSaveHouse(override: boolean, pos: Vector3, heading: float, isAutosave: boolean): [boolean, Vector3, number] { const result = inv<[boolean, number[], number]>('0xB2C69E11A37B5AF0', override, f(pos.x), f(pos.y), f(pos.z), f(heading), isAutosave, pvv(), pvf(), rai()); return [!!result[0], Vector3.fromArray(result[1]), result[2]]; } /** * @param flag * @returns bitFlags */ static isBitFlagSet(flag: int): [boolean, number] { const result = inv<[boolean, number]>('0x8F4F050054005C27', pvi(), flag, rai()); return [!!result[0], result[1]]; } /** * @param p0 * @param p1 */ static N_0x68319452C5064ABA(p0: any, p1: any): void { inv('0x68319452C5064ABA', p0, p1); } /** * @param maxSpawnDistance */ static setDispatchMaxSpawnDistance(maxSpawnDistance: float): void { inv('0x89314FB3463E28DE', f(maxSpawnDistance)); } /** * Sets whether the game should fade in after the player dies or is arrested. * * @param toggle */ static setFadeInAfterDeathArrest(toggle: boolean): void { inv('0xDF3B5846DE5904AF', toggle); } /** * nullsub, doesn't do anything * * @param p0 */ static N_0xA9342743B634A462(p0: any): void { inv('0xA9342743B634A462', p0); } /** * Maximum value is 1.0f * At a value of 0.0f the game will still run at a minimum time scale. * * @param timeScale */ static setTimeScale(timeScale: float): void { inv('0x9682AF6050854856', f(timeScale)); } /** * @param pos * @returns */ static getTemperatureAtCoords(pos: Vector3): float { return inv('0xB98B78C3768AF6E0', f(pos.x), f(pos.y), f(pos.z), raf()); } /** * @param p0 */ static removeDispatchSpawnBlockingArea(p0: any): void { inv('0x49F751F6868DDC5B', p0); } /** * The entities must be added to itemSet. * * @param dispatchService Refer to {@link eDispatchType} * @param pos * @param itemSet * @param radius * @returns outIncidentID */ static createIncidentWithEntities(dispatchService: int, pos: Vector3, itemSet: ItemSet, radius: float): [any, number] { const result = inv<[number, number]>('0xAB3D3F45436DB1D8', dispatchService, f(pos.x), f(pos.y), f(pos.z), itemSet.handle, f(radius), pvi()); return [result[0], result[1]]; } static resetDispatchMaxSpawnDistance(): void { inv('0x54EC7B6BC72BAD69'); } /** * *SET_MISSION_NAME**(FOR_ACTIVITY?/MINIGAME?) * * @param name */ static N_0x1096603B519C905F(name: string): void { inv('0x1096603B519C905F', name); } /** * @returns bitFlags */ static countBitFlags(): [int, number] { const result = inv<[number, number]>('0xE704838F36F93B7B', pvi(), rai()); return [result[0], result[1]]; } /** * @param p0 * @param p1 */ static N_0x96282005C5C6801F(p0: any, p1: any): void { inv('0x96282005C5C6801F', p0, p1); } static N_0x3C3C7B1B5EC08764(): void { inv('0x3C3C7B1B5EC08764'); } /** * UPDATE_PICKUP_COLLECTIBLE: set Eagle Eye fountain * _J*, _K*, _L* * * @param entity */ static N_0x553D67295DDD2309(entity: Entity): void { inv('0x553D67295DDD2309', entity.handle); } /** * Returns true if the entire string consists only of space characters. * * @param string * @returns */ static isStringNullOrEmptyOrSpaces(string: string): boolean { return !!inv('0x375F5870A7B8BEC1', string, rai()); } /** * dx = x1 - x2 * dy = y1 - y2 * * @param dx * @param dy * @returns */ static getHeadingFromVector2d(dx: float, dy: float): float { return inv('0x38D5202FF9271C62', f(dx), f(dy), raf()); } /** * @returns */ static shouldUseMetricWeight(): boolean { return !!inv('0x8F24157FEDB85EA2', rai()); } /** * @param p0 */ static N_0xB08C4FA25BC29DB9(p0: any): void { inv('0xB08C4FA25BC29DB9', p0); } /** * @param p0 */ static N_0xF650DCF5D6F312C1(p0: any): void { inv('0xF650DCF5D6F312C1', p0); } /** * @param p0 * @param p1 * @param p2 * @param p3 * @returns */ static N_0x0358B8A41916C613(p0: any, p1: any, p2: any, p3: any): any { return inv('0x0358B8A41916C613', p0, p1, p2, p3); } /** * @param p0 */ static informCodeOfContentIdOfCurrentUgcMission(p0: string): void { inv('0x708DF841B8F27AA2', p0); } /** * @param seed */ static setRandomSeed(seed: int): void { inv('0x5CD7A49104AFCB6B', seed); } /** * @param p0 * @param p1 */ static N_0x8C0F6A3D7236DEEB(p0: any, p1: any): void { inv('0x8C0F6A3D7236DEEB', p0, p1); } /** * @param milliseconds */ static clearWeatherTypePersistOvertime(milliseconds: int): void { inv('0xCE7690C0A0D1C36D', milliseconds); } /** * @returns */ static getScriptTimeWithinFrameInMicroseconds(): int { return inv('0x63219768C586667C', rai()); } /** * Old name: _COPY_MEMORY * * @param size * @returns dst; src */ static copyScriptStruct(size: int): [number, number] { const result = inv<[number, number]>('0xF7AC7DC0DEE7C9BE', pvi(), pvi(), size); return [result[0], result[1]]; } /** * @param ped * @returns */ static isPedDecomposed(ped: Ped): boolean { return !!inv('0x5170DDA6D63ACAAA', ped.handle, rai()); } /** * @param p0 */ static N_0x0730E518486DEEC3(p0: any): void { inv('0x0730E518486DEEC3', p0); } /** * @returns */ static isPlayerOwningStandaloneSp(): boolean { return !!inv('0x36040772DF5E59A0', rai()); } /** * @param p0 * @param p1 */ static N_0xBB282CF5D2333FB8(p0: any, p1: any): void { inv('0xBB282CF5D2333FB8', p0, p1); } /** * @param incidentId * @returns */ static isIncidentValid(incidentId: int): boolean { return !!inv('0x39F2B1BAD412246A', incidentId, rai()); } /** * If useZ is false, only the 2D plane (X-Y) will be considered for calculating the distance. Consider using this faster native instead: BUILTIN::VDIST - DVIST always takes in consideration the 3D coordinates. * * @param pos1 * @param pos2 * @param useZ * @returns */ static getDistanceBetweenCoords(pos1: Vector3, pos2: Vector3, useZ: boolean): float { return inv('0x0BE7F4E3CDBAFB28', f(pos1.x), f(pos1.y), f(pos1.z), f(pos2.x), f(pos2.y), f(pos2.z), useZ, raf()); } /** * @param p0 * @returns */ static N_0x0D0AE5081F88CFE1(p0: string | number): boolean { return !!inv('0x0D0AE5081F88CFE1', _h(p0), rai()); } /** * Used in CAIConditionAmbientAIMemoryReactionsEnabled * * @param enabled */ static setAiMemoryReactionsEnabled(enabled: boolean): void { inv('0x6AC4AF46A6B8DFB2', enabled); } /** * @param p0 * @param p1 * @param p2 * @returns */ static N_0xCC1BAF72D571DB8D(p0: any, p1: any, p2: any): any { return inv('0xCC1BAF72D571DB8D', p0, p1, p2); } /** * p3 is usually the same value of radius * p8 determines whether the ILO prompt is a lock on prompt with RMB * * @param entity * @param text * @param radius * @param p3 * @param flag * @param p5 * @param p6 * @param prompt * @param p8 * @param p9 * @returns */ static registerInteractionLockonPrompt(entity: Entity, text: string, radius: float, p3: float, flag: int, p5: float, p6: float, prompt: number, p8: boolean, p9: int): any { return inv('0x870708A6E147A9AD', entity.handle, text, f(radius), f(p3), flag, f(p5), f(p6), prompt, p8, p9); } /** * @param weatherType * @param p1 * @param p2 * @param p3 * @param p4 */ static setWeatherType2(weatherType: string | number, p1: int, p2: int, p3: int, p4: boolean): void { inv('0x2C6A07AF9AEDABD8', _h(weatherType), p1, p2, p3, p4); } /** * @param string1 * @param string2 * @returns */ static areStringsEqual(string1: string, string2: string): boolean { return !!inv('0xD3852F22AB713A1F', string1, string2, rai()); } /** * Note: this native was added in build 1232.56 */ static setGameLogicPaused(): void { inv('0x550F05CFFBD63C8C'); } /** * @returns */ static getRandomEventFlag(): boolean { return !!inv('0x924D54E5698AE3E0', rai()); } /** * @param string * @returns */ static isStringNullOrEmpty(string: string): boolean { return !!inv('0x2CF12F9ACF18F048', string, rai()); } /** * @param item * @returns */ static doesItemHaveValidBase(item: number): boolean { return !!inv('0xBDC6E364C9C78178', item, rai()); } /** * Hardcoded to return one/true. * * @param p0 * @returns */ static N_0xAF530E56505D1BD6(p0: any): any { return inv('0xAF530E56505D1BD6', p0); } /** * @param address * @param offset * @returns */ static isBitSet(address: int, offset: int): boolean { return !!inv('0x4ED6CFDFE8D4131A', address, offset, rai()); } static clearTacticalNavMeshPoints(): void { inv('0xD93B6516C6878267'); } /** * @param toggle */ static setWeatherTypeFrozen(toggle: boolean): void { inv('0xD74ACDF7DB8114AF', toggle); } /** * p3 is always -1.0f in the scripts * * @param pos * @param p3 */ static forceLightningFlashAtCoords(pos: Vector3, p3: float): void { inv('0x67943537D179597C', f(pos.x), f(pos.y), f(pos.z), f(p3)); } /** * @param minSpawnDistance */ static setDispatchMinSpawnDistance(minSpawnDistance: float): void { inv('0x27A1B170AA8AF84C', f(minSpawnDistance)); } static N_0x4B0501A468B749F8(): void { inv('0x4B0501A468B749F8'); } /** * Params: percentWeather2: 0f - 0.75f in R* Scripts Old name: _GET_WEATHER_TYPE_TRANSITION * * @returns weatherType1; weatherType2; percentWeather2 */ static getCurrWeatherState(): [number, number, number] { const result = inv<[number, number, number]>('0x0AC679B2342F14F2', pvi(), pvi(), pvf()); return [result[0], result[1], result[2]]; } /** * @returns */ static getRandomWeatherType(): number { return (inv('0x1359C181BC625503', rai())) & 0xFFFFFFFF; } /** * Hardcoded to return true. * * @returns */ static isPcVersion(): boolean { return !!inv('0xB0FB6CFAA5A1C833', rai()); } /** * Returns value of the '-benchmarkIterations' command line option. Old name: _GET_BENCHMARK_ITERATIONS_FROM_COMMAND_LINE * * @returns */ static getBenchmarkIterations(): int { return inv('0x22FC52CF470CC98D', rai()); } /** * @param offset * @returns address */ static setBit(offset: int): number { const result = inv('0xF73FBE4845C43B5B', pvi(), offset); return result; } /** * @param p0 * @param p1 * @param p2 * @param p3 * @param p4 * @param p5 * @param p6 * @returns */ static N_0x33982467B1E349EF(p0: any, p1: any, p2: any, p3: any, p4: any, p5: any, p6: any): any { return inv('0x33982467B1E349EF', p0, p1, p2, p3, p4, p5, p6); } /** * Determines whether there is a projectile of a specific type within the specified coordinates. The coordinates form a rectangle. * * @param min * @param max * @param weaponType * @param isPlayer * @returns */ static isProjectileTypeInArea(min: Vector3, max: Vector3, weaponType: string | number, isPlayer: boolean): boolean { return !!inv('0x04965FB9E14235C7', f(min.x), f(min.y), f(min.z), f(max.x), f(max.y), f(max.z), _h(weaponType), isPlayer, rai()); } /** * @returns */ static getMissionFlag(): boolean { return !!inv('0xB15CD1CF58771DE1', rai()); } static N_0x4D5C9CC7E7E23E09(): void { inv('0x4D5C9CC7E7E23E09'); } /** * @returns */ static getNextWeatherTypeHashName(): number { return (inv('0x51021D36F62AAA83', rai())) & 0xFFFFFFFF; } /** * spawns a few distant/out-of-sight peds, vehicles, animals etc each time it is called */ static populateNow(): void { inv('0xEA6DC3A8ADD2005F'); } /** * Hardcoded to return false. * * @returns */ static isStadiaVersion(): boolean { return !!inv('0x268AB8420A9E4ED7', rai()); } /** * @param ped * @returns */ static N_0x4B101DBCC9482F2D(ped: Ped): boolean { return !!inv('0x4B101DBCC9482F2D', ped.handle, rai()); } /** * @param entity * @returns */ static unregisterInteractionLockonPrompt(entity: Entity): any { return inv('0xE98D55C5983F2509', entity.handle); } /** * @param item * @returns */ static getVolumeFromIndexedItem(item: number): Volume | null { return createFromHandle('Volume', inv('0xF18AF483DF70BBDE', item, rai())); } /** * @param pos * @param range * @param p4 * @param p5 * @param p6 * @param p7 * @param p8 * @param p9 * @param p10 * @returns */ static isPositionOccupied(pos: Vector3, range: float, p4: boolean, p5: boolean, p6: boolean, p7: boolean, p8: boolean, p9: any, p10: boolean): boolean { return !!inv('0x825CA3ED43831015', f(pos.x), f(pos.y), f(pos.z), f(range), p4, p5, p6, p7, p8, p9, p10, rai()); } /** * nullsub, doesn't do anything */ static activityFeedPost(): void { inv('0xB16FC7B364D86585'); } /** * @param p0 * @param p1 * @returns */ static N_0x8BB99B85444544D9(p0: any, p1: any): any { return inv('0x8BB99B85444544D9', p0, p1); } /** * Delete an incident with a given id. * * @param incidentId */ static deleteIncident(incidentId: int): void { inv('0x5CFD0F0D6AAE0AEE', incidentId); } /** * @param pos * @param p4 * @returns groundZ */ static getGroundZFor3dCoord(pos: Vector3, p4: boolean): [boolean, number] { const result = inv<[boolean, number]>('0x24FA4267BB8D2431', f(pos.x), f(pos.y), f(pos.z), pvf(), p4, rai()); return [!!result[0], result[1]]; } /** * @param p0 * @param p1 * @param p2 * @param p3 * @param p4 * @param p5 * @param p6 * @returns */ static isBulletInBox(p0: float, p1: float, p2: float, p3: float, p4: float, p5: float, p6: boolean): boolean { return !!inv('0xC128137C52152741', f(p0), f(p1), f(p2), f(p3), f(p4), f(p5), p6, rai()); } /** * If true, the player can't save the game. * * @param toggle */ static setMissionFlag(toggle: boolean): void { inv('0x36694B456BE80D0A', toggle); } /** * @param p0 */ static N_0x745808BB01CEC6B9(p0: float): void { inv('0x745808BB01CEC6B9', f(p0)); } /** * enum eOnscreenKeyboardTextType * { * KTEXTTYPE_INVALID = -1, * KTEXTTYPE_DEFAULT, * KTEXTTYPE_EMAIL, * KTEXTTYPE_PASSWORD, * KTEXTTYPE_NUMERIC, * KTEXTTYPE_ALPHABET, * KTEXTTYPE_GAMERTAG, * KTEXTTYPE_FILENAME, * KTEXTTYPE_COUNT * }; * * @param textType * @param windowTitle * @param p2 * @param defaultText * @param defaultConcat1 * @param defaultConcat2 * @param defaultConcat3 * @param maxInputLength */ static displayOnscreenKeyboard(textType: int, windowTitle: string, p2: string, defaultText: string, defaultConcat1: string, defaultConcat2: string, defaultConcat3: string, maxInputLength: int): void { inv('0x044131118D8DB3CD', textType, windowTitle, p2, defaultText, defaultConcat1, defaultConcat2, defaultConcat3, maxInputLength); } /** * @param offset * @returns address */ static clearBit(offset: int): number { const result = inv('0x7D1D4A3602B6AD4E', pvi(), offset); return result; } /** * Only used in smuggler2 script * * @param maxAmplitude */ static waterOverrideSetOceanwavemaxamplitude(maxAmplitude: float): void { inv('0xF06C5B66DE20B2B8', f(maxAmplitude)); } /** * @param p0 * @returns */ static N_0x7CF96F1250EF3221(p0: any): any { return inv('0x7CF96F1250EF3221', p0); } /** * nullsub, doesn't do anything * * @param p0 * @param p1 */ static activityFeedActionStartWithCommandLine(p0: string, p1: string): void { inv('0x91D657230BC208D2', p0, p1); } /** * _CLEAR* * * @param p0 */ static N_0xA08111B053D84B4D(p0: any): void { inv('0xA08111B053D84B4D', p0); } static resetDispatchIdealSpawnDistance(): void { inv('0xC7817264BC4B6377'); } /** * @returns */ static N_0x35165C658077CD0B(): any { return inv('0x35165C658077CD0B'); } /** * @param handle * @returns */ static isBaseACoverPoint(handle: number): boolean { return !!inv('0xFEC1D4B5C82C176F', handle, rai()); } /** * @param modelHash * @returns minimum; maximum */ static getModelDimensions(modelHash: string | number): [Vector3, Vector3] { const result = inv<[number[], number[]]>('0xDCB8DDD5D054A7E7', _h(modelHash), pvv(), pvv()); return [Vector3.fromArray(result[0]), Vector3.fromArray(result[1])]; } /** * Only 0 and 1 are valid for p0, higher values causes the native to return 2. * * @param p0 * @returns */ static getStatusOfSavegameOperation(p0: int): int { return inv('0x1B065A2BF7953815', p0, rai()); } /** * Reads the passed value as floating point value and returns it. * Example: _READ_INT_AS_FLOAT(0x3F800000) returns 1.0f because 0x3F800000 is the hexadecimal representation of 1.0f. * * @param value * @returns */ static readIntAsFloat(value: int): float { return inv('0xD2C9126410DFA1B2', value, raf()); } /** * @param startRange * @param endRange * @returns */ static getRandomFloatInRange(startRange: float, endRange: float): float { return inv('0xE29F927A961F8AAA', f(startRange), f(endRange), raf()); } /** * @param p0 */ static N_0xCC3EDC5614B03F61(p0: int): void { inv('0xCC3EDC5614B03F61', p0); } /** * https://easings.net/ enum class eEasingCurveType * { * TYPE_LINEAR, * TYPE_QUADRATIC_IN, * TYPE_QUADRATIC_OUT, * TYPE_QUADRATIC_INOUT, * TYPE_CUBIC_IN, * TYPE_CUBIC_OUT, * TYPE_CUBIC_INOUT, * TYPE_QUARTIC_IN, * TYPE_QUARTIC_OUT, * TYPE_QUARTIC_INOUT, * TYPE_QUINTIC_IN, * TYPE_QUINTIC_OUT, * TYPE_QUINTIC_INOUT, * TYPE_EXPONENTIAL_IN, * TYPE_EXPONENTIAL_OUT, * TYPE_EXPONENTIAL_INOUT, * TYPE_SINE_IN, * TYPE_SINE_OUT, * TYPE_SINE_INOUT, * TYPE_CIRCULAR_IN, * TYPE_CIRCULAR_OUT, * TYPE_CIRCULAR_INOUT, * TYPE_BOUNCE_IN, * TYPE_BOUNCE_OUT, * TYPE_BOUNCE_INOUT, * TYPE_CUSTOM * }; * * @param t * @param b * @param d * @param easingCurveType * @returns */ static getEasingCurveValue(t: float, b: float, d: float, easingCurveType: int): float { return inv('0xEF50E344A8F93784', f(t), f(b), f(d), easingCurveType, raf()); } /** * @returns */ static getGameTimer(): int { return inv('0x4F67E8ECA7D3F667', rai()); } /** * @param level */ static setSnowLevel(level: float): void { inv('0xF6BEE7E80EC5CA40', f(level)); } /** * @param string1 * @param string2 * @returns */ static doesStringExistInString(string1: string, string2: string): boolean { return !!inv('0x9382D5D43D2AA6FF', string1, string2, rai()); } /** * @returns */ static getWindSpeed(): float { return inv('0xFFB7E74E041150A4', raf()); } /** * Old name: _CANCEL_ONSCREEN_KEYBOARD */ static cancelOnscreenKeyboard(): void { inv('0x58A39BE597CE99CD'); } /** * Hardcoded to return one/true. * * @returns */ static N_0xDC057B86FC157031(): any { return inv('0xDC057B86FC157031'); } /** * @returns */ static getWindDirection(): Vector3 { return Vector3.fromArray(inv('0xF703E82F3FE14A5F', rav())); } static gameFrameworkManagerShutdown(): void { inv('0xAFF2FD8ADD927585'); } static networkSetScriptIsSafeForNetworkGame(): void { inv('0x3D0EAC6385DD6100'); } /** * @param p0 * @returns */ static tan(p0: float): float { return inv('0x8C13DB96497B7ABF', f(p0), raf()); } /** * Returns rage::fwTimer::sm_nonScaledClippedTime * * @returns */ static getGameTimerNonScaledClipped(): int { return inv('0x483B8C542103AD72', rai()); } /** * Returns a formatted string (0x%x) * * @param rgb * @returns */ static createColorString(rgb: int): string { return inv('0xBCC2CFADEA1AEA6C', rgb, ras()); } /** * Outputs the ground Z axis, its material and flags. * Input flags are 17, 129 or 3423 in R* scripts. Surely similar to flags of shapes test. * * @param coords * @param flags * @returns groundZ; material; outFlags */ static getGroundZAndMaterialFor3dCoord(coords: Vector3, flags: int): [boolean, number, number, number] { const result = inv<[boolean, number, number, number]>('0xBBE5B63EFFB08E68', f(coords.x), f(coords.y), f(coords.z), flags, pvf(), pvi(), pvi(), rai()); return [!!result[0], result[1], result[2], result[3]]; } /** * @param p0 * @returns */ static N_0x38C2BF94D15F464D(p0: any): any { return inv('0x38C2BF94D15F464D', p0); } /** * @returns */ static getMaxNumInstructions(): int { return inv('0xC43CD2668B204419', rai()); } /** * @returns bitFlags */ static clearAllBitFlags(): number { const result = inv('0xD2D74F89DF844A50', pvi()); return result; } /** * @param fIdealSpawnDistance */ static setDispatchIdealSpawnDistance(fIdealSpawnDistance: float): void { inv('0xEAB6823B82FBD283', f(fIdealSpawnDistance)); } /** * Only used in script function PROCESS_ZONE_CREATION * Returns Pop multiplier volume ID * * @param volume * @param pedDensity * @param vehicleDensity * @param p3 * @param p4 * @returns */ static addPopMultiplierVolume(volume: Volume, pedDensity: float, vehicleDensity: float, p3: boolean, p4: boolean): int { return inv('0x3233C4EC0514C7EC', volume.handle, f(pedDensity), f(vehicleDensity), p3, p4, rai()); } /** * Begins with STOP_*. Next character in the name is either D or E. Old name: _STOP_BENCHMARK_RECORDING */ static stopEndUserBenchmark(): void { inv('0xB89AEC71AFF2B599'); } /** * Returns the weather type that has been set by a script * * @returns weather; p1 */ static getForcedWeather(): [number, number] { const result = inv<[number, number]>('0xDD560ABEF5D3784C', pvi(), pvi()); return [result[0], result[1]]; } /** * @returns */ static getFrameTime(): float { return inv('0x5E72022914CE3C38', raf()); } /** * @param p0 */ static N_0x9BF2C0C568C61641(p0: any): void { inv('0x9BF2C0C568C61641', p0); } /** * nullsub, doesn't do anything * * @param p0 */ static activityFeedAddSubstringToCaption(p0: string): void { inv('0x9935F76407C32539', p0); } /** * @param direction */ static setWindDirection(direction: float): void { inv('0xB56C4F5F57A45600', f(direction)); } /** * @param fontBitField */ static nextOnscreenKeyboardResultWillDisplayUsingTheseFonts(fontBitField: int): void { inv('0x5CB71EAA1429A358', fontBitField); } /** * creates single lightning+thunder at random position */ static forceLightningFlash(): void { inv('0x369DB5B2510FA080'); } /** * @param p0 * @returns */ static N_0x5B4A8121A47D844D(p0: any): any { return inv('0x5B4A8121A47D844D', p0); } /** * @param p0 * @returns */ static N_0x6F02B5E50511721E(p0: any): any { return inv('0x6F02B5E50511721E', p0); } /** * @returns data */ static N_0x183672FE838A661B(): number { const result = inv('0x183672FE838A661B', pvi()); return result; } /** * @param p0 * @param p1 * @param p2 * @param p3 * @param p4 * @param p5 * @param p6 * @param p7 * @param p8 * @param p9 * @param p10 * @param p11 * @returns p12 */ static getLinePlaneIntersection(p0: float, p1: float, p2: float, p3: float, p4: float, p5: float, p6: float, p7: float, p8: float, p9: float, p10: float, p11: float): [boolean, number] { const result = inv<[boolean, number]>('0xAB6A04CEC428258B', f(p0), f(p1), f(p2), f(p3), f(p4), f(p5), f(p6), f(p7), f(p8), f(p9), f(p10), f(p11), pvf(), rai()); return [!!result[0], result[1]]; } /** * @param p0 * @param p1 */ static setRandomWeatherType(p0: boolean, p1: boolean): void { inv('0x6E5A7FBEECAB3C72', p0, p1); } /** * @param p0 * @param p1 * @returns */ static atan2(p0: float, p1: float): float { return inv('0x965B220A066E3F07', f(p0), f(p1), raf()); } /** * @param p0 * @param p1 * @param p2 * @param p3 * @param p4 * @param p5 * @param p6 * @param p7 * @returns */ static hasBulletImpactedInBox(p0: float, p1: float, p2: float, p3: float, p4: float, p5: float, p6: boolean, p7: boolean): boolean { return !!inv('0x3B6A4C05FB2B33AC', f(p0), f(p1), f(p2), f(p3), f(p4), f(p5), p6, p7, rai()); } /** * @param part * @param checkpoint * @param lap * @param time */ static scriptRacePlayerHitCheckpoint(part: int, checkpoint: int, lap: int, time: int): void { inv('0xBA62B4D80FA66BD6', part, checkpoint, lap, time); } /** * @param volume * @param flag */ static clearVolumeArea(volume: Volume, flag: int): void { inv('0x2FCD528A397E5C88', volume.handle, flag); } /** * @param p0 * @param p1 */ static N_0xF63FA29D4A9ACA86(p0: any, p1: any): void { inv('0xF63FA29D4A9ACA86', p0, p1); } /** * @param p0 * @returns */ static acos(p0: float): float { return inv('0x586690F0176DC575', f(p0), raf()); } /** * Event names in the scripts: MGBegin, MGEnd, ReadyForCut * * @param ped * @param eventName * @returns */ static getLootingEventHasFired(ped: Ped, eventName: string): any { return inv('0xF9B91C5129EABC08', ped.handle, eventName); } /** * @param speed */ static setWindSpeed(speed: float): void { inv('0xD00C2D82DC04A99F', f(speed)); } /** * Only used in smuggler2 script * * @param amplitude */ static waterOverrideSetShorewaveamplitude(amplitude: float): void { inv('0x55123D5A7D9D3C42', f(amplitude)); } /** * @param player */ static setSuperJumpThisFrame(player: Player): void { inv('0xB3E9BE963F10C445', player.handle); } /** * @returns */ static getFrameCount(): int { return inv('0x77DFA958FCF100C1', rai()); } /** * nullsub, doesn't do anything */ static N_0xB711EB4BC8D06013(): void { inv('0xB711EB4BC8D06013'); } /** * @param p0 * @param p1 * @param p2 * @param p3 * @param p4 * @param p5 * @param p6 * @param p7 * @param p8 * @param p9 * @returns */ static getClosestPointOnLine(p0: float, p1: float, p2: float, p3: float, p4: float, p5: float, p6: float, p7: float, p8: float, p9: boolean): Vector3 { return Vector3.fromArray(inv('0x83ACC65D9ACEC5EF', f(p0), f(p1), f(p2), f(p3), f(p4), f(p5), f(p6), f(p7), f(p8), p9, rav())); } /** * @param weatherType */ static setOverrideWeather(weatherType: string | number): void { inv('0xBE83CAE8ED77A94F', _h(weatherType)); } /** * @param p0 */ static N_0x74ACA66484CEBAF0(p0: any): void { inv('0x74ACA66484CEBAF0', p0); } static N_0xF569E33FB72ED28E(): void { inv('0xF569E33FB72ED28E'); } /** * Params: BOOL p3 is always true Old name: _SET_WEATHER_TYPE_TRANSITION * * @param weatherType1 * @param weatherType2 * @param percentWeather2 * @param enabled */ static setCurrWeatherState(weatherType1: string | number, weatherType2: string | number, percentWeather2: float, enabled: boolean): void { inv('0xFA3E3CA8A1DE6D5D', _h(weatherType1), _h(weatherType2), f(percentWeather2), enabled); } /** * disables prompt eat * old name DISABLE_LOOTING_COMPOSITE_LOOTABLE_THIS_FRAME * * @param compositeId * @param disable */ static disableLootingCompositeLootableThisFrame(compositeId: int, disable: boolean): void { inv('0x40D72189F46D2E15', compositeId, disable); } /** * Note: the buffer should be exactly 32 bytes long * * @param value * @param format * @param buffer */ static intToString(value: int, format: string, buffer: string): void { inv('0xCF11C0CEB40C401B', value, format, buffer); } /** * @param p1 * @returns args */ static getAiPedDoesHaveEventMemory(p1: int): [any, number] { const result = inv<[number, number]>('0xFDF38E2B711BF78E', pvi(), p1); return [result[0], result[1]]; } /** * @param p0 * @param p1 */ static N_0x4647842FE8F31C1E(p0: any, p1: any): void { inv('0x4647842FE8F31C1E', p0, p1); } /** * @returns */ static gameFrameworkManagerGetMode(): number { return (inv('0xFAED234C7F53ABEB', rai())) & 0xFFFFFFFF; } /** * @param toggle */ static setThisScriptCanRemoveBlipsCreatedByAnyScript(toggle: boolean): void { inv('0x8ABD939C2E5D00ED', toggle); } /** * If the parameter is true, sets the random event flag to true, if the parameter is false, the function does nothing at all. * Does nothing if the mission flag is set. * * @param toggle */ static setRandomEventFlag(toggle: boolean): void { inv('0xB1ADCCC4150C6473', toggle); } static N_0x9A252AA23D7098F2(): void { inv('0x9A252AA23D7098F2'); } /** * @param p0 */ static N_0x5801BE2DF2AF07EC(p0: any): void { inv('0x5801BE2DF2AF07EC', p0); } /** * @param p0 * @returns */ static N_0x6C7B68D3CE60E8DE(p0: any): any { return inv('0x6C7B68D3CE60E8DE', p0); } /** * @param p0 * @param p1 * @param p2 */ static N_0xAD44856A1CD29635(p0: any, p1: any, p2: any): void { inv('0xAD44856A1CD29635', p0, p1, p2); } static clearWeatherTypePersist(): void { inv('0xD85DFE5C131E4AE9'); } /** * https://github.com/femga/rdr3_discoveries/blob/master/weather/weather_types.lua * * @param weatherType * @param p1 * @param p2 * @param transition * @param transitionTime * @param p5 */ static setWeatherType(weatherType: string | number, p1: boolean, p2: boolean, transition: boolean, transitionTime: float, p5: boolean): void { inv('0x59174F1AFE095B5A', _h(weatherType), p1, p2, transition, f(transitionTime), p5); } /** * @param index * @param toggle */ static setGlobalBlockIsLoaded(index: int, toggle: boolean): void { inv('0xE97240065406CB80', index, toggle); } /** * 0 = invalid * 1 = CEntity * 2 = rage::volBase * 3 = rage::volSphere * 4 = rage::volBox * 5 = rage::volAggregate * 6 = rage::volCylinder * 7 = CScriptedCoverPoint * 8 = rage::ptfxScriptInfo * 9 = CPed * 10 = CVehicle * 11 = CObject * 12 = CItemSet * 13 = CPersistentCharacter * * @param handle * @returns */ static getItemType(handle: number): int { return inv('0xDC8D2FF478DF9553', handle, rai()); } /** * Possible flag names: * ALL_BASE = 0, * PROJECTILES = 1, * BROADCAST = 524288, * AMBIENT_POPULATION = 1048576 * * @param pos * @param radius * @param flag */ static clearArea(pos: Vector3, radius: float, flag: int): void { inv('0x3B882A96EA77D5B1', f(pos.x), f(pos.y), f(pos.z), f(radius), flag); } /** * @param flag * @returns bitFlags */ static clearBitFlag(flag: int): number { const result = inv('0xB909149F2BB5F6DA', pvi(), flag); return result; } /** * nullsub, doesn't do anything * * @param p0 */ static activityFeedActionStartWithCommandLineAdd(p0: string): void { inv('0x1694A053DFB61A34', p0); } /** * @param ped * @param p1 * @param p2 * @param lootTableKey * @param p5 * @returns p4 */ static lootTablesGetInfo(ped: Ped, p1: boolean, p2: boolean, lootTableKey: string | number, p5: any): number { const result = inv('0x48E4D50F87A96AA5', ped.handle, p1, p2, _h(lootTableKey), pvi(), p5); return result; } /** * @param volume * @returns */ static doesPopMultiplierAreaExistForVolume(volume: Volume): boolean { return !!inv('0x39D6DACE323A20B6', volume.handle, rai()); } /** * @param id * @param p1 */ static removePopMultiplierArea(id: int, p1: boolean): void { inv('0x88CB484364EFB37A', id, p1); } /** * @returns bitFlags */ static isAnyBitFlagSet(): [boolean, number] { const result = inv<[boolean, number]>('0x80E9C316EF84DD81', pvi(), rai()); return [!!result[0], result[1]]; } static N_0xDBDA48EC456ED908(): void { inv('0xDBDA48EC456ED908'); } /** * @returns */ static N_0xF81C53561D15F330(): string { return inv('0xF81C53561D15F330', ras()); } /** * @param item * @returns */ static getObjectFromIndexedItem(item: number): Prop | null { return createFromHandle('Prop', inv('0x18013392501CE5DC', item, rai())); } /** * @param stackSize * @returns */ static getNumberOfFreeStacksOfThisSize(stackSize: int): int { return inv('0x40DC2907A9697EF7', stackSize, rai()); } /** * @param p0 * @param p1 * @param p2 */ static N_0x3A87FDA8F1B6CDFB(p0: any, p1: any, p2: any): void { inv('0x3A87FDA8F1B6CDFB', p0, p1, p2); } /** * @param ped * @param weaponHash Refer to {@link eWeaponHash} * @param distance * @param p5 * @param mustBeOwnedByThisPed * @returns outCoords; outProjectile */ static getProjectileOfProjectileTypeWithinDistance(ped: Ped, weaponHash: eWeaponHash, distance: float, p5: boolean, mustBeOwnedByThisPed: boolean): [boolean, Vector3, Prop | null] { const result = inv<[boolean, number[], number]>('0x9578986A6105A6AD', ped.handle, weaponHash, f(distance), pvv(), pvi(), p5, mustBeOwnedByThisPed, rai()); return [!!result[0], Vector3.fromArray(result[1]), createFromHandle('Prop', result[2])]; } /** * @returns */ static isMinigameInProgress(): boolean { return !!inv('0xF4D8BCD052E7EA1B', rai()); } /** * Old name: _GET_BENCHMARK_TIME * * @returns */ static getSystemTimeStep(): float { return inv('0x3F3172FEAE3AFE1C', raf()); } /** * Returns a string in the following format: <<%.4f,%.4f,%.4f>> * * @param pos * @returns */ static getStringFromVector(pos: Vector3): string { return inv('0x6C4DBF553885F9EB', f(pos.x), f(pos.y), f(pos.z), ras()); } /** * @param value * @returns */ static absi(value: int): int { return inv('0x0C214D5B8A38C828', value, rai()); } /** * nullsub, doesn't do anything * * @param p0 */ static N_0xFF252E2BAFB7330F(p0: any): void { inv('0xFF252E2BAFB7330F', p0); } /** * @returns */ static isGameSessionStateMachineIdle(): boolean { return !!inv('0xF9E7DBB39080640B', rai()); } /** * @param p0 * @param p1 */ static N_0xAF3A84C7DE6A1DC5(p0: any, p1: any): void { inv('0xAF3A84C7DE6A1DC5', p0, p1); } /** * @param p0 * @param p1 */ static N_0x7FA58CED69405F9A(p0: any, p1: any): void { inv('0x7FA58CED69405F9A', p0, p1); } static resetDispatchMinSpawnDistance(): void { inv('0x96498D922D8D0D0A'); } /** * @param volume * @returns */ static addDispatchSpawnBlockingArea(volume: Volume): any { return inv('0xA2D5A26208421426', volume.handle); } /** * https://github.com/femga/rdr3_discoveries/blob/master/weather/weather_variations.lua * * @param weatherType * @param variation */ static setWeatherVariation(weatherType: string, variation: string): void { inv('0x3373779BAF7CAF48', weatherType, variation); } /** * @param p0 */ static N_0x49C44FE78A135A1D(p0: any): void { inv('0x49C44FE78A135A1D', p0); } /** * @param weatherType * @param p1 */ static clearWeatherVariation(weatherType: string, p1: boolean): void { inv('0x0E71C80FA4EC8147', weatherType, p1); } /** * Not officially named * , Counts the number of segments in a string that are separated by specified delimiter characters, ignoring consecutive delimiters. * * @param inputString * @param delimiters * @returns * @example * ```lua * local count = N_0x94e8ca3dee952789('AAA_BB-AAA_BB;AAA_BB,AAA_BB.AAA_BB;AAA_BB-', '-,;.'); * // Returns 6, counts all segments separated by '-', ',', ';', or '.', while ignoring consecutive delimiters. * ``` */ static stringSplitAndCountSegments(inputString: string, delimiters: string): any { return inv('0x94E8CA3DEE952789', inputString, delimiters); } /** * @param id * @returns */ static doesPopMultiplierAreaExist(id: int): boolean { return !!inv('0x03BA619C81A646B3', id, rai()); } /** * @param weatherType */ static N_0x2916B30DC6C41179(weatherType: string | number): void { inv('0x2916B30DC6C41179', _h(weatherType)); } /** * @param ped * @param weaponHash Refer to {@link eWeaponHash} * @param distance * @param p4 * @param mustBeOwnedByThisPed * @returns outCoords */ static getCoordsOfProjectileTypeWithinDistance(ped: Ped, weaponHash: eWeaponHash, distance: float, p4: boolean, mustBeOwnedByThisPed: boolean): [boolean, Vector3] { const result = inv<[boolean, number[]]>('0xD73C960A681052DF', ped.handle, weaponHash, f(distance), pvv(), p4, mustBeOwnedByThisPed, rai()); return [!!result[0], Vector3.fromArray(result[1])]; } /** * Returns NULL unless UPDATE_ONSCREEN_KEYBOARD() returns 1 in the same tick. * * @returns */ static getOnscreenKeyboardResult(): string { return inv('0xAFB4CF58A4A292B1', ras()); } /** * Old name: _SET_RAIN_LEVEL * * @param intensity */ static setRain(intensity: float): void { inv('0x193DFC0526830FD6', f(intensity)); } /** * @param weatherType */ static N_0xD3F943B88F55376A(weatherType: string | number): void { inv('0xD3F943B88F55376A', _h(weatherType)); } /** * @param dispatchService Refer to {@link eDispatchType} * @param pos * @param numUnits * @param radius * @param p7 * @param p8 * @returns outIncidentID */ static createIncident(dispatchService: int, pos: Vector3, numUnits: int, radius: float, p7: any, p8: any): [boolean, number] { const result = inv<[boolean, number]>('0x3F892CAF67444AE7', dispatchService, f(pos.x), f(pos.y), f(pos.z), numUnits, f(radius), pvi(), p7, p8, rai()); return [!!result[0], result[1]]; } /** * @param volume * @param p1 */ static removePopMultiplierAreaForVolume(volume: Volume, p1: int): void { inv('0xBD090F5B1DB82189', volume.handle, p1); } /** * @param p0 * @param p1 * @param p2 * @returns */ static N_0x970339EFA4FDE518(p0: any, p1: any, p2: any): any { return inv('0x970339EFA4FDE518', p0, p1, p2); } /** * @param p0 * @param p1 * @returns */ static N_0x8DB104CCEBCD58C5(p0: any, p1: any): any { return inv('0x8DB104CCEBCD58C5', p0, p1); } /** * @param p0 * @param p1 */ static N_0xAB26DEEE120FD3FD(p0: any, p1: any): void { inv('0xAB26DEEE120FD3FD', p0, p1); } static N_0xA3A8926951471C82(): void { inv('0xA3A8926951471C82'); } /** * Hardcoded to return false. Old name: _UI_IS_SINGLEPLAYER_PAUSE_MENU_ACTIVE * * @returns */ static uiStartedEndUserBenchmark(): boolean { return !!inv('0x4FFA0386A6216113', rai()); } /** * @returns */ static isMissionCreatorActive(): boolean { return !!inv('0xF236C84C6ADFCB2F', rai()); } /** * @param p0 * @returns */ static N_0xB1F6665AA54DCD5C(p0: string | number): any { return inv('0xB1F6665AA54DCD5C', _h(p0)); } /** * @param dispatchService Refer to {@link eDispatchType} * @param toggle */ static blockDispatchServiceResourceCreation(dispatchService: int, toggle: boolean): void { inv('0x66947E61A44DE2C6', dispatchService, toggle); } /** * nullsub, doesn't do anything */ static stopCurrentLoadingProgressTimer(): void { inv('0xA565FAC215CBC77D'); } /** * @param pos * @returns groundZ; normal */ static getGroundZAndNormalFor3dCoord(pos: Vector3): [boolean, number, Vector3] { const result = inv<[boolean, number, number[]]>('0x2A29CA9A6319E6AB', f(pos.x), f(pos.y), f(pos.z), pvf(), pvv(), rai()); return [!!result[0], result[1], Vector3.fromArray(result[2])]; } /** * @returns */ static getSystemTime(): int { return inv('0xBE7F225417E35A7C', rai()); } /** * @param p0 */ static N_0x154340E87D8CC178(p0: any): void { inv('0x154340E87D8CC178', p0); } /** * @returns args */ static fireSingleBullet(): number { const result = inv('0xCBC9A21F6A2A679C', pvi()); return result; } /** * @param item * @returns */ static getPedFromIndexedItem(item: number): Ped | null { return createFromHandle('Ped', inv('0x3FFB15534067DCD4', item, rai())); } /** * @param value * @returns */ static getStringFromBool(value: boolean): string { return inv('0xF216F74101968DB0', value, ras()); } /** * Appears to remove stealth kill action from memory (?) * * @param hash * @param enable */ static actionManagerEnableAction(hash: string | number, enable: boolean): void { inv('0x7ACF124C12A2B045', _h(hash), enable); } /** * @param p0 * @returns p1; p2 */ static scriptRaceGetPlayerSplitTime(p0: any): [boolean, number, number] { const result = inv<[boolean, number, number]>('0x769E848C66E3C2BB', p0, pvi(), pvi(), rai()); return [!!result[0], result[1], result[2]]; } /** * @param variable * @param rangeStart * @param rangeEnd * @returns */ static getBitsInRange(variable: int, rangeStart: int, rangeEnd: int): int { return inv('0x68E1352AF48F905D', variable, rangeStart, rangeEnd, rai()); } /** * @param item * @returns */ static getVehicleFromIndexedItem(item: number): Vehicle | null { return createFromHandle('Vehicle', inv('0xE578C8AE173719B3', item, rai())); } /** * @param p0 * @param p1 * @param p2 * @param p3 * @param p4 * @param p5 * @param p6 * @param p7 * @param p8 * @returns */ static isProjectileTypeInAngledArea(p0: float, p1: float, p2: float, p3: float, p4: float, p5: float, p6: float, p7: any, p8: boolean): boolean { return !!inv('0x928431F4133CD3D4', f(p0), f(p1), f(p2), f(p3), f(p4), f(p5), f(p6), p7, p8, rai()); } static N_0xFC6ECB9170145ECE(): void { inv('0xFC6ECB9170145ECE'); } /** * @param entity * @param p1 * @param p2 * @returns */ static N_0x7A76104CC2CC69E8(entity: Entity, p1: int, p2: int): any { return inv('0x7A76104CC2CC69E8', entity.handle, p1, p2); } /** * Returns false if it's a null or empty string or if the string is too long. outInteger will be set to -999 in that case. * * @param string * @returns outInteger */ static stringToInt(string: string): [boolean, number] { const result = inv<[boolean, number]>('0xF2DD2298B3AF23E2', string, pvi(), rai()); return [!!result[0], result[1]]; } /** * @param toggle */ static ignoreNextRestart(toggle: boolean): void { inv('0x6C9FF40FF1B69F8F', toggle); } /** * @param p0 */ static N_0x49F3241C28EBBFBC(p0: int): void { inv('0x49F3241C28EBBFBC', p0); } /** * @param transitionMode * @returns */ static gameFrameworkManagerInit(transitionMode: string | number): any { return inv('0x4CABE596D632E4B0', _h(transitionMode)); } /** * Not implemented. * * @param ped * @param p1 */ static N_0xEB946B9E579729AD(ped: Ped, p1: any): void { inv('0xEB946B9E579729AD', ped.handle, p1); } /** * Returns GET_GAME_TIMER() / 1000 * Only used in rcm_pearson1.ysc * * @returns */ static getRealWorldTime(): int { return inv('0x2E036F0480B8BF02', rai()); } /** * Returns the current status of the onscreen keyboard, and updates the output. Status Codes: 0 - User still editing * 1 - User has finished editing * 2 - User has canceled editing * 3 - Keyboard isn't active * * @returns */ static updateOnscreenKeyboard(): int { return inv('0x37DF360F235A3893', rai()); } /** * @param p0 */ static N_0x94FCADCF9F0C368E(p0: any): void { inv('0x94FCADCF9F0C368E', p0); } /** * @param pos1 * @param pos2 * @returns */ static getAngleBetween2dVectors(pos1: Vector2, pos2: Vector2): float { return inv('0xD0DFE1C486097BBB', f(pos1.x), f(pos1.y), f(pos2.x), f(pos2.y), raf()); } /** * disables composite Pick prompt * * @param compositeId * @param disable */ static disableCompositePickPromptThisFrame(compositeId: int, disable: boolean): void { inv('0x082C043C7AFC3747', compositeId, disable); } /** * @param p0 * @param p1 * @param p2 * @param p3 * @param p4 * @param p5 * @param p6 * @param p7 * @returns */ static isBulletInAngledArea(p0: float, p1: float, p2: float, p3: float, p4: float, p5: float, p6: float, p7: boolean): boolean { return !!inv('0x9D09D8493747CF02', f(p0), f(p1), f(p2), f(p3), f(p4), f(p5), f(p6), p7, rai()); } static clearOverrideWeather(): void { inv('0x80A398F16FFE3CC3'); } /** * @param ped * @param toggle */ static setPedDecomposed(ped: Ped, toggle: boolean): void { inv('0x674B90BE1115846D', ped.handle, toggle); } /** * @param str1 * @param str2 * @param matchCase * @param maxLength * @returns */ static compareStrings(str1: string, str2: string, matchCase: boolean, maxLength: int): int { return inv('0xBFBB74A15EFC149B', str1, str2, matchCase, maxLength, rai()); } /** * Same as SHOULD_USE_METRIC_MEASUREMENTS * * @returns */ static shouldUseMetricMeasurements2(): boolean { return !!inv('0x58BCDC75BA52110A', rai()); } /** * Hardcoded to return false. * Checks for XBOXONE Game Build. * * @returns */ static isDurangoVersion(): boolean { return !!inv('0xD1CCC2A2639D325F', rai()); } /** * @returns */ static getRandomWeatherTypeIndex(): int { return inv('0x7F4CE164D9A11DFE', rai()); } /** * @param p0 */ static N_0x38C0C9CAE1544500(p0: string | number): void { inv('0x38C0C9CAE1544500', _h(p0)); } /** * @returns */ static shouldUseMetricTemperature(): boolean { return !!inv('0xFF4AAF3275BAAB4F', rai()); } /** * @param toggle */ static setCreditsActive(toggle: boolean): void { inv('0xD37BECF862DA726F', toggle); } /** * Make sure to call this from the correct thread if you're using multiple threads because all other threads except the one which is calling SET_GAME_PAUSED will be paused. * * @param toggle */ static setGamePaused(toggle: boolean): void { inv('0xFAEC088D28B1DE4A', toggle); } /** * @returns */ static getNumberOfMicrosecondsSinceLastCall(): int { return inv('0xB0CE5E5ED8BB3581', rai()); } static scriptRaceShutdown(): void { inv('0x334CE0DA4FAF330C'); } /** * @param string * @returns */ static isStringNull(string: string): boolean { return !!inv('0x602102324604D96B', string, rai()); } /** * @param p0 * @param p1 * @param p2 * @param p3 * @param p4 * @returns */ static isBulletInArea(p0: float, p1: float, p2: float, p3: float, p4: boolean): boolean { return !!inv('0xC652FD308772D79E', f(p0), f(p1), f(p2), f(p3), p4, rai()); } /** * Params: p3 is 0 in R* Script utopia2 * * @param pos * @param p3 */ static addTacticalNavMeshPoint(pos: Vector3, p3: int): void { inv('0xE4EE55E63FA9AF45', f(pos.x), f(pos.y), f(pos.z), p3); } /** * *SET_DISPATCH**, unused * * @param p0 * @param p1 * @param p2 */ static N_0x6BCF7B5CD338281A(p0: any, p1: any, p2: any): void { inv('0x6BCF7B5CD338281A', p0, p1, p2); } /** * p3 - possibly radius? * * @param pos * @param p3 * @param p4 * @param p5 * @returns */ static hasBulletImpactedInArea(pos: Vector3, p3: float, p4: boolean, p5: boolean): boolean { return !!inv('0xC153E5BCCF411814', f(pos.x), f(pos.y), f(pos.z), f(p3), p4, p5, rai()); } /** * @param p0 * @param p1 * @param p2 * @param p3 * @param p4 * @param p5 * @returns */ static isProjectileTypeWithinDistance(p0: float, p1: float, p2: float, p3: any, p4: float, p5: boolean): boolean { return !!inv('0xF51C9BAAD9ED64C4', f(p0), f(p1), f(p2), p3, f(p4), p5, rai()); } /** * @param pos1 * @param pos2 * @param damage * @param p7 * @param weaponHash Refer to {@link eWeaponHash} * @param ownerPed * @param isAudible * @param isInvisible * @param speed * @param p13 */ static shootSingleBulletBetweenCoords(pos1: Vector3, pos2: Vector3, damage: int, p7: boolean, weaponHash: eWeaponHash, ownerPed: Ped, isAudible: boolean, isInvisible: boolean, speed: float, p13: boolean): void { inv('0x867654CBC7606F2C', f(pos1.x), f(pos1.y), f(pos1.z), f(pos2.x), f(pos2.y), f(pos2.z), damage, p7, weaponHash, ownerPed.handle, isAudible, isInvisible, f(speed), p13); } /** * @param p0 */ static N_0xDA4D8EB04E8E2928(p0: any): void { inv('0xDA4D8EB04E8E2928', p0); } /** * @param hash * @returns */ static actionManagerIsActionEnabled(hash: string | number): any { return inv('0xFD0759658268FD8E', _h(hash)); } /** * Begins with RESET_*. Next character in the name is either D or E. Old name: _RESET_BENCHMARK_RECORDING */ static resetEndUserBenchmark(): void { inv('0xECBABD0307FB216F'); } /** * @param p1 * @returns p0 */ static N_0x6BED40493A1AFDB8(p1: float): number { const result = inv('0x6BED40493A1AFDB8', pvi(), f(p1)); return result; } /** * @param ped * @param item */ static setLootPeltSatchelItem(ped: Ped, item: any): void { inv('0x9B47971234169990', ped.handle, item); } /** * @param toggle */ static setThisScriptCanBePaused(toggle: boolean): void { inv('0x3215376E79F6EA18', toggle); } /** * Hardcoded to return false. * Checks for PS4 Game Build. * * @returns */ static isOrbisVersion(): boolean { return !!inv('0x88CFAE250D3E0C71', rai()); } /** * @returns */ static getSnowLevel(): float { return inv('0x1E5D727041BE1709', raf()); } /** * @param value * @returns */ static absf(value: float): float { return inv('0x134549B388167CBF', f(value), raf()); } /** * @param numCheckpoints * @param numLaps * @param numPlayers * @param p3 */ static scriptRaceInit(numCheckpoints: int, numLaps: int, numPlayers: int, p3: any): void { inv('0x8AE059F47158417E', numCheckpoints, numLaps, numPlayers, p3); } /** * p0 must be < 2 * * @param p0 * @returns */ static queueSavegameOperation(p0: int): any { return inv('0x279B0696DA4657EB', p0); } /** * @param p0 * @returns */ static atan(p0: float): float { return inv('0x503054DED0B78027', f(p0), raf()); } /** * @param p0 * @param p1 */ static N_0xDE2C3B74D2B3705C(p0: any, p1: any): void { inv('0xDE2C3B74D2B3705C', p0, p1); } /** * Determines whether there is a projectile within the specified coordinates. The coordinates form a rectangle. ownedByPlayer = only projectiles fired by the player will be detected. * * @param pos1 * @param pos2 * @param ownedByPlayer * @returns */ static isProjectileInArea(pos1: Vector3, pos2: Vector3, ownedByPlayer: boolean): boolean { return !!inv('0x05B0061EFDFC8941', f(pos1.x), f(pos1.y), f(pos1.z), f(pos2.x), f(pos2.y), f(pos2.z), ownedByPlayer, rai()); } /** * @param p0 * @returns */ static asin(p0: float): float { return inv('0x6E3C15D296C15583', f(p0), raf()); } /** * @param p0 * @param p1 * @param p2 * @returns */ static N_0x8314FC2013ECE2DA(p0: any, p1: any, p2: any): any { return inv('0x8314FC2013ECE2DA', p0, p1, p2); } /** * @param index * @returns */ static isGlobalBlockValid(index: int): boolean { return !!inv('0xACB7E1418A8B6E32', index, rai()); } /** * @param p0 */ static N_0x0A487CC74A517FB5(p0: any): void { inv('0x0A487CC74A517FB5', p0); } /** * aiMemoryType: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/_CREATE_AI_MEMORY * * @param aiMemoryType * @returns args */ static createAiMemory(aiMemoryType: int): number { const result = inv('0x88BC5F4AEF77FC4E', pvi(), aiMemoryType); return result; } static N_0x243CEDE8F916B994(): void { inv('0x243CEDE8F916B994'); } /** * Returns whether the game's measurement system is set to metric. * * @returns */ static shouldUseMetricMeasurements(): boolean { return !!inv('0x4FB556ACEFA93098', rai()); } /** * @param toggle */ static pauseDeathArrestRestart(toggle: boolean): void { inv('0x66AB6B6C7E72F393', toggle); } /** * @param incidentId */ static setIncidentUnk(incidentId: int): void { inv('0x9617B6E5F6537B63', incidentId); } /** * @returns */ static shouldUse24HourClock(): boolean { return !!inv('0x0177CF20345F44DD', rai()); } /** * @param dispatchService Refer to {@link eDispatchType} * @param toggle */ static enableDispatchService(dispatchService: int, toggle: boolean): void { inv('0x50E52637EF70EF77', dispatchService, toggle); } /** * Similar to SET_BIT but specifically designed for large (>32 flags) bit flag sets. * The flags are stored in an int array where each int has the ability to hold 32 flags. * Flags 0-31 would be stored in the first int, flags 32-63 in the second int, etc. * * @param flag * @returns bitFlags */ static setBitFlag(flag: int): number { const result = inv('0xE84AAC1B22A73E99', pvi(), flag); return result; } /** * Saves the benchmark recording to %USERPROFILE%\Documents\Rockstar Games\Red Dead Redemption 2\Benchmarks and submits some metrics. Old name: _SAVE_BENCHMARK_RECORDING */ static saveEndUserBenchmark(): void { inv('0xF4743E2ECC02B3DA'); } /** * magdemo = magazine demo, i. e. for magazines such as IGN, pre play phases to prepare articles etc. - example 2012 builds for V * Hardcoded to return false. * * @returns */ static isMagDemo1Active(): boolean { return !!inv('0x5FC9357C26DAEFCE', rai()); } static resetWantedResponseNumPedsToSpawn(): void { inv('0xEF42F56F69877125'); } /** * Returns value of the '-benchmarkPass' command line option. Old name: _GET_BENCHMARK_PASS_FROM_COMMAND_LINE * * @returns */ static getBenchmarkPass(): int { return inv('0x9297DACF3A2CDFF7', rai()); } /** * nullsub, doesn't do anything * * @param p0 * @param p1 */ static activityFeedCreate(p0: string, p1: string): void { inv('0xCC7FC854B956A128', p0, p1); } /** * Cheats are GTA IV cheats: 0 = unknown * 1 = unknown (same as 0) * 2 = Max Health and Armor * 3 = Raise Wanted Level * 4 = Lower Wanted Level * 5 = unknown (does nothing) * 6 = Change Weather * 7 = Spawn Annihilator * 8 = Spawn NRG 900 * 9 = Spawn FBI * 10 = Spawn Jetmax * 11 = Spawn Comet * 12 = Spawn Turismo * 13 = Spawn Cognoscenti * 14 = Spawn Super GT * 15 = Spawn Sanchez Initially used in Max Payne 3, that's why we know the name. * * @param cheatId */ static setCheatActive(cheatId: int): void { inv('0xD4958E8CF0DE0DD0', cheatId); } /** * Note: The first bit in 'flags' must not be set. * It is also required to pass at least one extra argument (this must be a text label string or hash). * When passing a hash, flags should be 0. * * @param flags * @param ...args * @returns */ static varString(flags: int, ...args: any[]): number { return inv('0xFA925AC00EB830B9', flags, ...args, rai()); } static resetScriptTimeWithinFrame(): void { inv('0x1411A7CBC3A6EB7B'); } /** * @param item * @returns */ static getEntityFromItem(item: number): Entity | null { return createFromHandle('Entity', inv('0xEE04C0AFD4EFAF0E', item, rai())); } /** * @param handle * @returns */ static isBaseAPersistentCharacter(handle: number): boolean { return !!inv('0x716F17F8A0419F95', handle, rai()); } /** * @returns */ static getPrevWeatherTypeHashName(): number { return (inv('0x4BEB42AEBCA732E9', rai())) & 0xFFFFFFFF; } /** * @param p0 * @returns */ static N_0x627B68D9CE6EE8DE(p0: any): any { return inv('0x627B68D9CE6EE8DE', p0); } /** * @returns */ static getNumberOfInstructions(): int { return inv('0x72904D3D62AF5839', rai()); } /** * @param pos1 * @param pos2 * @param pedDensity * @param trafficDensity * @param p8 * @param p9 * @returns */ static addPopMultiplierArea(pos1: Vector3, pos2: Vector3, pedDensity: float, trafficDensity: float, p8: boolean, p9: boolean): int { return inv('0x5EBDA1A3B8CB5EF7', f(pos1.x), f(pos1.y), f(pos1.z), f(pos2.x), f(pos2.y), f(pos2.z), f(pedDensity), f(trafficDensity), p8, p9, rai()); } /** * @param rangeStart * @param rangeEnd * @param p3 * @returns var */ static setBitsInRange(rangeStart: int, rangeEnd: int, p3: int): number { const result = inv('0x324DC1CEF57F31E6', pvi(), rangeStart, rangeEnd, p3); return result; } }