From ea1ea2c7a6e5c96736617adb0fd98e13bbf89a97 Mon Sep 17 00:00:00 2001 From: xshady <54737754+xxshady@users.noreply.github.com> Date: Thu, 9 Nov 2023 23:09:39 +0300 Subject: [PATCH 1/9] Add LocalVehicle to LocalPlayer vehicle property (#287) --- client/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/index.d.ts b/client/index.d.ts index a3a1554a..86d98283 100644 --- a/client/index.d.ts +++ b/client/index.d.ts @@ -1033,7 +1033,7 @@ declare module "alt-client" { public readonly name: string; /** Player's vehicle, null if player is not in any vehicle */ - public readonly vehicle: Vehicle | null; + public readonly vehicle: Vehicle | LocalVehicle | null; public readonly isDead: boolean; From 465ba213a7bea22df91764e97fcf83e57b0213db Mon Sep 17 00:00:00 2001 From: xLuxy <67131061+xLuxy@users.noreply.github.com> Date: Tue, 19 Dec 2023 13:49:46 +0100 Subject: [PATCH 2/9] feat(natives): Add new natives --- natives/index.d.ts | 27529 ++++++++++++++++++++++++------------------- 1 file changed, 15195 insertions(+), 12334 deletions(-) diff --git a/natives/index.d.ts b/natives/index.d.ts index 1b1daa3e..35d6f34d 100644 --- a/natives/index.d.ts +++ b/natives/index.d.ts @@ -1,6 +1,7 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +// This file was generated on 19.12.2023, 13:48:14 - DO NOT MODIFY MANUALLY /// + /** * @module natives */ @@ -8,40 +9,55 @@ declare module "natives" { import { Vector3, Entity, Vehicle, Player } from "alt-client"; export function toggleStrictChecks(enable: boolean): void; - /** - * Pauses execution of the current script, please note this behavior is only seen when called from one of the game script files(ysc). In order to wait an asi script use "static void WAIT(DWORD time);" found in main.h - */ + * Pauses execution of the current script, please note this behavior is only seen when called from one of the game script files(ysc). In order to wait an asi script use "static void WAIT(DWORD time);" found in main.h + */ export function wait(ms: number): void; /** - * Examples: - * g_384A = SYSTEM::START_NEW_SCRIPT("cellphone_flashhand", 1424); - * l_10D = SYSTEM::START_NEW_SCRIPT("taxiService", 1828); - * SYSTEM::START_NEW_SCRIPT("AM_MP_YACHT", 5000); - * SYSTEM::START_NEW_SCRIPT("emergencycall", 512); - * SYSTEM::START_NEW_SCRIPT("emergencycall", 512); - * SYSTEM::START_NEW_SCRIPT("FM_maintain_cloud_header_data", 1424); - * SYSTEM::START_NEW_SCRIPT("FM_Mission_Controller", 31000); - * SYSTEM::START_NEW_SCRIPT("tennis_family", 3650); - * See NativeDB for reference: http://natives.altv.mp/#/0xE81651AD79516E48 - * @returns return 1; - */ - export function startNewScript(scriptName: string | null, stackSize: number): number; - - /** - * return : script thread id, 0 if failed - * Pass pointer to struct of args in p1, size of struct goes into p2 - */ - export function startNewScriptWithArgs(scriptName: string | null, args: any | null, argCount: number, stackSize: number): [number, any]; + * Examples: + * g_384A = SYSTEM::START_NEW_SCRIPT("cellphone_flashhand", 1424); + * l_10D = SYSTEM::START_NEW_SCRIPT("taxiService", 1828); + * SYSTEM::START_NEW_SCRIPT("AM_MP_YACHT", 5000); + * SYSTEM::START_NEW_SCRIPT("emergencycall", 512); + * SYSTEM::START_NEW_SCRIPT("emergencycall", 512); + * SYSTEM::START_NEW_SCRIPT("FM_maintain_cloud_header_data", 1424); + * SYSTEM::START_NEW_SCRIPT("FM_Mission_Controller", 31000); + * SYSTEM::START_NEW_SCRIPT("tennis_family", 3650); + * SYSTEM::START_NEW_SCRIPT("Celebrations", 3650); + * Decompiled examples of usage when starting a script: + * SCRIPT::REQUEST_SCRIPT(a_0); + * if (SCRIPT::HAS_SCRIPT_LOADED(a_0)) { + * SYSTEM::START_NEW_SCRIPT(a_0, v_3); + * SCRIPT::SET_SCRIPT_AS_NO_LONGER_NEEDED(a_0); + * return 1; + * } + * or: + * v_2 = "MrsPhilips2"; + * SCRIPT::REQUEST_SCRIPT(v_2); + * while (!SCRIPT::HAS_SCRIPT_LOADED(v_2)) { + * SCRIPT::REQUEST_SCRIPT(v_2); + * SYSTEM::WAIT(0); + * } + * sub_8792(36); + * SYSTEM::START_NEW_SCRIPT(v_2, 17000); + * SCRIPT::SET_SCRIPT_AS_NO_LONGER_NEEDED(v_2); + */ + export function startNewScript(scriptName: string, stackSize: number): number; + + /** + * return : script thread id, 0 if failed + * Pass pointer to struct of args in p1, size of struct goes into p2 + */ + export function startNewScriptWithArgs(scriptName: string, args: any, argCount: number, stackSize: number): [number, any]; export function startNewScriptWithNameHash(scriptHash: number, stackSize: number): number; - export function startNewScriptWithNameHashAndArgs(scriptHash: number, args: any | null, argCount: number, stackSize: number): [number, any]; + export function startNewScriptWithNameHashAndArgs(scriptHash: number, args: any, argCount: number, stackSize: number): [number, any]; /** - * Counts up. Every 1000 is 1 real-time second. Use SETTIMERA(int value) to set the timer (e.g.: SETTIMERA(0)). - */ + * Counts up. Every 1000 is 1 real-time second. Use SETTIMERA(int value) to set the timer (e.g.: SETTIMERA(0)). + */ export function timera(): number; export function timerb(): number; @@ -51,8 +67,8 @@ declare module "natives" { export function settimerb(value: number): void; /** - * Gets the current frame time. - */ + * Gets the current frame time. + */ export function timestep(): number; export function sin(value: number): number; @@ -66,23 +82,23 @@ declare module "natives" { export function log10(value: number): number; /** - * Calculates the magnitude of a vector. - */ + * Calculates the magnitude of a vector. + */ export function vmag(x: number, y: number, z: number): number; /** - * Calculates the magnitude of a vector but does not perform Sqrt operations. (Its way faster) - */ + * Calculates the magnitude of a vector but does not perform Sqrt operations. (Its way faster) + */ export function vmag2(x: number, y: number, z: number): number; /** - * Calculates distance between vectors. - */ + * Calculates distance between vectors. + */ export function vdist(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): number; /** - * Calculates distance between vectors but does not perform Sqrt operations. (Its way faster) - */ + * Calculates distance between vectors but does not perform Sqrt operations. (Its way faster) + */ export function vdist2(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): number; export function shiftLeft(value: number, bitShift: number): number; @@ -92,8 +108,8 @@ declare module "natives" { export function floor(value: number): number; /** - * I'm guessing this rounds a float value up to the next whole number, and FLOOR rounds it down - */ + * I'm guessing this rounds a float value up to the next whole number, and FLOOR rounds it down + */ export function ceil(value: number): number; export function round(value: number): number; @@ -101,35 +117,35 @@ declare module "natives" { export function toFloat(value: number): number; /** - * THREAD_PRIO_HIGHEST = 0 - * THREAD_PRIO_NORMAL = 1 - * THREAD_PRIO_LOWEST = 2 - * THREAD_PRIO_MANUAL_UPDATE = 100 - */ + * THREAD_PRIO_HIGHEST = 0 + * THREAD_PRIO_NORMAL = 1 + * THREAD_PRIO_LOWEST = 2 + * THREAD_PRIO_MANUAL_UPDATE = 100 + */ export function setThisThreadPriority(priority: number): void; export function appDataValid(): boolean; - export function appGetInt(property: string | null): number; + export function appGetInt(property: string): number; - export function appGetFloat(property: string | null): number; + export function appGetFloat(property: string): number; - export function appGetString(property: string | null): string; + export function appGetString(property: string): string; - export function appSetInt(property: string | null, value: number): void; + export function appSetInt(property: string, value: number): void; - export function appSetFloat(property: string | null, value: number): void; + export function appSetFloat(property: string, value: number): void; - export function appSetString(property: string | null, value: string | null): void; + export function appSetString(property: string, value: string): void; /** - * Called in the gamescripts like: - * APP::APP_SET_APP("car"); - * APP::APP_SET_APP("dog"); - */ - export function appSetApp(appName: string | null): void; + * Called in the gamescripts like: + * APP::APP_SET_APP("car"); + * APP::APP_SET_APP("dog"); + */ + export function appSetApp(appName: string): void; - export function appSetBlock(blockName: string | null): void; + export function appSetBlock(blockName: string): void; export function appClearBlock(): void; @@ -139,5408 +155,5883 @@ declare module "natives" { export function appHasLinkedSocialClubAccount(): boolean; - export function appHasSyncedData(appName: string | null): boolean; + export function appHasSyncedData(appName: string): boolean; export function appSaveData(): void; export function appGetDeletedFileStatus(): number; - export function appDeleteAppData(appName: string | null): boolean; + export function appDeleteAppData(appName: string): boolean; /** - * NOTE: Debugging functions are not present in the retail version of the game. - */ - export function setDebugLinesAndSpheresDrawingActive(enabled: boolean): void; - - export function drawDebugLine(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, r: number, g: number, b: number, alpha: number): void; + * All found occurrences in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/RFb4GTny + * AUDIO::PLAY_PED_RINGTONE("Remote_Ring", PLAYER::PLAYER_PED_ID(), 1); + * AUDIO::PLAY_PED_RINGTONE("Dial_and_Remote_Ring", PLAYER::PLAYER_PED_ID(), 1); + */ + export function playPedRingtone(ringtoneName: string, ped: Ped | Player | number, p2: boolean): void; - /** - * NOTE: Debugging functions are not present in the retail version of the game. - */ - export function drawDebugLineWithTwoColours(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, r1: number, g1: number, b1: number, r2: number, g2: number, b2: number, alpha1: number, alpha2: number): void; + export function isPedRingtonePlaying(ped: Ped | Player | number): boolean; - /** - * NOTE: Debugging functions are not present in the retail version of the game. - */ - export function drawDebugSphere(x: number, y: number, z: number, radius: number, red: number, green: number, blue: number, alpha: number): void; + export function stopPedRingtone(ped: Ped | Player | number): void; - export function drawDebugBox(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, r: number, g: number, b: number, alpha: number): void; + export function isMobilePhoneCallOngoing(): boolean; - /** - * NOTE: Debugging functions are not present in the retail version of the game. - */ - export function drawDebugCross(x: number, y: number, z: number, size: number, red: number, green: number, blue: number, alpha: number): void; + export function isMobileInterferenceActive(): boolean; - /** - * NOTE: Debugging functions are not present in the retail version of the game. - */ - export function drawDebugText(text: string | null, x: number, y: number, z: number, red: number, green: number, blue: number, alpha: number): void; - - /** - * NOTE: Debugging functions are not present in the retail version of the game. - */ - export function drawDebugText2d(text: string | null, x: number, y: number, z: number, red: number, green: number, blue: number, alpha: number): void; - - /** - * Draws a depth-tested line from one point to another. - * ---------------- - * I recommend using a predefined function to call this. - * [VB.NET] - * Public Sub DrawLine(from As Vector3, [to] As Vector3, col As Color) - * [Function].Call(Hash.DRAW_LINE, from.X, from.Y, from.Z, [to].X, [to].Y, [to].Z, col.R, col.G, col.B, col.A) - * End Sub - * [C#] - * public void DrawLine(Vector3 from, Vector3 to, Color col) - * See NativeDB for reference: http://natives.altv.mp/#/0x6B7256074AE34680 - * @param x1 Coordinates for the first point - * @param y1 Coordinates for the first point - * @param x2 Coordinates for the second point - * @param y2 Coordinates for the second point - * @param red Color with RGBA-Values - * @param green Color with RGBA-Values - * @param blue Color with RGBA-Values - */ - export function drawLine(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, red: number, green: number, blue: number, alpha: number): void; + export function getCurrentTvShowPlayTime(): number; - /** - * x/y/z - Location of a vertex (in world coords), presumably. - * ---------------- - * Keep in mind that only one side of the drawn triangle is visible: It's the side, in which the vector-product of the vectors heads to: (b-a)x(c-a) Or (b-a)x(c-b). - * But be aware: The function seems to work somehow differently. I have trouble having them drawn in rotated orientation. Try it yourself and if you somehow succeed, please edit this and post your solution. - * I recommend using a predefined function to call this. - * [VB.NET] - * Public Sub DrawPoly(a As Vector3, b As Vector3, c As Vector3, col As Color) - * [Function].Call(Hash.DRAW_POLY, a.X, a.Y, a.Z, b.X, b.Y, b.Z, c.X, c.Y, c.Z, col.R, col.G, col.B, col.A) - * End Sub - * See NativeDB for reference: http://natives.altv.mp/#/0xAC26716048436851 - * @param x1 Coordinates for the first point - * @param y1 Coordinates for the first point - * @param x2 Coordinates for the second point - * @param y2 Coordinates for the second point - * @param x3 Coordinates for the third point - * @param y3 Coordinates for the third point - * @param red Color with RGBA-Values - * @param green Color with RGBA-Values - * @param blue Color with RGBA-Values - */ - export function drawPoly(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, x3: number, y3: number, z3: number, red: number, green: number, blue: number, alpha: number): void; + export function createNewScriptedConversation(): void; /** - * Used for drawling Deadline trailing lights, see deadline.ytd - * For UVW mapping (u,v,w parameters), reference your favourite internet resource for more details. - * @param u1 through p23 are values that appear to be related to illiumation, scaling, and rotation; more testing required. - */ - export function drawTexturedPoly(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, x3: number, y3: number, z3: number, red: number, green: number, blue: number, alpha: number, textureDict: string | null, textureName: string | null, u1: number, v1: number, w1: number, u2: number, v2: number, w2: number, u3: number, v3: number, w3: number): void; - - /** - * Used for drawling Deadline trailing lights, see deadline.ytd - * For UVW mapping (u,v,w parameters), reference your favourite internet resource for more details. - * @param y1 casted internally. - */ - export function drawTexturedPolyWithThreeColours(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, x3: number, y3: number, z3: number, red1: number, green1: number, blue1: number, alpha1: number, red2: number, green2: number, blue2: number, alpha2: number, red3: number, green3: number, blue3: number, alpha3: number, textureDict: string | null, textureName: string | null, u1: number, v1: number, w1: number, u2: number, v2: number, w2: number, u3: number, v3: number, w3: number): void; - - /** - * Draw's a 3D Box between the two x,y,z coords. - * -------------- - * Keep in mind that the edges of the box do only align to the worlds base-vectors. Therefore something like rotation cannot be applied. That means this function is pretty much useless, unless you want a static unicolor box somewhere. - * I recommend using a predefined function to call this. - * [VB.NET] - * Public Sub DrawBox(a As Vector3, b As Vector3, col As Color) - * [Function].Call(Hash.DRAW_BOX,a.X, a.Y, a.Z,b.X, b.Y, b.Z,col.R, col.G, col.B, col.A) - * End Sub - * [C#] - * See NativeDB for reference: http://natives.altv.mp/#/0xD3A9971CADAC7252 - * @param y1 start pos - * @param x2 end pos - * @param y2 end pos - */ - export function drawBox(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, red: number, green: number, blue: number, alpha: number): void; - - export function setBackfaceculling(toggle: boolean): void; + * NOTE: ones that are -1, 0 - 35 are determined by a function where it gets a TextLabel from a global then runs, + * GET_CHARACTER_FROM_AUDIO_CONVERSATION_FILENAME and depending on what the result is it goes in check order of 0 - 9 then A - Z then z (lowercase). So it will then return 0 - 35 or -1 if it's 'z'. The func to handle that ^^ is func_67 in dialog_handler.c atleast in TU27 Xbox360 scripts. + * p0 is -1, 0 - 35 + * p1 is a char or string (whatever you wanna call it) + * p2 is Global 10597 + i * 6. 'i' is a while(i < 70) loop + * p3 is again -1, 0 - 35 + * p4 is again -1, 0 - 35 + * p5 is either 0 or 1 (bool ?) + * p6 is either 0 or 1 (The func to determine this is bool) + * p7 is either 0 or 1 (The func to determine this is bool) + * p8 is either 0 or 1 (The func to determine this is bool) + * p9 is 0 - 3 (Determined by func_60 in dialogue_handler.c) + * p10 is either 0 or 1 (The func to determine this is bool) + * p11 is either 0 or 1 (The func to determine this is bool) + * p12 is unknown as in TU27 X360 scripts it only goes to p11. + */ + export function addLineToConversation(index: number, p1: string, p2: string, p3: number, p4: number, p5: boolean, p6: boolean, p7: boolean, p8: boolean, p9: number, p10: boolean, p11: boolean, p12: boolean): void; + + /** + * 4 calls in the b617d scripts. The only one with p0 and p2 in clear text: + * AUDIO::ADD_PED_TO_CONVERSATION(5, l_AF, "DINAPOLI"); + * ================================================= + * One of the 2 calls in dialogue_handler.c p0 is in a while-loop, and so is determined to also possibly be 0 - 15. + */ + export function addPedToConversation(index: number, ped: Ped | Player | number, p2: string): void; - export function setDepthwriting(toggle: boolean): void; + export function setPositionForNullConvPed(p0: any, p1: number, p2: number, p3: number): void; - export function beginTakeMissionCreatorPhoto(): boolean; + export function setEntityForNullConvPed(p0: number, entity: Entity | number): void; - export function getStatusOfTakeMissionCreatorPhoto(): number; + /** + * This native controls where the game plays audio from. By default the microphone is positioned on the player. + * When p0 is true the game will play audio from the 3 positions inputted. + * It is recommended to set all 3 positions to the same value as mixing different positions doesn't seem to work well. + * The scripts mostly use it with only one position such as in fbi3.c: + * AUDIO::SET_MICROPHONE_POSITION(true, ENTITY::GET_ENTITY_COORDS(iLocal_3091, true), ENTITY::GET_ENTITY_COORDS(iLocal_3091, true), ENTITY::GET_ENTITY_COORDS(iLocal_3091, true)); + */ + export function setMicrophonePosition(toggle: boolean, x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, x3: number, y3: number, z3: number): void; - export function freeMemoryForMissionCreatorPhoto(): void; + export function setConversationAudioControlledByAnim(p0: boolean): void; - export function loadMissionCreatorPhoto(p0: any | null, p1: any, p2: any, p3: any): [boolean, any]; + export function setConversationAudioPlaceholder(p0: boolean): void; - export function getStatusOfLoadMissionCreatorPhoto(p0: any): [number, any]; + export function startScriptPhoneConversation(p0: boolean, p1: boolean): void; - export function beginCreateMissionCreatorPhotoPreview(): boolean; + export function preloadScriptPhoneConversation(p0: boolean, p1: boolean): void; - export function getStatusOfCreateMissionCreatorPhotoPreview(): number; + export function startScriptConversation(p0: boolean, p1: boolean, p2: boolean, p3: boolean): void; - export function freeMemoryForMissionCreatorPhotoPreview(): void; + export function preloadScriptConversation(p0: boolean, p1: boolean, p2: boolean, p3: boolean): void; - export function beginTakeHighQualityPhoto(): boolean; + export function startPreloadedConversation(): void; - export function getStatusOfTakeHighQualityPhoto(): number; + export function getIsPreloadedConversationReady(): boolean; - export function freeMemoryForHighQualityPhoto(): void; + export function isScriptedConversationOngoing(): boolean; - export function setTakenPhotoIsMugshot(toggle: boolean): void; + export function isScriptedConversationLoaded(): boolean; - export function setArenaThemeAndVariationForTakenPhoto(p0: any, p1: number): void; + export function getCurrentScriptedConversationLine(): number; - export function setOnIslandXForTakenPhoto(p0: any): void; + export function pauseScriptedConversation(p0: boolean): void; - /** - * 1 match in 1 script. cellphone_controller. - * @param unused is -1 in scripts. - */ - export function saveHighQualityPhoto(unused: number): boolean; + export function restartScriptedConversation(): void; - export function getStatusOfSaveHighQualityPhoto(): number; + export function stopScriptedConversation(p0: boolean): number; - export function beginCreateLowQualityCopyOfPhoto(p0: any): boolean; + export function skipToNextScriptedConversationLine(): void; - export function getStatusOfCreateLowQualityCopyOfPhoto(p0: number): number; + /** + * Example from carsteal3.c: AUDIO::INTERRUPT_CONVERSATION(PLAYER::PLAYER_PED_ID(), "CST4_CFAA", "FRANKLIN"); + * Voicelines can be found in GTAV\x64\audio\sfx in files starting with "SS_" which seems to mean scripted speech. + */ + export function interruptConversation(ped: Ped | Player | number, voiceline: string, speaker: string): void; - export function freeMemoryForLowQualityPhoto(): void; + /** + * One call found in the b617d scripts: + * AUDIO::INTERRUPT_CONVERSATION_AND_PAUSE(NETWORK::NET_TO_PED(l_3989._f26F[0/*1*\/]), "CONV_INTERRUPT_QUIT_IT", "LESTER"); + */ + export function interruptConversationAndPause(ped: Ped | Player | number, p1: string, speaker: string): void; - export function drawLowQualityPhotoToPhone(p0: boolean, p1: boolean): void; + export function getVariationChosenForScriptedLine(p0?: any): [number, any]; - export function getMaximumNumberOfPhotos(): number; + export function setNoDuckingForConversation(p0: boolean): void; - export function getMaximumNumberOfCloudPhotos(): number; + /** + * This native does absolutely nothing, just a nullsub + */ + export function registerScriptWithAudio(p0: number): void; - export function getCurrentNumberOfCloudPhotos(): number; + /** + * This native does absolutely nothing, just a nullsub + */ + export function unregisterScriptWithAudio(): void; /** - * 2 matches across 2 scripts. Only showed in appcamera & appmedia. Both were 0. - */ - export function queueOperationToCreateSortedListOfPhotos(p0: any): boolean; + * All occurrences and usages found in b617d: https://pastebin.com/NzZZ2Tmm + * Full list of mission audio bank names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/missionAudioBankNames.json + * p2 is always -1 + */ + export function requestMissionAudioBank(audioBank: string, p1: boolean, p2: any): boolean; /** - * 3 matches across 3 scripts. First 2 were 0, 3rd was 1. Possibly a bool. - * appcamera, appmedia, and cellphone_controller. - */ - export function getStatusOfSortedListOperation(p0: any): number; + * All occurrences and usages found in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/XZ1tmGEz + * Full list of ambient audio bank names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ambientAudioBankNames.json + * p2 is always -1 + */ + export function requestAmbientAudioBank(audioBank: string, p1: boolean, p2: any): boolean; - export function clearStatusOfSortedListOperation(): void; + /** + * All occurrences and usages found in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/AkmDAVn6 + * Full list of script audio bank names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scriptAudioBankNames.json + * p2 is always -1 + */ + export function requestScriptAudioBank(audioBank: string, p1: boolean, p2: any): boolean; /** - * @returns This function is hard-coded to always return 0. - */ - export function doesThisPhotoSlotContainAValidPhoto(p0: any): boolean; + * p2 is always -1 + */ + export function hintMissionAudioBank(audioBank: string, p1: boolean, p2: any): boolean; /** - * @returns This function is hard-coded to always return 0. - */ - export function loadHighQualityPhoto(p0: any): boolean; + * p2 is always -1 + */ + export function hintAmbientAudioBank(audioBank: string, p1: boolean, p2: any): boolean; /** - * @returns Hardcoded to always return 2. - */ - export function getLoadHighQualityPhotoStatus(p0: number): number; + * p2 is always -1 + */ + export function hintScriptAudioBank(audioBank: string, p1: boolean, p2: any): boolean; - export function drawLightWithRangeex(x: number, y: number, z: number, r: number, g: number, b: number, range: number, intensity: number, shadow: number): void; + export function releaseMissionAudioBank(): void; - export function drawLightWithRange(posX: number, posY: number, posZ: number, colorR: number, colorG: number, colorB: number, range: number, intensity: number): void; + export function releaseAmbientAudioBank(): void; /** - * Parameters: - * roundness - "smoothness" of the circle edge - * Example in C# (spotlight aims at the closest vehicle): - * Vector3 myPos = Game.Player.Character.Position; - * Vehicle nearest = World.GetClosestVehicle(myPos , 1000f); - * Vector3 destinationCoords = nearest.Position; - * Vector3 dirVector = destinationCoords - myPos; - * dirVector.Normalize(); - * Function.Call(Hash.DRAW_SPOT_LIGHT, pos.X, pos.Y, pos.Z, dirVector.X, dirVector.Y, dirVector.Z, 255, 255, 255, 100.0f, 1f, 0.0f, 13.0f, 1f); - * @param posX - coordinate where the spotlight is located - * @param posY - coordinate where the spotlight is located - * @param posZ - coordinate where the spotlight is located - * @param dirX - the direction vector the spotlight should aim at from its current position - * @param dirY - the direction vector the spotlight should aim at from its current position - * @param dirZ - the direction vector the spotlight should aim at from its current position - * @param colorR color of the spotlight - * @param colorG color of the spotlight - * @param distance - the maximum distance the light can reach - * @param brightness - the brightness of the light - * @param radius - the radius size of the spotlight - * @param falloff - the falloff size of the light's edge (example: www.i.imgur.com/DemAWeO.jpg) - */ - export function drawSpotLight(posX: number, posY: number, posZ: number, dirX: number, dirY: number, dirZ: number, colorR: number, colorG: number, colorB: number, distance: number, brightness: number, hardness: number, radius: number, falloff: number): void; + * Full list of script audio bank names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scriptAudioBankNames.json + */ + export function releaseNamedScriptAudioBank(audioBank: string): void; - export function drawShadowedSpotLight(posX: number, posY: number, posZ: number, dirX: number, dirY: number, dirZ: number, colorR: number, colorG: number, colorB: number, distance: number, brightness: number, roundness: number, radius: number, falloff: number, shadowId: number): void; + export function releaseScriptAudioBank(): void; - export function fadeUpPedLight(p0: number): void; + export function unhintAmbientAudioBank(): void; - export function updateLightsOnEntity(entity: Entity | number): void; + export function unhintScriptAudioBank(): void; - export function setLightOverrideMaxIntensityScale(p0: any): void; + export function unhintNamedScriptAudioBank(audioBank: string): void; - export function getLightOverrideMaxIntensityScale(): number; + export function getSoundId(): number; - /** - * enum MarkerTypes - * { - * MarkerTypeUpsideDownCone = 0, - * MarkerTypeVerticalCylinder = 1, - * MarkerTypeThickChevronUp = 2, - * MarkerTypeThinChevronUp = 3, - * MarkerTypeCheckeredFlagRect = 4, - * MarkerTypeCheckeredFlagCircle = 5, - * MarkerTypeVerticleCircle = 6, - * See NativeDB for reference: http://natives.altv.mp/#/0x28477EC23D892089 - * @param faceCamera - Rotates only the y-axis (the heading) towards the camera - * @param p19 - no effect, default value in script is 2 - * @param rotate - Rotates only on the y-axis (the heading) - * @param textureDict - Name of texture dictionary to load texture from (e.g. "GolfPutting") - * @param textureName - Name of texture inside dictionary to load (e.g. "PuttingMarker") - * @param drawOnEnts - Draws the marker onto any entities that intersect it - */ - export function drawMarker(type: number, posX: number, posY: number, posZ: number, dirX: number, dirY: number, dirZ: number, rotX: number, rotY: number, rotZ: number, scaleX: number, scaleY: number, scaleZ: number, red: number, green: number, blue: number, alpha: number, bobUpAndDown: boolean, faceCamera: boolean, p19: number, rotate: boolean, textureDict: string | null, textureName: string | null, drawOnEnts: boolean): void; - - export function drawMarkerEx(type: number, posX: number, posY: number, posZ: number, dirX: number, dirY: number, dirZ: number, rotX: number, rotY: number, rotZ: number, scaleX: number, scaleY: number, scaleZ: number, red: number, green: number, blue: number, alpha: number, bobUpAndDown: boolean, faceCamera: boolean, p19: any, rotate: boolean, textureDict: string | null, textureName: string | null, drawOnEnts: boolean, p24: boolean, p25: boolean): void; - - /** - * Draws a 3D sphere, typically seen in the GTA:O freemode event "Penned In". - * Example https://imgur.com/nCbtS4H - */ - export function drawMarkerSphere(x: number, y: number, z: number, radius: number, red: number, green: number, blue: number, alpha: number): void; + export function releaseSoundId(soundId: number): void; /** - * 20/03/17 : Attention, checkpoints are already handled by the game itself, so you must not loop it like markers. - * Parameters: - * pos2 - The position of the next checkpoint to point to. - * radius - The radius of the checkpoint. - * Checkpoint types: - * 0-4---------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker - * 5-9---------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker - * 10-14-------Ring: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker - * 15-19-------1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker - * See NativeDB for reference: http://natives.altv.mp/#/0x0134F0835AB6BFCB - * @param type - The type of checkpoint to create. See below for a list of checkpoint types. - * @param posX1 - The position of the checkpoint. - * @param red Special parameter, see below for details. Usually set to 0 in the scripts. - * @param green - The color of the checkpoint. - * @param blue - The color of the checkpoint. - * @param reserved - Special parameter, see below for details. Usually set to 0 in the scripts. - * @returns Creates a checkpoint. Returns the handle of the checkpoint. - */ - export function createCheckpoint(type: number, posX1: number, posY1: number, posZ1: number, posX2: number, posY2: number, posZ2: number, diameter: number, red: number, green: number, blue: number, alpha: number, reserved: number): number; - - export function setCheckpointInsideCylinderHeightScale(checkpoint: number, scale: number): void; - - export function setCheckpointInsideCylinderScale(checkpoint: number, scale: number): void; + * All found occurrences in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/A8Ny8AHZ + * Full list of audio / sound names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/soundNames.json + */ + export function playSound(soundId: number, audioName: string, audioRef: string, p3: boolean, p4: any, p5: boolean): void; /** - * Sets the cylinder height of the checkpoint. - * Parameters: - * @param nearHeight - The height of the checkpoint when inside of the radius. - * @param farHeight - The height of the checkpoint when outside of the radius. - * @param radius - The radius of the checkpoint. - */ - export function setCheckpointCylinderHeight(checkpoint: number, nearHeight: number, farHeight: number, radius: number): void; + * List: https://pastebin.com/DCeRiaLJ + * All occurrences as of Cayo Perico Heist DLC (b2189), sorted alphabetically and identical lines removed: https://git.io/JtLxM + * Full list of audio / sound names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/soundNames.json + */ + export function playSoundFrontend(soundId: number, audioName: string, audioRef: string, p3: boolean): void; /** - * Sets the checkpoint color. - */ - export function setCheckpointRgba(checkpoint: number, red: number, green: number, blue: number, alpha: number): void; + * Only call found in the b617d scripts: + * AUDIO::PLAY_DEFERRED_SOUND_FRONTEND("BACK", "HUD_FREEMODE_SOUNDSET"); + * Full list of audio / sound names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/soundNames.json + */ + export function playDeferredSoundFrontend(soundName: string, soundsetName: string): void; /** - * Sets the checkpoint icon color. - */ - export function setCheckpointRgba2(checkpoint: number, red: number, green: number, blue: number, alpha: number): void; + * All found occurrences in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/f2A7vTj0 + * No changes made in b678d. + * gtaforums.com/topic/795622-audio-for-mods + * Full list of audio / sound names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/soundNames.json + */ + export function playSoundFromEntity(soundId: number, audioName: string, entity: Entity | number, audioRef: string, isNetwork: boolean, p5: any): void; /** - * This does not move an existing checkpoint... so wtf. - */ - export function setCheckpointClipplaneWithPosNorm(checkpoint: number, posX: number, posY: number, posZ: number, unkX: number, unkY: number, unkZ: number): void; - - export function setCheckpointForceOldArrowPointing(checkpoint: number): void; + * Only used with "formation_flying_blips_soundset" and "biker_formation_blips_soundset". + * p1 is always the model of p2 + */ + export function playSoundFromEntityHash(soundId: number, model: number, entity: Entity | number, soundSetHash: number, p4: any, p5: any): void; /** - * Unknown. Called after creating a checkpoint (type: 51) in the creators. - */ - export function setCheckpointDecalRotAlignedToCameraRot(checkpoint: number): void; + * All found occurrences in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/eeFc5DiW + * gtaforums.com/topic/795622-audio-for-mods + * Full list of audio / sound names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/soundNames.json + */ + export function playSoundFromCoord(soundId: number, audioName: string, x: number, y: number, z: number, audioRef: string, isNetwork: boolean, range: number, p8: boolean): void; - export function setCheckpointForceDirection(checkpoint: number): void; + export function updateSoundCoord(soundId: number, x: number, y: number, z: number): void; - export function setCheckpointDirection(checkpoint: number, posX: number, posY: number, posZ: number): void; + export function stopSound(soundId: number): void; - export function deleteCheckpoint(checkpoint: number): void; + /** + * Could this be used alongside either, + * SET_NETWORK_ID_EXISTS_ON_ALL_MACHINES or _SET_NETWORK_ID_SYNC_TO_PLAYER to make it so other players can hear the sound while online? It'd be a bit troll-fun to be able to play the Zancudo UFO creepy sounds globally. + */ + export function getNetworkIdFromSoundId(soundId: number): number; - export function dontRenderInGameUi(p0: boolean): void; + export function getSoundIdFromNetworkId(netId: number): number; - export function forceRenderInGameUi(toggle: boolean): void; + export function setVariableOnSound(soundId: number, variable: string, p2: number): void; /** - * This function can requests texture dictonaries from following RPFs: - * scaleform_generic.rpf - * scaleform_minigames.rpf - * scaleform_minimap.rpf - * scaleform_web.rpf - * last param isnt a toggle - */ - export function requestStreamedTextureDict(textureDict: string | null, p1: boolean): void; + * From the scripts, p0: + * "ArmWrestlingIntensity", + * "INOUT", + * "Monkey_Stream", + * "ZoomLevel" + */ + export function setVariableOnStream(variable: string, p1: number): void; - export function hasStreamedTextureDictLoaded(textureDict: string | null): boolean; - - export function setStreamedTextureDictAsNoLongerNeeded(textureDict: string | null): void; + export function overrideUnderwaterStream(p0: string, p1: boolean): void; /** - * Draws a rectangle on the screen. - * The total number of rectangles to be drawn in one frame is apparently limited to 399. - * @param x The relative X point of the center of the rectangle. (0.0-1.0, 0.0 is the left edge of the screen, 1.0 is the right edge of the screen) - * @param y The relative Y point of the center of the rectangle. (0.0-1.0, 0.0 is the top edge of the screen, 1.0 is the bottom edge of the screen) - * @param width The relative width of the rectangle. (0.0-1.0, 1.0 means the whole screen width) - * @param height The relative height of the rectangle. (0.0-1.0, 1.0 means the whole screen height) - * @param r Red part of the color. (0-255) - * @param g Green part of the color. (0-255) - * @param b Blue part of the color. (0-255) - * @param a Alpha part of the color. (0-255, 0 means totally transparent, 255 means totally opaque) - */ - export function drawRect(x: number, y: number, width: number, height: number, r: number, g: number, b: number, a: number, p8: boolean): void; + * AUDIO::SET_VARIABLE_ON_UNDER_WATER_STREAM("inTunnel", 1.0); + * AUDIO::SET_VARIABLE_ON_UNDER_WATER_STREAM("inTunnel", 0.0); + */ + export function setVariableOnUnderWaterStream(variableName: string, value: number): void; - /** - * Sets a flag defining whether or not script draw commands should continue being drawn behind the pause menu. This is usually used for TV channels and other draw commands that are used with a world render target. - */ - export function setScriptGfxDrawBehindPausemenu(toggle: boolean): void; + export function hasSoundFinished(soundId: number): boolean; /** - * Sets the draw order for script draw commands. - * Examples from decompiled scripts: - * GRAPHICS::SET_SCRIPT_GFX_DRAW_ORDER(7); - * GRAPHICS::DRAW_RECT(0.5, 0.5, 3.0, 3.0, v_4, v_5, v_6, a_0._f172, 0); - * GRAPHICS::SET_SCRIPT_GFX_DRAW_ORDER(1); - * GRAPHICS::DRAW_RECT(0.5, 0.5, 1.5, 1.5, 0, 0, 0, 255, 0); - */ - export function setScriptGfxDrawOrder(drawOrder: number): void; + * Plays ambient speech. See also _0x444180DB. + * ped: The ped to play the ambient speech. + * speechName: Name of the speech to play, eg. "GENERIC_HI". + * speechParam: Can be one of the following: + * SPEECH_PARAMS_STANDARD + * SPEECH_PARAMS_ALLOW_REPEAT + * SPEECH_PARAMS_BEAT + * SPEECH_PARAMS_FORCE + * SPEECH_PARAMS_FORCE_FRONTEND + * SPEECH_PARAMS_FORCE_NO_REPEAT_FRONTEND + * SPEECH_PARAMS_FORCE_NORMAL + * SPEECH_PARAMS_FORCE_NORMAL_CLEAR + * SPEECH_PARAMS_FORCE_NORMAL_CRITICAL + * SPEECH_PARAMS_FORCE_SHOUTED + * SPEECH_PARAMS_FORCE_SHOUTED_CLEAR + * SPEECH_PARAMS_FORCE_SHOUTED_CRITICAL + * SPEECH_PARAMS_FORCE_PRELOAD_ONLY + * SPEECH_PARAMS_MEGAPHONE + * SPEECH_PARAMS_HELI + * SPEECH_PARAMS_FORCE_MEGAPHONE + * SPEECH_PARAMS_FORCE_HELI + * SPEECH_PARAMS_INTERRUPT + * SPEECH_PARAMS_INTERRUPT_SHOUTED + * SPEECH_PARAMS_INTERRUPT_SHOUTED_CLEAR + * SPEECH_PARAMS_INTERRUPT_SHOUTED_CRITICAL + * SPEECH_PARAMS_INTERRUPT_NO_FORCE + * SPEECH_PARAMS_INTERRUPT_FRONTEND + * SPEECH_PARAMS_INTERRUPT_NO_FORCE_FRONTEND + * SPEECH_PARAMS_ADD_BLIP + * SPEECH_PARAMS_ADD_BLIP_ALLOW_REPEAT + * SPEECH_PARAMS_ADD_BLIP_FORCE + * SPEECH_PARAMS_ADD_BLIP_SHOUTED + * SPEECH_PARAMS_ADD_BLIP_SHOUTED_FORCE + * SPEECH_PARAMS_ADD_BLIP_INTERRUPT + * SPEECH_PARAMS_ADD_BLIP_INTERRUPT_FORCE + * SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED + * SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED_CLEAR + * SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED_CRITICAL + * SPEECH_PARAMS_SHOUTED + * SPEECH_PARAMS_SHOUTED_CLEAR + * SPEECH_PARAMS_SHOUTED_CRITICAL + * Note: A list of Name and Parameters can be found here https://pastebin.com/1GZS5dCL + * Full list of speeches and voices names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/speeches.json + */ + export function playPedAmbientSpeechNative(ped: Ped | Player | number, speechName: string, speechParam: string, p3: any): void; + + /** + * Plays ambient speech. See also _0x5C57B85D. + * See PLAY_PED_AMBIENT_SPEECH_NATIVE for parameter specifications. + * Full list of speeches and voices names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/speeches.json + */ + export function playPedAmbientSpeechAndCloneNative(ped: Ped | Player | number, speechName: string, speechParam: string, p3: any): void; + + /** + * This is the same as PLAY_PED_AMBIENT_SPEECH_NATIVE and PLAY_PED_AMBIENT_SPEECH_AND_CLONE_NATIVE but it will allow you to play a speech file from a specific voice file. It works on players and all peds, even animals. + * EX (C#): + * GTA.Native.Function.Call(Hash.PLAY_PED_AMBIENT_SPEECH_WITH_VOICE_NATIVE, Game.Player.Character, "GENERIC_INSULT_HIGH", "s_m_y_sheriff_01_white_full_01", "SPEECH_PARAMS_FORCE_SHOUTED", 0); + * The first param is the ped you want to play it on, the second is the speech name, the third is the voice name, the fourth is the speech param, and the last param is usually always 0. + * Full list of speeches and voices names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/speeches.json + */ + export function playPedAmbientSpeechWithVoiceNative(ped: Ped | Player | number, speechName: string, voiceName: string, speechParam: string, p4: boolean): void; + + /** + * Full list of speeches and voices names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/speeches.json + */ + export function playAmbientSpeechFromPositionNative(speechName: string, voiceName: string, x: number, y: number, z: number, speechParam: string): void; + + /** + * This native enables the audio flag "TrevorRageIsOverridden" and sets the voice effect to `voiceEffect` + */ + export function overrideTrevorRage(voiceEffect: string): void; + + export function resetTrevorRage(): void; + + export function setPlayerAngry(ped: Ped | Player | number, toggle: boolean): void; /** - * This function anchors script draws to a side of the safe zone. This needs to be called to make the interface independent of the player's safe zone configuration. - * These values are equivalent to alignX and alignY in common:/data/ui/frontend.xml, which can be used as a baseline for default alignment. - * Using any other value (including 0) will result in the safe zone not being taken into account for this draw. The canonical value for this is 'I' (73). - * For example, you can use SET_SCRIPT_GFX_ALIGN(0, 84) to only scale on the Y axis (to the top), but not change the X axis. - * To reset the value, use RESET_SCRIPT_GFX_ALIGN. - * @param horizontalAlign The horizontal alignment. This can be 67 ('C'), 76 ('L'), or 82 ('R'). - * @param verticalAlign The vertical alignment. This can be 67 ('C'), 66 ('B'), or 84 ('T'). - */ - export function setScriptGfxAlign(horizontalAlign: number, verticalAlign: number): void; + * Needs another parameter [int p2]. The signature is PED::PLAY_PAIN(Ped ped, int painID, int p1, int p2); + * Last 2 parameters always seem to be 0. + * EX: Function.Call(Hash.PLAY_PAIN, TestPed, 6, 0, 0); + * Known Pain IDs + * ________________________ + * 1 - Doesn't seem to do anything. Does NOT crash the game like previously said. (Latest patch) + * 6 - Scream (Short) + * 7 - Scared Scream (Kinda Long) + * 8 - On Fire + */ + export function playPain(ped: Ped | Player | number, painID: number, p1: number, p3: any): void; + + export function releaseWeaponAudio(): void; /** - * This function resets the alignment set using SET_SCRIPT_GFX_ALIGN and SET_SCRIPT_GFX_ALIGN_PARAMS to the default values ('I', 'I'; 0, 0, 0, 0). - * This should be used after having used the aforementioned functions in order to not affect any other scripts attempting to draw. - */ - export function resetScriptGfxAlign(): void; + * mode can be any of these: + * SLOWMO_T1_TRAILER_SMASH + * SLOWMO_T1_RAYFIRE_EXPLOSION + * SLOWMO_PROLOGUE_VAULT + * NIGEL_02_SLOWMO_SETTING + * JSH_EXIT_TUNNEL_SLOWMO + * SLOWMO_BIG_SCORE_JUMP + * SLOWMO_FIB4_TRUCK_SMASH + * SLOWMO_EXTREME_04 + * SLOW_MO_METH_HOUSE_RAYFIRE + * BARRY_02_SLOWMO + * BARRY_01_SLOWMO + */ + export function activateAudioSlowmoMode(mode: string): void; /** - * Sets the draw offset/calculated size for SET_SCRIPT_GFX_ALIGN. If using any alignment other than left/top, the game expects the width/height to be configured using this native in order to get a proper starting position for the draw command. - */ - export function setScriptGfxAlignParams(x: number, y: number, w: number, h: number): void; + * see ACTIVATE_AUDIO_SLOWMO_MODE for modes + */ + export function deactivateAudioSlowmoMode(mode: string): void; /** - * Calculates the effective X/Y fractions when applying the values set by SET_SCRIPT_GFX_ALIGN and SET_SCRIPT_GFX_ALIGN_PARAMS - */ - export function getScriptGfxAlignPosition(x: number, y: number, calculatedX?: number, calculatedY?: number): [void, number, number]; + * Audio List + * gtaforums.com/topic/795622-audio-for-mods/ + * All found occurrences in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/FTeAj4yZ + */ + export function setAmbientVoiceName(ped: Ped | Player | number, name: string): void; - export function getSafeZoneSize(): number; + export function setAmbientVoiceNameHash(ped: Ped | Player | number, hash: number): void; + + export function getAmbientVoiceNameHash(ped: Ped | Player | number): number; /** - * Draws a 2D sprite on the screen. - * Parameters: - * scaleX/Y - Texture scaling. Negative values can be used to flip the texture on that axis. (0.5 = half) - * @param textureDict - Name of texture dictionary to load texture from (e.g. "CommonMenu", "MPWeaponsCommon", etc.) - * @param textureName - Name of texture to load from texture dictionary (e.g. "last_team_standing_icon", "tennis_icon", etc.) - * @param screenX Screen offset (0.5 = center) - * @param heading - Texture rotation in degrees (default = 0.0) positive is clockwise, measured in degrees - * @param red Sprite color (default = 255/255/255) - * @param green Sprite color (default = 255/255/255) - * @param alpha - opacity level - */ - export function drawSprite(textureDict: string | null, textureName: string | null, screenX: number, screenY: number, width: number, height: number, heading: number, red: number, green: number, blue: number, alpha: number, p11: boolean, p12: any): void; - - /** - * Used in arcade games and Beam hack minigame in Doomsday Heist. I will most certainly dive into this to try replicate arcade games. - * @param x position must be between 0.0 and 1.0 (1.0 being the most right side of the screen) - * @param y position must be between 0.0 and 1.0 (1.0 being the most bottom side of the screen) - * @param width 0.0 - 1.0 is the reasonable amount generally - * @param height 0.0 - 1.0 is the reasonable amount generally - * @param p6 almost always 0.0 - * @param p11 seems to be unknown but almost always 0 int - */ - export function drawSpriteArx(textureDict: string | null, textureName: string | null, x: number, y: number, width: number, height: number, p6: number, red: number, green: number, blue: number, alpha: number, p11: any, p12: any): void; - - /** - * Similar to _DRAW_SPRITE, but seems to be some kind of "interactive" sprite, at least used by render targets. - * These seem to be the only dicts ever requested by this native: - * prop_screen_biker_laptop - * Prop_Screen_GR_Disruption - * Prop_Screen_TaleOfUs - * prop_screen_nightclub - * Prop_Screen_IE_Adhawk - * prop_screen_sm_free_trade_shipping - * prop_screen_hacker_truck - * See NativeDB for reference: http://natives.altv.mp/#/0x2BC54A8188768488 - */ - export function drawSpriteNamedRendertarget(textureDict: string | null, textureName: string | null, screenX: number, screenY: number, width: number, height: number, heading: number, red: number, green: number, blue: number, alpha: number, p11: any): void; - - /** - * Similar to DRAW_SPRITE, but allows to specify the texture coordinates used to draw the sprite. - * @param u1 texture coordinates for the top - * @param u2 texture coordinates for the bottom - */ - export function drawSpriteArxWithUv(textureDict: string | null, textureName: string | null, x: number, y: number, width: number, height: number, u1: number, v1: number, u2: number, v2: number, heading: number, red: number, green: number, blue: number, alpha: number, p15: any): void; - - /** - * Example: - * GRAPHICS::ADD_ENTITY_ICON(a_0, "MP_Arrow"); - * I tried this and nothing happened... - */ - export function addEntityIcon(entity: Entity | number, icon: string | null): number; + * Assigns some ambient voice to the ped. + */ + export function setPedVoiceFull(ped: Ped | Player | number): void; - export function setEntityIconVisibility(entity: Entity | number, toggle: boolean): void; + export function setPedRaceAndVoiceGroup(ped: Ped | Player | number, p1: number, voiceGroup: number): void; - export function setEntityIconColor(entity: Entity | number, red: number, green: number, blue: number, alpha: number): void; + /** + * From the scripts: + * AUDIO::SET_PED_VOICE_GROUP(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("PAIGE_PVG")); + * AUDIO::SET_PED_VOICE_GROUP(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("TALINA_PVG")); + * AUDIO::SET_PED_VOICE_GROUP(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("FEMALE_LOST_BLACK_PVG")); + * AUDIO::SET_PED_VOICE_GROUP(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("FEMALE_LOST_WHITE_PVG")); + */ + export function setPedVoiceGroup(ped: Ped | Player | number, voiceGroupHash: number): void; /** - * Sets the on-screen drawing origin for draw-functions (which is normally x=0,y=0 in the upper left corner of the screen) to a world coordinate. - * From now on, the screen coordinate which displays the given world coordinate on the screen is seen as x=0,y=0. - * Example in C#: - * Vector3 boneCoord = somePed.GetBoneCoord(Bone.SKEL_Head); - * Function.Call(Hash.SET_DRAW_ORIGIN, boneCoord.X, boneCoord.Y, boneCoord.Z, 0); - * Function.Call(Hash.DRAW_SPRITE, "helicopterhud", "hud_corner", -0.01, -0.015, 0.013, 0.013, 0.0, 255, 0, 0, 200); - * Function.Call(Hash.DRAW_SPRITE, "helicopterhud", "hud_corner", 0.01, -0.015, 0.013, 0.013, 90.0, 255, 0, 0, 200); - * Function.Call(Hash.DRAW_SPRITE, "helicopterhud", "hud_corner", -0.01, 0.015, 0.013, 0.013, 270.0, 255, 0, 0, 200); - * Function.Call(Hash.DRAW_SPRITE, "helicopterhud", "hud_corner", 0.01, 0.015, 0.013, 0.013, 180.0, 255, 0, 0, 200); - * See NativeDB for reference: http://natives.altv.mp/#/0xAA0008F3BBB8F416 - */ - export function setDrawOrigin(x: number, y: number, z: number, p3: boolean): void; + * Dat151RelType == 29 + */ + export function setPedVoiceGroupFromRaceToPvg(ped: Ped | Player | number, voiceGroupHash: number): void; /** - * Resets the screen's draw-origin which was changed by the function GRAPHICS::SET_DRAW_ORIGIN(...) back to x=0,y=0. - * See GRAPHICS::SET_DRAW_ORIGIN(...) for further information. - */ - export function clearDrawOrigin(): void; + * BOOL p1: 0 = Female; 1 = Male + */ + export function setPedGender(ped: Ped | Player | number, p1: boolean): void; - export function setBinkMovie(name: string | null): number; + export function stopCurrentPlayingSpeech(ped: Ped | Player | number): void; - export function playBinkMovie(binkMovie: number): void; + export function stopCurrentPlayingAmbientSpeech(ped: Ped | Player | number): void; - export function stopBinkMovie(binkMovie: number): void; + export function isAmbientSpeechPlaying(ped: Ped | Player | number): boolean; - export function releaseBinkMovie(binkMovie: number): void; + export function isScriptedSpeechPlaying(p0: Ped | Player | number): boolean; - export function drawBinkMovie(binkMovie: number, p1: number, p2: number, p3: number, p4: number, p5: number, r: number, g: number, b: number, a: number): void; + export function isAnySpeechPlaying(ped: Ped | Player | number): boolean; - /** - * In percentage: 0.0 - 100.0 - */ - export function setBinkMovieTime(binkMovie: number, progress: number): void; + export function isAnyPositionalSpeechPlaying(): boolean; /** - * In percentage: 0.0 - 100.0 - */ - export function getBinkMovieTime(binkMovie: number): number; + * Checks if the ped can play the speech or has the speech file, p2 is usually false. + */ + export function doesContextExistForThisPed(ped: Ped | Player | number, speechName: string, p2: boolean): boolean; + + export function isPedInCurrentConversation(ped: Ped | Player | number): boolean; /** - * @param binkMovie Is return value from _SET_BINK_MOVIE. Has something to do with bink volume? (audRequestedSettings::SetVolumeCurveScale) - * @returns binkMovie: Is return value from _SET_BINK_MOVIE. Has something to do with bink volume? (audRequestedSettings::SetVolumeCurveScale) - */ - export function setBinkMovieVolume(binkMovie: number, value: number): void; + * Sets the ped drunk sounds. Only works with PLAYER_PED_ID + * ==================================================== + * As mentioned above, this only sets the drunk sound to ped/player. + * To give the Ped a drunk effect with drunk walking animation try using SET_PED_MOVEMENT_CLIPSET + * Below is an example + * if (!Function.Call(Hash.HAS_ANIM_SET_LOADED, "move_m@drunk@verydrunk")) + * { + * Function.Call(Hash.REQUEST_ANIM_SET, "move_m@drunk@verydrunk"); + * } + * Function.Call(Hash.SET_PED_MOVEMENT_CLIPSET, Ped.Handle, "move_m@drunk@verydrunk", 0x3E800000); + * And to stop the effect use + * RESET_PED_MOVEMENT_CLIPSET + */ + export function setPedIsDrunk(ped: Ped | Player | number, toggle: boolean): void; /** - * Might be more appropriate in AUDIO? - */ - export function attachTvAudioToEntity(entity: Entity | number): void; + * Plays sounds from a ped with chop model. For example it used to play bark or sniff sounds. p1 is always 3 or 4294967295 in decompiled scripts. By a quick disassembling I can assume that this arg is unused. + * This native is works only when you call it on the ped with right model (ac_chop only ?) + * Speech Name can be: CHOP_SNIFF_SEQ CHOP_WHINE CHOP_LICKS_MOUTH CHOP_PANT bark GROWL SNARL BARK_SEQ + */ + export function playAnimalVocalization(pedHandle: Ped | Player | number, p1: number, speechName: string): void; - export function setBinkMovieAudioFrontend(binkMovie: number, p1: boolean): void; + export function isAnimalVocalizationPlaying(pedHandle: Ped | Player | number): boolean; /** - * Probably changes tvs from being a 3d audio to being "global" audio - */ - export function setTvAudioFrontend(toggle: boolean): void; - - export function setBinkShouldSkip(binkMovie: number, bShouldSkip: boolean): void; + * mood can be 0 or 1 (it's not a boolean value!). Effects audio of the animal. + */ + export function setAnimalMood(animal: Ped | Player | number, mood: number): void; - export function loadMovieMeshSet(movieMeshSetName: string | null): number; + export function isMobilePhoneRadioActive(): boolean; - export function releaseMovieMeshSet(movieMeshSet: number): void; + export function setMobilePhoneRadioState(state: boolean): void; - export function queryMovieMeshSetState(p0: any): number; + /** + * Returns 255 (radio off index) if the function fails. + */ + export function getPlayerRadioStationIndex(): number; /** - * int screenresx,screenresy; - * GET_SCREEN_RESOLUTION(&screenresx,&screenresy); - */ - export function getScreenResolution(x?: number, y?: number): [void, number, number]; + * Returns active radio station name + */ + export function getPlayerRadioStationName(): string; /** - * Returns current screen resolution. - */ - export function getActualScreenResolution(x?: number, y?: number): [void, number, number]; + * Converts radio station index to string. Use HUD::GET_FILENAME_FOR_AUDIO_CONVERSATION to get the user-readable text. + */ + export function getRadioStationName(radioStation: number): string; - export function getAspectRatio(b: boolean): number; + export function getPlayerRadioStationGenre(): number; - export function getScreenAspectRatio(): number; + export function isRadioRetuning(): boolean; - /** - * Setting Aspect Ratio Manually in game will return: - * false - for Narrow format Aspect Ratios (3:2, 4:3, 5:4, etc. ) - * true - for Wide format Aspect Ratios (5:3, 16:9, 16:10, etc. ) - * @returns Setting Aspect Ratio to "Auto" in game will return "false" or "true" based on the actual set Resolution Ratio. - */ - export function getIsWidescreen(): boolean; + export function isRadioFadedOut(): boolean; /** - * false = Any resolution < 1280x720 - * true = Any resolution >= 1280x720 - */ - export function getIsHidef(): boolean; - - export function adjustNextPosSizeAsNormalized169(): void; + * Tune Forward... + */ + export function setRadioRetuneUp(): void; /** - * Enables Night Vision. - * Example: - * C#: Function.Call(Hash.SET_NIGHTVISION, true); - * C++: GRAPHICS::SET_NIGHTVISION(true); - * BOOL toggle: - * true = turns night vision on for your player. - * false = turns night vision off for your player. - */ - export function setNightvision(toggle: boolean): void; - - export function getRequestingnightvision(): boolean; + * Tune Backwards... + */ + export function setRadioRetuneDown(): void; - export function getUsingnightvision(): boolean; + /** + * List of radio stations that are in the wheel, in clockwise order, as of LS Tuners DLC: https://git.io/J8a3k + * An older list including hidden radio stations: https://pastebin.com/Kj9t38KF + */ + export function setRadioToStationName(stationName: string): void; - export function setExposuretweak(toggle: boolean): void; + /** + * List of radio stations that are in the wheel, in clockwise order, as of LS Tuners DLC: https://git.io/J8a3k + * An older list including hidden radio stations: https://pastebin.com/Kj9t38KF + */ + export function setVehRadioStation(vehicle: Vehicle | number, radioStation: string): void; - export function forceExposureReadback(toggle: boolean): void; + export function setVehHasNormalRadio(vehicle: Vehicle | number): void; - export function overrideNightvisionLightRange(p0: number): void; + export function isVehicleRadioOn(vehicle: Vehicle | number): boolean; - export function setNoiseoveride(toggle: boolean): void; + export function setVehForcedRadioThisFrame(vehicle: Vehicle | number): void; - export function setNoisinessoveride(value: number): void; + /** + * Full list of static emitters by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/staticEmitters.json + */ + export function setEmitterRadioStation(emitterName: string, radioStation: string, p2: any): void; /** - * Convert a world coordinate into its relative screen coordinate. (WorldToScreen) - * For .NET users... - * VB: - * Public Shared Function World3DToScreen2d(pos as vector3) As Vector2 - * Dim x2dp, y2dp As New Native.OutputArgument - * Native.Function.Call(Of Boolean)(Native.Hash.GET_SCREEN_COORD_FROM_WORLD_COORD , pos.x, pos.y, pos.z, x2dp, y2dp) - * Return New Vector2(x2dp.GetResult(Of Single), y2dp.GetResult(Of Single)) - * End Function - * C#: - * See NativeDB for reference: http://natives.altv.mp/#/0x34E82F05DF2974F5 - * @returns Returns a boolean; whether or not the operation was successful. It will return false if the coordinates given are not visible to the rendering camera. - */ - export function getScreenCoordFromWorldCoord(worldX: number, worldY: number, worldZ: number, screenX?: number, screenY?: number): [boolean, number, number]; + * Example: + * AUDIO::SET_STATIC_EMITTER_ENABLED((Any*)"LOS_SANTOS_VANILLA_UNICORN_01_STAGE", false); AUDIO::SET_STATIC_EMITTER_ENABLED((Any*)"LOS_SANTOS_VANILLA_UNICORN_02_MAIN_ROOM", false); AUDIO::SET_STATIC_EMITTER_ENABLED((Any*)"LOS_SANTOS_VANILLA_UNICORN_03_BACK_ROOM", false); + * This turns off surrounding sounds not connected directly to peds. + * Full list of static emitters by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/staticEmitters.json + */ + export function setStaticEmitterEnabled(emitterName: string, toggle: boolean): void; /** - * Returns the texture resolution of the passed texture dict+name. - * Note: Most texture resolutions are doubled compared to the console version of the game. - */ - export function getTextureResolution(textureDict: string | null, textureName: string | null): Vector3; + * Full list of static emitters by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/staticEmitters.json + */ + export function linkStaticEmitterToEntity(emitterName: string, entity: Entity | number): void; /** - * Overriding ped badge texture to a passed texture. It's synced between players (even custom textures!), don't forget to request used dict on *all* clients to make it sync properly. Can be removed by passing empty strings. - */ - export function overridePedCrewLogoTexture(ped: Player | number, txd: string | null, txn: string | null): boolean; + * Sets radio station by index. + */ + export function setRadioToStationIndex(radioStation: number): void; - export function setDistanceBlurStrengthOverride(p0: number): void; + export function setFrontendRadioActive(active: boolean): void; /** - * Purpose of p0 and p1 unknown. - */ - export function setFlash(p0: number, p1: number, fadeIn: number, duration: number, fadeOut: number): void; + * "news" that play on the radio after you've done something in story mode(?) + */ + export function unlockMissionNewsStory(newsStory: number): void; - export function disableOcclusionThisFrame(): void; + export function isMissionNewsStoryUnlocked(newsStory: number): boolean; - /** - * Does not affect weapons, particles, fire/explosions, flashlights or the sun. - * When set to true, all emissive textures (including ped components that have light effects), street lights, building lights, vehicle lights, etc will all be turned off. - * Used in Humane Labs Heist for EMP. - * @param state True turns off all artificial light sources in the map: buildings, street lights, car lights, etc. False turns them back on. - */ - export function setArtificialLightsState(state: boolean): void; + export function getAudibleMusicTrackTextId(): number; - /** - * If "blackout" is enabled, this native allows you to ignore "blackout" for vehicles. - */ - export function setArtificialVehicleLightsState(toggle: boolean): void; + export function playEndCreditsMusic(play: boolean): void; - export function disableHdtexThisFrame(): void; + export function skipRadioForward(): void; - /** - * Creates a tracked point, useful for checking the visibility of a 3D point on screen. - */ - export function createTrackedPoint(): number; + export function freezeRadioStation(radioStation: string): void; - export function setTrackedPointInfo(point: number, x: number, y: number, z: number, radius: number): void; + export function unfreezeRadioStation(radioStation: string): void; - export function isTrackedPointVisible(point: number): boolean; + export function setRadioAutoUnfreeze(toggle: boolean): void; - export function destroyTrackedPoint(point: number): void; + export function setInitialPlayerStation(radioStation: string): void; - /** - * @returns This function is hard-coded to always return 0. - */ - export function setGrassCullSphere(p0: number, p1: number, p2: number, p3: number): number; + export function setUserRadioControlEnabled(toggle: boolean): void; /** - * This native does absolutely nothing, just a nullsub - */ - export function removeGrassCullSphere(handle: number): void; + * Only found this one in the decompiled scripts: + * AUDIO::SET_RADIO_TRACK("RADIO_03_HIPHOP_NEW", "ARM1_RADIO_STARTS"); + */ + export function setRadioTrack(radioStation: string, radioTrack: string): void; - export function procgrassEnableCullsphere(handle: number, x: number, y: number, z: number, scale: number): void; + export function setRadioTrackWithStartOffset(radioStationName: string, mixName: string, p2: number): void; - export function procgrassDisableCullsphere(handle: number): void; + export function setNextRadioTrack(radioName: string, radioTrack: string, p2: string, p3: string): void; - export function procgrassIsCullsphereEnabled(handle: number): boolean; + export function setVehicleRadioLoud(vehicle: Vehicle | number, toggle: boolean): void; - export function procgrassEnableAmbscalescan(): void; + export function canVehicleReceiveCbRadio(vehicle: Vehicle | number): boolean; - export function procgrassDisableAmbscalescan(): void; + export function setMobileRadioEnabledDuringGameplay(toggle: boolean): void; - export function disableProcobjCreation(): void; + export function doesPlayerVehHaveRadio(): boolean; - export function enableProcobjCreation(): void; + export function isPlayerVehRadioEnable(): boolean; - export function grassbatchEnableFlatteningExtInSphere(x: number, y: number, z: number, p3: any, p4: number, p5: number, p6: number, scale: number): void; + /** + * can't seem to enable radio on cop cars etc + */ + export function setVehicleRadioEnabled(vehicle: Vehicle | number, toggle: boolean): void; + + export function setPositionedPlayerVehicleRadioEmitterEnabled(p0: any): void; /** - * Wraps 0xAAE9BE70EC7C69AB with FLT_MAX as p7, Jenkins: 0x73E96210? - */ - export function grassbatchEnableFlatteningInSphere(x: number, y: number, z: number, radius: number, p4: number, p5: number, p6: number): void; + * Examples: + * AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK", "END_CREDITS_KILL_MICHAEL", 1); + * AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK", "END_CREDITS_KILL_MICHAEL", 1); + * AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK", "END_CREDITS_KILL_TREVOR", 1); + * AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK", "END_CREDITS_SAVE_MICHAEL_TREVOR", 1); + * AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK", "OFF_ROAD_RADIO_ROCK_LIST", 1); + * AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_06_COUNTRY", "MAGDEMO2_RADIO_DINGHY", 1); + * AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_16_SILVERLAKE", "SEA_RACE_RADIO_PLAYLIST", 1); + * AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK", "OFF_ROAD_RADIO_ROCK_LIST", 1); + */ + export function setCustomRadioTrackList(radioStation: string, trackListName: string, p2: boolean): void; - export function grassbatchDisableFlattening(): void; + /** + * 3 calls in the b617d scripts, removed duplicate. + * AUDIO::CLEAR_CUSTOM_RADIO_TRACK_LIST("RADIO_16_SILVERLAKE"); + * AUDIO::CLEAR_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK"); + */ + export function clearCustomRadioTrackList(radioStation: string): void; - export function cascadeShadowsInitSession(): void; + export function getNumUnlockedRadioStations(): number; - export function cascadeShadowsSetCascadeBounds(p0: any, p1: boolean, p2: number, p3: number, p4: number, p5: number, p6: boolean, p7: number): void; + export function findRadioStationIndex(stationNameHash: number): number; - export function cascadeShadowsSetCascadeBoundsScale(p0: number): void; + /** + * 6 calls in the b617d scripts, removed identical lines: + * AUDIO::SET_RADIO_STATION_MUSIC_ONLY("RADIO_01_CLASS_ROCK", 1); + * AUDIO::SET_RADIO_STATION_MUSIC_ONLY(AUDIO::GET_RADIO_STATION_NAME(10), 0); + * AUDIO::SET_RADIO_STATION_MUSIC_ONLY(AUDIO::GET_RADIO_STATION_NAME(10), 1); + */ + export function setRadioStationMusicOnly(radioStation: string, toggle: boolean): void; - export function cascadeShadowsSetEntityTrackerScale(p0: number): void; + export function setRadioFrontendFadeTime(fadeTime: number): void; - export function cascadeShadowsSetSplitZExpWeight(p0: number): void; + /** + * AUDIO::UNLOCK_RADIO_STATION_TRACK_LIST("RADIO_16_SILVERLAKE", "MIRRORPARK_LOCKED"); + */ + export function unlockRadioStationTrackList(radioStation: string, trackListName: string): void; - export function cascadeShadowsSetBoundPosition(p0: any): void; + export function lockRadioStationTrackList(radioStation: string, trackListName: string): void; /** - * When this is set to ON, shadows only draw as you get nearer. - * When OFF, they draw from a further distance. - */ - export function cascadeShadowsEnableEntityTracker(toggle: boolean): void; + * Just a nullsub (i.e. does absolutely nothing) since build 1604. + */ + export function updateUnlockableDjRadioTracks(enableMixes: boolean): void; - export function cascadeShadowsSetScreenSizeCheckEnabled(p0: boolean): void; + /** + * Disables the radio station (hides it from the radio wheel). + */ + export function lockRadioStation(radioStationName: string, toggle: boolean): void; /** - * Possible values: - * "CSM_ST_POINT" - * "CSM_ST_LINEAR" - * "CSM_ST_TWOTAP" - * "CSM_ST_BOX3x3" - * "CSM_ST_BOX4x4" - * "CSM_ST_DITHER2_LINEAR" - * "CSM_ST_CUBIC" - * "CSM_ST_DITHER4" - * See NativeDB for reference: http://natives.altv.mp/#/0xB11D94BC55F41932 - */ - export function cascadeShadowsSetShadowSampleType(type: string | null): void; + * Doesn't have an effect in Story Mode. + */ + export function setRadioStationAsFavourite(radioStation: string, toggle: boolean): void; - export function cascadeShadowsClearShadowSampleType(): void; + export function isRadioStationFavourited(radioStation: string): boolean; - export function cascadeShadowsSetAircraftMode(p0: boolean): void; - - export function cascadeShadowsSetDynamicDepthMode(p0: boolean): void; + export function getNextAudibleBeat(out1?: number, out2?: number, out3?: number): [boolean, number, number, number]; - export function cascadeShadowsSetDynamicDepthValue(p0: number): void; + /** + * Changes start time of a tracklist (milliseconds) + * R* uses a random int: MISC::GET_RANDOM_INT_IN_RANGE(0, 13) * 60000) + */ + export function forceMusicTrackList(radioStation: string, trackListName: string, milliseconds: number): void; - export function cascadeShadowsEnableFreezer(p0: boolean): void; + export function getCurrentTrackPlayTime(radioStationName: string): number; - export function waterReflectionSetScriptObjectVisibility(p0: any): void; + export function getCurrentTrackSoundName(radioStationName: string): number; - export function golfTrailSetEnabled(toggle: boolean): void; + export function setVehicleMissileWarningEnabled(vehicle: Vehicle | number, toggle: boolean): void; /** - * @param p8 seems to always be false. - */ - export function golfTrailSetPath(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number, p7: number, p8: boolean): void; + * Full list of ambient zones by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ambientZones.json + */ + export function setAmbientZoneState(zoneName: string, p1: boolean, p2: boolean): void; - export function golfTrailSetRadius(p0: number, p1: number, p2: number): void; + /** + * This function also has a p2, unknown. Signature AUDIO::CLEAR_AMBIENT_ZONE_STATE(const char* zoneName, bool p1, Any p2); + * Still needs more research. + * Full list of ambient zones by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ambientZones.json + */ + export function clearAmbientZoneState(zoneName: string, p1: boolean): void; - export function golfTrailSetColour(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number, p7: number, p8: number, p9: number, p10: number, p11: number): void; + export function setAmbientZoneListState(ambientZone: string, p1: boolean, p2: boolean): void; - export function golfTrailSetTessellation(p0: number, p1: number): void; + export function clearAmbientZoneListState(ambientZone: string, p1: boolean): void; - export function golfTrailSetFixedControlPointEnable(p0: boolean): void; + /** + * Full list of ambient zones by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ambientZones.json + */ + export function setAmbientZoneStatePersistent(ambientZone: string, p1: boolean, p2: boolean): void; /** - * 12 matches across 4 scripts. All 4 scripts were job creators. - * Tested but noticed nothing. - * @param type ranged from 0 - 2. - * @param p4 was always 0.2f. Likely scale. - * @param alpha p8 is RGBA, the graphic is always yellow (255, 255, 0, 255). - */ - export function golfTrailSetFixedControlPoint(type: number, xPos: number, yPos: number, zPos: number, p4: number, red: number, green: number, blue: number, alpha: number): void; + * Full list of ambient zones by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ambientZones.json + */ + export function setAmbientZoneListStatePersistent(ambientZone: string, p1: boolean, p2: boolean): void; /** - * Only appeared in Golf & Golf_mp. Parameters were all ptrs - */ - export function golfTrailSetShaderParams(p0: number, p1: number, p2: number, p3: number, p4: number): void; + * Full list of ambient zones by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ambientZones.json + */ + export function isAmbientZoneEnabled(ambientZone: string): boolean; - export function golfTrailSetFacing(p0: boolean): void; + export function refreshClosestOceanShoreline(): void; - export function golfTrailGetMaxHeight(): number; + /** + * All occurrences found in b617d, sorted alphabetically and identical lines removed: + * AUDIO::SET_CUTSCENE_AUDIO_OVERRIDE("_AK"); + * AUDIO::SET_CUTSCENE_AUDIO_OVERRIDE("_CUSTOM"); + * AUDIO::SET_CUTSCENE_AUDIO_OVERRIDE("_TOOTHLESS"); + * Full list of cutscene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/cutsceneNames.json + */ + export function setCutsceneAudioOverride(name: string): void; - export function golfTrailGetVisualControlPoint(p0: number): Vector3; + export function setVariableOnSynchSceneAudio(variableName: string, value: number): void; /** - * Toggles Heatvision on/off. - */ - export function setSeethrough(toggle: boolean): void; + * Plays the given police radio message. + * All found occurrences in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/GBnsQ5hr + * Full list of police report names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/policeReportNames.json + */ + export function playPoliceReport(name: string, p1: number): number; - export function getUsingseethrough(): boolean; + export function cancelAllPoliceReports(): void; - export function seethroughReset(): void; + /** + * Plays the siren sound of a vehicle which is otherwise activated when fastly double-pressing the horn key. + * Only works on vehicles with a police siren. + */ + export function blipSiren(vehicle: Vehicle | number): void; - export function seethroughSetFadeStartdistance(distance: number): void; + /** + * Overrides the vehicle's horn hash. + * When changing this hash on a vehicle, it will not return the 'overwritten' hash. It will still always return the default horn hash (same as GET_VEHICLE_DEFAULT_HORN) + * vehicle - the vehicle whose horn should be overwritten + * mute - p1 seems to be an option for muting the horn + * p2 - maybe a horn id, since the function AUDIO::GET_VEHICLE_DEFAULT_HORN(veh) exists? + */ + export function overrideVehHorn(vehicle: Vehicle | number, override: boolean, hornHash: number): void; - export function seethroughSetFadeEnddistance(distance: number): void; + /** + * Checks whether the horn of a vehicle is currently played. + */ + export function isHornActive(vehicle: Vehicle | number): boolean; - export function seethroughGetMaxThickness(): number; + /** + * Makes pedestrians sound their horn longer, faster and more agressive when they use their horn. + */ + export function setAggressiveHorns(toggle: boolean): void; /** - * 0.0 = you will not be able to see people behind the walls. 50.0 and more = you will see everyone through the walls. More value is "better" view. See https://gfycat.com/FirmFlippantGourami - * min: 1.0 - * max: 10000.0 - */ - export function seethroughSetMaxThickness(thickness: number): void; + * Does nothing (it's a nullsub). + */ + export function setRadioPositionAudioMute(p0: boolean): void; - export function seethroughSetNoiseMin(amount: number): void; + /** + * SET_VEHICLE_CONVERSATIONS_PERSIST? + */ + export function setVehicleConversationsPersist(p0: boolean, p1: boolean): void; - export function seethroughSetNoiseMax(amount: number): void; + export function setVehicleConversationsPersistNew(p0: boolean, p1: boolean, p2: boolean): void; - export function seethroughSetHilightIntensity(intensity: number): void; + export function isStreamPlaying(): boolean; - export function seethroughSetHighlightNoise(noise: number): void; + export function getStreamPlayTime(): number; /** - * min: 0.0 - * max: 0.75 - */ - export function seethroughSetHeatscale(index: number, heatScale: number): void; - - export function seethroughSetColorNear(red: number, green: number, blue: number): void; + * Example: + * AUDIO::LOAD_STREAM("CAR_STEAL_1_PASSBY", "CAR_STEAL_1_SOUNDSET"); + * All found occurrences in the b678d decompiled scripts: https://pastebin.com/3rma6w5w + * Stream names often ends with "_MASTER", "_SMALL" or "_STREAM". Also "_IN", "_OUT" and numbers. + * soundSet is often set to 0 in the scripts. These are common to end the soundSets: "_SOUNDS", "_SOUNDSET" and numbers. + * Full list of audio / sound names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/soundNames.json + */ + export function loadStream(streamName: string, soundSet: string): boolean; /** - * Setter for GET_MOTIONBLUR_MAX_VEL_SCALER - */ - export function setMotionblurMaxVelScaler(p0: number): void; + * Example: + * AUDIO::LOAD_STREAM_WITH_START_OFFSET("STASH_TOXIN_STREAM", 2400, "FBI_05_SOUNDS"); + * Only called a few times in the scripts. + * Full list of audio / sound names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/soundNames.json + */ + export function loadStreamWithStartOffset(streamName: string, startOffset: number, soundSet: string): boolean; + + export function playStreamFromPed(ped: Ped | Player | number): void; + + export function playStreamFromVehicle(vehicle: Vehicle | number): void; /** - * Getter for SET_MOTIONBLUR_MAX_VEL_SCALER - */ - export function getMotionblurMaxVelScaler(): number; + * Used with AUDIO::LOAD_STREAM + * Example from finale_heist2b.c4: + * TASK::TASK_SYNCHRONIZED_SCENE(l_4C8[2/*14*\/], l_4C8[2/*14*\/]._f7, l_30A, "push_out_vault_l", 4.0, -1.5, 5, 713, 4.0, 0); + * PED::SET_SYNCHRONIZED_SCENE_PHASE(l_4C8[2/*14*\/]._f7, 0.0); + * PED::FORCE_PED_AI_AND_ANIMATION_UPDATE(l_4C8[2/*14*\/], 0, 0); + * PED::SET_PED_COMBAT_ATTRIBUTES(l_4C8[2/*14*\/], 38, 1); + * PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(l_4C8[2/*14*\/], 1); + * if (AUDIO::LOAD_STREAM("Gold_Cart_Push_Anim_01", "BIG_SCORE_3B_SOUNDS")) { + * AUDIO::PLAY_STREAM_FROM_OBJECT(l_36F[0/*1*\/]); + * } + */ + export function playStreamFromObject(object: Object): void; - export function setForceMotionblur(toggle: boolean): void; + export function playStreamFrontend(): void; - export function togglePlayerDamageOverlay(toggle: boolean): void; + export function playStreamFromPosition(x: number, y: number, z: number): void; - /** - * Sets an value related to timecycles. - */ - export function resetAdaptation(p0: number): void; + export function stopStream(): void; - /** - * time in ms to transition to fully blurred screen - */ - export function triggerScreenblurFadeIn(transitionTime: number): boolean; + export function stopPedSpeaking(ped: Ped | Player | number, shaking: boolean): void; - /** - * time in ms to transition from fully blurred to normal - */ - export function triggerScreenblurFadeOut(transitionTime: number): boolean; + export function blockAllSpeechFromPed(ped: Ped | Player | number, p1: boolean, p2: boolean): void; - export function disableScreenblurFade(): void; + export function stopPedSpeakingSynced(ped: Ped | Player | number, p1: boolean): void; - export function getScreenblurFadeCurrentTime(): number; + export function disablePedPainAudio(ped: Ped | Player | number, toggle: boolean): void; /** - * Returns whether screen transition to blur/from blur is running. - */ - export function isScreenblurFadeRunning(): boolean; + * Common in the scripts: + * AUDIO::IS_AMBIENT_SPEECH_DISABLED(PLAYER::PLAYER_PED_ID()); + */ + export function isAmbientSpeechDisabled(ped: Ped | Player | number): boolean; - export function togglePausedRenderphases(toggle: boolean): void; + export function blockSpeechContextGroup(p0: string, p1: number): void; - export function getTogglePausedRenderphasesStatus(): boolean; + export function unblockSpeechContextGroup(p0: string): void; - export function resetPausedRenderphases(): void; + export function setSirenWithNoDriver(vehicle: Vehicle | number, toggle: boolean): void; - export function grabPausemenuOwnership(): void; + export function setSirenBypassMpDriverCheck(vehicle: Vehicle | number, toggle: boolean): void; - export function setHidofOverride(p0: boolean, p1: boolean, nearplaneOut: number, nearplaneIn: number, farplaneOut: number, farplaneIn: number): void; + export function triggerSirenAudio(vehicle: Vehicle | number): void; - export function setLockAdaptiveDofDistance(p0: boolean): void; + export function setHornPermanentlyOn(vehicle: Vehicle | number): void; - export function phonephotoeditorToggle(p0: boolean): boolean; + export function setHornEnabled(vehicle: Vehicle | number, toggle: boolean): void; - export function phonephotoeditorIsActive(): boolean; + export function setAudioVehiclePriority(vehicle: Vehicle | number, p1: any): void; - export function phonephotoeditorSetFrameTxd(textureDict: string | null, p1: boolean): boolean; + export function setHornPermanentlyOnTime(vehicle: Vehicle | number, time: number): void; - /** - * GRAPHICS::START_PARTICLE_FX_NON_LOOPED_AT_COORD("scr_paleto_roof_impact", -140.8576f, 6420.789f, 41.1391f, 0f, 0f, 267.3957f, 0x3F800000, 0, 0, 0); - * Axis - Invert Axis Flags - * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json - * ------------------------------------------------------------------- - * C# - * Function.Call(Hash.START_PARTICLE_FX_NON_LOOPED_AT_COORD, = you are calling this function. - * char *effectname = This is an in-game effect name, for e.g. "scr_fbi4_trucks_crash" is used to give the effects when truck crashes etc - * float x, y, z pos = this one is Simple, you just have to declare, where do you want this effect to take place at, so declare the ordinates - * float scale = is declare the scale of the effect, this may vary as per the effects for e.g 1.0f - * See NativeDB for reference: http://natives.altv.mp/#/0x25129531F77B9ED3 - * @param xRot Again simple? just mention the value in case if you want the effect to rotate. - * @param yRot Again simple? just mention the value in case if you want the effect to rotate. - * @param xAxis To bool the axis values. - * @param yAxis To bool the axis values. - */ - export function startParticleFxNonLoopedAtCoord(effectName: string | null, xPos: number, yPos: number, zPos: number, xRot: number, yRot: number, zRot: number, scale: number, xAxis: boolean, yAxis: boolean, zAxis: boolean): boolean; + export function useSirenAsHorn(vehicle: Vehicle | number, toggle: boolean): void; /** - * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json - */ - export function startNetworkedParticleFxNonLoopedAtCoord(effectName: string | null, xPos: number, yPos: number, zPos: number, xRot: number, yRot: number, zRot: number, scale: number, xAxis: boolean, yAxis: boolean, zAxis: boolean, p11: boolean): boolean; + * This native sets the audio of the specified vehicle to the audioName (p1). + * Use the audioNameHash found in vehicles.meta + * Example: + * _SET_VEHICLE_AUDIO(veh, "ADDER"); + * The selected vehicle will now have the audio of the Adder. + */ + export function forceUseAudioGameObject(vehicle: Vehicle | number, audioName: string): void; - /** - * GRAPHICS::START_PARTICLE_FX_NON_LOOPED_ON_PED_BONE("scr_sh_bong_smoke", PLAYER::PLAYER_PED_ID(), -0.025f, 0.13f, 0f, 0f, 0f, 0f, 31086, 0x3F800000, 0, 0, 0); - * Axis - Invert Axis Flags - * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json - */ - export function startParticleFxNonLoopedOnPedBone(effectName: string | null, ped: Player | number, offsetX: number, offsetY: number, offsetZ: number, rotX: number, rotY: number, rotZ: number, boneIndex: number, scale: number, axisX: boolean, axisY: boolean, axisZ: boolean): boolean; + export function preloadVehicleAudioBank(vehicleModel: number): void; - /** - * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json - */ - export function startNetworkedParticleFxNonLoopedOnPedBone(effectName: string | null, ped: Player | number, offsetX: number, offsetY: number, offsetZ: number, rotX: number, rotY: number, rotZ: number, boneIndex: number, scale: number, axisX: boolean, axisY: boolean, axisZ: boolean): boolean; + export function setVehicleStartupRevSound(vehicle: Vehicle | number, p1: string, p2: string): void; - /** - * Starts a particle effect on an entity for example your player. - * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json - * Example: - * C#: - * Internally this calls the same function as GRAPHICS::START_PARTICLE_FX_NON_LOOPED_ON_PED_BONE - * however it uses -1 for the specified bone index, so it should be possible to start a non looped fx on an entity bone using that native - * -can confirm START_PARTICLE_FX_NON_LOOPED_ON_PED_BONE does NOT work on vehicle bones. - * @param entity 0.5, 0.0, 0.0, 0.0, 1.0, false, false, false); - */ - export function startParticleFxNonLoopedOnEntity(effectName: string | null, entity: Entity | number, offsetX: number, offsetY: number, offsetZ: number, rotX: number, rotY: number, rotZ: number, scale: number, axisX: boolean, axisY: boolean, axisZ: boolean): boolean; + export function resetVehicleStartupRevSound(vehicle: Vehicle | number): void; - /** - * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json - */ - export function startNetworkedParticleFxNonLoopedOnEntity(effectName: string | null, entity: Entity | number, offsetX: number, offsetY: number, offsetZ: number, rotX: number, rotY: number, rotZ: number, scale: number, axisX: boolean, axisY: boolean, axisZ: boolean): boolean; + export function setVehicleForceReverseWarning(p0: any, p1: any): void; - /** - * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json - */ - export function startParticleFxNonLoopedOnEntityBone(effectName: string | null, entity: Entity | number, offsetX: number, offsetY: number, offsetZ: number, rotX: number, rotY: number, rotZ: number, boneIndex: number, scale: number, axisX: boolean, axisY: boolean, axisZ: boolean): boolean; + export function isVehicleAudiblyDamaged(vehicle: Vehicle | number): boolean; - /** - * only works on some fx's, not networked - */ - export function setParticleFxNonLoopedColour(r: number, g: number, b: number): void; + export function setVehicleAudioEngineDamageFactor(vehicle: Vehicle | number, damageFactor: number): void; /** - * Usage example for C#: - * Function.Call(Hash.SET_PARTICLE_FX_NON_LOOPED_ALPHA, new InputArgument[] { 0.1f }); - * Note: the argument alpha ranges from 0.0f-1.0f ! - */ - export function setParticleFxNonLoopedAlpha(alpha: number): void; + * intensity: 0.0f - 1.0f, only used once with 1.0f in R* Scripts (nigel2) + * Makes an engine rattling noise when you decelerate, you need to be going faster to hear lower values + */ + export function setVehicleAudioBodyDamageFactor(vehicle: Vehicle | number, intensity: number): void; - export function setParticleFxNonLoopedScale(scale: number): void; + export function enableVehicleFanbeltDamage(vehicle: Vehicle | number, toggle: boolean): void; - export function setParticleFxNonLoopedEmitterSize(p0: number, p1: number, scale: number): void; + export function enableVehicleExhaustPops(vehicle: Vehicle | number, toggle: boolean): void; /** - * Used only once in the scripts (taxi_clowncar) - */ - export function setParticleFxForceVehicleInterior(toggle: boolean): void; + * SET_VEHICLE_BOOST_ACTIVE(vehicle, 1, 0); + * SET_VEHICLE_BOOST_ACTIVE(vehicle, 0, 0); + * Will give a boost-soundeffect. + */ + export function setVehicleBoostActive(vehicle: Vehicle | number, toggle: boolean): void; - /** - * GRAPHICS::START_PARTICLE_FX_LOOPED_AT_COORD("scr_fbi_falling_debris", 93.7743f, -749.4572f, 70.86904f, 0f, 0f, 0f, 0x3F800000, 0, 0, 0, 0) - * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json - * @param p11 seems to be always 0 - */ - export function startParticleFxLoopedAtCoord(effectName: string | null, x: number, y: number, z: number, xRot: number, yRot: number, zRot: number, scale: number, xAxis: boolean, yAxis: boolean, zAxis: boolean, p11: boolean): number; + export function setPlayerVehicleAlarmAudioActive(vehicle: Vehicle | number, toggle: boolean): void; - /** - * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json - */ - export function startParticleFxLoopedOnPedBone(effectName: string | null, ped: Player | number, xOffset: number, yOffset: number, zOffset: number, xRot: number, yRot: number, zRot: number, boneIndex: number, scale: number, xAxis: boolean, yAxis: boolean, zAxis: boolean): number; + export function setScriptUpdateDoorAudio(doorHash: number, toggle: boolean): void; /** - * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json - */ - export function startParticleFxLoopedOnEntity(effectName: string | null, entity: Entity | number, xOffset: number, yOffset: number, zOffset: number, xRot: number, yRot: number, zRot: number, scale: number, xAxis: boolean, yAxis: boolean, zAxis: boolean): number; + * doorId: see SET_VEHICLE_DOOR_SHUT + */ + export function playVehicleDoorOpenSound(vehicle: Vehicle | number, doorId: number): void; /** - * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json - */ - export function startParticleFxLoopedOnEntityBone(effectName: string | null, entity: Entity | number, xOffset: number, yOffset: number, zOffset: number, xRot: number, yRot: number, zRot: number, boneIndex: number, scale: number, xAxis: boolean, yAxis: boolean, zAxis: boolean): number; + * doorId: see SET_VEHICLE_DOOR_SHUT + */ + export function playVehicleDoorCloseSound(vehicle: Vehicle | number, doorId: number): void; /** - * @param r https - * @param b https - */ - export function startNetworkedParticleFxLoopedOnEntity(effectName: string | null, entity: Entity | number, xOffset: number, yOffset: number, zOffset: number, xRot: number, yRot: number, zRot: number, scale: number, xAxis: boolean, yAxis: boolean, zAxis: boolean, r: number, g: number, b: number, a: number): number; + * Works for planes only. + */ + export function enableStallWarningSounds(vehicle: Vehicle | number, toggle: boolean): void; - /** - * @param r https - * @param b https - */ - export function startNetworkedParticleFxLoopedOnEntityBone(effectName: string | null, entity: Entity | number, xOffset: number, yOffset: number, zOffset: number, xRot: number, yRot: number, zRot: number, boneIndex: number, scale: number, xAxis: boolean, yAxis: boolean, zAxis: boolean, r: number, g: number, b: number, a: number): number; + export function enableDragRaceStationaryWarningSounds(vehicle: Vehicle | number, enable: boolean): void; /** - * @param p1 is always 0 in the native scripts - */ - export function stopParticleFxLooped(ptfxHandle: number, p1: boolean): void; - - export function removeParticleFx(ptfxHandle: number, p1: boolean): void; - - export function removeParticleFxFromEntity(entity: Entity | number): void; + * Hardcoded to return 1 + */ + export function isGameInControlOfMusic(): boolean; - export function removeParticleFxInRange(X: number, Y: number, Z: number, radius: number): void; + export function setGpsActive(active: boolean): void; - export function forceParticleFxInVehicleInterior(p0: any, p1: any): void; + /** + * Called 38 times in the scripts. There are 5 different audioNames used. + * One unknown removed below. + * AUDIO::PLAY_MISSION_COMPLETE_AUDIO("DEAD"); + * AUDIO::PLAY_MISSION_COMPLETE_AUDIO("FRANKLIN_BIG_01"); + * AUDIO::PLAY_MISSION_COMPLETE_AUDIO("GENERIC_FAILED"); + * AUDIO::PLAY_MISSION_COMPLETE_AUDIO("TREVOR_SMALL_01"); + */ + export function playMissionCompleteAudio(audioName: string): void; - export function doesParticleFxLoopedExist(ptfxHandle: number): boolean; + export function isMissionCompletePlaying(): boolean; - export function setParticleFxLoopedOffsets(ptfxHandle: number, x: number, y: number, z: number, rotX: number, rotY: number, rotZ: number): void; + export function isMissionCompleteReadyForUi(): boolean; - export function setParticleFxLoopedEvolution(ptfxHandle: number, propertyName: string | null, amount: number, noNetwork: boolean): void; + export function blockDeathJingle(toggle: boolean): void; /** - * only works on some fx's - * @param p4 = 0 - */ - export function setParticleFxLoopedColour(ptfxHandle: number, r: number, g: number, b: number, p4: boolean): void; - - export function setParticleFxLoopedAlpha(ptfxHandle: number, alpha: number): void; - - export function setParticleFxLoopedScale(ptfxHandle: number, scale: number): void; + * Used to prepare a scene where the surrounding sound is muted or a bit changed. This does not play any sound. + * List of all usable scene names found in b617d. Sorted alphabetically and identical names removed: https://pastebin.com/MtM9N9CC + * Full list of audio scene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/audioSceneNames.json + */ + export function startAudioScene(scene: string): boolean; - export function setParticleFxLoopedFarClipDist(ptfxHandle: number, range: number): void; + /** + * Full list of audio scene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/audioSceneNames.json + */ + export function stopAudioScene(scene: string): void; - export function setParticleFxCamInsideVehicle(p0: boolean): void; + /** + * ?? + */ + export function stopAudioScenes(): void; - export function setParticleFxCamInsideNonplayerVehicle(vehicle: Vehicle | number, p1: boolean): void; + /** + * Full list of audio scene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/audioSceneNames.json + */ + export function isAudioSceneActive(scene: string): boolean; - export function setParticleFxShootoutBoat(p0: any): void; + /** + * Full list of audio scene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/audioSceneNames.json + */ + export function setAudioSceneVariable(scene: string, variable: string, value: number): void; - export function clearParticleFxShootoutBoat(): void; + export function setAudioScriptCleanupTime(time: number): void; - export function setParticleFxBloodScale(p0: any): void; + /** + * All found occurrences in b678d: + * https://pastebin.com/ceu67jz8 + */ + export function addEntityToAudioMixGroup(entity: Entity | number, groupName: string, p2: number): void; - export function disableInWaterPtfx(toggle: boolean): void; + export function removeEntityFromAudioMixGroup(entity: Entity | number, p1: number): void; - export function disableDownwashPtfx(toggle: boolean): void; + export function audioIsMusicPlaying(): boolean; - export function setParticleFxSlipstreamLodrangeScale(scale: number): void; + /** + * This is an alias of AUDIO_IS_MUSIC_PLAYING. + */ + export function audioIsScriptedMusicPlaying(): boolean; /** - * Creates cartoon effect when Michel smokes the weed - */ - export function enableClownBloodVfx(toggle: boolean): void; + * All music event names found in the b617d scripts: https://pastebin.com/GnYt0R3P + * Full list of music event names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/musicEventNames.json + */ + export function prepareMusicEvent(eventName: string): boolean; /** - * Creates a motion-blur sort of effect, this native does not seem to work, however by using the `START_SCREEN_EFFECT` native with `DrugsMichaelAliensFight` as the effect parameter, you should be able to get the effect. - */ - export function enableAlienBloodVfx(toggle: boolean): void; + * All music event names found in the b617d scripts: https://pastebin.com/GnYt0R3P + * Full list of music event names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/musicEventNames.json + */ + export function cancelMusicEvent(eventName: string): boolean; - export function setParticleFxBulletImpactScale(scale: number): void; + /** + * List of all usable event names found in b617d used with this native. Sorted alphabetically and identical names removed: https://pastebin.com/RzDFmB1W + * All music event names found in the b617d scripts: https://pastebin.com/GnYt0R3P + * Full list of music event names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/musicEventNames.json + */ + export function triggerMusicEvent(eventName: string): boolean; - export function setParticleFxBulletImpactLodrangeScale(p0: number): void; + export function isMusicOneshotPlaying(): boolean; - export function setParticleFxBulletTraceNoAngleReject(p0: boolean): void; + export function getMusicPlaytime(): number; - export function setParticleFxBangScrapeLodrangeScale(p0: number): void; + export function setGlobalRadioSignalLevel(p0: any): void; - export function setParticleFxFootLodrangeScale(p0: number): void; + export function recordBrokenGlass(x: number, y: number, z: number, radius: number): void; - /** - * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json - */ - export function setParticleFxFootOverrideName(p0: string | null): void; + export function clearAllBrokenGlass(): void; - export function setSkidmarkRangeScale(scale: number): void; + export function scriptOverridesWindElevation(p0: boolean, p1: any): void; - export function setPtfxForceVehicleInteriorFlag(p0: any): void; + export function setPedWallaDensity(p0: number, p1: number): void; - export function registerPostfxBulletImpact(weaponWorldPosX: number, weaponWorldPosY: number, weaponWorldPosZ: number, intensity: number): void; + export function setPedInteriorWallaDensity(p0: number, p1: number): void; - export function forcePostfxBulletImpactsAfterHud(p0: boolean): void; + export function forcePedPanicWalla(): void; /** - * From the b678d decompiled scripts: - * GRAPHICS::USE_PARTICLE_FX_ASSET("FM_Mission_Controler"); - * GRAPHICS::USE_PARTICLE_FX_ASSET("scr_apartment_mp"); - * GRAPHICS::USE_PARTICLE_FX_ASSET("scr_indep_fireworks"); - * GRAPHICS::USE_PARTICLE_FX_ASSET("scr_mp_cig_plane"); - * GRAPHICS::USE_PARTICLE_FX_ASSET("scr_mp_creator"); - * GRAPHICS::USE_PARTICLE_FX_ASSET("scr_ornate_heist"); - * GRAPHICS::USE_PARTICLE_FX_ASSET("scr_prison_break_heist_station"); - * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json - */ - export function useParticleFxAsset(name: string | null): void; + * Example: + * bool prepareAlarm = AUDIO::PREPARE_ALARM("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS"); + * Full list of alarm names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/alarmSounds.json + */ + export function prepareAlarm(alarmName: string): boolean; + + /** + * Example: + * This will start the alarm at Fort Zancudo. + * AUDIO::START_ALARM("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS", 1); + * First parameter (char) is the name of the alarm. + * Second parameter (bool) is unknown, it does not seem to make a difference if this one is 0 or 1. + * ---------- + * It DOES make a difference but it has to do with the duration or something I dunno yet + * ---------- + * Found in the b617d scripts: + * AUDIO::START_ALARM("AGENCY_HEIST_FIB_TOWER_ALARMS", 0); + * AUDIO::START_ALARM("AGENCY_HEIST_FIB_TOWER_ALARMS_UPPER", 1); + * AUDIO::START_ALARM("AGENCY_HEIST_FIB_TOWER_ALARMS_UPPER_B", 0); + * AUDIO::START_ALARM("BIG_SCORE_HEIST_VAULT_ALARMS", a_0); + * AUDIO::START_ALARM("FBI_01_MORGUE_ALARMS", 1); + * AUDIO::START_ALARM("FIB_05_BIOTECH_LAB_ALARMS", 0); + * AUDIO::START_ALARM("JEWEL_STORE_HEIST_ALARMS", 0); + * AUDIO::START_ALARM("PALETO_BAY_SCORE_ALARM", 1); + * AUDIO::START_ALARM("PALETO_BAY_SCORE_CHICKEN_FACTORY_ALARM", 0); + * AUDIO::START_ALARM("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS", 1); + * AUDIO::START_ALARM("PORT_OF_LS_HEIST_SHIP_ALARMS", 0); + * AUDIO::START_ALARM("PRISON_ALARMS", 0); + * AUDIO::START_ALARM("PROLOGUE_VAULT_ALARMS", 0); + * Full list of alarm names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/alarmSounds.json + */ + export function startAlarm(alarmName: string, p2: boolean): void; + + /** + * Example: + * This will stop the alarm at Fort Zancudo. + * AUDIO::STOP_ALARM("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS", 1); + * First parameter (char) is the name of the alarm. + * Second parameter (bool) has to be true (1) to have any effect. + * Full list of alarm names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/alarmSounds.json + */ + export function stopAlarm(alarmName: string, toggle: boolean): void; - /** - * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json - */ - export function setParticleFxOverride(oldAsset: string | null, newAsset: string | null): void; + export function stopAllAlarms(stop: boolean): void; /** - * Resets the effect of SET_PARTICLE_FX_OVERRIDE - * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json - */ - export function resetParticleFxOverride(name: string | null): void; - - export function setWeatherPtfxUseOverrideSettings(p0: boolean): void; + * Example: + * bool playing = AUDIO::IS_ALARM_PLAYING("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS"); + * Full list of alarm names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/alarmSounds.json + */ + export function isAlarmPlaying(alarmName: string): boolean; - export function setWeatherPtfxOverrideCurrLevel(p0: number): void; + /** + * Returns hash of default vehicle horn + * Hash is stored in audVehicleAudioEntity + */ + export function getVehicleDefaultHorn(vehicle: Vehicle | number): number; - export function washDecalsInRange(x: number, y: number, z: number, range: number, p4: number): void; + export function getVehicleDefaultHornIgnoreMods(vehicle: Vehicle | number): number; - export function washDecalsFromVehicle(vehicle: Vehicle | number, p1: number): void; + export function resetPedAudioFlags(ped: Ped | Player | number): void; /** - * Fades nearby decals within the range specified - */ - export function fadeDecalsInRange(x: number, y: number, z: number, p3: number, p4: number): void; + * Enables/disables ped's "loud" footstep sound. + */ + export function setPedFootstepsEventsEnabled(ped: Ped | Player | number, toggle: boolean): void; /** - * Removes all decals in range from a position, it includes the bullet holes, blood pools, petrol... - */ - export function removeDecalsInRange(x: number, y: number, z: number, range: number): void; - - export function removeDecalsFromObject(obj: number): void; + * Enables/disables ped's "quiet" footstep sound. + */ + export function setPedClothEventsEnabled(ped: Ped | Player | number, toggle: boolean): void; - export function removeDecalsFromObjectFacing(obj: number, x: number, y: number, z: number): void; + /** + * Sets audio flag "OverridePlayerGroundMaterial" + */ + export function overridePlayerGroundMaterial(hash: number, toggle: boolean): void; - export function removeDecalsFromVehicle(vehicle: Vehicle | number): void; + export function useFootstepScriptSweeteners(ped: Ped | Player | number, p1: boolean, hash: number): void; /** - * decal types: - * public enum DecalTypes - * { - * splatters_blood = 1010, - * splatters_blood_dir = 1015, - * splatters_blood_mist = 1017, - * splatters_mud = 1020, - * splatters_paint = 1030, - * splatters_water = 1040, - * See NativeDB for reference: http://natives.altv.mp/#/0xB302244A1839BDAD - */ - export function addDecal(decalType: number, posX: number, posY: number, posZ: number, p4: number, p5: number, p6: number, p7: number, p8: number, p9: number, width: number, height: number, rCoef: number, gCoef: number, bCoef: number, opacity: number, timeout: number, p17: boolean, p18: boolean, p19: boolean): number; + * Sets audio flag "OverrideMicrophoneSettings" + */ + export function overrideMicrophoneSettings(hash: number, toggle: boolean): void; - export function addPetrolDecal(x: number, y: number, z: number, groundLvl: number, width: number, transparency: number): number; + export function freezeMicrophone(): void; - export function addOilDecal(x: number, y: number, z: number, groundLvl: number, width: number, transparency: number): number; + /** + * If value is set to true, and ambient siren sound will be played. + * Appears to enable/disable an audio flag. + */ + export function distantCopCarSirens(value: boolean): void; - export function startPetrolTrailDecals(p0: number): void; + export function setSirenCanBeControlledByAudio(vehicle: Vehicle | number, p1: boolean): void; - export function addPetrolTrailDecalInfo(x: number, y: number, z: number, p3: number): void; + export function enableStuntJumpAudio(): void; - export function endPetrolTrailDecals(): void; + /** + * Possible flag names: + * "ActivateSwitchWheelAudio" + * "AllowAmbientSpeechInSlowMo" + * "AllowCutsceneOverScreenFade" + * "AllowForceRadioAfterRetune" + * "AllowPainAndAmbientSpeechToPlayDuringCutscene" + * "AllowPlayerAIOnMission" + * "AllowPoliceScannerWhenPlayerHasNoControl" + * "AllowRadioDuringSwitch" + * "AllowRadioOverScreenFade" + * "AllowScoreAndRadio" + * "AllowScriptedSpeechInSlowMo" + * "AvoidMissionCompleteDelay" + * "DisableAbortConversationForDeathAndInjury" + * "DisableAbortConversationForRagdoll" + * "DisableBarks" + * "DisableFlightMusic" + * "DisableReplayScriptStreamRecording" + * "EnableHeadsetBeep" + * "ForceConversationInterrupt" + * "ForceSeamlessRadioSwitch" + * "ForceSniperAudio" + * "FrontendRadioDisabled" + * "HoldMissionCompleteWhenPrepared" + * "IsDirectorModeActive" + * "IsPlayerOnMissionForSpeech" + * "ListenerReverbDisabled" + * "LoadMPData" + * "MobileRadioInGame" + * "OnlyAllowScriptTriggerPoliceScanner" + * "PlayMenuMusic" + * "PoliceScannerDisabled" + * "ScriptedConvListenerMaySpeak" + * "SpeechDucksScore" + * "SuppressPlayerScubaBreathing" + * "WantedMusicDisabled" + * "WantedMusicOnMission" + * ------------------------------- + * No added flag names between b393d and b573d, including b573d. + * ####################################################################### + * "IsDirectorModeActive" is an audio flag which will allow you to play speech infinitely without any pauses like in Director Mode. + * ----------------------------------------------------------------------- + * All flag IDs and hashes: + * ID: 00 | Hash: 0x0FED7A7F + * ID: 01 | Hash: 0x20A7858F + * ID: 02 | Hash: 0xA11C2259 + * ID: 03 | Hash: 0x08DE4700 + * ID: 04 | Hash: 0x989F652F + * ID: 05 | Hash: 0x3C9E76BA + * ID: 06 | Hash: 0xA805FEB0 + * ID: 07 | Hash: 0x4B94EA26 + * ID: 08 | Hash: 0x803ACD34 + * ID: 09 | Hash: 0x7C741226 + * ID: 10 | Hash: 0x31DB9EBD + * ID: 11 | Hash: 0xDF386F18 + * ID: 12 | Hash: 0x669CED42 + * ID: 13 | Hash: 0x51F22743 + * ID: 14 | Hash: 0x2052B35C + * ID: 15 | Hash: 0x071472DC + * ID: 16 | Hash: 0xF9928BCC + * ID: 17 | Hash: 0x7ADBDD48 + * ID: 18 | Hash: 0xA959BA1A + * ID: 19 | Hash: 0xBBE89B60 + * ID: 20 | Hash: 0x87A08871 + * ID: 21 | Hash: 0xED1057CE + * ID: 22 | Hash: 0x1584AD7A + * ID: 23 | Hash: 0x8582CFCB + * ID: 24 | Hash: 0x7E5E2FB0 + * ID: 25 | Hash: 0xAE4F72DB + * ID: 26 | Hash: 0x5D16D1FA + * ID: 27 | Hash: 0x06B2F4B8 + * ID: 28 | Hash: 0x5D4CDC96 + * ID: 29 | Hash: 0x8B5A48BA + * ID: 30 | Hash: 0x98FBD539 + * ID: 31 | Hash: 0xD8CB0473 + * ID: 32 | Hash: 0x5CBB4874 + * ID: 33 | Hash: 0x2E9F93A9 + * ID: 34 | Hash: 0xD93BEA86 + * ID: 35 | Hash: 0x92109B7D + * ID: 36 | Hash: 0xB7EC9E4D + * ID: 37 | Hash: 0xCABDBB1D + * ID: 38 | Hash: 0xB3FD4A52 + * ID: 39 | Hash: 0x370D94E5 + * ID: 40 | Hash: 0xA0F7938F + * ID: 41 | Hash: 0xCBE1CE81 + * ID: 42 | Hash: 0xC27F1271 + * ID: 43 | Hash: 0x9E3258EB + * ID: 44 | Hash: 0x551CDA5B + * ID: 45 | Hash: 0xCB6D663C + * ID: 46 | Hash: 0x7DACE87F + * ID: 47 | Hash: 0xF9DE416F + * ID: 48 | Hash: 0x882E6E9E + * ID: 49 | Hash: 0x16B447E7 + * ID: 50 | Hash: 0xBD867739 + * ID: 51 | Hash: 0xA3A58604 + * ID: 52 | Hash: 0x7E046BBC + * ID: 53 | Hash: 0xD95FDB98 + * ID: 54 | Hash: 0x5842C0ED + * ID: 55 | Hash: 0x285FECC6 + * ID: 56 | Hash: 0x9351AC43 + * ID: 57 | Hash: 0x50032E75 + * ID: 58 | Hash: 0xAE6D0D59 + * ID: 59 | Hash: 0xD6351785 + * ID: 60 | Hash: 0xD25D71BC + * ID: 61 | Hash: 0x1F7F6423 + * ID: 62 | Hash: 0xE24C3AA6 + * ID: 63 | Hash: 0xBFFDD2B7 + */ + export function setAudioFlag(flagName: string, toggle: boolean): void; + + /** + * p1 is always 0 in the scripts + */ + export function prepareSynchronizedAudioEvent(audioEvent: string, p1: any): boolean; + + export function prepareSynchronizedAudioEventForScene(sceneID: number, audioEvent: string): boolean; - export function removeDecal(decal: number): void; + export function playSynchronizedAudioEvent(sceneID: number): boolean; - export function isDecalAlive(decal: number): boolean; + export function stopSynchronizedAudioEvent(sceneID: number): boolean; - export function getDecalWashLevel(decal: number): number; + export function initSynchSceneAudioWithPosition(audioEvent: string, x: number, y: number, z: number): void; - export function setDisablePetrolDecalsIgnitingThisFrame(): void; + export function initSynchSceneAudioWithEntity(audioEvent: string, entity: Entity | number): void; - export function setDisablePetrolDecalsRecyclingThisFrame(): void; + /** + * Needs to be called every frame. + * Audio mode to apply this frame: https://alloc8or.re/gta5/doc/enums/audSpecialEffectMode.txt + */ + export function setAudioSpecialEffectMode(mode: number): void; - export function setDisableDecalRenderingThisFrame(): void; + /** + * Found in the b617d scripts, duplicates removed: + * AUDIO::SET_PORTAL_SETTINGS_OVERRIDE("V_CARSHOWROOM_PS_WINDOW_UNBROKEN", "V_CARSHOWROOM_PS_WINDOW_BROKEN"); + * AUDIO::SET_PORTAL_SETTINGS_OVERRIDE("V_CIA_PS_WINDOW_UNBROKEN", "V_CIA_PS_WINDOW_BROKEN"); + * AUDIO::SET_PORTAL_SETTINGS_OVERRIDE("V_DLC_HEIST_APARTMENT_DOOR_CLOSED", "V_DLC_HEIST_APARTMENT_DOOR_OPEN"); + * AUDIO::SET_PORTAL_SETTINGS_OVERRIDE("V_FINALEBANK_PS_VAULT_INTACT", "V_FINALEBANK_PS_VAULT_BLOWN"); + * AUDIO::SET_PORTAL_SETTINGS_OVERRIDE("V_MICHAEL_PS_BATHROOM_WITH_WINDOW", "V_MICHAEL_PS_BATHROOM_WITHOUT_WINDOW"); + */ + export function setPortalSettingsOverride(p0: string, p1: string): void; - export function getIsPetrolDecalInRange(xCoord: number, yCoord: number, zCoord: number, radius: number): boolean; + /** + * Found in the b617d scripts, duplicates removed: + * AUDIO::REMOVE_PORTAL_SETTINGS_OVERRIDE("V_CARSHOWROOM_PS_WINDOW_UNBROKEN"); + * AUDIO::REMOVE_PORTAL_SETTINGS_OVERRIDE("V_CIA_PS_WINDOW_UNBROKEN"); + * AUDIO::REMOVE_PORTAL_SETTINGS_OVERRIDE("V_DLC_HEIST_APARTMENT_DOOR_CLOSED"); + * AUDIO::REMOVE_PORTAL_SETTINGS_OVERRIDE("V_FINALEBANK_PS_VAULT_INTACT"); + * AUDIO::REMOVE_PORTAL_SETTINGS_OVERRIDE("V_MICHAEL_PS_BATHROOM_WITH_WINDOW"); + */ + export function removePortalSettingsOverride(p0: string): void; - export function patchDecalDiffuseMap(decalType: number, textureDict: string | null, textureName: string | null): void; + /** + * STOP_S[MOKE_GRENADE_EXPLOSION_SOUNDS]? + */ + export function stopSmokeGrenadeExplosionSounds(): void; - export function unpatchDecalDiffuseMap(decalType: number): void; + export function getMusicVolSlider(): number; - export function moveVehicleDecals(p0: any, p1: any): void; + export function requestTennisBanks(ped: Ped | Player | number): void; - /** - * @param boneIndex is always chassis_dummy in the scripts. The x/y/z params are location relative to the chassis bone. - */ - export function addVehicleCrewEmblem(vehicle: Vehicle | number, ped: Player | number, boneIndex: number, x1: number, x2: number, x3: number, y1: number, y2: number, y3: number, z1: number, z2: number, z3: number, scale: number, p13: any, alpha: number): boolean; + export function unrequestTennisBanks(): void; - export function abortVehicleCrewEmblemRequest(p0: number): [boolean, number]; + export function setSkipMinigunSpinUpAudio(p0: boolean): void; - export function removeVehicleCrewEmblem(vehicle: Vehicle | number, p1: number): void; + export function stopCutsceneAudio(): void; - export function getVehicleCrewEmblemRequestState(vehicle: Vehicle | number, p1: number): number; + export function hasLoadedMpDataSet(): boolean; - export function doesVehicleHaveCrewEmblem(vehicle: Vehicle | number, p1: number): boolean; + export function hasLoadedSpDataSet(): boolean; - export function disableCompositeShotgunDecals(toggle: boolean): void; + export function getVehicleHornSoundIndex(vehicle: Vehicle | number): number; - export function disableScuffDecals(toggle: boolean): void; + export function setVehicleHornSoundIndex(vehicle: Vehicle | number, value: number): void; - export function setDecalBulletImpactRangeScale(p0: number): void; + /** + * BRAIN::ADD_SCRIPT_TO_RANDOM_PED("pb_prostitute", ${s_f_y_hooker_01}, 100, 0); + * - Nacorpio + * ----- + * Hardcoded to not work in Multiplayer. + */ + export function addScriptToRandomPed(name: string, model: number, p2: number, p3: number): void; - export function overrideInteriorSmokeName(name: string | null): void; + /** + * Registers a script for any object with a specific model hash. + * BRAIN::REGISTER_OBJECT_SCRIPT_BRAIN("ob_telescope", ${prop_telescope_01}, 100, 4.0, -1, 9); + * - Nacorpio + */ + export function registerObjectScriptBrain(scriptName: string, modelHash: number, p2: number, activationRange: number, p4: number, p5: number): void; - export function overrideInteriorSmokeLevel(level: number): void; + export function isObjectWithinBrainActivationRange(object: Object): boolean; - export function overrideInteriorSmokeEnd(): void; + export function registerWorldPointScriptBrain(scriptName: string, activationRange: number, p2: number): void; /** - * Used with 'NG_filmnoir_BW{01,02}' timecycles and the "NOIR_FILTER_SOUNDS" audioref. - */ - export function registerNoirLensEffect(): void; + * Gets whether the world point the calling script is registered to is within desired range of the player. + */ + export function isWorldPointWithinBrainActivationRange(): boolean; - export function disableVehicleDistantlights(toggle: boolean): void; + export function enableScriptBrainSet(brainSet: number): void; - export function renderShadowedLightsWithNoShadows(p0: boolean): void; + export function disableScriptBrainSet(brainSet: number): void; - export function requestEarlyLightCheck(): void; + export function reactivateAllWorldBrainsThatAreWaitingTillOutOfRange(): void; + + export function reactivateAllObjectBrainsThatAreWaitingTillOutOfRange(): void; /** - * Forces footstep tracks on all surfaces. - */ - export function useSnowFootVfxWhenUnsheltered(toggle: boolean): void; + * Possible values: + * act_cinema + * am_mp_carwash_launch + * am_mp_carwash_control + * am_mp_property_ext + * chop + * fairgroundHub + * launcher_BasejumpHeli + * launcher_BasejumpPack + * launcher_CarWash + * launcher_golf + * launcher_Hunting_Ambient + * launcher_MrsPhilips + * launcher_OffroadRacing + * launcher_pilotschool + * launcher_Racing + * launcher_rampage + * launcher_rampage + * launcher_range + * launcher_stunts + * launcher_stunts + * launcher_tennis + * launcher_Tonya + * launcher_Triathlon + * launcher_Yoga + * ob_mp_bed_low + * ob_mp_bed_med + */ + export function reactivateNamedWorldBrainsWaitingTillOutOfRange(scriptName: string): void; + + /** + * Looks like a cousin of above function _6D6840CEE8845831 as it was found among them. Must be similar + * Here are possible values of argument - + * "ob_tv" + * "launcher_Darts" + */ + export function reactivateNamedObjectBrainsWaitingTillOutOfRange(scriptName: string): void; + + /** + * ease - smooth transition between the camera's positions + * easeTime - Time in milliseconds for the transition to happen + * If you have created a script (rendering) camera, and want to go back to the + * character (gameplay) camera, call this native with render set to 0. + * Setting ease to 1 will smooth the transition. + */ + export function renderScriptCams(render: boolean, ease: boolean, easeTime: number, p3: boolean, p4: boolean, p5: any): void; /** - * Forces vehicle trails on all surfaces. - */ - export function useSnowWheelVfxWhenUnsheltered(toggle: boolean): void; - - export function disableRegionVfx(p0: any): void; + * This native makes the gameplay camera zoom into first person/third person with a special effect. + */ + export function stopRenderingScriptCamsUsingCatchUp(render: boolean, p1: number, p2: number, p3: any): void; /** - * Only one match in the scripts: - * GRAPHICS::PRESET_INTERIOR_AMBIENT_CACHE("int_carrier_hanger"); - */ - export function presetInteriorAmbientCache(timecycleModifierName: string | null): void; + * "DEFAULT_SCRIPTED_CAMERA" + * "DEFAULT_ANIMATED_CAMERA" + * "DEFAULT_SPLINE_CAMERA" + * "DEFAULT_SCRIPTED_FLY_CAMERA" + * "TIMED_SPLINE_CAMERA" + */ + export function createCam(camName: string, p1: boolean): number; /** - * Loads the specified timecycle modifier. Modifiers are defined separately in another file (e.g. "timecycle_mods_1.xml") - * Parameters: - * Full list of timecycle modifiers by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/timecycleModifiers.json - * @param modifierName - The modifier to load (e.g. "V_FIB_IT3", "scanline_cam", etc.) - */ - export function setTimecycleModifier(modifierName: string | null): void; + * camName is always set to "DEFAULT_SCRIPTED_CAMERA" in Rockstar's scripts. + * ------------ + * Camera names found in the b617d scripts: + * "DEFAULT_ANIMATED_CAMERA" + * "DEFAULT_SCRIPTED_CAMERA" + * "DEFAULT_SCRIPTED_FLY_CAMERA" + * "DEFAULT_SPLINE_CAMERA" + * ------------ + * Side Note: It seems p8 is basically to represent what would be the bool p1 within CREATE_CAM native. As well as the p9 since it's always 2 in scripts seems to represent what would be the last param within SET_CAM_ROT native which normally would be 2. + */ + export function createCamWithParams(camName: string, posX: number, posY: number, posZ: number, rotX: number, rotY: number, rotZ: number, fov: number, p8: boolean, p9: number): number; - export function setTimecycleModifierStrength(strength: number): void; + export function createCamera(camHash: number, p1: boolean): number; /** - * Full list of timecycle modifiers by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/timecycleModifiers.json - */ - export function setTransitionTimecycleModifier(modifierName: string | null, transition: number): void; + * p9 uses 2 by default + */ + export function createCameraWithParams(camHash: number, posX: number, posY: number, posZ: number, rotX: number, rotY: number, rotZ: number, fov: number, p8: boolean, p9: any): number; - export function setTransitionOutOfTimecycleModifier(strength: number): void; + /** + * BOOL param indicates whether the cam should be destroyed if it belongs to the calling script. + */ + export function destroyCam(cam: number, bScriptHostCam: boolean): void; - export function clearTimecycleModifier(): void; + /** + * BOOL param indicates whether the cam should be destroyed if it belongs to the calling script. + */ + export function destroyAllCams(bScriptHostCam: boolean): void; /** - * Only use for this in the PC scripts is: - * if (GRAPHICS::GET_TIMECYCLE_MODIFIER_INDEX() != -1) - */ - export function getTimecycleModifierIndex(): number; + * Returns whether or not the passed camera handle exists. + */ + export function doesCamExist(cam: number): boolean; - export function getTimecycleTransitionModifierIndex(): number; + /** + * Set camera as active/inactive. + */ + export function setCamActive(cam: number, active: boolean): void; - export function getIsTimecycleTransitioningOut(): boolean; + /** + * Returns whether or not the passed camera handle is active. + */ + export function isCamActive(cam: number): boolean; - export function pushTimecycleModifier(): void; + export function isCamRendering(cam: number): boolean; - export function popTimecycleModifier(): void; + export function getRenderingCam(): number; - export function setCurrentPlayerTcmodifier(modifierName: string | null): void; + export function getCamCoord(cam: number): Vector3; - export function setPlayerTcmodifierTransition(value: number): void; + /** + * The last parameter, as in other "ROT" methods, is usually 2. + */ + export function getCamRot(cam: number, rotationOrder: number): Vector3; - export function setNextPlayerTcmodifier(modifierName: string | null): void; + export function getCamFov(cam: number): number; - export function addTcmodifierOverride(modifierName1: string | null, modifierName2: string | null): void; + export function getCamNearClip(cam: number): number; - export function clearAllTcmodifierOverrides(p0: string | null): void; + export function getCamFarClip(cam: number): number; - /** - * Full list of timecycle modifiers by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/timecycleModifiers.json - */ - export function setExtraTcmodifier(modifierName: string | null): void; + export function getCamNearDof(cam: number): number; - /** - * Clears the secondary timecycle modifier usually set with _SET_EXTRA_TIMECYCLE_MODIFIER - */ - export function clearExtraTcmodifier(): void; + export function getCamFarDof(cam: number): number; - /** - * See GET_TIMECYCLE_MODIFIER_INDEX for use, works the same just for the secondary timecycle modifier. - * Returns an integer representing the Timecycle modifier - */ - export function getExtraTcmodifier(): number; + export function getCamDofStrength(cam: number): number; - /** - * The same as SET_TIMECYCLE_MODIFIER_STRENGTH but for the secondary timecycle modifier. - */ - export function enableMoonCycleOverride(strength: number): void; + export function setCamParams(cam: number, posX: number, posY: number, posZ: number, rotX: number, rotY: number, rotZ: number, fieldOfView: number, p8: any, p9: number, p10: number, p11: number): void; /** - * Resets the extra timecycle modifier strength normally set with 0x2C328AF17210F009 - */ - export function disableMoonCycleOverride(): void; - - export function requestScaleformMovie(scaleformName: string | null): number; + * Sets the position of the cam. + */ + export function setCamCoord(cam: number, posX: number, posY: number, posZ: number): void; /** - * Another REQUEST_SCALEFORM_MOVIE equivalent. - */ - export function requestScaleformMovieWithIgnoreSuperWidescreen(scaleformName: string | null): number; - - export function requestScaleformMovieInstance(scaleformName: string | null): number; + * Sets the rotation of the cam. + * Last parameter unknown. + * Last parameter seems to always be set to 2. + */ + export function setCamRot(cam: number, rotX: number, rotY: number, rotZ: number, rotationOrder: number): void; /** - * Similar to REQUEST_SCALEFORM_MOVIE, but seems to be some kind of "interactive" scaleform movie? - * These seem to be the only scaleforms ever requested by this native: - * "breaking_news" - * "desktop_pc" - * "ECG_MONITOR" - * "Hacking_PC" - * "TEETH_PULLING" - * Note: Unless this hash is out-of-order, this native is next-gen only. - */ - export function requestScaleformMovieSkipRenderWhilePaused(scaleformName: string | null): number; + * Sets the field of view of the cam. + * --------------------------------------------- + * Min: 1.0f + * Max: 130.0f + */ + export function setCamFov(cam: number, fieldOfView: number): void; - export function hasScaleformMovieLoaded(scaleformHandle: number): boolean; + export function setCamNearClip(cam: number, nearClip: number): void; - /** - * @param val is 1-20 (0 will return false) - * @returns val is 1-20 (0 will return false) - */ - export function isActiveScaleformMovieDeleting(val: number): boolean; + export function setCamFarClip(cam: number, farClip: number): void; - /** - * @param val is 1-20. Return is related to INSTRUCTIONAL_BUTTONS, COLOUR_SWITCHER_02, etc? - * @returns val is 1-20. Return is related to INSTRUCTIONAL_BUTTONS, COLOUR_SWITCHER_02, etc? - */ - export function isScaleformMovieDeleting(val: number): boolean; + export function forceCamFarClip(cam: number, p1: number): void; - /** - * Only values used in the scripts are: - * "heist_mp" - * "heistmap_mp" - * "instructional_buttons" - * "heist_pre" - */ - export function hasScaleformMovieFilenameLoaded(scaleformName: string | null): boolean; + export function setCamMotionBlurStrength(cam: number, strength: number): void; - export function hasScaleformContainerMovieLoadedIntoParent(scaleformHandle: number): boolean; + export function setCamNearDof(cam: number, nearDOF: number): void; - export function setScaleformMovieAsNoLongerNeeded(scaleformHandle: number): [void, number]; + export function setCamFarDof(cam: number, farDOF: number): void; - export function setScaleformMovieToUseSystemTime(scaleform: number, toggle: boolean): void; + export function setCamDofStrength(cam: number, dofStrength: number): void; - export function setScaleformMovieToUseLargeRt(scaleformHandle: number, toggle: boolean): void; + export function setCamDofPlanes(cam: number, p1: number, p2: number, p3: number, p4: number): void; - /** - * This native is used in some casino scripts to fit the scaleform in the rendertarget. - */ - export function setScaleformMovieToUseSuperLargeRt(scaleformHandle: number, toggle: boolean): void; + export function setCamUseShallowDofMode(cam: number, toggle: boolean): void; - export function drawScaleformMovie(scaleformHandle: number, x: number, y: number, width: number, height: number, red: number, green: number, blue: number, alpha: number, p9: number): void; + export function setUseHiDof(): void; /** - * unk is not used so no need - */ - export function drawScaleformMovieFullscreen(scaleform: number, red: number, green: number, blue: number, alpha: number, p5: number): void; - - export function drawScaleformMovieFullscreenMasked(scaleform1: number, scaleform2: number, red: number, green: number, blue: number, alpha: number): void; + * Only used in R* Script fm_mission_controller_2020 + */ + export function setUseHiDofOnSyncedSceneThisUpdate(): void; - export function drawScaleformMovie3d(scaleform: number, posX: number, posY: number, posZ: number, rotX: number, rotY: number, rotZ: number, p7: number, p8: number, p9: number, scaleX: number, scaleY: number, scaleZ: number, rotationOrder: number): void; + export function setCamDofOverriddenFocusDistance(camera: number, p1: number): void; - export function drawScaleformMovie3dSolid(scaleform: number, posX: number, posY: number, posZ: number, rotX: number, rotY: number, rotZ: number, p7: number, p8: number, p9: number, scaleX: number, scaleY: number, scaleZ: number, rotationOrder: number): void; + export function setCamDofOverriddenFocusDistanceBlendLevel(p0: any, p1: number): void; /** - * Calls the Scaleform function. - */ - export function callScaleformMovieMethod(scaleform: number, method: string | null): void; + * This native has its name defined inside its codE + */ + export function setCamDofFnumberOfLens(camera: number, p1: number): void; /** - * Calls the Scaleform function and passes the parameters as floats. - * The number of parameters passed to the function varies, so the end of the parameter list is represented by -1.0. - */ - export function callScaleformMovieMethodWithNumber(scaleform: number, methodName: string | null, param1: number, param2: number, param3: number, param4: number, param5: number): void; + * Native name labeled within its code + */ + export function setCamDofFocalLengthMultiplier(camera: number, multiplier: number): void; /** - * Calls the Scaleform function and passes the parameters as strings. - * The number of parameters passed to the function varies, so the end of the parameter list is represented by 0 (NULL). - */ - export function callScaleformMovieMethodWithString(scaleform: number, methodName: string | null, param1: string | null, param2: string | null, param3: string | null, param4: string | null, param5: string | null): void; + * This native has a name defined inside its code + */ + export function setCamDofFocusDistanceBias(camera: number, p1: number): void; /** - * Calls the Scaleform function and passes both float and string parameters (in their respective order). - * The number of parameters passed to the function varies, so the end of the float parameters is represented by -1.0, and the end of the string parameters is represented by 0 (NULL). - * NOTE: The order of parameters in the function prototype is important! All float parameters must come first, followed by the string parameters. - * Examples: - * // function MY_FUNCTION(floatParam1, floatParam2, stringParam) - * // function MY_FUNCTION_2(floatParam, stringParam1, stringParam2) - * GRAPHICS::CALL_SCALEFORM_MOVIE_METHOD_WITH_NUMBER_AND_STRING(scaleform, "MY_FUNCTION_2", 10.0, -1.0, -1.0, -1.0, -1.0, "String param #1", "String param #2", 0, 0, 0); - */ - export function callScaleformMovieMethodWithNumberAndString(scaleform: number, methodName: string | null, floatParam1: number, floatParam2: number, floatParam3: number, floatParam4: number, floatParam5: number, stringParam1: string | null, stringParam2: string | null, stringParam3: string | null, stringParam4: string | null, stringParam5: string | null): void; + * This native has a name defined inside its code + */ + export function setCamDofMaxNearInFocusDistance(camera: number, p1: number): void; /** - * Pushes a function from the Hud component Scaleform onto the stack. Same behavior as GRAPHICS::BEGIN_SCALEFORM_MOVIE_METHOD, just a hud component id instead of a Scaleform. - * Known components: - * 19 - MP_RANK_BAR - * 20 - HUD_DIRECTOR_MODE - * This native requires more research - all information can be found inside of 'hud.gfx'. Using a decompiler, the different components are located under "scripts\__Packages\com\rockstargames\gtav\hud\hudComponents" and "scripts\__Packages\com\rockstargames\gtav\Multiplayer". - */ - export function beginScaleformScriptHudMovieMethod(hudComponent: number, methodName: string | null): boolean; + * This native has a name defined inside its code + */ + export function setCamDofMaxNearInFocusDistanceBlendLevel(camera: number, p1: number): void; /** - * Push a function from the Scaleform onto the stack - */ - export function beginScaleformMovieMethod(scaleform: number, methodName: string | null): boolean; + * This native has a name defined inside its code + */ + export function setCamDofShouldKeepLookAtTargetInFocus(camera: number, state: boolean): void; /** - * Starts frontend (pause menu) scaleform movie methods. - * This can be used when you want to make custom frontend menus, and customize things like images or text in the menus etc. - * Use `BEGIN_SCALEFORM_MOVIE_METHOD_ON_FRONTEND_HEADER` for header scaleform functions. - */ - export function beginScaleformMovieMethodOnFrontend(methodName: string | null): boolean; + * Last param determines if its relative to the Entity + */ + export function attachCamToEntity(cam: number, entity: Entity | number, xOffset: number, yOffset: number, zOffset: number, isRelative: boolean): void; + + export function attachCamToPedBone(cam: number, ped: Ped | Player | number, boneIndex: number, x: number, y: number, z: number, heading: boolean): void; + + export function hardAttachCamToPedBone(cam: number, ped: Ped | Player | number, boneIndex: number, p3: number, p4: number, p5: number, p6: number, p7: number, p8: number, p9: boolean): void; /** - * Starts frontend (pause menu) scaleform movie methods for header options. - * Use `BEGIN_SCALEFORM_MOVIE_METHOD_ON_FRONTEND` to customize the content inside the frontend menus. - */ - export function beginScaleformMovieMethodOnFrontendHeader(methodName: string | null): boolean; + * Example from am_mp_drone script: + * CAM::HARD_ATTACH_CAM_TO_ENTITY(Local_190.f_169, NETWORK::NET_TO_OBJ(Local_190.f_159), 0f, 0f, 180f, Var0, 1); + */ + export function hardAttachCamToEntity(cam: number, entity: Entity | number, xRot: number, yRot: number, zRot: number, xOffset: number, yOffset: number, zOffset: number, isRelative: boolean): void; /** - * Pops and calls the Scaleform function on the stack - */ - export function endScaleformMovieMethod(): void; + * This native works with vehicles only. Bone indexes are usually given by this native GET_ENTITY_BONE_INDEX_BY_NAME. + */ + export function attachCamToVehicleBone(cam: number, vehicle: Vehicle | number, boneIndex: number, relativeRotation: boolean, rotX: number, rotY: number, rotZ: number, offsetX: number, offsetY: number, offsetZ: number, fixedDirection: boolean): void; - export function endScaleformMovieMethodReturnValue(): number; + export function detachCam(cam: number): void; /** - * Returns true if the return value of a scaleform function is ready to be collected (using GET_SCALEFORM_MOVIE_METHOD_RETURN_VALUE_STRING or GET_SCALEFORM_MOVIE_METHOD_RETURN_VALUE_INT). - * @param methodReturn The return value of this native: END_SCALEFORM_MOVIE_METHOD_RETURN_VALUE - * @returns methodReturn: The return value of this native: END_SCALEFORM_MOVIE_METHOD_RETURN_VALUE - */ - export function isScaleformMovieMethodReturnValueReady(methodReturn: number): boolean; + * The native seems to only be called once. + * The native is used as so, + * CAM::SET_CAM_INHERIT_ROLL_VEHICLE(l_544, getElem(2, &l_525, 4)); + * In the exile1 script. + */ + export function setCamInheritRollVehicle(cam: number, p1: boolean): void; - /** - * Used to get a return value from a scaleform function. Returns an int in the same way GET_SCALEFORM_MOVIE_METHOD_RETURN_VALUE_STRING returns a string. - * @param methodReturn The return value of this native: END_SCALEFORM_MOVIE_METHOD_RETURN_VALUE - * @returns methodReturn: The return value of this native: END_SCALEFORM_MOVIE_METHOD_RETURN_VALUE - */ - export function getScaleformMovieMethodReturnValueInt(methodReturn: number): number; + export function pointCamAtCoord(cam: number, x: number, y: number, z: number): void; /** - * @param methodReturn The return value of this native: END_SCALEFORM_MOVIE_METHOD_RETURN_VALUE - * @returns methodReturn: The return value of this native: END_SCALEFORM_MOVIE_METHOD_RETURN_VALUE - */ - export function getScaleformMovieMethodReturnValueBool(methodReturn: number): boolean; + * p5 always seems to be 1 i.e TRUE + */ + export function pointCamAtEntity(cam: number, entity: Entity | number, p2: number, p3: number, p4: number, p5: boolean): void; /** - * Used to get a return value from a scaleform function. Returns a string in the same way GET_SCALEFORM_MOVIE_METHOD_RETURN_VALUE_INT returns an int. - * @param methodReturn The return value of this native: END_SCALEFORM_MOVIE_METHOD_RETURN_VALUE - * @returns methodReturn: The return value of this native: END_SCALEFORM_MOVIE_METHOD_RETURN_VALUE - */ - export function getScaleformMovieMethodReturnValueString(methodReturn: number): string; + * Parameters p0-p5 seems correct. The bool p6 is unknown, but through every X360 script it's always 1. Please correct p0-p5 if any prove to be wrong. + */ + export function pointCamAtPedBone(cam: number, ped: Ped | Player | number, boneIndex: number, x: number, y: number, z: number, p6: boolean): void; - /** - * Pushes an integer for the Scaleform function onto the stack. - */ - export function scaleformMovieMethodAddParamInt(value: number): void; + export function stopCamPointing(cam: number): void; /** - * Pushes a float for the Scaleform function onto the stack. - */ - export function scaleformMovieMethodAddParamFloat(value: number): void; + * Allows you to aim and shoot at the direction the camera is facing. + */ + export function setCamAffectsAiming(cam: number, toggle: boolean): void; /** - * Pushes a boolean for the Scaleform function onto the stack. - */ - export function scaleformMovieMethodAddParamBool(value: boolean): void; + * Rotates the radar to match the camera's Z rotation + */ + export function setCamControlsMiniMapHeading(cam: number, toggle: boolean): void; /** - * Called prior to adding a text component to the UI. After doing so, GRAPHICS::END_TEXT_COMMAND_SCALEFORM_STRING is called. - * Examples: - * GRAPHICS::BEGIN_TEXT_COMMAND_SCALEFORM_STRING("NUMBER"); - * HUD::ADD_TEXT_COMPONENT_INTEGER(MISC::ABSI(a_1)); - * GRAPHICS::END_TEXT_COMMAND_SCALEFORM_STRING(); - * GRAPHICS::BEGIN_TEXT_COMMAND_SCALEFORM_STRING("STRING"); - * HUD::ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(a_2); - * GRAPHICS::END_TEXT_COMMAND_SCALEFORM_STRING(); - * GRAPHICS::BEGIN_TEXT_COMMAND_SCALEFORM_STRING("STRTNM2"); - * See NativeDB for reference: http://natives.altv.mp/#/0x80338406F3475E55 - */ - export function beginTextCommandScaleformString(componentType: string | null): void; + * When set to true shadows appear more smooth but less detailed. + * Set to false by default. + */ + export function setCamIsInsideVehicle(cam: number, toggle: boolean): void; - export function endTextCommandScaleformString(): void; + export function allowMotionBlurDecay(p0: any, p1: boolean): void; /** - * Same as END_TEXT_COMMAND_SCALEFORM_STRING but does not perform HTML conversion for text tokens. - * END_TEXT_COMMAND_VIA_SPECIAL_MODIFIABLE_STRING? - */ - export function endTextCommandUnparsedScaleformString(): void; + * NOTE: Debugging functions are not present in the retail version of the game. + */ + export function setCamDebugName(camera: number, name: string): void; - /** - * Same as SCALEFORM_MOVIE_METHOD_ADD_PARAM_TEXTURE_NAME_STRING - * Both SCALEFORM_MOVIE_METHOD_ADD_PARAM_TEXTURE_NAME_STRING / _SCALEFORM_MOVIE_METHOD_ADD_PARAM_TEXTURE_NAME_STRING_2 works, but _SCALEFORM_MOVIE_METHOD_ADD_PARAM_TEXTURE_NAME_STRING_2 is usually used for "name" (organisation, players..). - */ - export function scaleformMovieMethodAddParamLiteralString(string: string | null): void; + export function getDebugCam(): number; - export function scaleformMovieMethodAddParamTextureNameString(string: string | null): void; + /** + * I filled p1-p6 (the floats) as they are as other natives with 6 floats in a row are similar and I see no other method. So if a test from anyone proves them wrong please correct. + * p7 (length) determines the length of the spline, affects camera path and duration of transition between previous node and this one + * p8 big values ~100 will slow down the camera movement before reaching this node + * p9 != 0 seems to override the rotation/pitch (bool?) + */ + export function addCamSplineNode(camera: number, x: number, y: number, z: number, xRot: number, yRot: number, zRot: number, length: number, smoothingStyle: number, rotationOrder: number): void; - export function scaleformMovieMethodAddParamPlayerNameString(string: string | null): void; + /** + * p0 is the spline camera to which the node is being added. + * p1 is the camera used to create the node. + * p3 is always 3 in scripts. It might be smoothing style or rotation order. + */ + export function addCamSplineNodeUsingCameraFrame(cam: number, cam2: number, length: number, p3: number): void; - export function doesLatestBriefStringExist(p0: number): boolean; + /** + * p0 is the spline camera to which the node is being added. + * p1 is the camera used to create the node. + * p3 is always 3 in scripts. It might be smoothing style or rotation order. + */ + export function addCamSplineNodeUsingCamera(cam: number, cam2: number, length: number, p3: number): void; - export function scaleformMovieMethodAddParamLatestBriefString(value: number): void; + /** + * p2 is always 2 in scripts. It might be smoothing style or rotation order. + */ + export function addCamSplineNodeUsingGameplayFrame(cam: number, length: number, p2: number): void; - export function requestScaleformScriptHudMovie(hudComponent: number): void; + export function setCamSplinePhase(cam: number, p1: number): void; - export function hasScaleformScriptHudMovieLoaded(hudComponent: number): boolean; + /** + * Can use this with SET_CAM_SPLINE_PHASE to set the float it this native returns. + * (returns 1.0f when no nodes has been added, reached end of non existing spline) + */ + export function getCamSplinePhase(cam: number): number; - export function removeScaleformScriptHudMovie(hudComponent: number): void; + /** + * I'm pretty sure the parameter is the camera as usual, but I am not certain so I'm going to leave it as is. + */ + export function getCamSplineNodePhase(cam: number): number; - export function passKeyboardInputToScaleform(scaleformHandle: number): boolean; + /** + * I named p1 as timeDuration as it is obvious. I'm assuming tho it is ran in ms(Milliseconds) as usual. + */ + export function setCamSplineDuration(cam: number, timeDuration: number): void; - export function setTvChannel(channel: number): void; + export function setCamSplineSmoothingStyle(cam: number, smoothingStyle: number): void; - export function getTvChannel(): number; + export function getCamSplineNodeIndex(cam: number): number; - export function setTvVolume(volume: number): void; + export function setCamSplineNodeEase(cam: number, easingFunction: number, p2: number, p3: number): void; - export function getTvVolume(): number; + export function setCamSplineNodeVelocityScale(cam: number, p1: number, scale: number): void; - /** - * All calls to this native are preceded by calls to GRAPHICS::SET_SCRIPT_GFX_DRAW_ORDER and GRAPHICS::SET_SCRIPT_GFX_DRAW_BEHIND_PAUSEMENU, respectively. - * "act_cinema.ysc", line 1483: - * HUD::SET_HUD_COMPONENT_POSITION(15, 0.0, -0.0375); - * HUD::SET_TEXT_RENDER_ID(l_AE); - * GRAPHICS::SET_SCRIPT_GFX_DRAW_ORDER(4); - * GRAPHICS::SET_SCRIPT_GFX_DRAW_BEHIND_PAUSEMENU(1); - * if (GRAPHICS::IS_TVSHOW_CURRENTLY_PLAYING(${movie_arthouse})) { - * GRAPHICS::DRAW_TV_CHANNEL(0.5, 0.5, 0.7375, 1.0, 0.0, 255, 255, 255, 255); - * } else { - * See NativeDB for reference: http://natives.altv.mp/#/0xFDDC2B4ED3C69DF0 - */ - export function drawTvChannel(xPos: number, yPos: number, xScale: number, yScale: number, rotation: number, red: number, green: number, blue: number, alpha: number): void; + export function overrideCamSplineVelocity(cam: number, p1: number, p2: number, p3: number): void; /** - * Loads specified video sequence into the TV Channel - * TV_Channel ranges from 0-2 - * VideoSequence can be any of the following: - * "PL_STD_CNT" CNT Standard Channel - * "PL_STD_WZL" Weazel Standard Channel - * "PL_LO_CNT" - * "PL_LO_WZL" - * "PL_SP_WORKOUT" - * "PL_SP_INV" - Jay Norris Assassination Mission Fail - * See NativeDB for reference: http://natives.altv.mp/#/0xF7B38B8305F1FE8B - */ - export function setTvChannelPlaylist(tvChannel: number, playlistName: string | null, restart: boolean): void; - - export function setTvChannelPlaylistAtHour(tvChannel: number, playlistName: string | null, hour: number): void; + * Max value for p1 is 15. + */ + export function overrideCamSplineMotionBlur(cam: number, p1: number, p2: number, p3: number): void; - export function clearTvChannelPlaylist(tvChannel: number): void; + export function setCamSplineNodeExtraFlags(cam: number, p1: number, flags: number): void; - export function isPlaylistOnChannel(tvChannel: number, p1: any): boolean; + export function isCamSplinePaused(cam: number): boolean; - export function isTvshowCurrentlyPlaying(videoCliphash: number): boolean; + /** + * Previous declaration void SET_CAM_ACTIVE_WITH_INTERP(Cam camTo, Cam camFrom, int duration, BOOL easeLocation, BOOL easeRotation) is completely wrong. The last two params are integers not BOOLs... + */ + export function setCamActiveWithInterp(camTo: number, camFrom: number, duration: number, easeLocation: number, easeRotation: number): void; - export function enableMovieKeyframeWait(toggle: boolean): void; + export function isCamInterpolating(cam: number): boolean; - export function setTvPlayerWatchingThisFrame(p0: any): void; + /** + * Possible shake types (updated b617d): + * DEATH_FAIL_IN_EFFECT_SHAKE + * DRUNK_SHAKE + * FAMILY5_DRUG_TRIP_SHAKE + * HAND_SHAKE + * JOLT_SHAKE + * LARGE_EXPLOSION_SHAKE + * MEDIUM_EXPLOSION_SHAKE + * SMALL_EXPLOSION_SHAKE + * ROAD_VIBRATION_SHAKE + * SKY_DIVING_SHAKE + * VIBRATE_SHAKE + * Full list of cam shake types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/camShakeTypesCompact.json + */ + export function shakeCam(cam: number, type: string, amplitude: number): void; + + /** + * Example from michael2 script. + * CAM::ANIMATED_SHAKE_CAM(l_5069, "shake_cam_all@", "light", "", 1f); + */ + export function animatedShakeCam(cam: number, p1: string, p2: string, p3: string, amplitude: number): void; - export function getCurrentTvClipNamehash(): number; + export function isCamShaking(cam: number): boolean; - export function enableMovieSubtitles(toggle: boolean): void; + export function setCamShakeAmplitude(cam: number, amplitude: number): void; - export function ui3dsceneIsAvailable(): boolean; + export function stopCamShaking(cam: number, p1: boolean): void; /** - * All presets can be found in common\data\ui\uiscenes.meta - */ - export function ui3dscenePushPreset(presetName: string | null): boolean; + * CAM::SHAKE_SCRIPT_GLOBAL("HAND_SHAKE", 0.2); + * Full list of cam shake types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/camShakeTypesCompact.json + */ + export function shakeScriptGlobal(p0: string, p1: number): void; /** - * It's called after UI3DSCENE_IS_AVAILABLE and UI3DSCENE_PUSH_PRESET - * All presets can be found in common\data\ui\uiscenes.meta - * @param presetName was always "CELEBRATION_WINNER" - */ - export function ui3dsceneAssignPedToSlot(presetName: string | null, ped: Player | number, slot: number, posX: number, posY: number, posZ: number): boolean; - - export function ui3dsceneClearPatchedData(): void; - - export function ui3dsceneMakePushedPresetPersistent(toggle: boolean): void; + * CAM::ANIMATED_SHAKE_SCRIPT_GLOBAL("SHAKE_CAM_medium", "medium", "", 0.5f); + * Full list of cam shake types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/camShakeTypesCompact.json + */ + export function animatedShakeScriptGlobal(p0: string, p1: string, p2: string, p3: number): void; /** - * This native enables/disables the gold putting grid display (https://i.imgur.com/TC6cku6.png). - * This requires these two natives to be called as well to configure the grid: `TERRAINGRID_SET_PARAMS` and `TERRAINGRID_SET_COLOURS`. - */ - export function terraingridActivate(toggle: boolean): void; + * In drunk_controller.c4, sub_309 + * if (CAM::IS_SCRIPT_GLOBAL_SHAKING()) { + * CAM::STOP_SCRIPT_GLOBAL_SHAKING(0); + * } + */ + export function isScriptGlobalShaking(): boolean; /** - * This native is used along with these two natives: `TERRAINGRID_ACTIVATE` and `TERRAINGRID_SET_COLOURS`. - * This native configures the location, size, rotation, normal height, and the difference ratio between min, normal and max. - * All those natives combined they will output something like this: https://i.imgur.com/TC6cku6.png - * This native renders a box at the given position, with a special shader that renders a grid on world geometry behind it. This box does not have backface culling. - * The forward args here are a direction vector, something similar to what's returned by GET_ENTITY_FORWARD_VECTOR. - * Example with box superimposed on the image to demonstrate: https://i.imgur.com/wdqskxd.jpg - * @param normalHeight and heightDiff are used for positioning the color gradient of the grid, colors specified via TERRAINGRID_SET_COLOURS. - */ - export function terraingridSetParams(x: number, y: number, z: number, forwardX: number, forwardY: number, forwardZ: number, sizeX: number, sizeY: number, sizeZ: number, gridScale: number, glowIntensity: number, normalHeight: number, heightDiff: number): void; + * In drunk_controller.c4, sub_309 + * if (CAM::IS_SCRIPT_GLOBAL_SHAKING()) { + * CAM::STOP_SCRIPT_GLOBAL_SHAKING(0); + * } + */ + export function stopScriptGlobalShaking(p0: boolean): void; /** - * This native is used along with these two natives: `TERRAINGRID_ACTIVATE` and `TERRAINGRID_SET_PARAMS`. - * This native sets the colors for the golf putting grid. the 'min...' values are for the lower areas that the grid covers, the 'max...' values are for the higher areas that the grid covers, all remaining values are for the 'normal' ground height. - * All those natives combined they will output something like this: https://i.imgur.com/TC6cku6.png - */ - export function terraingridSetColours(lowR: number, lowG: number, lowB: number, lowAlpha: number, r: number, g: number, b: number, alpha: number, highR: number, highG: number, highB: number, highAlpha: number): void; + * p1: 0..16 + */ + export function triggerVehiclePartBrokenCameraShake(vehicle: Vehicle | number, p1: number, p2: number): void; /** - * if loop is true, the effect won't stop until you call ANIMPOSTFX_STOP on it. (only loopable effects) - * Full list of animpostFX / screen effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animPostFxNamesCompact.json - * @param duration - is how long to play the effect for in milliseconds. If 0, it plays the default length - */ - export function animpostfxPlay(effectName: string | null, duration: number, looped: boolean): void; + * Atleast one time in a script for the zRot Rockstar uses GET_ENTITY_HEADING to help fill the parameter. + * p9 is unknown at this time. + * p10 throughout all the X360 Scripts is always 2. + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function playCamAnim(cam: number, animName: string, animDictionary: string, x: number, y: number, z: number, xRot: number, yRot: number, zRot: number, p9: boolean, p10: number): boolean; - /** - * See ANIMPOSTFX_PLAY - * Full list of animpostFX / screen effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animPostFxNamesCompact.json - */ - export function animpostfxStop(effectName: string | null): void; + export function isCamPlayingAnim(cam: number, animName: string, animDictionary: string): boolean; - /** - * See ANIMPOSTFX_PLAY - * Full list of animpostFX / screen effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animPostFxNamesCompact.json - */ - export function animpostfxGetCurrentTime(effectName: string | null): number; + export function setCamAnimCurrentPhase(cam: number, phase: number): void; - /** - * Returns whether the specified effect is active. - * See ANIMPOSTFX_PLAY - * Full list of animpostFX / screen effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animPostFxNamesCompact.json - */ - export function animpostfxIsRunning(effectName: string | null): boolean; + export function getCamAnimCurrentPhase(cam: number): number; /** - * Stops ALL currently playing effects. - */ - export function animpostfxStopAll(): void; + * Examples: + * CAM::PLAY_SYNCHRONIZED_CAM_ANIM(l_2734, NETWORK::NETWORK_GET_LOCAL_SCENE_FROM_NETWORK_ID(l_2739), "PLAYER_EXIT_L_CAM", "mp_doorbell"); + * CAM::PLAY_SYNCHRONIZED_CAM_ANIM(l_F0D[7/*1*\/], l_F4D[15/*1*\/], "ah3b_attackheli_cam2", "missheistfbi3b_helicrash"); + */ + export function playSynchronizedCamAnim(p0: any, p1: any, animName: string, animDictionary: string): boolean; - /** - * Stops the effect and sets a value (bool) in its data (+0x199) to false. - * See ANIMPOSTFX_PLAY - * Full list of animpostFX / screen effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animPostFxNamesCompact.json - */ - export function animpostfxStopAndFlushRequests(effectName: string | null): void; + export function setFlyCamHorizontalResponse(cam: number, p1: number, p2: number, p3: number): void; - /** - * All found occurrences in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/RFb4GTny - * AUDIO::PLAY_PED_RINGTONE("Remote_Ring", PLAYER::PLAYER_PED_ID(), 1); - * AUDIO::PLAY_PED_RINGTONE("Dial_and_Remote_Ring", PLAYER::PLAYER_PED_ID(), 1); - */ - export function playPedRingtone(ringtoneName: string | null, ped: Player | number, p2: boolean): void; + export function setFlyCamVerticalResponse(cam: number, p1: number, p2: number, p3: number): void; - export function isPedRingtonePlaying(ped: Player | number): boolean; + export function setFlyCamMaxHeight(cam: number, height: number): void; - export function stopPedRingtone(ped: Player | number): void; + export function setFlyCamCoordAndConstrain(cam: number, x: number, y: number, z: number): void; - export function isMobilePhoneCallOngoing(): boolean; + export function setFlyCamVerticalControlsThisUpdate(cam: number): void; - export function isMobileInterferenceActive(): boolean; + export function wasFlyCamConstrainedOnPreviousUdpate(cam: number): boolean; - export function createNewScriptedConversation(): void; + export function isScreenFadedOut(): boolean; - /** - * NOTE: ones that are -1, 0 - 35 are determined by a function where it gets a TextLabel from a global then runs, - * @param index is -1, 0 - 35 - * @param p1 is a char or string (whatever you wanna call it) - * @param p2 is Global 10597 + i * 6. 'i' is a while(i < 70) loop - * @param p3 is again -1, 0 - 35 - * @param p4 is again -1, 0 - 35 - * @param p5 is either 0 or 1 (bool ?) - * @param p6 is either 0 or 1 (The func to determine this is bool) - * @param p7 is either 0 or 1 (The func to determine this is bool) - * @param p8 is either 0 or 1 (The func to determine this is bool) - * @param p9 is 0 - 3 (Determined by func_60 in dialogue_handler.c) - * @param p10 is either 0 or 1 (The func to determine this is bool) - * @param p11 is either 0 or 1 (The func to determine this is bool) - * @param p12 is unknown as in TU27 X360 scripts it only goes to p11. - * @returns GET_CHARACTER_FROM_AUDIO_CONVERSATION_FILENAME and depending on what the result is it goes in check order of 0 - 9 then A - Z then z (lowercase). So it will then return 0 - 35 or -1 if it's 'z'. The func to handle that ^^ is func_67 in dialog_handler.c atleast in TU27 Xbox360 scripts. - */ - export function addLineToConversation(index: number, p1: string | null, p2: string | null, p3: number, p4: number, p5: boolean, p6: boolean, p7: boolean, p8: boolean, p9: number, p10: boolean, p11: boolean, p12: boolean): void; - - /** - * 4 calls in the b617d scripts. The only one with p0 and p2 in clear text: - * AUDIO::ADD_PED_TO_CONVERSATION(5, l_AF, "DINAPOLI"); - * ================================================= - * One of the 2 calls in dialogue_handler.c p0 is in a while-loop, and so is determined to also possibly be 0 - 15. - */ - export function addPedToConversation(index: number, ped: Player | number, p2: string | null): void; + export function isScreenFadedIn(): boolean; - export function setPositionForNullConvPed(p0: any, p1: number, p2: number, p3: number): void; + export function isScreenFadingOut(): boolean; - export function setEntityForNullConvPed(p0: number, entity: Entity | number): void; + export function isScreenFadingIn(): boolean; /** - * This native controls where the game plays audio from. By default the microphone is positioned on the player. - * When p0 is true the game will play audio from the 3 positions inputted. - * It is recommended to set all 3 positions to the same value as mixing different positions doesn't seem to work well. - * The scripts mostly use it with only one position such as in fbi3.c: - * AUDIO::SET_MICROPHONE_POSITION(true, ENTITY::GET_ENTITY_COORDS(iLocal_3091, true), ENTITY::GET_ENTITY_COORDS(iLocal_3091, true), ENTITY::GET_ENTITY_COORDS(iLocal_3091, true)); - */ - export function setMicrophonePosition(toggle: boolean, x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, x3: number, y3: number, z3: number): void; - - export function setConversationAudioControlledByAnim(p0: boolean): void; + * Fades the screen in. + * duration: The time the fade should take, in milliseconds. + */ + export function doScreenFadeIn(duration: number): void; - export function setConversationAudioPlaceholder(p0: boolean): void; + /** + * Fades the screen out. + * duration: The time the fade should take, in milliseconds. + */ + export function doScreenFadeOut(duration: number): void; - export function startScriptPhoneConversation(p0: boolean, p1: boolean): void; + export function setWidescreenBorders(p0: boolean, p1: number): void; - export function preloadScriptPhoneConversation(p0: boolean, p1: boolean): void; + export function areWidescreenBordersActive(): boolean; - export function startScriptConversation(p0: boolean, p1: boolean, p2: boolean, p3: boolean): void; + export function getGameplayCamCoord(): Vector3; - export function preloadScriptConversation(p0: boolean, p1: boolean, p2: boolean, p3: boolean): void; + /** + * p0 dosen't seem to change much, I tried it with 0, 1, 2: + * 0-Pitch(X): -70.000092 + * 0-Roll(Y): -0.000001 + * 0-Yaw(Z): -43.886459 + * 1-Pitch(X): -70.000092 + * 1-Roll(Y): -0.000001 + * 1-Yaw(Z): -43.886463 + * 2-Pitch(X): -70.000092 + * 2-Roll(Y): -0.000002 + * 2-Yaw(Z): -43.886467 + */ + export function getGameplayCamRot(rotationOrder: number): Vector3; - export function startPreloadedConversation(): void; + export function getGameplayCamFov(): number; - export function getIsPreloadedConversationReady(): boolean; + /** + * some camera effect that is used in the drunk-cheat, and turned off (by setting it to 0.0) along with the shaking effects once the drunk cheat is disabled. + */ + export function setGameplayCamMotionBlurScalingThisUpdate(p0: number): void; - export function isScriptedConversationOngoing(): boolean; + /** + * some camera effect that is (also) used in the drunk-cheat, and turned off (by setting it to 0.0) along with the shaking effects once the drunk cheat is disabled. + */ + export function setGameplayCamMaxMotionBlurStrengthThisUpdate(p0: number): void; - export function isScriptedConversationLoaded(): boolean; + export function getGameplayCamRelativeHeading(): number; - export function getCurrentScriptedConversationLine(): number; + /** + * Sets the camera position relative to heading in float from -360 to +360. + * Heading is alwyas 0 in aiming camera. + */ + export function setGameplayCamRelativeHeading(heading: number): void; - export function pauseScriptedConversation(p0: boolean): void; + export function getGameplayCamRelativePitch(): number; - export function restartScriptedConversation(): void; + /** + * This native sets the camera's pitch (rotation on the x-axis). + */ + export function setGameplayCamRelativePitch(angle: number, scalingFactor: number): void; - export function stopScriptedConversation(p0: boolean): number; + export function resetGameplayCamFullAttachParentTransformTimer(): void; - export function skipToNextScriptedConversationLine(): void; + export function forceCameraRelativeHeadingAndPitch(roll: number, pitch: number, yaw: number): void; - /** - * Example from carsteal3.c: AUDIO::INTERRUPT_CONVERSATION(PLAYER::PLAYER_PED_ID(), "CST4_CFAA", "FRANKLIN"); - * Voicelines can be found in GTAV\x64\audio\sfx in files starting with "SS_" which seems to mean scripted speech. - */ - export function interruptConversation(ped: Player | number, voiceline: string | null, speaker: string | null): void; + export function forceBonnetCameraRelativeHeadingAndPitch(p0: number, p1: number): void; /** - * One call found in the b617d scripts: - * AUDIO::INTERRUPT_CONVERSATION_AND_PAUSE(NETWORK::NET_TO_PED(l_3989._f26F[01]), "CONV_INTERRUPT_QUIT_IT", "LESTER"); - */ - export function interruptConversationAndPause(ped: Player | number, p1: string | null, speaker: string | null): void; + * Does nothing + */ + export function setFirstPersonShooterCameraHeading(yaw: number): void; - export function getVariationChosenForScriptedLine(p0: any): [number, any]; + export function setFirstPersonShooterCameraPitch(pitch: number): void; - export function setNoDuckingForConversation(p0: boolean): void; + export function setScriptedCameraIsFirstPersonThisFrame(p0: boolean): void; /** - * This native does absolutely nothing, just a nullsub - */ - export function registerScriptWithAudio(p0: number): void; + * Possible shake types (updated b617d): + * DEATH_FAIL_IN_EFFECT_SHAKE + * DRUNK_SHAKE + * FAMILY5_DRUG_TRIP_SHAKE + * HAND_SHAKE + * JOLT_SHAKE + * LARGE_EXPLOSION_SHAKE + * MEDIUM_EXPLOSION_SHAKE + * SMALL_EXPLOSION_SHAKE + * ROAD_VIBRATION_SHAKE + * SKY_DIVING_SHAKE + * VIBRATE_SHAKE + * Full list of cam shake types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/camShakeTypesCompact.json + */ + export function shakeGameplayCam(shakeName: string, intensity: number): void; - /** - * This native does absolutely nothing, just a nullsub - */ - export function unregisterScriptWithAudio(): void; + export function isGameplayCamShaking(): boolean; /** - * All occurrences and usages found in b617d: https://pastebin.com/NzZZ2Tmm - * Full list of mission audio bank names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/missionAudioBankNames.json - * @param p2 is always -1 - */ - export function requestMissionAudioBank(audioBank: string | null, p1: boolean, p2: any): boolean; + * Sets the amplitude for the gameplay (i.e. 3rd or 1st) camera to shake. Used in script "drunk_controller.ysc.c4" to simulate making the player drunk. + */ + export function setGameplayCamShakeAmplitude(amplitude: number): void; - /** - * All occurrences and usages found in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/XZ1tmGEz - * Full list of ambient audio bank names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ambientAudioBankNames.json - * @param p2 is always -1 - */ - export function requestAmbientAudioBank(audioBank: string | null, p1: boolean, p2: any): boolean; + export function stopGameplayCamShaking(p0: boolean): void; /** - * All occurrences and usages found in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/AkmDAVn6 - * Full list of script audio bank names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scriptAudioBankNames.json - * @param p2 is always -1 - */ - export function requestScriptAudioBank(audioBank: string | null, p1: boolean, p2: any): boolean; + * Forces gameplay cam to specified ped as if you were the ped or spectating it + */ + export function setGameplayCamFollowPedThisUpdate(ped: Ped | Player | number): void; /** - * @param p2 is always -1 - */ - export function hintMissionAudioBank(audioBank: string | null, p1: boolean, p2: any): boolean; + * Examples when this function will return 0 are: + * - During busted screen. + * - When player is coming out from a hospital. + * - When player is coming out from a police station. + * - When player is buying gun from AmmuNation. + */ + export function isGameplayCamRendering(): boolean; - /** - * @param p2 is always -1 - */ - export function hintAmbientAudioBank(audioBank: string | null, p1: boolean, p2: any): boolean; + export function isInterpolatingFromScriptCams(): boolean; - /** - * @param p2 is always -1 - */ - export function hintScriptAudioBank(audioBank: string | null, p1: boolean, p2: any): boolean; + export function isInterpolatingToScriptCams(): boolean; - export function releaseMissionAudioBank(): void; - - export function releaseAmbientAudioBank(): void; + export function setGameplayCamAltitudeFovScalingState(p0: boolean): void; /** - * Full list of script audio bank names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scriptAudioBankNames.json - */ - export function releaseNamedScriptAudioBank(audioBank: string | null): void; - - export function releaseScriptAudioBank(): void; + * Shows the crosshair even if it wouldn't show normally. Only works for one frame, so make sure to call it repeatedly. + */ + export function disableGameplayCamAltitudeFovScalingThisUpdate(): void; - export function unhintAmbientAudioBank(): void; + export function isGameplayCamLookingBehind(): boolean; - export function unhintScriptAudioBank(): void; + export function setGameplayCamIgnoreEntityCollisionThisUpdate(entity: Entity | number): void; - export function unhintNamedScriptAudioBank(audioBank: string | null): void; + export function disableCamCollisionForObject(entity: Entity | number): void; - export function getSoundId(): number; + export function bypassCameraCollisionBuoyancyTestThisUpdate(): void; - export function releaseSoundId(soundId: number): void; + export function setGameplayCamEntityToLimitFocusOverBoundingSphereThisUpdate(entity: Entity | number): void; /** - * All found occurrences in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/A8Ny8AHZ - * Full list of audio / sound names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/soundNames.json - */ - export function playSound(soundId: number, audioName: string | null, audioRef: string | null, p3: boolean, p4: any, p5: boolean): void; + * Sets some flag on cinematic camera + */ + export function disableFirstPersonCameraWaterClippingTestThisUpdate(): void; - /** - * List: https://pastebin.com/DCeRiaLJ - * All occurrences as of Cayo Perico Heist DLC (b2189), sorted alphabetically and identical lines removed: https://git.io/JtLxM - * Full list of audio / sound names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/soundNames.json - */ - export function playSoundFrontend(soundId: number, audioName: string | null, audioRef: string | null, p3: boolean): void; + export function setFollowCamIgnoreAttachParentMovementThisUpdate(): void; - /** - * Only call found in the b617d scripts: - * AUDIO::PLAY_DEFERRED_SOUND_FRONTEND("BACK", "HUD_FREEMODE_SOUNDSET"); - * Full list of audio / sound names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/soundNames.json - */ - export function playDeferredSoundFrontend(soundName: string | null, soundsetName: string | null): void; + export function isSphereVisible(x: number, y: number, z: number, radius: number): boolean; - /** - * All found occurrences in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/f2A7vTj0 - * No changes made in b678d. - * gtaforums.com/topic/795622-audio-for-mods - * Full list of audio / sound names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/soundNames.json - */ - export function playSoundFromEntity(soundId: number, audioName: string | null, entity: Entity | number, audioRef: string | null, isNetwork: boolean, p5: any): void; + export function isFollowPedCamActive(): boolean; /** - * Only used with "formation_flying_blips_soundset" and "biker_formation_blips_soundset". - * @param model is always the model of p2 - */ - export function playSoundFromEntityHash(soundId: number, model: number, entity: Entity | number, soundSetHash: number, p4: any, p5: any): void; + * From the scripts: + * CAM::SET_FOLLOW_PED_CAM_THIS_UPDATE("FOLLOW_PED_ATTACHED_TO_ROPE_CAMERA", 0); + * CAM::SET_FOLLOW_PED_CAM_THIS_UPDATE("FOLLOW_PED_ON_EXILE1_LADDER_CAMERA", 1500); + * CAM::SET_FOLLOW_PED_CAM_THIS_UPDATE("FOLLOW_PED_SKY_DIVING_CAMERA", 0); + * CAM::SET_FOLLOW_PED_CAM_THIS_UPDATE("FOLLOW_PED_SKY_DIVING_CAMERA", 3000); + * CAM::SET_FOLLOW_PED_CAM_THIS_UPDATE("FOLLOW_PED_SKY_DIVING_FAMILY5_CAMERA", 0); + * CAM::SET_FOLLOW_PED_CAM_THIS_UPDATE("FOLLOW_PED_SKY_DIVING_CAMERA", 0); + */ + export function setFollowPedCamThisUpdate(camName: string, p1: number): boolean; - /** - * All found occurrences in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/eeFc5DiW - * gtaforums.com/topic/795622-audio-for-mods - * Full list of audio / sound names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/soundNames.json - */ - export function playSoundFromCoord(soundId: number, audioName: string | null, x: number, y: number, z: number, audioRef: string | null, isNetwork: boolean, range: number, p8: boolean): void; + export function useScriptCamForAmbientPopulationOriginThisFrame(p0: boolean, p1: boolean): void; - export function updateSoundCoord(soundId: number, x: number, y: number, z: number): void; + export function setFollowPedCamLadderAlignThisUpdate(): void; - export function stopSound(soundId: number): void; + /** + * minimum: Degrees between -180f and 180f. + * maximum: Degrees between -180f and 180f. + * Clamps the gameplay camera's current yaw. + * Eg. SET_THIRD_PERSON_CAM_RELATIVE_HEADING_LIMITS_THIS_UPDATE(0.0f, 0.0f) will set the horizontal angle directly behind the player. + */ + export function setThirdPersonCamRelativeHeadingLimitsThisUpdate(minimum: number, maximum: number): void; /** - * Could this be used alongside either, - * SET_NETWORK_ID_EXISTS_ON_ALL_MACHINES or _SET_NETWORK_ID_SYNC_TO_PLAYER to make it so other players can hear the sound while online? It'd be a bit troll-fun to be able to play the Zancudo UFO creepy sounds globally. - */ - export function getNetworkIdFromSoundId(soundId: number): number; + * minimum: Degrees between -90f and 90f. + * maximum: Degrees between -90f and 90f. + * Clamps the gameplay camera's current pitch. + * Eg. SET_THIRD_PERSON_CAM_RELATIVE_PITCH_LIMITS_THIS_UPDATE(0.0f, 0.0f) will set the vertical angle directly behind the player. + */ + export function setThirdPersonCamRelativePitchLimitsThisUpdate(minimum: number, maximum: number): void; - export function getSoundIdFromNetworkId(netId: number): number; + /** + * Seems to animate the gameplay camera zoom. + * Eg. SET_THIRD_PERSON_CAM_ORBIT_DISTANCE_LIMITS_THIS_UPDATE(1f, 1000f); + * will animate the camera zooming in from 1000 meters away. + * Game scripts use it like this: + * // Setting this to 1 prevents V key from changing zoom + * PLAYER::SET_PLAYER_FORCED_ZOOM(PLAYER::PLAYER_ID(), 1); + * // These restrict how far you can move cam up/down left/right + * CAM::SET_THIRD_PERSON_CAM_RELATIVE_HEADING_LIMITS_THIS_UPDATE(-20f, 50f); + * CAM::SET_THIRD_PERSON_CAM_RELATIVE_PITCH_LIMITS_THIS_UPDATE(-60f, 0f); + * CAM::SET_THIRD_PERSON_CAM_ORBIT_DISTANCE_LIMITS_THIS_UPDATE(1f, 1f); + */ + export function setThirdPersonCamOrbitDistanceLimitsThisUpdate(p0: number, distance: number): void; - export function setVariableOnSound(soundId: number, unkVariable: string | null, p2: number): void; + export function getThirdPersonCamMinOrbitDistanceSpring(): number; - /** - * From the scripts, p0: - * "ArmWrestlingIntensity", - * "INOUT", - * "Monkey_Stream", - * "ZoomLevel" - */ - export function setVariableOnStream(unkVariable: string | null, p1: number): void; + export function getThirdPersonCamMaxOrbitDistanceSpring(): number; - export function overrideUnderwaterStream(p0: string | null, p1: boolean): void; + /** + * Forces gameplay cam to specified vehicle as if you were in it + */ + export function setInVehicleCamStateThisUpdate(p0: Vehicle | number, p1: number): void; /** - * AUDIO::SET_VARIABLE_ON_UNDER_WATER_STREAM("inTunnel", 1.0); - * AUDIO::SET_VARIABLE_ON_UNDER_WATER_STREAM("inTunnel", 0.0); - */ - export function setVariableOnUnderWaterStream(unkVariableName: string | null, value: number): void; + * Disables first person camera for the current frame. + * Found in decompiled scripts: + * GRAPHICS::DRAW_DEBUG_TEXT_2D("Disabling First Person Cam", 0.5, 0.8, 0.0, 0, 0, 255, 255); + * CAM::DISABLE_ON_FOOT_FIRST_PERSON_VIEW_THIS_UPDATE(); + */ + export function disableOnFootFirstPersonViewThisUpdate(): void; - export function hasSoundFinished(soundId: number): boolean; + export function disableFirstPersonFlashEffectThisUpdate(): void; - /** - * Plays ambient speech. See also _0x444180DB. - * SPEECH_PARAMS_STANDARD - * SPEECH_PARAMS_ALLOW_REPEAT - * SPEECH_PARAMS_BEAT - * SPEECH_PARAMS_FORCE - * SPEECH_PARAMS_FORCE_FRONTEND - * SPEECH_PARAMS_FORCE_NO_REPEAT_FRONTEND - * SPEECH_PARAMS_FORCE_NORMAL - * SPEECH_PARAMS_FORCE_NORMAL_CLEAR - * See NativeDB for reference: http://natives.altv.mp/#/0x8E04FEDD28D42462 - * @param ped The ped to play the ambient speech. - * @param speechName Name of the speech to play, eg. "GENERIC_HI". - * @param speechParam Can be one of the following: - */ - export function playPedAmbientSpeechNative(ped: Player | number, speechName: string | null, speechParam: string | null, p3: any): void; + export function blockFirstPersonOrientationResetThisUpdate(): void; - /** - * Plays ambient speech. See also _0x5C57B85D. - * See PLAY_PED_AMBIENT_SPEECH_NATIVE for parameter specifications. - * Full list of speeches and voices names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/speeches.json - */ - export function playPedAmbientSpeechAndCloneNative(ped: Player | number, speechName: string | null, speechParam: string | null, p3: any): void; + export function getFollowPedCamZoomLevel(): number; /** - * This is the same as PLAY_PED_AMBIENT_SPEECH_NATIVE and PLAY_PED_AMBIENT_SPEECH_AND_CLONE_NATIVE but it will allow you to play a speech file from a specific voice file. It works on players and all peds, even animals. - * EX (C#): - * GTA.Native.Function.Call(Hash.PLAY_PED_AMBIENT_SPEECH_WITH_VOICE_NATIVE, Game.Player.Character, "GENERIC_INSULT_HIGH", "s_m_y_sheriff_01_white_full_01", "SPEECH_PARAMS_FORCE_SHOUTED", 0); - * The first param is the ped you want to play it on, the second is the speech name, the third is the voice name, the fourth is the speech param, and the last param is usually always 0. - * Full list of speeches and voices names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/speeches.json - */ - export function playPedAmbientSpeechWithVoiceNative(ped: Player | number, speechName: string | null, voiceName: string | null, speechParam: string | null, p4: boolean): void; + * See viewmode enum in CAM.GET_FOLLOW_VEHICLE_CAM_VIEW_MODE for return value + */ + export function getFollowPedCamViewMode(): number; /** - * Full list of speeches and voices names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/speeches.json - */ - export function playAmbientSpeechFromPositionNative(speechName: string | null, voiceName: string | null, x: number, y: number, z: number, speechParam: string | null): void; + * Sets the type of Player camera: + * 0 - Third Person Close + * 1 - Third Person Mid + * 2 - Third Person Far + * 4 - First Person + */ + export function setFollowPedCamViewMode(viewMode: number): void; - /** - * This native enables the audio flag "TrevorRageIsOverridden" and sets the voice effect to `voiceEffect` - */ - export function overrideTrevorRage(voiceEffect: string | null): void; + export function isFollowVehicleCamActive(): boolean; - export function resetTrevorRage(): void; + export function setFollowVehicleCamHighAngleModeThisUpdate(p0: boolean): void; - export function setPlayerAngry(ped: Player | number, toggle: boolean): void; + export function setFollowVehicleCamHighAngleModeEveryUpdate(p0: boolean, p1: boolean): void; - /** - * Last 2 parameters always seem to be 0. - * EX: Function.Call(Hash.PLAY_PAIN, TestPed, 6, 0, 0); - * Known Pain IDs - * ________________________ - * 1 - Doesn't seem to do anything. Does NOT crash the game like previously said. (Latest patch) - * 6 - Scream (Short) - * 7 - Scared Scream (Kinda Long) - * 8 - On Fire - */ - export function playPain(ped: Player | number, painID: number, p1: number, p3: any): void; + export function setTableGamesCameraThisUpdate(hash: number): boolean; - export function releaseWeaponAudio(): void; + export function getFollowVehicleCamZoomLevel(): number; - /** - * SLOWMO_T1_TRAILER_SMASH - * SLOWMO_T1_RAYFIRE_EXPLOSION - * SLOWMO_PROLOGUE_VAULT - * NIGEL_02_SLOWMO_SETTING - * JSH_EXIT_TUNNEL_SLOWMO - * SLOWMO_BIG_SCORE_JUMP - * SLOWMO_FIB4_TRUCK_SMASH - * SLOWMO_EXTREME_04 - * SLOW_MO_METH_HOUSE_RAYFIRE - * See NativeDB for reference: http://natives.altv.mp/#/0xD01005D2BA2EB778 - * @param mode can be any of these: - */ - export function activateAudioSlowmoMode(mode: string | null): void; + export function setFollowVehicleCamZoomLevel(zoomLevel: number): void; /** - * see ACTIVATE_AUDIO_SLOWMO_MODE for modes - */ - export function deactivateAudioSlowmoMode(mode: string | null): void; + * Returns the type of camera: + * enum _viewmode //0xA11D7CA8 + * { + * THIRD_PERSON_NEAR = 0, + * THIRD_PERSON_MEDIUM = 1, + * THIRD_PERSON_FAR = 2, + * CINEMATIC = 3, + * FIRST_PERSON = 4 + * }; + */ + export function getFollowVehicleCamViewMode(): number; /** - * Audio List - * gtaforums.com/topic/795622-audio-for-mods/ - * All found occurrences in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/FTeAj4yZ - */ - export function setAmbientVoiceName(ped: Player | number, name: string | null): void; - - export function setAmbientVoiceNameHash(ped: Player | number, hash: number): void; - - export function getAmbientVoiceNameHash(ped: Player | number): number; + * Sets the type of Player camera in vehicles: + * viewmode: see CAM.GET_FOLLOW_VEHICLE_CAM_VIEW_MODE + */ + export function setFollowVehicleCamViewMode(viewMode: number): void; /** - * Assigns some ambient voice to the ped. - */ - export function setPedVoiceFull(ped: Player | number): void; - - export function setPedRaceAndVoiceGroup(ped: Player | number, p1: number, voiceGroup: number): void; + * context: see _GET_CAM_ACTIVE_VIEW_MODE_CONTEXT + */ + export function getCamViewModeForContext(context: number): number; /** - * From the scripts: - * AUDIO::SET_PED_VOICE_GROUP(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("PAIGE_PVG")); - * AUDIO::SET_PED_VOICE_GROUP(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("TALINA_PVG")); - * AUDIO::SET_PED_VOICE_GROUP(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("FEMALE_LOST_BLACK_PVG")); - * AUDIO::SET_PED_VOICE_GROUP(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("FEMALE_LOST_WHITE_PVG")); - */ - export function setPedVoiceGroup(ped: Player | number, voiceGroupHash: number): void; + * context: see _GET_CAM_ACTIVE_VIEW_MODE_CONTEXT, viewmode: see CAM.GET_FOLLOW_VEHICLE_CAM_VIEW_MODE + */ + export function setCamViewModeForContext(context: number, viewMode: number): void; /** - * Dat151RelType == 29 - */ - export function setPedVoiceGroupFromRaceToPvg(ped: Player | number, voiceGroupHash: number): void; + * enum Context + * { + * ON_FOOT, + * IN_VEHICLE, + * ON_BIKE, + * IN_BOAT, + * IN_AIRCRAFT, + * IN_SUBMARINE, + * IN_HELI, + * IN_TURRET + * }; + */ + export function getCamActiveViewModeContext(): number; + + export function useVehicleCamStuntSettingsThisUpdate(): void; /** - * BOOL p1: 0 = Female; 1 = Male - */ - export function setPedGender(ped: Player | number, p1: boolean): void; + * Sets gameplay camera to hash + */ + export function useDedicatedStuntCameraThisUpdate(camName: string): void; - export function stopCurrentPlayingSpeech(ped: Player | number): void; + export function forceVehicleCamStuntSettingsThisUpdate(): void; - export function stopCurrentPlayingAmbientSpeech(ped: Player | number): void; + export function setFollowVehicleCamSeatThisUpdate(seatIndex: number): void; - export function isAmbientSpeechPlaying(ped: Player | number): boolean; + export function isAimCamActive(): boolean; - export function isScriptedSpeechPlaying(p0: Player | number): boolean; + export function isAimCamActiveInAccurateMode(): boolean; - export function isAnySpeechPlaying(ped: Player | number): boolean; + export function isFirstPersonAimCamActive(): boolean; - export function isAnyPositionalSpeechPlaying(): boolean; + export function disableAimCamThisUpdate(): void; - /** - * Checks if the ped can play the speech or has the speech file, p2 is usually false. - */ - export function doesContextExistForThisPed(ped: Player | number, speechName: string | null, p2: boolean): boolean; + export function getFirstPersonAimCamZoomFactor(): number; - export function isPedInCurrentConversation(ped: Player | number): boolean; + export function setFirstPersonAimCamZoomFactor(zoomFactor: number): void; - /** - * Sets the ped drunk sounds. Only works with PLAYER_PED_ID - * ==================================================== - * As mentioned above, this only sets the drunk sound to ped/player. - * To give the Ped a drunk effect with drunk walking animation try using SET_PED_MOVEMENT_CLIPSET - * Below is an example - * if (!Function.Call(Hash.HAS_ANIM_SET_LOADED, "move_m@drunk@verydrunk")) - * { - * Function.Call(Hash.REQUEST_ANIM_SET, "move_m@drunk@verydrunk"); - * } - * See NativeDB for reference: http://natives.altv.mp/#/0x95D2D383D5396B8A - */ - export function setPedIsDrunk(ped: Player | number, toggle: boolean): void; + export function setFirstPersonAimCamZoomFactorLimitsThisUpdate(p0: number, p1: number): void; - /** - * Plays sounds from a ped with chop model. For example it used to play bark or sniff sounds. p1 is always 3 or 4294967295 in decompiled scripts. By a quick disassembling I can assume that this arg is unused. - * This native is works only when you call it on the ped with right model (ac_chop only ?) - * Speech Name can be: CHOP_SNIFF_SEQ CHOP_WHINE CHOP_LICKS_MOUTH CHOP_PANT bark GROWL SNARL BARK_SEQ - */ - export function playAnimalVocalization(pedHandle: Player | number, p1: number, speechName: string | null): void; + export function setFirstPersonAimCamRelativeHeadingLimitsThisUpdate(p0: number, p1: number): void; - export function isAnimalVocalizationPlaying(pedHandle: Player | number): boolean; + export function setFirstPersonAimCamRelativePitchLimitsThisUpdate(p0: number, p1: number): void; - /** - * @param mood can be 0 or 1 (it's not a boolean value!). Effects audio of the animal. - */ - export function setAnimalMood(animal: Player | number, mood: number): void; + export function setFirstPersonAimCamNearClipThisUpdate(p0: number): void; - export function isMobilePhoneRadioActive(): boolean; + export function setThirdPersonAimCamNearClipThisUpdate(p0: number): void; - export function setMobilePhoneRadioState(state: boolean): void; + export function setAllowCustomVehicleDriveByCamThisUpdate(p0: boolean): void; - /** - * Returns 255 (radio off index) if the function fails. - */ - export function getPlayerRadioStationIndex(): number; + export function forceTightspaceCustomFramingThisUpdate(): void; - /** - * Returns active radio station name - */ - export function getPlayerRadioStationName(): string; + export function getFinalRenderedCamCoord(): Vector3; /** - * Converts radio station index to string. Use HUD::GET_FILENAME_FOR_AUDIO_CONVERSATION to get the user-readable text. - */ - export function getRadioStationName(radioStation: number): string; + * p0 seems to consistently be 2 across scripts + * Function is called faily often by CAM::CREATE_CAM_WITH_PARAMS + */ + export function getFinalRenderedCamRot(rotationOrder: number): Vector3; - export function getPlayerRadioStationGenre(): number; + export function getFinalRenderedRemotePlayerCamRot(player: Player | number, rotationOrder: number): Vector3; - export function isRadioRetuning(): boolean; + /** + * Gets some camera fov + */ + export function getFinalRenderedCamFov(): number; - export function isRadioFadedOut(): boolean; + export function getFinalRenderedRemotePlayerCamFov(player: Player | number): number; - /** - * Tune Forward... - */ - export function setRadioRetuneUp(): void; + export function getFinalRenderedCamNearClip(): number; - /** - * Tune Backwards... - */ - export function setRadioRetuneDown(): void; + export function getFinalRenderedCamFarClip(): number; - /** - * List of radio stations that are in the wheel, in clockwise order, as of LS Tuners DLC: https://git.io/J8a3k - * An older list including hidden radio stations: https://pastebin.com/Kj9t38KF - */ - export function setRadioToStationName(stationName: string | null): void; + export function getFinalRenderedCamNearDof(): number; - /** - * List of radio stations that are in the wheel, in clockwise order, as of LS Tuners DLC: https://git.io/J8a3k - * An older list including hidden radio stations: https://pastebin.com/Kj9t38KF - */ - export function setVehRadioStation(vehicle: Vehicle | number, radioStation: string | null): void; + export function getFinalRenderedCamFarDof(): number; - export function setVehHasNormalRadio(vehicle: Vehicle | number): void; + export function getFinalRenderedCamMotionBlurStrength(): number; - export function isVehicleRadioOn(vehicle: Vehicle | number): boolean; + export function setGameplayCoordHint(x: number, y: number, z: number, duration: number, blendOutDuration: number, blendInDuration: number, p6: number): void; - export function setVehForcedRadioThisFrame(vehicle: Vehicle | number): void; + export function setGameplayPedHint(ped: Ped | Player | number, x1: number, y1: number, z1: number, p4: boolean, duration: number, blendOutDuration: number, blendInDuration: number): void; /** - * Full list of static emitters by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/staticEmitters.json - */ - export function setEmitterRadioStation(emitterName: string | null, radioStation: string | null, p2: any): void; + * Focuses the camera on the specified vehicle. + */ + export function setGameplayVehicleHint(vehicle: Vehicle | number, offsetX: number, offsetY: number, offsetZ: number, p4: boolean, time: number, easeInTime: number, easeOutTime: number): void; - /** - * Example: - * AUDIO::SET_STATIC_EMITTER_ENABLED((Any*)"LOS_SANTOS_VANILLA_UNICORN_01_STAGE", false); AUDIO::SET_STATIC_EMITTER_ENABLED((Any*)"LOS_SANTOS_VANILLA_UNICORN_02_MAIN_ROOM", false); AUDIO::SET_STATIC_EMITTER_ENABLED((Any*)"LOS_SANTOS_VANILLA_UNICORN_03_BACK_ROOM", false); - * This turns off surrounding sounds not connected directly to peds. - * Full list of static emitters by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/staticEmitters.json - */ - export function setStaticEmitterEnabled(emitterName: string | null, toggle: boolean): void; + export function setGameplayObjectHint(object: Object, xOffset: number, yOffset: number, zOffset: number, p4: boolean, time: number, easeInTime: number, easeOutTime: number): void; /** - * Full list of static emitters by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/staticEmitters.json - */ - export function linkStaticEmitterToEntity(emitterName: string | null, entity: Entity | number): void; + * p8 could be some sort of flag. Scripts use: + * -244429742 + * 0 + * 1726668277 + * 1844968929 + */ + export function setGameplayEntityHint(entity: Entity | number, xOffset: number, yOffset: number, zOffset: number, p4: boolean, time: number, easeInTime: number, easeOutTime: number, p8: number): void; - /** - * Sets radio station by index. - */ - export function setRadioToStationIndex(radioStation: number): void; + export function isGameplayHintActive(): boolean; - export function setFrontendRadioActive(active: boolean): void; + export function stopGameplayHint(p0: boolean): void; /** - * "news" that play on the radio after you've done something in story mode(?) - */ - export function unlockMissionNewsStory(newsStory: number): void; + * This native does absolutely nothing, just a nullsub + */ + export function stopGameplayHintBeingCancelledThisUpdate(p0: boolean): void; - export function isMissionNewsStoryUnlocked(newsStory: number): boolean; + export function stopCodeGameplayHint(p0: boolean): void; - export function getAudibleMusicTrackTextId(): number; + export function isCodeGameplayHintActive(): boolean; - export function playEndCreditsMusic(play: boolean): void; + export function setGameplayHintFov(FOV: number): void; - export function skipRadioForward(): void; + export function setGameplayHintFollowDistanceScalar(value: number): void; - export function freezeRadioStation(radioStation: string | null): void; + export function setGameplayHintBaseOrbitPitchOffset(value: number): void; - export function unfreezeRadioStation(radioStation: string | null): void; + export function setGameplayHintCameraRelativeSideOffset(xOffset: number): void; - export function setRadioAutoUnfreeze(toggle: boolean): void; + export function setGameplayHintCameraRelativeVerticalOffset(yOffset: number): void; - export function setInitialPlayerStation(radioStation: string | null): void; + export function setGameplayHintCameraBlendToFollowPedMediumViewMode(toggle: boolean): void; - export function setUserRadioControlEnabled(toggle: boolean): void; + export function setCinematicButtonActive(p0: boolean): void; - /** - * Only found this one in the decompiled scripts: - * AUDIO::SET_RADIO_TRACK("RADIO_03_HIPHOP_NEW", "ARM1_RADIO_STARTS"); - */ - export function setRadioTrack(radioStation: string | null, radioTrack: string | null): void; + export function isCinematicCamRendering(): boolean; - export function setRadioTrackWithStartOffset(radioStationName: string | null, mixName: string | null, p2: number): void; + /** + * p0 argument found in the b617d scripts: "DRUNK_SHAKE" + * Full list of cam shake types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/camShakeTypesCompact.json + */ + export function shakeCinematicCam(shakeType: string, amount: number): void; - export function setNextRadioTrack(radioName: string | null, radioTrack: string | null, p2: string | null, p3: string | null): void; + export function isCinematicCamShaking(): boolean; - export function setVehicleRadioLoud(vehicle: Vehicle | number, toggle: boolean): void; + export function setCinematicCamShakeAmplitude(p0: number): void; - export function canVehicleReceiveCbRadio(vehicle: Vehicle | number): boolean; + export function stopCinematicCamShaking(p0: boolean): void; - export function setMobileRadioEnabledDuringGameplay(toggle: boolean): void; + export function disableCinematicBonnetCameraThisUpdate(): void; - export function doesPlayerVehHaveRadio(): boolean; + export function disableCinematicVehicleIdleModeThisUpdate(): void; - export function isPlayerVehRadioEnable(): boolean; + /** + * Resets the vehicle idle camera timer. Calling this in a loop will disable the idle camera. + */ + export function invalidateCinematicVehicleIdleMode(): void; /** - * can't seem to enable radio on cop cars etc - */ - export function setVehicleRadioEnabled(vehicle: Vehicle | number, toggle: boolean): void; + * Resets the idle camera timer. Calling that in a loop once every few seconds is enough to disable the idle cinematic camera. + */ + export function invalidateIdleCam(): void; - export function setPositionedPlayerVehicleRadioEmitterEnabled(p0: any): void; + export function isCinematicIdleCamRendering(): boolean; + + export function isCinematicFirstPersonVehicleInteriorCamRendering(): boolean; /** - * Examples: - * AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK", "END_CREDITS_KILL_MICHAEL", 1); - * AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK", "END_CREDITS_KILL_MICHAEL", 1); - * AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK", "END_CREDITS_KILL_TREVOR", 1); - * AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK", "END_CREDITS_SAVE_MICHAEL_TREVOR", 1); - * AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK", "OFF_ROAD_RADIO_ROCK_LIST", 1); - * AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_06_COUNTRY", "MAGDEMO2_RADIO_DINGHY", 1); - * AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_16_SILVERLAKE", "SEA_RACE_RADIO_PLAYLIST", 1); - * AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK", "OFF_ROAD_RADIO_ROCK_LIST", 1); - */ - export function setCustomRadioTrackList(radioStation: string | null, trackListName: string | null, p2: boolean): void; + * hash is always JOAAT("CAMERA_MAN_SHOT") in decompiled scripts + */ + export function createCinematicShot(p0: number, time: number, p2: boolean, entity: Entity | number): void; /** - * 3 calls in the b617d scripts, removed duplicate. - * AUDIO::CLEAR_CUSTOM_RADIO_TRACK_LIST("RADIO_16_SILVERLAKE"); - * AUDIO::CLEAR_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK"); - */ - export function clearCustomRadioTrackList(radioStation: string | null): void; + * Hash is always JOAAT("CAMERA_MAN_SHOT") in decompiled scripts + */ + export function isCinematicShotActive(p0: number): boolean; - export function getNumUnlockedRadioStations(): number; + /** + * Only used once in carsteal3 with p0 set to -1096069633 (CAMERA_MAN_SHOT) + */ + export function stopCinematicShot(p0: number): void; - export function findRadioStationIndex(stationNameHash: number): number; + export function forceCinematicRenderingThisUpdate(toggle: boolean): void; + + export function setCinematicNewsChannelActiveThisUpdate(): void; /** - * 6 calls in the b617d scripts, removed identical lines: - * AUDIO::SET_RADIO_STATION_MUSIC_ONLY("RADIO_01_CLASS_ROCK", 1); - * AUDIO::SET_RADIO_STATION_MUSIC_ONLY(AUDIO::GET_RADIO_STATION_NAME(10), 0); - * AUDIO::SET_RADIO_STATION_MUSIC_ONLY(AUDIO::GET_RADIO_STATION_NAME(10), 1); - */ - export function setRadioStationMusicOnly(radioStation: string | null, toggle: boolean): void; + * Toggles the vehicle cinematic cam; requires the player ped to be in a vehicle to work. + */ + export function setCinematicModeActive(toggle: boolean): void; - export function setRadioFrontendFadeTime(fadeTime: number): void; + export function isInVehicleMobilePhoneCameraRendering(): boolean; - /** - * AUDIO::UNLOCK_RADIO_STATION_TRACK_LIST("RADIO_16_SILVERLAKE", "MIRRORPARK_LOCKED"); - */ - export function unlockRadioStationTrackList(radioStation: string | null, trackListName: string | null): void; + export function disableCinematicSlowMoThisUpdate(): boolean; - export function lockRadioStationTrackList(radioStation: string | null, trackListName: string | null): void; + export function isBonnetCinematicCamRendering(): boolean; /** - * Just a nullsub (i.e. does absolutely nothing) since build 1604. - */ - export function updateUnlockableDjRadioTracks(enableMixes: boolean): void; + * Tests some cinematic camera flags + */ + export function isCinematicCamInputActive(): boolean; - /** - * Disables the radio station (hides it from the radio wheel). - */ - export function lockRadioStation(radioStationName: string | null, toggle: boolean): void; + export function ignoreMenuPreferenceForBonnetCameraThisUpdate(): void; + + export function bypassCutsceneCamRenderingThisUpdate(): void; + + export function stopCutsceneCamShaking(p0: any): void; /** - * Doesn't have an effect in Story Mode. - */ - export function setRadioStationAsFavourite(radioStation: string | null, toggle: boolean): void; + * Hardcoded to only work in multiplayer. + */ + export function setCutsceneCamFarClipThisUpdate(p0: number): void; - export function isRadioStationFavourited(radioStation: string | null): boolean; + export function getFocusPedOnScreen(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number, p7: number, p8: number): Ped | Player | number; - export function getNextAudibleBeat(out1?: number, out2?: number, out3?: number): [boolean, number, number, number]; + export function disableNearClipScanThisUpdate(): void; + + /** + * if p0 is 0, effect is cancelled + * if p0 is 1, effect zooms in, gradually tilts cam clockwise apx 30 degrees, wobbles slowly. Motion blur is active until cancelled. + * if p0 is 2, effect immediately tilts cam clockwise apx 30 degrees, begins to wobble slowly, then gradually tilts cam back to normal. The wobbling will continue until the effect is cancelled. + */ + export function setCamDeathFailEffectState(p0: number): void; + + export function setFirstPersonFlashEffectType(p0: any): void; /** - * Changes start time of a tracklist (milliseconds) - * R* uses a random int: MISC::GET_RANDOM_INT_IN_RANGE(0, 13) * 60000) - */ - export function forceMusicTrackList(radioStation: string | null, trackListName: string | null, milliseconds: number): void; + * From b617 scripts: + * CAM::SET_FIRST_PERSON_FLASH_EFFECT_VEHICLE_MODEL_NAME("DINGHY"); + * CAM::SET_FIRST_PERSON_FLASH_EFFECT_VEHICLE_MODEL_NAME("ISSI2"); + * CAM::SET_FIRST_PERSON_FLASH_EFFECT_VEHICLE_MODEL_NAME("SPEEDO"); + */ + export function setFirstPersonFlashEffectVehicleModelName(vehicleName: string): void; - export function getCurrentTrackPlayTime(radioStationName: string | null): number; + export function setFirstPersonFlashEffectVehicleModelHash(vehicleModel: number): void; - export function getCurrentTrackSoundName(radioStationName: string | null): number; + export function isAllowedIndependentCameraModes(): boolean; - export function setVehicleMissileWarningEnabled(vehicle: Vehicle | number, toggle: boolean): void; + export function cameraPreventCollisionSettingsForTripleheadInInteriorsThisUpdate(): void; - /** - * Full list of ambient zones by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ambientZones.json - */ - export function setAmbientZoneState(zoneName: string | null, p1: boolean, p2: boolean): void; + export function replayGetMaxDistanceAllowedFromPlayer(): number; /** - * Still needs more research. - * Full list of ambient zones by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ambientZones.json - */ - export function clearAmbientZoneState(zoneName: string | null, p1: boolean): void; + * SET_CLOCK_TIME(12, 34, 56); + */ + export function setClockTime(hour: number, minute: number, second: number): void; + + export function pauseClock(toggle: boolean): void; - export function setAmbientZoneListState(ambientZone: string | null, p1: boolean, p2: boolean): void; + export function advanceClockTimeTo(hour: number, minute: number, second: number): void; - export function clearAmbientZoneListState(ambientZone: string | null, p1: boolean): void; + export function addToClockTime(hours: number, minutes: number, seconds: number): void; /** - * Full list of ambient zones by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ambientZones.json - */ - export function setAmbientZoneStatePersistent(ambientZone: string | null, p1: boolean, p2: boolean): void; + * Gets the current ingame hour, expressed without zeros. (09:34 will be represented as 9) + */ + export function getClockHours(): number; /** - * Full list of ambient zones by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ambientZones.json - */ - export function setAmbientZoneListStatePersistent(ambientZone: string | null, p1: boolean, p2: boolean): void; + * Gets the current ingame clock minute. + */ + export function getClockMinutes(): number; /** - * Full list of ambient zones by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ambientZones.json - */ - export function isAmbientZoneEnabled(ambientZone: string | null): boolean; + * Gets the current ingame clock second. Note that ingame clock seconds change really fast since a day in GTA is only 48 minutes in real life. + */ + export function getClockSeconds(): number; - export function refreshClosestOceanShoreline(): void; + export function setClockDate(day: number, month: number, year: number): void; /** - * All occurrences found in b617d, sorted alphabetically and identical lines removed: - * AUDIO::SET_CUTSCENE_AUDIO_OVERRIDE("_AK"); - * AUDIO::SET_CUTSCENE_AUDIO_OVERRIDE("_CUSTOM"); - * AUDIO::SET_CUTSCENE_AUDIO_OVERRIDE("_TOOTHLESS"); - * Full list of cutscene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/cutsceneNames.json - */ - export function setCutsceneAudioOverride(name: string | null): void; + * Gets the current day of the week. + * 0: Sunday + * 1: Monday + * 2: Tuesday + * 3: Wednesday + * 4: Thursday + * 5: Friday + * 6: Saturday + */ + export function getClockDayOfWeek(): number; - export function setVariableOnSynchSceneAudio(unkVariableName: string | null, value: number): void; + export function getClockDayOfMonth(): number; - /** - * Plays the given police radio message. - * All found occurrences in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/GBnsQ5hr - * Full list of police report names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/policeReportNames.json - */ - export function playPoliceReport(name: string | null, p1: number): number; + export function getClockMonth(): number; - export function cancelAllPoliceReports(): void; + export function getClockYear(): number; - /** - * Plays the siren sound of a vehicle which is otherwise activated when fastly double-pressing the horn key. - * Only works on vehicles with a police siren. - */ - export function blipSiren(vehicle: Vehicle | number): void; + export function getMillisecondsPerGameMinute(): number; /** - * Overrides the vehicle's horn hash. - * mute - p1 seems to be an option for muting the horn - * @param vehicle - the vehicle whose horn should be overwritten - * @param hornHash - maybe a horn id, since the function AUDIO::GET_VEHICLE_DEFAULT_HORN(veh) exists? - * @returns When changing this hash on a vehicle, it will not return the 'overwritten' hash. It will still always return the default horn hash (same as GET_VEHICLE_DEFAULT_HORN) - */ - export function overrideVehHorn(vehicle: Vehicle | number, override: boolean, hornHash: number): void; + * Gets system time as year, month, day, hour, minute and second. + * Example usage: + * int year; + * int month; + * int day; + * int hour; + * int minute; + * int second; + * TIME::GET_POSIX_TIME(&year, &month, &day, &hour, &minute, &second); + */ + export function getPosixTime(year?: number, month?: number, day?: number, hour?: number, minute?: number, second?: number): [void, number, number, number, number, number, number]; /** - * Checks whether the horn of a vehicle is currently played. - */ - export function isHornActive(vehicle: Vehicle | number): boolean; + * Gets current UTC time + */ + export function getUtcTime(year?: number, month?: number, day?: number, hour?: number, minute?: number, second?: number): [void, number, number, number, number, number, number]; /** - * Makes pedestrians sound their horn longer, faster and more agressive when they use their horn. - */ - export function setAggressiveHorns(toggle: boolean): void; + * Gets local system time as year, month, day, hour, minute and second. + * Example usage: + * int year; + * int month; + * int day; + * int hour; + * int minute; + * int second; + * or use std::tm struct + * TIME::GET_LOCAL_TIME(&year, &month, &day, &hour, &minute, &second); + */ + export function getLocalTime(year?: number, month?: number, day?: number, hour?: number, minute?: number, second?: number): [void, number, number, number, number, number, number]; /** - * Does nothing (it's a nullsub). - */ - export function setRadioPositionAudioMute(p0: boolean): void; + * flags: Usually 8 + * Full list of cutscene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/cutsceneNames.json + */ + export function requestCutscene(cutsceneName: string, flags: number): void; /** - * SET_VEHICLE_CONVERSATIONS_PERSIST? - */ - export function setVehicleConversationsPersist(p0: boolean, p1: boolean): void; + * flags: Usually 8 + * playbackFlags: Which scenes should be played. + * Example: 0x105 (bit 0, 2 and 8 set) will enable scene 1, 3 and 9. + * Full list of cutscene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/cutsceneNames.json + */ + export function requestCutsceneWithPlaybackList(cutsceneName: string, playbackFlags: number, flags: number): void; - export function setVehicleConversationsPersistNew(p0: boolean, p1: boolean, p2: boolean): void; - - export function isStreamPlaying(): boolean; + export function removeCutscene(): void; - export function getStreamPlayTime(): number; + export function hasCutsceneLoaded(): boolean; /** - * Example: - * AUDIO::LOAD_STREAM("CAR_STEAL_1_PASSBY", "CAR_STEAL_1_SOUNDSET"); - * All found occurrences in the b678d decompiled scripts: https://pastebin.com/3rma6w5w - * Stream names often ends with "_MASTER", "_SMALL" or "_STREAM". Also "_IN", "_OUT" and numbers. - * Full list of audio / sound names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/soundNames.json - * @param soundSet is often set to 0 in the scripts. These are common to end the soundSets: "_SOUNDS", "_SOUNDSET" and numbers. - */ - export function loadStream(streamName: string | null, soundSet: string | null): boolean; + * Full list of cutscene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/cutsceneNames.json + */ + export function hasThisCutsceneLoaded(cutsceneName: string): boolean; /** - * Example: - * AUDIO::LOAD_STREAM_WITH_START_OFFSET("STASH_TOXIN_STREAM", 2400, "FBI_05_SOUNDS"); - * Only called a few times in the scripts. - * Full list of audio / sound names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/soundNames.json - */ - export function loadStreamWithStartOffset(streamName: string | null, startOffset: number, soundSet: string | null): boolean; + * Sets the cutscene's owning thread ID. + */ + export function setScriptCanStartCutscene(threadId: number): void; + + export function canRequestAssetsForCutsceneEntity(): boolean; - export function playStreamFromPed(ped: Player | number): void; + export function isCutscenePlaybackFlagSet(flag: number): boolean; - export function playStreamFromVehicle(vehicle: Vehicle | number): void; + export function setCutsceneEntityStreamingFlags(cutsceneEntName: string, p1: number, p2: number): void; /** - * Used with AUDIO::LOAD_STREAM - * Example from finale_heist2b.c4: - * TASK::TASK_SYNCHRONIZED_SCENE(l_4C8[214], l_4C8[214]._f7, l_30A, "push_out_vault_l", 4.0, -1.5, 5, 713, 4.0, 0); - * PED::SET_SYNCHRONIZED_SCENE_PHASE(l_4C8[214]._f7, 0.0); - * PED::FORCE_PED_AI_AND_ANIMATION_UPDATE(l_4C8[214], 0, 0); - * PED::SET_PED_COMBAT_ATTRIBUTES(l_4C8[214], 38, 1); - * PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(l_4C8[214], 1); - * if (AUDIO::LOAD_STREAM("Gold_Cart_Push_Anim_01", "BIG_SCORE_3B_SOUNDS")) { - * AUDIO::PLAY_STREAM_FROM_OBJECT(l_36F[01]); - * } - */ - export function playStreamFromObject(object: number): void; + * Simply loads the cutscene and doesn't do extra stuff that REQUEST_CUTSCENE does. + * Full list of cutscene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/cutsceneNames.json + */ + export function requestCutFile(cutsceneName: string): void; - export function playStreamFrontend(): void; + /** + * Simply checks if the cutscene has loaded and doesn't check via CutSceneManager as opposed to HAS_[THIS]_CUTSCENE_LOADED. + * Full list of cutscene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/cutsceneNames.json + */ + export function hasCutFileLoaded(cutsceneName: string): boolean; - export function playStreamFromPosition(x: number, y: number, z: number): void; + /** + * Simply unloads the cutscene and doesn't do extra stuff that REMOVE_CUTSCENE does. + * Full list of cutscene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/cutsceneNames.json + */ + export function removeCutFile(cutsceneName: string): void; - export function stopStream(): void; + /** + * Full list of cutscene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/cutsceneNames.json + */ + export function getCutFileConcatCount(cutsceneName: string): number; - export function stopPedSpeaking(ped: Player | number, shaking: boolean): void; + /** + * flags: Usually 0. + */ + export function startCutscene(flags: number): void; - export function blockAllSpeechFromPed(ped: Player | number, p1: boolean, p2: boolean): void; + /** + * flags: Usually 0. + */ + export function startCutsceneAtCoords(x: number, y: number, z: number, flags: number): void; - export function stopPedSpeakingSynced(ped: Player | number, p1: boolean): void; + export function stopCutscene(p0: boolean): void; - export function disablePedPainAudio(ped: Player | number, toggle: boolean): void; + export function stopCutsceneImmediately(): void; /** - * Common in the scripts: - * AUDIO::IS_AMBIENT_SPEECH_DISABLED(PLAYER::PLAYER_PED_ID()); - */ - export function isAmbientSpeechDisabled(ped: Player | number): boolean; + * p3 could be heading. Needs more research. + */ + export function setCutsceneOrigin(x: number, y: number, z: number, p3: number, p4: number): void; - export function blockSpeechContextGroup(p0: string | null, p1: number): void; + export function setCutsceneOriginAndOrientation(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, p6: number): void; - export function unblockSpeechContextGroup(p0: string | null): void; + export function getCutsceneTime(): number; - export function setSirenWithNoDriver(vehicle: Vehicle | number, toggle: boolean): void; + export function getCutsceneTotalDuration(): number; - export function setSirenBypassMpDriverCheck(vehicle: Vehicle | number, toggle: boolean): void; - - export function triggerSirenAudio(vehicle: Vehicle | number): void; + export function getCutsceneEndTime(): number; - export function setHornPermanentlyOn(vehicle: Vehicle | number): void; + export function getCutscenePlayDuration(): number; - export function setHornEnabled(vehicle: Vehicle | number, toggle: boolean): void; + export function wasCutsceneSkipped(): boolean; - export function setAudioVehiclePriority(vehicle: Vehicle | number, p1: any): void; + export function hasCutsceneFinished(): boolean; - export function setHornPermanentlyOnTime(vehicle: Vehicle | number, time: number): void; + export function isCutsceneActive(): boolean; - export function useSirenAsHorn(vehicle: Vehicle | number, toggle: boolean): void; + export function isCutscenePlaying(): boolean; - /** - * This native sets the audio of the specified vehicle to the audioName (p1). - * Use the audioNameHash found in vehicles.meta - * Example: - * _SET_VEHICLE_AUDIO(veh, "ADDER"); - * The selected vehicle will now have the audio of the Adder. - */ - export function forceUseAudioGameObject(vehicle: Vehicle | number, audioName: string | null): void; + export function getCutsceneSectionPlaying(): number; - export function preloadVehicleAudioBank(vehicleModel: number): void; + export function getEntityIndexOfCutsceneEntity(cutsceneEntName: string, modelHash: number): Entity | number; - export function setVehicleStartupRevSound(vehicle: Vehicle | number, p1: string | null, p2: string | null): void; + export function getCutsceneConcatSectionPlaying(): number; - export function resetVehicleStartupRevSound(vehicle: Vehicle | number): void; + /** + * This function is hard-coded to always return 1. + */ + export function isCutsceneAuthorized(cutsceneName: string): boolean; - export function setVehicleForceReverseWarning(p0: any, p1: any): void; + export function doesCutsceneHandleExist(cutsceneHandle: number): number; - export function isVehicleAudiblyDamaged(vehicle: Vehicle | number): boolean; + export function registerEntityForCutscene(cutscenePed: Ped | Player | number, cutsceneEntName: string, p2: number, modelHash: number, p4: number): void; - export function setVehicleAudioEngineDamageFactor(vehicle: Vehicle | number, damageFactor: number): void; + export function getEntityIndexOfRegisteredEntity(cutsceneEntName: string, modelHash: number): Entity | number; /** - * Makes an engine rattling noise when you decelerate, you need to be going faster to hear lower values - * @param intensity 0.0f - 1.0f, only used once with 1.0f in R* Scripts (nigel2) - */ - export function setVehicleAudioBodyDamageFactor(vehicle: Vehicle | number, intensity: number): void; - - export function enableVehicleFanbeltDamage(vehicle: Vehicle | number, toggle: boolean): void; + * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json + */ + export function setVehicleModelPlayerWillExitScene(modelHash: number): void; - export function enableVehicleExhaustPops(vehicle: Vehicle | number, toggle: boolean): void; + /** + * Only used twice in R* scripts + */ + export function setCutsceneTriggerArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): void; /** - * SET_VEHICLE_BOOST_ACTIVE(vehicle, 1, 0); - * SET_VEHICLE_BOOST_ACTIVE(vehicle, 0, 0); - * Will give a boost-soundeffect. - */ - export function setVehicleBoostActive(vehicle: Vehicle | number, toggle: boolean): void; + * modelHash (p1) was always 0 in R* scripts + */ + export function canSetEnterStateForRegisteredEntity(cutsceneEntName: string, modelHash: number): boolean; - export function setPlayerVehicleAlarmAudioActive(vehicle: Vehicle | number, toggle: boolean): void; + export function canSetExitStateForRegisteredEntity(cutsceneEntName: string, modelHash: number): boolean; - export function setScriptUpdateDoorAudio(doorHash: number, toggle: boolean): void; + export function canSetExitStateForCamera(p0: boolean): boolean; /** - * @param doorId see SET_VEHICLE_DOOR_SHUT - */ - export function playVehicleDoorOpenSound(vehicle: Vehicle | number, doorId: number): void; + * Toggles a value (bool) for cutscenes. + */ + export function setPadCanShakeDuringCutscene(toggle: boolean): void; - /** - * @param doorId see SET_VEHICLE_DOOR_SHUT - */ - export function playVehicleDoorCloseSound(vehicle: Vehicle | number, doorId: number): void; + export function setCutsceneFadeValues(p0: boolean, p1: boolean, p2: boolean, p3: boolean): void; - /** - * Works for planes only. - */ - export function enableStallWarningSounds(vehicle: Vehicle | number, toggle: boolean): void; + export function setCutsceneMultiheadFade(p0: boolean, p1: boolean, p2: boolean, p3: boolean): void; - export function isGameInControlOfMusic(): boolean; + export function setCutsceneMultiheadFadeManual(p0: boolean): void; - export function setGpsActive(active: boolean): void; + export function isMultiheadFadeUp(): boolean; /** - * Called 38 times in the scripts. There are 5 different audioNames used. - * One unknown removed below. - * AUDIO::PLAY_MISSION_COMPLETE_AUDIO("DEAD"); - * AUDIO::PLAY_MISSION_COMPLETE_AUDIO("FRANKLIN_BIG_01"); - * AUDIO::PLAY_MISSION_COMPLETE_AUDIO("GENERIC_FAILED"); - * AUDIO::PLAY_MISSION_COMPLETE_AUDIO("TREVOR_SMALL_01"); - */ - export function playMissionCompleteAudio(audioName: string | null): void; + * Stops current cutscene with a fade transition + * p0: always true in R* Scripts + * You will need to manually fade the screen back in + * SET_CUTSCENE_INPUTS_PARTIALLY_FADE? + */ + export function networkSetMocapCutsceneCanBeSkipped(p0: boolean): void; - export function isMissionCompletePlaying(): boolean; + export function setCarGeneratorsCanUpdateDuringCutscene(p0: boolean): void; - export function isMissionCompleteReadyForUi(): boolean; + export function canUseMobilePhoneDuringCutscene(): boolean; - export function blockDeathJingle(toggle: boolean): void; + export function setCutsceneCanBeSkipped(p0: boolean): void; - /** - * Used to prepare a scene where the surrounding sound is muted or a bit changed. This does not play any sound. - * List of all usable scene names found in b617d. Sorted alphabetically and identical names removed: https://pastebin.com/MtM9N9CC - * Full list of audio scene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/audioSceneNames.json - */ - export function startAudioScene(scene: string | null): boolean; + export function setCanDisplayMinimapDuringCutsceneThisUpdate(): void; /** - * Full list of audio scene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/audioSceneNames.json - */ - export function stopAudioScene(scene: string | null): void; + * Full list of ped components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pedComponentVariations.json + */ + export function setCutscenePedComponentVariation(cutsceneEntName: string, componentId: number, drawableId: number, textureId: number, modelHash: number): void; - /** - * ?? - */ - export function stopAudioScenes(): void; + export function setCutscenePedComponentVariationFromPed(cutsceneEntName: string, ped: Ped | Player | number, modelHash: number): void; - /** - * Full list of audio scene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/audioSceneNames.json - */ - export function isAudioSceneActive(scene: string | null): boolean; + export function doesCutsceneEntityExist(cutsceneEntName: string, modelHash: number): boolean; /** - * Full list of audio scene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/audioSceneNames.json - */ - export function setAudioSceneVariable(scene: string | null, unkVariable: string | null, value: number): void; + * Thanks R*! ;) + * if ((l_161 == 0) || (l_161 == 2)) { + * sub_2ea27("Trying to set Jimmy prop variation"); + * CUTSCENE::SET_CUTSCENE_PED_PROP_VARIATION("Jimmy_Boston", 1, 0, 0, 0); + * } + * Full list of ped components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pedComponentVariations.json + */ + export function setCutscenePedPropVariation(cutsceneEntName: string, componentId: number, drawableId: number, textureId: number, modelHash: number): void; - export function setAudioScriptCleanupTime(time: number): void; + /** + * Possibly HAS_CUTSCENE_CUT_THIS_FRAME, needs more research. + */ + export function hasCutsceneCutThisFrame(): boolean; /** - * All found occurrences in b678d: - * https://pastebin.com/ceu67jz8 - */ - export function addEntityToAudioMixGroup(entity: Entity | number, groupName: string | null, p2: number): void; + * Adds the given requestID to the watch list. + */ + export function datafileWatchRequestId(requestId: number): void; - export function removeEntityFromAudioMixGroup(entity: Entity | number, p1: number): void; + export function datafileClearWatchList(): void; - export function audioIsMusicPlaying(): boolean; + export function datafileIsValidRequestId(index: number): boolean; - /** - * This is an alias of AUDIO_IS_MUSIC_PLAYING. - */ - export function audioIsScriptedMusicPlaying(): boolean; + export function datafileHasLoadedFileData(requestId: number): boolean; - /** - * All music event names found in the b617d scripts: https://pastebin.com/GnYt0R3P - * Full list of music event names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/musicEventNames.json - */ - export function prepareMusicEvent(eventName: string | null): boolean; + export function datafileHasValidFileData(requestId: number): boolean; - /** - * All music event names found in the b617d scripts: https://pastebin.com/GnYt0R3P - * Full list of music event names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/musicEventNames.json - */ - export function cancelMusicEvent(eventName: string | null): boolean; + export function datafileSelectActiveFile(requestId: number, p1: any): boolean; - /** - * List of all usable event names found in b617d used with this native. Sorted alphabetically and identical names removed: https://pastebin.com/RzDFmB1W - * All music event names found in the b617d scripts: https://pastebin.com/GnYt0R3P - * Full list of music event names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/musicEventNames.json - */ - export function triggerMusicEvent(eventName: string | null): boolean; + export function datafileDeleteRequestedFile(requestId: number): boolean; - export function isMusicOneshotPlaying(): boolean; + export function ugcCreateContent(data: any, dataCount: number, contentName: string, description: string, tagsCsv: string, contentTypeName: string, publish: boolean, p7: any): [boolean, any]; - export function getMusicPlaytime(): number; + export function ugcCreateMission(contentName: string, description: string, tagsCsv: string, contentTypeName: string, publish: boolean, p5: any): boolean; - export function setGlobalRadioSignalLevel(p0: any): void; + export function ugcUpdateContent(contentId: string, data: any, dataCount: number, contentName: string, description: string, tagsCsv: string, contentTypeName: string, p7: any): [boolean, any]; - export function recordBrokenGlass(x: number, y: number, z: number, radius: number): void; + export function ugcUpdateMission(contentId: string, contentName: string, description: string, tagsCsv: string, contentTypeName: string, p5: any): boolean; - export function clearAllBrokenGlass(): void; + export function ugcSetPlayerData(contentId: string, rating: number, contentTypeName: string, p3: any): boolean; - export function scriptOverridesWindElevation(p0: boolean, p1: any): void; + export function datafileSelectUgcData(p0: number, p1: any): boolean; - export function setPedWallaDensity(p0: number, p1: number): void; + export function datafileSelectUgcStats(p0: number, p1: boolean, p2: any): boolean; - export function setPedInteriorWallaDensity(p0: number, p1: number): void; + export function datafileSelectUgcPlayerData(p0: number, p1: any): boolean; - export function forcePedPanicWalla(): void; + export function datafileSelectCreatorStats(p0: number, p1: any): boolean; /** - * Example: - * bool prepareAlarm = AUDIO::PREPARE_ALARM("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS"); - * Full list of alarm names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/alarmSounds.json - */ - export function prepareAlarm(alarmName: string | null): boolean; - - /** - * Example: - * This will start the alarm at Fort Zancudo. - * AUDIO::START_ALARM("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS", 1); - * First parameter (char) is the name of the alarm. - * Second parameter (bool) is unknown, it does not seem to make a difference if this one is 0 or 1. - * ---------- - * It DOES make a difference but it has to do with the duration or something I dunno yet - * ---------- - * Found in the b617d scripts: - * See NativeDB for reference: http://natives.altv.mp/#/0x0355EF116C4C97B2 - */ - export function startAlarm(alarmName: string | null, p2: boolean): void; - - /** - * Example: - * This will stop the alarm at Fort Zancudo. - * AUDIO::STOP_ALARM("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS", 1); - * First parameter (char) is the name of the alarm. - * Second parameter (bool) has to be true (1) to have any effect. - * Full list of alarm names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/alarmSounds.json - */ - export function stopAlarm(alarmName: string | null, toggle: boolean): void; + * Loads a User-Generated Content (UGC) file. These files can be found in "[GTA5]\data\ugc" and "[GTA5]\common\patch\ugc". They seem to follow a naming convention, most likely of "[name]_[part].ugc". See example below for usage. + * Returns whether or not the file was successfully loaded. + * Example: + * DATAFILE::DATAFILE_LOAD_OFFLINE_UGC("RockstarPlaylists") // loads "rockstarplaylists_00.ugc" + */ + export function datafileLoadOfflineUgc(filename: string, p1: any): boolean; - export function stopAllAlarms(stop: boolean): void; + export function datafileCreate(p0: number): void; - /** - * Example: - * bool playing = AUDIO::IS_ALARM_PLAYING("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS"); - * Full list of alarm names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/alarmSounds.json - */ - export function isAlarmPlaying(alarmName: string | null): boolean; + export function datafileDelete(p0: number): void; - /** - * Returns hash of default vehicle horn - * Hash is stored in audVehicleAudioEntity - */ - export function getVehicleDefaultHorn(vehicle: Vehicle | number): number; + export function datafileStoreMissionHeader(p0: number): void; - export function getVehicleDefaultHornIgnoreMods(vehicle: Vehicle | number): number; + export function datafileFlushMissionHeader(): void; - export function resetPedAudioFlags(ped: Player | number): void; + export function datafileGetFileDict(p0: number): any; - /** - * Enables/disables ped's "loud" footstep sound. - */ - export function setPedFootstepsEventsEnabled(ped: Player | number, toggle: boolean): void; + export function datafileStartSaveToCloud(filename: string, p1: any): boolean; - /** - * Enables/disables ped's "quiet" footstep sound. - */ - export function setPedClothEventsEnabled(ped: Player | number, toggle: boolean): void; + export function datafileUpdateSaveToCloud(p0?: boolean): [boolean, boolean]; - /** - * Sets audio flag "OverridePlayerGroundMaterial" - */ - export function overridePlayerGroundMaterial(hash: number, toggle: boolean): void; + export function datafileIsSavePending(): boolean; - export function useFootstepScriptSweeteners(ped: Player | number, p1: boolean, hash: number): void; + export function datafileLoadOfflineUgcForAdditionalDataFile(p0: any, p1: any): boolean; - /** - * Sets audio flag "OverrideMicrophoneSettings" - */ - export function overrideMicrophoneSettings(hash: number, toggle: boolean): void; + export function datafileDeleteForAdditionalDataFile(p0: any): void; - export function freezeMicrophone(): void; + export function datafileGetFileDictForAdditionalDataFile(p0: any): any; - /** - * If value is set to true, and ambient siren sound will be played. - * Appears to enable/disable an audio flag. - */ - export function distantCopCarSirens(value: boolean): void; + export function datadictSetBool(objectData: any, key: string, value: boolean): [void, any]; - export function setSirenCanBeControlledByAudio(vehicle: Vehicle | number, p1: boolean): void; + export function datadictSetInt(objectData: any, key: string, value: number): [void, any]; - export function enableStuntJumpAudio(): void; + export function datadictSetFloat(objectData: any, key: string, value: number): [void, any]; - /** - * Possible flag names: - * "ActivateSwitchWheelAudio" - * "AllowAmbientSpeechInSlowMo" - * "AllowCutsceneOverScreenFade" - * "AllowForceRadioAfterRetune" - * "AllowPainAndAmbientSpeechToPlayDuringCutscene" - * "AllowPlayerAIOnMission" - * "AllowPoliceScannerWhenPlayerHasNoControl" - * "AllowRadioDuringSwitch" - * See NativeDB for reference: http://natives.altv.mp/#/0xB9EFD5C25018725A - */ - export function setAudioFlag(flagName: string | null, toggle: boolean): void; + export function datadictSetString(objectData: any, key: string, value: string): [void, any]; - /** - * @param p1 is always 0 in the scripts - */ - export function prepareSynchronizedAudioEvent(audioEvent: string | null, p1: any): boolean; + export function datadictSetVector(objectData: any, key: string, valueX: number, valueY: number, valueZ: number): [void, any]; - export function prepareSynchronizedAudioEventForScene(sceneID: number, audioEvent: string | null): boolean; + export function datadictCreateDict(objectData: any, key: string): [any, any]; - export function playSynchronizedAudioEvent(sceneID: number): boolean; + export function datadictCreateArray(objectData: any, key: string): [any, any]; - export function stopSynchronizedAudioEvent(sceneID: number): boolean; + export function datadictGetBool(objectData: any, key: string): [boolean, any]; - export function initSynchSceneAudioWithPosition(audioEvent: string | null, x: number, y: number, z: number): void; + export function datadictGetInt(objectData: any, key: string): [number, any]; - export function initSynchSceneAudioWithEntity(audioEvent: string | null, entity: Entity | number): void; + export function datadictGetFloat(objectData: any, key: string): [number, any]; - /** - * Needs to be called every frame. - * Audio mode to apply this frame: https://alloc8or.re/gta5/doc/enums/audSpecialEffectMode.txt - */ - export function setAudioSpecialEffectMode(mode: number): void; + export function datadictGetString(objectData: any, key: string): [string, any]; - /** - * Found in the b617d scripts, duplicates removed: - * AUDIO::SET_PORTAL_SETTINGS_OVERRIDE("V_CARSHOWROOM_PS_WINDOW_UNBROKEN", "V_CARSHOWROOM_PS_WINDOW_BROKEN"); - * AUDIO::SET_PORTAL_SETTINGS_OVERRIDE("V_CIA_PS_WINDOW_UNBROKEN", "V_CIA_PS_WINDOW_BROKEN"); - * AUDIO::SET_PORTAL_SETTINGS_OVERRIDE("V_DLC_HEIST_APARTMENT_DOOR_CLOSED", "V_DLC_HEIST_APARTMENT_DOOR_OPEN"); - * AUDIO::SET_PORTAL_SETTINGS_OVERRIDE("V_FINALEBANK_PS_VAULT_INTACT", "V_FINALEBANK_PS_VAULT_BLOWN"); - * AUDIO::SET_PORTAL_SETTINGS_OVERRIDE("V_MICHAEL_PS_BATHROOM_WITH_WINDOW", "V_MICHAEL_PS_BATHROOM_WITHOUT_WINDOW"); - */ - export function setPortalSettingsOverride(p0: string | null, p1: string | null): void; + export function datadictGetVector(objectData: any, key: string): [Vector3, any]; - /** - * Found in the b617d scripts, duplicates removed: - * AUDIO::REMOVE_PORTAL_SETTINGS_OVERRIDE("V_CARSHOWROOM_PS_WINDOW_UNBROKEN"); - * AUDIO::REMOVE_PORTAL_SETTINGS_OVERRIDE("V_CIA_PS_WINDOW_UNBROKEN"); - * AUDIO::REMOVE_PORTAL_SETTINGS_OVERRIDE("V_DLC_HEIST_APARTMENT_DOOR_CLOSED"); - * AUDIO::REMOVE_PORTAL_SETTINGS_OVERRIDE("V_FINALEBANK_PS_VAULT_INTACT"); - * AUDIO::REMOVE_PORTAL_SETTINGS_OVERRIDE("V_MICHAEL_PS_BATHROOM_WITH_WINDOW"); - */ - export function removePortalSettingsOverride(p0: string | null): void; + export function datadictGetDict(objectData: any, key: string): [any, any]; + + export function datadictGetArray(objectData: any, key: string): [any, any]; /** - * STOP_S[MOKE_GRENADE_EXPLOSION_SOUNDS]? - */ - export function stopSmokeGrenadeExplosionSounds(): void; + * Types: + * 1 = Boolean + * 2 = Integer + * 3 = Float + * 4 = String + * 5 = Vector3 + * 6 = Object + * 7 = Array + */ + export function datadictGetType(objectData: any, key: string): [number, any]; - export function getMusicVolSlider(): number; + export function dataarrayAddBool(arrayData: any, value: boolean): [void, any]; - export function requestTennisBanks(ped: Player | number): void; + export function dataarrayAddInt(arrayData: any, value: number): [void, any]; - export function unrequestTennisBanks(): void; + export function dataarrayAddFloat(arrayData: any, value: number): [void, any]; - export function setSkipMinigunSpinUpAudio(p0: boolean): void; + export function dataarrayAddString(arrayData: any, value: string): [void, any]; - export function stopCutsceneAudio(): void; + export function dataarrayAddVector(arrayData: any, valueX: number, valueY: number, valueZ: number): [void, any]; - export function hasLoadedMpDataSet(): boolean; + export function dataarrayAddDict(arrayData?: any): [any, any]; - export function hasLoadedSpDataSet(): boolean; + export function dataarrayGetBool(arrayData: any, arrayIndex: number): [boolean, any]; - export function getVehicleHornSoundIndex(vehicle: Vehicle | number): number; + export function dataarrayGetInt(arrayData: any, arrayIndex: number): [number, any]; - export function setVehicleHornSoundIndex(vehicle: Vehicle | number, value: number): void; + export function dataarrayGetFloat(arrayData: any, arrayIndex: number): [number, any]; - /** - * BRAIN::ADD_SCRIPT_TO_RANDOM_PED("pb_prostitute", ${s_f_y_hooker_01}, 100, 0); - * - Nacorpio - * ----- - * Hardcoded to not work in Multiplayer. - */ - export function addScriptToRandomPed(name: string | null, model: number, p2: number, p3: number): void; + export function dataarrayGetString(arrayData: any, arrayIndex: number): [string, any]; - /** - * Registers a script for any object with a specific model hash. - * BRAIN::REGISTER_OBJECT_SCRIPT_BRAIN("ob_telescope", ${prop_telescope_01}, 100, 4.0, -1, 9); - * - Nacorpio - */ - export function registerObjectScriptBrain(scriptName: string | null, modelHash: number, p2: number, activationRange: number, p4: number, p5: number): void; + export function dataarrayGetVector(arrayData: any, arrayIndex: number): [Vector3, any]; - export function isObjectWithinBrainActivationRange(object: number): boolean; + export function dataarrayGetDict(arrayData: any, arrayIndex: number): [any, any]; - export function registerWorldPointScriptBrain(scriptName: string | null, activationRange: number, p2: number): void; + export function dataarrayGetCount(arrayData?: any): [number, any]; /** - * Gets whether the world point the calling script is registered to is within desired range of the player. - */ - export function isWorldPointWithinBrainActivationRange(): boolean; - - export function enableScriptBrainSet(brainSet: number): void; - - export function disableScriptBrainSet(brainSet: number): void; - - export function reactivateAllWorldBrainsThatAreWaitingTillOutOfRange(): void; + * Types: + * 1 = Boolean + * 2 = Integer + * 3 = Float + * 4 = String + * 5 = Vector3 + * 6 = Object + * 7 = Array + */ + export function dataarrayGetType(arrayData: any, arrayIndex: number): [number, any]; - export function reactivateAllObjectBrainsThatAreWaitingTillOutOfRange(): void; + export function decorSetTime(entity: Entity | number, propertyName: string, timestamp: number): boolean; /** - * Possible values: - * act_cinema - * am_mp_carwash_launch - * am_mp_carwash_control - * am_mp_property_ext - * chop - * fairgroundHub - * launcher_BasejumpHeli - * launcher_BasejumpPack - * See NativeDB for reference: http://natives.altv.mp/#/0x6D6840CEE8845831 - */ - export function reactivateNamedWorldBrainsWaitingTillOutOfRange(scriptName: string | null): void; - - /** - * Looks like a cousin of above function _6D6840CEE8845831 as it was found among them. Must be similar - * Here are possible values of argument - - * "ob_tv" - * "launcher_Darts" - */ - export function reactivateNamedObjectBrainsWaitingTillOutOfRange(scriptName: string | null): void; - - /** - * If you have created a script (rendering) camera, and want to go back to the - * character (gameplay) camera, call this native with render set to 0. - * Setting ease to 1 will smooth the transition. - * @param ease - smooth transition between the camera's positions - * @param easeTime - Time in milliseconds for the transition to happen - */ - export function renderScriptCams(render: boolean, ease: boolean, easeTime: number, p3: boolean, p4: boolean, p5: any): void; + * This function sets metadata of type bool to specified entity. + */ + export function decorSetBool(entity: Entity | number, propertyName: string, value: boolean): boolean; - /** - * This native makes the gameplay camera zoom into first person/third person with a special effect. - */ - export function stopRenderingScriptCamsUsingCatchUp(render: boolean, p1: number, p2: number, p3: any): void; + export function decorSetFloat(entity: Entity | number, propertyName: string, value: number): boolean; /** - * "DEFAULT_SCRIPTED_CAMERA" - * "DEFAULT_ANIMATED_CAMERA" - * "DEFAULT_SPLINE_CAMERA" - * "DEFAULT_SCRIPTED_FLY_CAMERA" - * "TIMED_SPLINE_CAMERA" - */ - export function createCam(camName: string | null, p1: boolean): number; + * Sets property to int. + */ + export function decorSetInt(entity: Entity | number, propertyName: string, value: number): boolean; - /** - * ------------ - * Camera names found in the b617d scripts: - * "DEFAULT_ANIMATED_CAMERA" - * "DEFAULT_SCRIPTED_CAMERA" - * "DEFAULT_SCRIPTED_FLY_CAMERA" - * "DEFAULT_SPLINE_CAMERA" - * ------------ - * Side Note: It seems p8 is basically to represent what would be the bool p1 within CREATE_CAM native. As well as the p9 since it's always 2 in scripts seems to represent what would be the last param within SET_CAM_ROT native which normally would be 2. - * @param camName is always set to "DEFAULT_SCRIPTED_CAMERA" in Rockstar's scripts. - */ - export function createCamWithParams(camName: string | null, posX: number, posY: number, posZ: number, rotX: number, rotY: number, rotZ: number, fov: number, p8: boolean, p9: number): number; + export function decorGetBool(entity: Entity | number, propertyName: string): boolean; - export function createCamera(camHash: number, p1: boolean): number; + export function decorGetFloat(entity: Entity | number, propertyName: string): number; - /** - * @param p9 uses 2 by default - */ - export function createCameraWithParams(camHash: number, posX: number, posY: number, posZ: number, rotX: number, rotY: number, rotZ: number, fov: number, p8: boolean, p9: any): number; + export function decorGetInt(entity: Entity | number, propertyName: string): number; /** - * BOOL param indicates whether the cam should be destroyed if it belongs to the calling script. - */ - export function destroyCam(cam: number, bScriptHostCam: boolean): void; + * Returns whether or not the specified property is set for the entity. + */ + export function decorExistOn(entity: Entity | number, propertyName: string): boolean; - /** - * BOOL param indicates whether the cam should be destroyed if it belongs to the calling script. - */ - export function destroyAllCams(bScriptHostCam: boolean): void; + export function decorRemove(entity: Entity | number, propertyName: string): boolean; /** - * Returns whether or not the passed camera handle exists. - */ - export function doesCamExist(cam: number): boolean; + * https://alloc8or.re/gta5/doc/enums/eDecorType.txt + */ + export function decorRegister(propertyName: string, type: number): void; /** - * Set camera as active/inactive. - */ - export function setCamActive(cam: number, active: boolean): void; + * type: see DECOR_REGISTER + */ + export function decorIsRegisteredAsType(propertyName: string, type: number): boolean; /** - * Returns whether or not the passed camera handle is active. - */ - export function isCamActive(cam: number): boolean; - - export function isCamRendering(cam: number): boolean; - - export function getRenderingCam(): number; + * Called after all decorator type initializations. + */ + export function decorRegisterLock(): void; - export function getCamCoord(cam: number): Vector3; + export function areAnyCcsPending(): boolean; /** - * The last parameter, as in other "ROT" methods, is usually 2. - */ - export function getCamRot(cam: number, rotationOrder: number): Vector3; - - export function getCamFov(cam: number): number; + * Returns true if the given DLC pack is present. + */ + export function isDlcPresent(dlcHash: number): boolean; - export function getCamNearClip(cam: number): number; + /** + * This function is hard-coded to always return 1. + */ + export function dlcCheckCloudDataCorrect(): boolean; - export function getCamFarClip(cam: number): number; + /** + * This function is hard-coded to always return 0. + */ + export function getExtracontentCloudResult(): number; - export function getCamNearDof(cam: number): number; + /** + * This function is hard-coded to always return 1. + */ + export function dlcCheckCompatPackConfiguration(): boolean; - export function getCamFarDof(cam: number): number; + export function getEverHadBadPackOrder(): boolean; - export function getCamDofStrength(cam: number): number; + export function getIsLoadingScreenActive(): boolean; - export function setCamParams(cam: number, posX: number, posY: number, posZ: number, rotX: number, rotY: number, rotZ: number, fieldOfView: number, p8: any, p9: number, p10: number, p11: number): void; + export function getIsInitialLoadingScreenActive(): boolean; /** - * Sets the position of the cam. - */ - export function setCamCoord(cam: number, posX: number, posY: number, posZ: number): void; + * Sets the value of the specified variable to 0. + * Always returns true. + */ + export function hasCloudRequestsFinished(p0: boolean, unused: number): [boolean, boolean]; /** - * Sets the rotation of the cam. - * Last parameter unknown. - * Last parameter seems to always be set to 2. - */ - export function setCamRot(cam: number, rotX: number, rotY: number, rotZ: number, rotationOrder: number): void; + * Unloads GROUP_MAP (GTAO/MP) DLC data and loads GROUP_MAP_SP DLC. Neither are loaded by default, ON_ENTER_MP is a cognate to this function and loads MP DLC (and unloads SP DLC by extension). + * Works in singleplayer. + */ + export function onEnterSp(): void; /** - * Sets the field of view of the cam. - * --------------------------------------------- - * Min: 1.0f - * Max: 130.0f - */ - export function setCamFov(cam: number, fieldOfView: number): void; + * This loads the GTA:O dlc map parts (high end garages, apartments). + * Works in singleplayer. + * In order to use GTA:O heist IPL's you have to call this native with the following params: SET_INSTANCE_PRIORITY_MODE(1); + */ + export function onEnterMp(): void; - export function setCamNearClip(cam: number, nearClip: number): void; + /** + * Checks whether an entity exists in the game world. + */ + export function doesEntityExist(entity: Entity | number): boolean; - export function setCamFarClip(cam: number, farClip: number): void; + export function doesEntityBelongToThisScript(entity: Entity | number, p1: boolean): boolean; - export function forceCamFarClip(cam: number, p1: number): void; + export function doesEntityHaveDrawable(entity: Entity | number): boolean; - export function setCamMotionBlurStrength(cam: number, strength: number): void; + export function doesEntityHavePhysics(entity: Entity | number): boolean; - export function setCamNearDof(cam: number, nearDOF: number): void; + export function doesEntityHaveSkeleton(entity: Entity | number): boolean; - export function setCamFarDof(cam: number, farDOF: number): void; + export function doesEntityHaveAnimDirector(entity: Entity | number): boolean; - export function setCamDofStrength(cam: number, dofStrength: number): void; + /** + * P3 is always 3 as far as i cant tell + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function hasEntityAnimFinished(entity: Entity | number, animDict: string, animName: string, p3: number): boolean; - export function setCamDofPlanes(cam: number, p1: number, p2: number, p3: number, p4: number): void; + export function hasEntityBeenDamagedByAnyObject(entity: Entity | number): boolean; - export function setCamUseShallowDofMode(cam: number, toggle: boolean): void; + export function hasEntityBeenDamagedByAnyPed(entity: Entity | number): boolean; - export function setUseHiDof(): void; + export function hasEntityBeenDamagedByAnyVehicle(entity: Entity | number): boolean; /** - * Only used in R* Script fm_mission_controller_2020 - */ - export function setUseHiDofOnSyncedSceneThisUpdate(): void; + * Entity 1 = Victim + * Entity 2 = Attacker + * p2 seems to always be 1 + */ + export function hasEntityBeenDamagedByEntity(entity1: Entity | number, entity2: Entity | number, p2: boolean): boolean; - export function setCamDofOverriddenFocusDistance(camera: number, p1: number): void; + /** + * traceType is always 17 in the scripts. + * There is other codes used for traceType: + * 19 - in jewelry_prep1a + * 126 - in am_hunt_the_beast + * 256 & 287 - in fm_mission_controller + */ + export function hasEntityClearLosToEntity(entity1: Entity | number, entity2: Entity | number, traceType: number): boolean; - export function setCamDofOverriddenFocusDistanceBlendLevel(p0: any, p1: number): void; + export function hasEntityClearLosToEntityAdjustForCover(entity1: Entity | number, entity2: Entity | number, traceType: number): boolean; /** - * This native has its name defined inside its codE - */ - export function setCamDofFnumberOfLens(camera: number, p1: number): void; + * Has the entity1 got a clear line of sight to the other entity2 from the direction entity1 is facing. + * This is one of the most CPU demanding BOOL natives in the game; avoid calling this in things like nested for-loops + */ + export function hasEntityClearLosToEntityInFront(entity1: Entity | number, entity2: Entity | number): boolean; /** - * Native name labeled within its code - */ - export function setCamDofFocalLengthMultiplier(camera: number, multiplier: number): void; + * Called on tick. + * Tested with vehicles, returns true whenever the vehicle is touching any entity. + * Note: for vehicles, the wheels can touch the ground and it will still return false, but if the body of the vehicle touches the ground, it will return true. + */ + export function hasEntityCollidedWithAnything(entity: Entity | number): boolean; - /** - * This native has a name defined inside its code - */ - export function setCamDofFocusDistanceBias(camera: number, p1: number): void; + export function getLastEntityHitByEntity(entity: Entity | number): Entity | number; + + export function getLastMaterialHitByEntity(entity: Entity | number): number; + + export function getCollisionNormalOfLastHitForEntity(entity: Entity | number): Vector3; /** - * This native has a name defined inside its code - */ - export function setCamDofMaxNearInFocusDistance(camera: number, p1: number): void; + * Based on carmod_shop script decompile this takes a vehicle parameter. It is called when repair is done on initial enter. + */ + export function forceEntityAiAndAnimationUpdate(entity: Entity | number): void; /** - * This native has a name defined inside its code - */ - export function setCamDofMaxNearInFocusDistanceBlendLevel(camera: number, p1: number): void; + * Returns a float value representing animation's current playtime with respect to its total playtime. This value increasing in a range from [0 to 1] and wrap back to 0 when it reach 1. + * Example: + * 0.000000 - mark the starting of animation. + * 0.500000 - mark the midpoint of the animation. + * 1.000000 - mark the end of animation. + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function getEntityAnimCurrentTime(entity: Entity | number, animDict: string, animName: string): number; /** - * Last param determines if its relative to the Entity - */ - export function attachCamToEntity(cam: number, entity: Entity | number, xOffset: number, yOffset: number, zOffset: number, isRelative: boolean): void; + * Returns a float value representing animation's total playtime in milliseconds. + * Example: + * GET_ENTITY_ANIM_TOTAL_TIME(PLAYER_ID(),"amb@world_human_yoga@female@base","base_b") + * return 20800.000000 + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function getEntityAnimTotalTime(entity: Entity | number, animDict: string, animName: string): number; - export function attachCamToPedBone(cam: number, ped: Player | number, boneIndex: number, x: number, y: number, z: number, heading: boolean): void; + /** + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function getAnimDuration(animDict: string, animName: string): number; - export function hardAttachCamToPedBone(cam: number, ped: Player | number, boneIndex: number, p3: number, p4: number, p5: number, p6: number, p7: number, p8: number, p9: boolean): void; + export function getEntityAttachedTo(entity: Entity | number): Entity | number; /** - * Example from am_mp_drone script: - * @param cam :HARD_ATTACH_CAM_TO_ENTITY(Local_190.f_169, NETWORK::NET_TO_OBJ(Local_190.f_159), 0f, 0f, 180f, Var0, 1); - */ - export function hardAttachCamToEntity(cam: number, entity: Entity | number, xRot: number, yRot: number, zRot: number, xOffset: number, yOffset: number, zOffset: number, isRelative: boolean): void; + * Gets the current coordinates for a specified entity. + * `entity` = The entity to get the coordinates from. + * `alive` = Unused by the game, potentially used by debug builds of GTA in order to assert whether or not an entity was alive. + */ + export function getEntityCoords(entity: Entity | number, alive: boolean): Vector3; /** - * This native works with vehicles only. Bone indexes are usually given by this native GET_ENTITY_BONE_INDEX_BY_NAME. - */ - export function attachCamToVehicleBone(cam: number, vehicle: Vehicle | number, boneIndex: number, relativeRotation: boolean, rotX: number, rotY: number, rotZ: number, offsetX: number, offsetY: number, offsetZ: number, fixedDirection: boolean): void; - - export function detachCam(cam: number): void; + * Gets the entity's forward vector. + */ + export function getEntityForwardVector(entity: Entity | number): Vector3; /** - * The native seems to only be called once. - * The native is used as so, - * In the exile1 script. - * @param cam :SET_CAM_INHERIT_ROLL_VEHICLE(l_544, getElem(2, &l_525, 4)); - */ - export function setCamInheritRollVehicle(cam: number, p1: boolean): void; - - export function pointCamAtCoord(cam: number, x: number, y: number, z: number): void; + * Gets the X-component of the entity's forward vector. + */ + export function getEntityForwardX(entity: Entity | number): number; /** - * @param p5 always seems to be 1 i.e TRUE - */ - export function pointCamAtEntity(cam: number, entity: Entity | number, p2: number, p3: number, p4: number, p5: boolean): void; + * Gets the Y-component of the entity's forward vector. + */ + export function getEntityForwardY(entity: Entity | number): number; /** - * Parameters p0-p5 seems correct. The bool p6 is unknown, but through every X360 script it's always 1. Please correct p0-p5 if any prove to be wrong. - */ - export function pointCamAtPedBone(cam: number, ped: Player | number, boneIndex: number, x: number, y: number, z: number, p6: boolean): void; + * Returns the heading of the entity in degrees. Also know as the "Yaw" of an entity. + */ + export function getEntityHeading(entity: Entity | number): number; - export function stopCamPointing(cam: number): void; + /** + * Gets the heading of the entity physics in degrees, which tends to be more accurate than just "GET_ENTITY_HEADING". This can be clearly seen while, for example, ragdolling a ped/player. + * NOTE: The name and description of this native are based on independent research. If you find this native to be more suitable under a different name and/or described differently, please feel free to do so. + */ + export function getEntityHeadingFromEulers(entity: Entity | number): number; /** - * Allows you to aim and shoot at the direction the camera is facing. - */ - export function setCamAffectsAiming(cam: number, toggle: boolean): void; + * Returns an integer value of entity's current health. + * Example of range for ped: + * - Player [0 to 200] + * - Ped [100 to 200] + * - Vehicle [0 to 1000] + * - Object [0 to 1000] + * Health is actually a float value but this native casts it to int. + * In order to get the actual value, do: + * float health = *(float *)(entityAddress + 0x280); + */ + export function getEntityHealth(entity: Entity | number): number; /** - * Rotates the radar to match the camera's Z rotation - */ - export function setCamControlsMiniMapHeading(cam: number, toggle: boolean): void; + * Return an integer value of entity's maximum health. + * Example: + * - Player = 200 + * - Ped = 150 + */ + export function getEntityMaxHealth(entity: Entity | number): number; /** - * When set to true shadows appear more smooth but less detailed. - * Set to false by default. - */ - export function setCamIsInsideVehicle(cam: number, toggle: boolean): void; + * For instance: ENTITY::SET_ENTITY_MAX_HEALTH(PLAYER::PLAYER_PED_ID(), 200); // director_mode.c4: 67849 + */ + export function setEntityMaxHealth(entity: Entity | number, value: number): void; - export function allowMotionBlurDecay(p0: any, p1: boolean): void; + export function getEntityHeight(entity: Entity | number, X: number, Y: number, Z: number, atTop: boolean, inWorldCoords: boolean): number; /** - * NOTE: Debugging functions are not present in the retail version of the game. - */ - export function setCamDebugName(camera: number, name: string | null): void; + * Return height (z-dimension) above ground. + * Example: The pilot in a titan plane is 1.844176 above ground. + * How can i convert it to meters? + * Everything seems to be in meters, probably this too. + */ + export function getEntityHeightAboveGround(entity: Entity | number): number; - export function getDebugCam(): number; + export function getEntityMatrix(entity: Entity | number, forwardVector?: Vector3, rightVector?: Vector3, upVector?: Vector3, position?: Vector3): [void, Vector3, Vector3, Vector3, Vector3]; /** - * I filled p1-p6 (the floats) as they are as other natives with 6 floats in a row are similar and I see no other method. So if a test from anyone proves them wrong please correct. - * @param length (length) determines the length of the spline, affects camera path and duration of transition between previous node and this one - * @param smoothingStyle big values ~100 will slow down the camera movement before reaching this node - * @param rotationOrder != 0 seems to override the rotation/pitch (bool?) - */ - export function addCamSplineNode(camera: number, x: number, y: number, z: number, xRot: number, yRot: number, zRot: number, length: number, smoothingStyle: number, rotationOrder: number): void; + * Returns the model hash from the entity + */ + export function getEntityModel(entity: Entity | number): number; /** - * @param cam is the spline camera to which the node is being added. - * @param cam2 is the camera used to create the node. - * @param p3 is always 3 in scripts. It might be smoothing style or rotation order. - */ - export function addCamSplineNodeUsingCameraFrame(cam: number, cam2: number, length: number, p3: number): void; + * Converts world coords (posX - Z) to coords relative to the entity + * Example: + * posX is given as 50 + * entity's x coord is 40 + * the returned x coord will then be 10 or -10, not sure haven't used this in a while (think it is 10 though). + */ + export function getOffsetFromEntityGivenWorldCoords(entity: Entity | number, posX: number, posY: number, posZ: number): Vector3; /** - * @param cam is the spline camera to which the node is being added. - * @param cam2 is the camera used to create the node. - * @param p3 is always 3 in scripts. It might be smoothing style or rotation order. - */ - export function addCamSplineNodeUsingCamera(cam: number, cam2: number, length: number, p3: number): void; + * Offset values are relative to the entity. + * x = left/right + * y = forward/backward + * z = up/down + */ + export function getOffsetFromEntityInWorldCoords(entity: Entity | number, offsetX: number, offsetY: number, offsetZ: number): Vector3; + + export function getEntityPitch(entity: Entity | number): number; /** - * @param p2 is always 2 in scripts. It might be smoothing style or rotation order. - */ - export function addCamSplineNodeUsingGameplayFrame(cam: number, length: number, p2: number): void; + * w is the correct parameter name! + */ + export function getEntityQuaternion(entity: Entity | number, x?: number, y?: number, z?: number, w?: number): [void, number, number, number, number]; - export function setCamSplinePhase(cam: number, p1: number): void; + /** + * Displays the current ROLL axis of the entity [-180.0000/180.0000+] + * (Sideways Roll) such as a vehicle tipped on its side + */ + export function getEntityRoll(entity: Entity | number): number; /** - * Can use this with SET_CAM_SPLINE_PHASE to set the float it this native returns. - * (returns 1.0f when no nodes has been added, reached end of non existing spline) - */ - export function getCamSplinePhase(cam: number): number; + * rotationOrder is the order yaw, pitch and roll is applied. Usually 2. Returns a vector where the Z coordinate is the yaw. + * rotationOrder refers to the order yaw pitch roll is applied; value ranges from 0 to 5 and is usually *2* in scripts. + * What you use for rotationOrder when getting must be the same as rotationOrder when setting the rotation. + * What it returns is the yaw on the z part of the vector, which makes sense considering R* considers z as vertical. Here's a picture for those of you who don't understand pitch, yaw, and roll: www.allstar.fiu.edu/aero/images/pic5-1.gif + * Rotation Orders: + * 0: ZYX - Rotate around the z-axis, then the y-axis and finally the x-axis. + * 1: YZX - Rotate around the y-axis, then the z-axis and finally the x-axis. + * 2: ZXY - Rotate around the z-axis, then the x-axis and finally the y-axis. + * 3: XZY - Rotate around the x-axis, then the z-axis and finally the y-axis. + * 4: YXZ - Rotate around the y-axis, then the x-axis and finally the z-axis. + * 5: XYZ - Rotate around the x-axis, then the y-axis and finally the z-axis. + */ + export function getEntityRotation(entity: Entity | number, rotationOrder: number): Vector3; + + export function getEntityRotationVelocity(entity: Entity | number): Vector3; /** - * I'm pretty sure the parameter is the camera as usual, but I am not certain so I'm going to leave it as is. - */ - export function getCamSplineNodePhase(cam: number): number; + * Returns the name of the script that owns/created the entity or nullptr. Second parameter is unused, can just be a nullptr. + */ + export function getEntityScript(entity: Entity | number, script?: number): [string, number]; /** - * I named p1 as timeDuration as it is obvious. I'm assuming tho it is ran in ms(Milliseconds) as usual. - */ - export function setCamSplineDuration(cam: number, timeDuration: number): void; + * result is in meters per second + * ------------------------------------------------------------ + * So would the conversion to mph and km/h, be along the lines of this. + * float speed = GET_ENTITY_SPEED(veh); + * float kmh = (speed * 3.6); + * float mph = (speed * 2.236936); + * ------------------------------------------------------------ + */ + export function getEntitySpeed(entity: Entity | number): number; - export function setCamSplineSmoothingStyle(cam: number, smoothingStyle: number): void; + /** + * Relative can be used for getting speed relative to the frame of the vehicle, to determine for example, if you are going in reverse (-y speed) or not (+y speed). + */ + export function getEntitySpeedVector(entity: Entity | number, relative: boolean): Vector3; - export function getCamSplineNodeIndex(cam: number): number; + export function getEntityUprightValue(entity: Entity | number): number; - export function setCamSplineNodeEase(cam: number, easingFunction: number, p2: number, p3: number): void; + export function getEntityVelocity(entity: Entity | number): Vector3; - export function setCamSplineNodeVelocityScale(cam: number, p1: number, scale: number): void; + /** + * Simply returns whatever is passed to it (Regardless of whether the handle is valid or not). + */ + export function getObjectIndexFromEntityIndex(entity: Entity | number): Object; - export function overrideCamSplineVelocity(cam: number, p1: number, p2: number, p3: number): void; + /** + * Simply returns whatever is passed to it (Regardless of whether the handle is valid or not). + */ + export function getPedIndexFromEntityIndex(entity: Entity | number): Ped | Player | number; /** - * Max value for p1 is 15. - */ - export function overrideCamSplineMotionBlur(cam: number, p1: number, p2: number, p3: number): void; + * Simply returns whatever is passed to it (Regardless of whether the handle is valid or not). + */ + export function getVehicleIndexFromEntityIndex(entity: Entity | number): Vehicle | number; - export function setCamSplineNodeExtraFlags(cam: number, p1: number, flags: number): void; + /** + * Returns the coordinates of an entity-bone. + */ + export function getWorldPositionOfEntityBone(entity: Entity | number, boneIndex: number): Vector3; - export function isCamSplinePaused(cam: number): boolean; + export function getNearestPlayerToEntity(entity: Entity | number): Player | number; - /** - * Previous declaration void SET_CAM_ACTIVE_WITH_INTERP(Cam camTo, Cam camFrom, int duration, BOOL easeLocation, BOOL easeRotation) is completely wrong. The last two params are integers not BOOLs... - */ - export function setCamActiveWithInterp(camTo: number, camFrom: number, duration: number, easeLocation: number, easeRotation: number): void; + export function getNearestPlayerToEntityOnTeam(entity: Entity | number, team: number): Player | number; - export function isCamInterpolating(cam: number): boolean; + export function getNearestParticipantToEntity(entity: Entity | number): number; /** - * Possible shake types (updated b617d): - * DEATH_FAIL_IN_EFFECT_SHAKE - * DRUNK_SHAKE - * FAMILY5_DRUG_TRIP_SHAKE - * HAND_SHAKE - * JOLT_SHAKE - * LARGE_EXPLOSION_SHAKE - * MEDIUM_EXPLOSION_SHAKE - * SMALL_EXPLOSION_SHAKE - * See NativeDB for reference: http://natives.altv.mp/#/0x6A25241C340D3822 - */ - export function shakeCam(cam: number, type: string | null, amplitude: number): void; + * Returns: + * 0 = no entity + * 1 = ped + * 2 = vehicle + * 3 = object + */ + export function getEntityType(entity: Entity | number): number; /** - * Example from michael2 script. - * @param cam :ANIMATED_SHAKE_CAM(l_5069, "shake_cam_all@", "light", "", 1f); - */ - export function animatedShakeCam(cam: number, p1: string | null, p2: string | null, p3: string | null, amplitude: number): void; + * A population type, from the following enum: https://alloc8or.re/gta5/doc/enums/ePopulationType.txt + */ + export function getEntityPopulationType(entity: Entity | number): number; - export function isCamShaking(cam: number): boolean; + export function isAnEntity(handle: number): boolean; - export function setCamShakeAmplitude(cam: number, amplitude: number): void; + export function isEntityAPed(entity: Entity | number): boolean; - export function stopCamShaking(cam: number, p1: boolean): void; + export function isEntityAMissionEntity(entity: Entity | number): boolean; - /** - * CAM::SHAKE_SCRIPT_GLOBAL("HAND_SHAKE", 0.2); - * Full list of cam shake types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/camShakeTypesCompact.json - */ - export function shakeScriptGlobal(p0: string | null, p1: number): void; + export function isEntityAVehicle(entity: Entity | number): boolean; + + export function isEntityAnObject(entity: Entity | number): boolean; /** - * CAM::ANIMATED_SHAKE_SCRIPT_GLOBAL("SHAKE_CAM_medium", "medium", "", 0.5f); - * Full list of cam shake types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/camShakeTypesCompact.json - */ - export function animatedShakeScriptGlobal(p0: string | null, p1: string | null, p2: string | null, p3: number): void; + * Checks if entity is within x/y/zSize distance of x/y/z. + * Last three are unknown ints, almost always p7 = 0, p8 = 1, p9 = 0 + */ + export function isEntityAtCoord(entity: Entity | number, xPos: number, yPos: number, zPos: number, xSize: number, ySize: number, zSize: number, p7: boolean, p8: boolean, p9: number): boolean; /** - * In drunk_controller.c4, sub_309 - * if (CAM::IS_SCRIPT_GLOBAL_SHAKING()) { - * CAM::STOP_SCRIPT_GLOBAL_SHAKING(0); - * } - */ - export function isScriptGlobalShaking(): boolean; + * Checks if entity1 is within the box defined by x/y/zSize of entity2. + * Last three parameters are almost alwasy p5 = 0, p6 = 1, p7 = 0 + */ + export function isEntityAtEntity(entity1: Entity | number, entity2: Entity | number, xSize: number, ySize: number, zSize: number, p5: boolean, p6: boolean, p7: number): boolean; /** - * In drunk_controller.c4, sub_309 - * if (CAM::IS_SCRIPT_GLOBAL_SHAKING()) { - * CAM::STOP_SCRIPT_GLOBAL_SHAKING(0); - * } - */ - export function stopScriptGlobalShaking(p0: boolean): void; + * Whether the entity is attached to any other entity. + */ + export function isEntityAttached(entity: Entity | number): boolean; + + export function isEntityAttachedToAnyObject(entity: Entity | number): boolean; + + export function isEntityAttachedToAnyPed(entity: Entity | number): boolean; + + export function isEntityAttachedToAnyVehicle(entity: Entity | number): boolean; + + export function isEntityAttachedToEntity(from: Entity | number, to: Entity | number): boolean; + + export function isEntityDead(entity: Entity | number, p1: boolean): boolean; + + export function isEntityInAir(entity: Entity | number): boolean; /** - * @param p1 0..16 - */ - export function triggerVehiclePartBrokenCameraShake(vehicle: Vehicle | number, p1: number, p2: number): void; + * `p8` is a debug flag invoking functions in the same path as ``DRAW_MARKER`` + * `p10` is some entity flag check, also used in `IS_ENTITY_AT_ENTITY`, `IS_ENTITY_IN_AREA`, and `IS_ENTITY_AT_COORD`. + * See IS_POINT_IN_ANGLED_AREA for the definition of an angled area. + */ + export function isEntityInAngledArea(entity: Entity | number, x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, width: number, debug: boolean, includeZ: boolean, p10: any): boolean; + + export function isEntityInArea(entity: Entity | number, x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, p7: boolean, p8: boolean, p9: any): boolean; /** - * Atleast one time in a script for the zRot Rockstar uses GET_ENTITY_HEADING to help fill the parameter. - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - * @param p9 is unknown at this time. - * @param p10 throughout all the X360 Scripts is always 2. - */ - export function playCamAnim(cam: number, animName: string | null, animDictionary: string | null, x: number, y: number, z: number, xRot: number, yRot: number, zRot: number, p9: boolean, p10: number): boolean; + * Full list of zones by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/zones.json + */ + export function isEntityInZone(entity: Entity | number, zone: string): boolean; - export function isCamPlayingAnim(cam: number, animName: string | null, animDictionary: string | null): boolean; + export function isEntityInWater(entity: Entity | number): boolean; - export function setCamAnimCurrentPhase(cam: number, phase: number): void; + /** + * Get how much of the entity is submerged. 1.0f is whole entity. + */ + export function getEntitySubmergedLevel(entity: Entity | number): number; - export function getCamAnimCurrentPhase(cam: number): number; + export function setEntityRequiresMoreExpensiveRiverCheck(entity: Entity | number, toggle: boolean): void; /** - * Examples: - * CAM::PLAY_SYNCHRONIZED_CAM_ANIM(l_2734, NETWORK::NETWORK_GET_LOCAL_SCENE_FROM_NETWORK_ID(l_2739), "PLAYER_EXIT_L_CAM", "mp_doorbell"); - * CAM::PLAY_SYNCHRONIZED_CAM_ANIM(l_F0D[71], l_F4D[151], "ah3b_attackheli_cam2", "missheistfbi3b_helicrash"); - */ - export function playSynchronizedCamAnim(p0: any, p1: any, animName: string | null, animDictionary: string | null): boolean; + * Returns true if the entity is in between the minimum and maximum values for the 2d screen coords. + * This means that it will return true even if the entity is behind a wall for example, as long as you're looking at their location. + * Chipping + */ + export function isEntityOnScreen(entity: Entity | number): boolean; - export function setFlyCamHorizontalResponse(cam: number, p1: number, p2: number, p3: number): void; + /** + * See also PED::IS_SCRIPTED_SCENARIO_PED_USING_CONDITIONAL_ANIM 0x6EC47A344923E1ED 0x3C30B447 + * Taken from ENTITY::IS_ENTITY_PLAYING_ANIM(PLAYER::PLAYER_PED_ID(), "creatures@shark@move", "attack_player", 3) + * p4 is always 3 in the scripts. + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function isEntityPlayingAnim(entity: Entity | number, animDict: string, animName: string, taskFlag: number): boolean; - export function setFlyCamVerticalResponse(cam: number, p1: number, p2: number, p3: number): void; + /** + * a static ped will not react to natives like "APPLY_FORCE_TO_ENTITY" or "SET_ENTITY_VELOCITY" and oftentimes will not react to task-natives like "TASK::TASK_COMBAT_PED". The only way I know of to make one of these peds react is to ragdoll them (or sometimes to use CLEAR_PED_TASKS_IMMEDIATELY(). Static peds include almost all far-away peds, beach-combers, peds in certain scenarios, peds crossing a crosswalk, peds walking to get back into their cars, and others. If anyone knows how to make a ped non-static without ragdolling them, please edit this with the solution. + * how can I make an entity static??? + */ + export function isEntityStatic(entity: Entity | number): boolean; - export function setFlyCamMaxHeight(cam: number, height: number): void; + export function isEntityTouchingEntity(entity: Entity | number, targetEntity: Entity | number): boolean; - export function setFlyCamCoordAndConstrain(cam: number, x: number, y: number, z: number): void; + export function isEntityTouchingModel(entity: Entity | number, modelHash: number): boolean; - export function setFlyCamVerticalControlsThisUpdate(cam: number): void; + export function isEntityUpright(entity: Entity | number, angle: number): boolean; - export function wasFlyCamConstrainedOnPreviousUdpate(cam: number): boolean; + export function isEntityUpsidedown(entity: Entity | number): boolean; - export function isScreenFadedOut(): boolean; + export function isEntityVisible(entity: Entity | number): boolean; - export function isScreenFadedIn(): boolean; + export function isEntityVisibleToScript(entity: Entity | number): boolean; - export function isScreenFadingOut(): boolean; + export function isEntityOccluded(entity: Entity | number): boolean; - export function isScreenFadingIn(): boolean; + export function wouldEntityBeOccluded(entityModelHash: number, x: number, y: number, z: number, p4: boolean): boolean; + + export function isEntityWaitingForWorldCollision(entity: Entity | number): boolean; /** - * Fades the screen in. - * @param duration The time the fade should take, in milliseconds. - */ - export function doScreenFadeIn(duration: number): void; + * Applies a force to the specified entity. + * **List of force types (p1)**: + * public enum ForceType + * { + * MinForce = 0, + * MaxForceRot = 1, + * MinForce2 = 2, + * MaxForceRot2 = 3, + * ForceNoRot = 4, + * ForceRotPlusForce = 5 + * } + * Research/documentation on the gtaforums can be found here https://gtaforums.com/topic/885669-precisely-define-object-physics/) and here https://gtaforums.com/topic/887362-apply-forces-and-momentums-to-entityobject/. + * p6/relative - makes the xyz force not relative to world coords, but to something else + * p7/highForce - setting false will make the force really low + */ + export function applyForceToEntityCenterOfMass(entity: Entity | number, forceType: number, x: number, y: number, z: number, p5: boolean, isDirectionRel: boolean, isForceRel: boolean, p8: boolean): void; /** - * Fades the screen out. - * @param duration The time the fade should take, in milliseconds. - */ - export function doScreenFadeOut(duration: number): void; + * Documented here: + * gtaforums.com/topic/885669-precisely-define-object-physics/ + * gtaforums.com/topic/887362-apply-forces-and-momentums-to-entityobject/ + * forceFlags: + * First bit (lowest): Strong force flag, factor 100 + * Second bit: Unkown flag + * Third bit: Momentum flag=1 (vector (x,y,z) is a momentum, more research needed) + * If higher bits are unequal 0 the function doesn't applay any forces at all. + * (As integer possible values are 0-7) + * 0: weak force + * 1: strong force + * 2: same as 0 (2nd bit?) + * 3: same as 1 + * 4: weak momentum + * 5: strong momentum + * 6: same as 4 + * 7: same as 5 + * isLocal: vector defined in local (body-fixed) coordinate frame + * isMassRel: if true the force gets multiplied with the objects mass (this is why it was known as highForce) and different objects will have the same acceleration. + * p8 !!! Whenever I set this !=0, my script stopped. + */ + export function applyForceToEntity(entity: Entity | number, forceFlags: number, x: number, y: number, z: number, offX: number, offY: number, offZ: number, boneIndex: number, isDirectionRel: boolean, ignoreUpVec: boolean, isForceRel: boolean, p12: boolean, p13: boolean): void; - export function setWidescreenBorders(p0: boolean, p1: number): void; + /** + * Attaches entity1 to bone (boneIndex) of entity2. + * boneIndex - this is different to boneID, use GET_PED_BONE_INDEX to get the index from the ID. use the index for attaching to specific bones. entity1 will be attached to entity2's centre if bone index given doesn't correspond to bone indexes for that entity type. + * useSoftPinning - if set to false attached entity will not detach when fixed + * collision - controls collision between the two entities (FALSE disables collision). + * isPed - pitch doesnt work when false and roll will only work on negative numbers (only peds) + * vertexIndex - position of vertex + * fixedRot - if false it ignores entity vector + */ + export function attachEntityToEntity(entity1: Entity | number, entity2: Entity | number, boneIndex: number, xPos: number, yPos: number, zPos: number, xRot: number, yRot: number, zRot: number, p9: boolean, useSoftPinning: boolean, collision: boolean, isPed: boolean, vertexIndex: number, fixedRot: boolean, p15: any): void; - export function areWidescreenBordersActive(): boolean; + export function attachEntityBoneToEntityBone(entity1: Entity | number, entity2: Entity | number, boneIndex1: number, boneIndex2: number, p4: boolean, p5: boolean): void; - export function getGameplayCamCoord(): Vector3; + export function attachEntityBoneToEntityBoneYForward(entity1: Entity | number, entity2: Entity | number, boneIndex1: number, boneIndex2: number, p4: boolean, p5: boolean): void; /** - * 0-Pitch(X): -70.000092 - * 0-Roll(Y): -0.000001 - * 0-Yaw(Z): -43.886459 - * 1-Pitch(X): -70.000092 - * 1-Roll(Y): -0.000001 - * 1-Yaw(Z): -43.886463 - * 2-Pitch(X): -70.000092 - * 2-Roll(Y): -0.000002 - * 2-Yaw(Z): -43.886467 - * @param rotationOrder dosen't seem to change much, I tried it with 0, 1, 2: - */ - export function getGameplayCamRot(rotationOrder: number): Vector3; + * breakForce is the amount of force required to break the bond. + * p14 - is always 1 in scripts + * p15 - is 1 or 0 in scripts - unknoun what it does + * p16 - controls collision between the two entities (FALSE disables collision). + * p17 - do not teleport entity to be attached to the position of the bone Index of the target entity (if 1, entity will not be teleported to target bone) + * p18 - is always 2 in scripts. + */ + export function attachEntityToEntityPhysically(entity1: Entity | number, entity2: Entity | number, boneIndex1: number, boneIndex2: number, xPos1: number, yPos1: number, zPos1: number, xPos2: number, yPos2: number, zPos2: number, xRot: number, yRot: number, zRot: number, breakForce: number, fixedRot: boolean, p15: boolean, collision: boolean, p17: boolean, p18: number): void; - export function getGameplayCamFov(): number; + export function attachEntityToEntityPhysicallyOverrideInverseMass(firstEntityIndex: Entity | number, secondEntityIndex: Entity | number, firstEntityBoneIndex: number, secondEntityBoneIndex: number, secondEntityOffsetX: number, secondEntityOffsetY: number, secondEntityOffsetZ: number, firstEntityOffsetX: number, firstEntityOffsetY: number, firstEntityOffsetZ: number, vecRotationX: number, vecRotationY: number, vecRotationZ: number, physicalStrength: number, constrainRotation: boolean, doInitialWarp: boolean, collideWithEntity: boolean, addInitialSeperation: boolean, rotOrder: number, invMassScaleA: number, invMassScaleB: number): void; /** - * some camera effect that is used in the drunk-cheat, and turned off (by setting it to 0.0) along with the shaking effects once the drunk cheat is disabled. - */ - export function setGameplayCamMotionBlurScalingThisUpdate(p0: number): void; + * Called to update entity attachments. + */ + export function processEntityAttachments(entity: Entity | number): void; /** - * some camera effect that is (also) used in the drunk-cheat, and turned off (by setting it to 0.0) along with the shaking effects once the drunk cheat is disabled. - */ - export function setGameplayCamMaxMotionBlurStrengthThisUpdate(p0: number): void; + * Returns the index of the bone. If the bone was not found, -1 will be returned. + * list: + * https://pastebin.com/D7JMnX1g + * BoneNames: + * chassis, + * windscreen, + * seat_pside_r, + * seat_dside_r, + * bodyshell, + * suspension_lm, + * suspension_lr, + * platelight, + * attach_female, + * attach_male, + * bonnet, + * boot, + * chassis_dummy, //Center of the dummy + * chassis_Control, //Not found yet + * door_dside_f, //Door left, front + * door_dside_r, //Door left, back + * door_pside_f, //Door right, front + * door_pside_r, //Door right, back + * Gun_GripR, + * windscreen_f, + * platelight, //Position where the light above the numberplate is located + * VFX_Emitter, + * window_lf, //Window left, front + * window_lr, //Window left, back + * window_rf, //Window right, front + * window_rr, //Window right, back + * engine, //Position of the engine + * gun_ammo, + * ROPE_ATTATCH, //Not misspelled. In script "finale_heist2b.c4". + * wheel_lf, //Wheel left, front + * wheel_lr, //Wheel left, back + * wheel_rf, //Wheel right, front + * wheel_rr, //Wheel right, back + * exhaust, //Exhaust. shows only the position of the stock-exhaust + * overheat, //A position on the engine(not exactly sure, how to name it) + * misc_e, //Not a car-bone. + * seat_dside_f, //Driver-seat + * seat_pside_f, //Seat next to driver + * Gun_Nuzzle, + * seat_r + * I doubt that the function is case-sensitive, since I found a "Chassis" and a "chassis". - Just tested: Definitely not case-sensitive. + */ + export function getEntityBoneIndexByName(entity: Entity | number, boneName: string): number; - export function getGameplayCamRelativeHeading(): number; + export function clearEntityLastDamageEntity(entity: Entity | number): void; /** - * Sets the camera position relative to heading in float from -360 to +360. - * @param heading is alwyas 0 in aiming camera. - */ - export function setGameplayCamRelativeHeading(heading: number): void; - - export function getGameplayCamRelativePitch(): number; + * Deletes the specified entity, then sets the handle pointed to by the pointer to NULL. + */ + export function deleteEntity(entity?: Entity | number): [void, Entity | number]; /** - * This native sets the camera's pitch (rotation on the x-axis). - */ - export function setGameplayCamRelativePitch(angle: number, scalingFactor: number): void; + * If `collision` is set to true, both entities won't collide with the other until the distance between them is above 4 meters. + * Set `dynamic` to true to keep velocity after dettaching + */ + export function detachEntity(entity: Entity | number, dynamic: boolean, collision: boolean): void; - export function resetGameplayCamFullAttachParentTransformTimer(): void; + /** + * Freezes or unfreezes an entity preventing its coordinates to change by the player if set to `true`. You can still change the entity position using SET_ENTITY_COORDS. + */ + export function freezeEntityPosition(entity: Entity | number, toggle: boolean): void; - export function forceCameraRelativeHeadingAndPitch(roll: number, pitch: number, yaw: number): void; + /** + * True means it can be deleted by the engine when switching lobbies/missions/etc, false means the script is expected to clean it up. + * "Allow Freeze If No Collision" + */ + export function setEntityShouldFreezeWaitingOnCollision(entity: Entity | number, toggle: boolean): void; - export function forceBonnetCameraRelativeHeadingAndPitch(p0: number, p1: number): void; + /** + * delta and bitset are guessed fields. They are based on the fact that most of the calls have 0 or nil field types passed in. + * The only time bitset has a value is 0x4000 and the only time delta has a value is during stealth with usually <1.0f values. + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function playEntityAnim(entity: Entity | number, animName: string, animDict: string, p3: number, loop: boolean, stayInAnim: boolean, p6: boolean, delta: number, bitset: any): boolean; /** - * Does nothing - */ - export function setFirstPersonShooterCameraHeading(yaw: number): void; + * p4 and p7 are usually 1000.0f. + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function playSynchronizedEntityAnim(entity: Entity | number, syncedScene: number, animation: string, propName: string, p4: number, p5: number, p6: any, p7: number): boolean; - export function setFirstPersonShooterCameraPitch(pitch: number): void; + /** + * p6,p7 probably animname and animdict + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function playSynchronizedMapEntityAnim(x1: number, y1: number, z1: number, x2: number, y2: any, z2: number, p6: string, p7: string, p8: number, p9: number, p10: any, p11: number): boolean; - export function setScriptedCameraIsFirstPersonThisFrame(p0: boolean): void; + export function stopSynchronizedMapEntityAnim(x1: number, y1: number, z1: number, x2: number, y2: any, z2: number): boolean; /** - * Possible shake types (updated b617d): - * DEATH_FAIL_IN_EFFECT_SHAKE - * DRUNK_SHAKE - * FAMILY5_DRUG_TRIP_SHAKE - * HAND_SHAKE - * JOLT_SHAKE - * LARGE_EXPLOSION_SHAKE - * MEDIUM_EXPLOSION_SHAKE - * SMALL_EXPLOSION_SHAKE - * See NativeDB for reference: http://natives.altv.mp/#/0xFD55E49555E017CF - */ - export function shakeGameplayCam(shakeName: string | null, intensity: number): void; + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + * RAGEPluginHook list: docs.ragepluginhook.net/html/62951c37-a440-478c-b389-c471230ddfc5.htm + */ + export function stopEntityAnim(entity: Entity | number, animation: string, animGroup: string, p3: number): boolean; - export function isGameplayCamShaking(): boolean; + /** + * p1 sync task id? + */ + export function stopSynchronizedEntityAnim(entity: Entity | number, p1: number, p2: boolean): boolean; /** - * Sets the amplitude for the gameplay (i.e. 3rd or 1st) camera to shake. Used in script "drunk_controller.ysc.c4" to simulate making the player drunk. - */ - export function setGameplayCamShakeAmplitude(amplitude: number): void; + * if (ENTITY::HAS_ANIM_EVENT_FIRED(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("CreateObject"))) + */ + export function hasAnimEventFired(entity: Entity | number, actionHash: number): boolean; - export function stopGameplayCamShaking(p0: boolean): void; + /** + * In the script "player_scene_t_bbfight.c4": + * "if (ENTITY::FIND_ANIM_EVENT_PHASE(&l_16E, &l_19F[v_4/*16*\/], v_9, &v_A, &v_B))" + * -- &l_16E (p0) is requested as an anim dictionary earlier in the script. + * -- &l_19F[v_4/*16*\/] (p1) is used in other natives in the script as the "animation" param. + * -- v_9 (p2) is instantiated as "victim_fall"; I'm guessing that's another anim + * --v_A and v_B (p3 & p4) are both set as -1.0, but v_A is used immediately after this native for: + * "if (v_A < ENTITY::GET_ENTITY_ANIM_CURRENT_TIME(...))" + * Both v_A and v_B are seemingly used to contain both Vector3's and floats, so I can't say what either really is other than that they are both output parameters. p4 looks more like a *Vector3 though + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function findAnimEventPhase(animDictionary: string, animName: string, p2: string, p3?: any, p4?: any): [boolean, any, any]; /** - * Forces gameplay cam to specified ped as if you were the ped or spectating it - */ - export function setGameplayCamFollowPedThisUpdate(ped: Player | number): void; + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function setEntityAnimCurrentTime(entity: Entity | number, animDictionary: string, animName: string, time: number): void; /** - * - During busted screen. - * - When player is coming out from a hospital. - * - When player is coming out from a police station. - * - When player is buying gun from AmmuNation. - * @returns Examples when this function will return 0 are: - */ - export function isGameplayCamRendering(): boolean; + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function setEntityAnimSpeed(entity: Entity | number, animDictionary: string, animName: string, speedMultiplier: number): void; - export function isInterpolatingFromScriptCams(): boolean; + /** + * Makes the specified entity (ped, vehicle or object) persistent. Persistent entities will not automatically be removed by the engine. + * p1 has no effect when either its on or off + * maybe a quick disassembly will tell us what it does + * p2 has no effect when either its on or off + * maybe a quick disassembly will tell us what it does + */ + export function setEntityAsMissionEntity(entity: Entity | number, p1: boolean, p2: boolean): void; - export function isInterpolatingToScriptCams(): boolean; + /** + * Marks the specified entity (ped, vehicle or object) as no longer needed if its population type is set to the mission type. + * If the entity is ped, it will also clear their tasks immediately just like when CLEAR_PED_TASKS_IMMEDIATELY is called. + * Entities marked as no longer needed, will be deleted as the engine sees fit. + * Use this if you just want to just let the game delete the ped: + * void MarkPedAsAmbientPed(Ped ped) { + * auto addr = getScriptHandleBaseAddress(ped); + * if (!addr) { + * return; + * } + * //the game uses only lower 4 bits as entity population type + * BYTE origValue = *(BYTE *)(addr + 0xDA); + * *(BYTE *)(addr + 0xDA) = ((origValue & 0xF0) | ePopulationType::POPTYPE_RANDOM_AMBIENT); + * } + */ + export function setEntityAsNoLongerNeeded(entity?: Entity | number): [void, Entity | number]; - export function setGameplayCamAltitudeFovScalingState(p0: boolean): void; + /** + * This is an alias of SET_ENTITY_AS_NO_LONGER_NEEDED. + */ + export function setPedAsNoLongerNeeded(ped?: Ped | Player | number): [void, Ped | Player | number]; /** - * Shows the crosshair even if it wouldn't show normally. Only works for one frame, so make sure to call it repeatedly. - */ - export function disableGameplayCamAltitudeFovScalingThisUpdate(): void; + * This is an alias of SET_ENTITY_AS_NO_LONGER_NEEDED. + */ + export function setVehicleAsNoLongerNeeded(vehicle?: Vehicle | number): [void, Vehicle | number]; - export function isGameplayCamLookingBehind(): boolean; + /** + * This is an alias of SET_ENTITY_AS_NO_LONGER_NEEDED. + */ + export function setObjectAsNoLongerNeeded(object?: Object): [void, Object]; - export function setGameplayCamIgnoreEntityCollisionThisUpdate(entity: Entity | number): void; + export function setEntityCanBeDamaged(entity: Entity | number, toggle: boolean): void; - export function disableCamCollisionForObject(entity: Entity | number): void; + export function getEntityCanBeDamaged(entity: Entity | number): boolean; - export function bypassCameraCollisionBuoyancyTestThisUpdate(): void; + export function setEntityCanBeDamagedByRelationshipGroup(entity: Entity | number, bCanBeDamaged: boolean, relGroup: number): void; - export function setGameplayCamEntityToLimitFocusOverBoundingSphereThisUpdate(entity: Entity | number): void; + export function setEntityCanOnlyBeDamagedByScriptParticipants(entity: Entity | number, toggle: boolean): void; /** - * Sets some flag on cinematic camera - */ - export function disableFirstPersonCameraWaterClippingTestThisUpdate(): void; + * Sets whether the entity can be targeted without being in line-of-sight. + */ + export function setEntityCanBeTargetedWithoutLos(entity: Entity | number, toggle: boolean): void; - export function setFollowCamIgnoreAttachParentMovementThisUpdate(): void; + export function setEntityCollision(entity: Entity | number, toggle: boolean, keepPhysics: boolean): void; - export function isSphereVisible(x: number, y: number, z: number, radius: number): boolean; + export function getEntityCollisionDisabled(entity: Entity | number): boolean; - export function isFollowPedCamActive(): boolean; + export function setEntityCompletelyDisableCollision(entity: Entity | number, toggle: boolean, keepPhysics: boolean): void; /** - * From the scripts: - * CAM::SET_FOLLOW_PED_CAM_THIS_UPDATE("FOLLOW_PED_ATTACHED_TO_ROPE_CAMERA", 0); - * CAM::SET_FOLLOW_PED_CAM_THIS_UPDATE("FOLLOW_PED_ON_EXILE1_LADDER_CAMERA", 1500); - * CAM::SET_FOLLOW_PED_CAM_THIS_UPDATE("FOLLOW_PED_SKY_DIVING_CAMERA", 0); - * CAM::SET_FOLLOW_PED_CAM_THIS_UPDATE("FOLLOW_PED_SKY_DIVING_CAMERA", 3000); - * CAM::SET_FOLLOW_PED_CAM_THIS_UPDATE("FOLLOW_PED_SKY_DIVING_FAMILY5_CAMERA", 0); - * CAM::SET_FOLLOW_PED_CAM_THIS_UPDATE("FOLLOW_PED_SKY_DIVING_CAMERA", 0); - */ - export function setFollowPedCamThisUpdate(camName: string | null, p1: number): boolean; - - export function useScriptCamForAmbientPopulationOriginThisFrame(p0: boolean, p1: boolean): void; + * p7 is always 1 in the scripts. Set to 1, an area around the destination coords for the moved entity is cleared from other entities. + * Often ends with 1, 0, 0, 1); in the scripts. It works. + * Axis - Invert Axis Flags + */ + export function setEntityCoords(entity: Entity | number, xPos: number, yPos: number, zPos: number, xAxis: boolean, yAxis: boolean, zAxis: boolean, clearArea: boolean): void; - export function setFollowPedCamLadderAlignThisUpdate(): void; + export function setEntityCoordsWithoutPlantsReset(entity: Entity | number, xPos: number, yPos: number, zPos: number, alive: boolean, deadFlag: boolean, ragdollFlag: boolean, clearArea: boolean): void; /** - * Clamps the gameplay camera's current yaw. - * Eg. SET_THIRD_PERSON_CAM_RELATIVE_HEADING_LIMITS_THIS_UPDATE(0.0f, 0.0f) will set the horizontal angle directly behind the player. - * @param minimum Degrees between -180f and 180f. - * @param maximum Degrees between -180f and 180f. - */ - export function setThirdPersonCamRelativeHeadingLimitsThisUpdate(minimum: number, maximum: number): void; + * Axis - Invert Axis Flags + */ + export function setEntityCoordsNoOffset(entity: Entity | number, xPos: number, yPos: number, zPos: number, xAxis: boolean, yAxis: boolean, zAxis: boolean): void; - /** - * Clamps the gameplay camera's current pitch. - * Eg. SET_THIRD_PERSON_CAM_RELATIVE_PITCH_LIMITS_THIS_UPDATE(0.0f, 0.0f) will set the vertical angle directly behind the player. - * @param minimum Degrees between -90f and 90f. - * @param maximum Degrees between -90f and 90f. - */ - export function setThirdPersonCamRelativePitchLimitsThisUpdate(minimum: number, maximum: number): void; + export function setEntityDynamic(entity: Entity | number, toggle: boolean): void; /** - * Seems to animate the gameplay camera zoom. - * Eg. SET_THIRD_PERSON_CAM_ORBIT_DISTANCE_LIMITS_THIS_UPDATE(1f, 1000f); - * will animate the camera zooming in from 1000 meters away. - * Game scripts use it like this: - * // Setting this to 1 prevents V key from changing zoom - * PLAYER::SET_PLAYER_FORCED_ZOOM(PLAYER::PLAYER_ID(), 1); - * // These restrict how far you can move cam up/down left/right - * CAM::SET_THIRD_PERSON_CAM_RELATIVE_HEADING_LIMITS_THIS_UPDATE(-20f, 50f); - * CAM::SET_THIRD_PERSON_CAM_RELATIVE_PITCH_LIMITS_THIS_UPDATE(-60f, 0f); - * CAM::SET_THIRD_PERSON_CAM_ORBIT_DISTANCE_LIMITS_THIS_UPDATE(1f, 1f); - */ - export function setThirdPersonCamOrbitDistanceLimitsThisUpdate(p0: number, distance: number): void; + * Set the heading of an entity in degrees also known as "Yaw". + */ + export function setEntityHeading(entity: Entity | number, heading: number): void; /** - * Forces gameplay cam to specified vehicle as if you were in it - */ - export function setInVehicleCamStateThisUpdate(p0: Vehicle | number, p1: number): void; + * health >= 0 + * male ped ~= 100 - 200 + * female ped ~= 0 - 100 + */ + export function setEntityHealth(entity: Entity | number, health: number, instigator: Entity | number, weaponType: number): void; + + /** + * Sets a ped or an object totally invincible. It doesn't take any kind of damage. Peds will not ragdoll on explosions and the tazer animation won't apply either. + * If you use this for a ped and you want Ragdoll to stay enabled, then do: + * *(DWORD *)(pedAddress + 0x188) |= (1 << 9); + * Use this if you want to get the invincibility status: + * bool IsPedInvincible(Ped ped) + * { + * auto addr = getScriptHandleBaseAddress(ped); + * if (addr) + * { + * DWORD flag = *(DWORD *)(addr + 0x188); + * return ((flag & (1 << 8)) != 0) || ((flag & (1 << 9)) != 0); + * } + * return false; + * } + */ + export function setEntityInvincible(entity: Entity | number, toggle: boolean): void; + + export function setEntityIsTargetPriority(entity: Entity | number, p1: boolean, p2: number): void; + + export function setEntityLights(entity: Entity | number, toggle: boolean): void; /** - * Disables first person camera for the current frame. - * Found in decompiled scripts: - * GRAPHICS::DRAW_DEBUG_TEXT_2D("Disabling First Person Cam", 0.5, 0.8, 0.0, 0, 0, 255, 255); - * CAM::DISABLE_ON_FOOT_FIRST_PERSON_VIEW_THIS_UPDATE(); - */ - export function disableOnFootFirstPersonViewThisUpdate(): void; + * Loads collision grid for an entity spawned outside of a player's loaded area. This allows peds to execute tasks rather than sit dormant because of a lack of a physics grid. + * Certainly not the main usage of this native but when set to true for a Vehicle, it will prevent the vehicle to explode if it is spawned far away from the player. + */ + export function setEntityLoadCollisionFlag(entity: Entity | number, toggle: boolean, p2: any): void; - export function disableFirstPersonFlashEffectThisUpdate(): void; + export function hasCollisionLoadedAroundEntity(entity: Entity | number): boolean; - export function blockFirstPersonOrientationResetThisUpdate(): void; + export function setEntityMaxSpeed(entity: Entity | number, speed: number): void; - export function getFollowPedCamZoomLevel(): number; + export function setEntityOnlyDamagedByPlayer(entity: Entity | number, toggle: boolean): void; - export function getFollowPedCamViewMode(): number; + export function setEntityOnlyDamagedByRelationshipGroup(entity: Entity | number, p1: boolean, p2: any): void; /** - * Sets the type of Player camera: - * 0 - Third Person Close - * 1 - Third Person Mid - * 2 - Third Person Far - * 4 - First Person - */ - export function setFollowPedCamViewMode(viewMode: number): void; + * Enable / disable each type of damage. + * waterProof is damage related to water not drowning + * -------------- + * p7 is to to '1' in am_mp_property_ext/int: ENTITY::SET_ENTITY_PROOFS(uParam0->f_19, true, true, true, true, true, true, 1, true); + */ + export function setEntityProofs(entity: Entity | number, bulletProof: boolean, fireProof: boolean, explosionProof: boolean, collisionProof: boolean, meleeProof: boolean, steamProof: boolean, p7: boolean, waterProof: boolean): void; - export function isFollowVehicleCamActive(): boolean; + export function getEntityProofs(entity: Entity | number, bulletProof?: boolean, fireProof?: boolean, explosionProof?: boolean, collisionProof?: boolean, meleeProof?: boolean, steamProof?: boolean, p7?: boolean, drownProof?: boolean): [boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean]; - export function setFollowVehicleCamHighAngleModeThisUpdate(p0: boolean): void; + /** + * w is the correct parameter name! + */ + export function setEntityQuaternion(entity: Entity | number, x: number, y: number, z: number, w: number): void; - export function setFollowVehicleCamHighAngleModeEveryUpdate(p0: boolean, p1: boolean): void; + export function setEntityRecordsCollisions(entity: Entity | number, toggle: boolean): void; - export function setTableGamesCameraThisUpdate(hash: number): boolean; + /** + * rotationOrder refers to the order yaw pitch roll is applied + * value ranges from 0 to 5. What you use for rotationOrder when setting must be the same as rotationOrder when getting the rotation. + * Unsure what value corresponds to what rotation order, more testing will be needed for that. + * For the most part R* uses 1 or 2 as the order. + * p5 is usually set as true + */ + export function setEntityRotation(entity: Entity | number, pitch: number, roll: number, yaw: number, rotationOrder: number, p5: boolean): void; - export function getFollowVehicleCamZoomLevel(): number; + /** + * p2 is always 0. + */ + export function setEntityVisible(entity: Entity | number, toggle: boolean, p2: boolean): void; - export function setFollowVehicleCamZoomLevel(zoomLevel: number): void; + export function setEntityWaterReflectionFlag(entity: Entity | number, toggle: boolean): void; - /** - * Returns the type of camera: - * enum _viewmode //0xA11D7CA8 - * { - * THIRD_PERSON_NEAR = 0, - * THIRD_PERSON_MEDIUM = 1, - * THIRD_PERSON_FAR = 2, - * CINEMATIC = 3, - * FIRST_PERSON = 4 - * }; - */ - export function getFollowVehicleCamViewMode(): number; + export function setEntityMirrorReflectionFlag(entity: Entity | number, p1: boolean): void; /** - * Sets the type of Player camera in vehicles: - * @param viewMode see CAM.GET_FOLLOW_VEHICLE_CAM_VIEW_MODE - */ - export function setFollowVehicleCamViewMode(viewMode: number): void; + * Note that the third parameter(denoted as z) is "up and down" with positive numbers encouraging upwards movement. + */ + export function setEntityVelocity(entity: Entity | number, x: number, y: number, z: number): void; + + export function setEntityAngularVelocity(entity: Entity | number, x: number, y: number, z: number): void; + + export function setEntityHasGravity(entity: Entity | number, toggle: boolean): void; /** - * @param context see _GET_CAM_ACTIVE_VIEW_MODE_CONTEXT - */ - export function getCamViewModeForContext(context: number): number; + * LOD distance can be 0 to 0xFFFF (higher values will result in 0xFFFF) as it is actually stored as a 16-bit value (aka uint16_t). + */ + export function setEntityLodDist(entity: Entity | number, value: number): void; /** - * @param context see _GET_CAM_ACTIVE_VIEW_MODE_CONTEXT, viewmode: see CAM.GET_FOLLOW_VEHICLE_CAM_VIEW_MODE - */ - export function setCamViewModeForContext(context: number, viewMode: number): void; + * Returns the LOD distance of an entity. + */ + export function getEntityLodDist(entity: Entity | number): number; /** - * enum Context - * { - * ON_FOOT, - * IN_VEHICLE, - * ON_BIKE, - * IN_BOAT, - * IN_AIRCRAFT, - * IN_SUBMARINE, - * IN_HELI, - * See NativeDB for reference: http://natives.altv.mp/#/0x19CAFA3C87F7C2FF - */ - export function getCamActiveViewModeContext(): number; + * skin - everything alpha except skin + * Set entity alpha level. Ranging from 0 to 255 but chnages occur after every 20 percent (after every 51). + */ + export function setEntityAlpha(entity: Entity | number, alphaLevel: number, skin: boolean): void; - export function useVehicleCamStuntSettingsThisUpdate(): void; + export function getEntityAlpha(entity: Entity | number): number; + + export function resetEntityAlpha(entity: Entity | number): void; /** - * Sets gameplay camera to hash - */ - export function useDedicatedStuntCameraThisUpdate(camName: string | null): void; + * Similar to RESET_ENTITY_ALPHA + */ + export function resetPickupEntityGlow(entity: Entity | number): void; - export function forceVehicleCamStuntSettingsThisUpdate(): void; + export function setPickupCollidesWithProjectiles(p0: any, p1: any): void; - export function setFollowVehicleCamSeatThisUpdate(seatIndex: number): void; + /** + * Only called once in the scripts. + * Related to weapon objects. + */ + export function setEntitySortBias(entity: Entity | number, p1: number): void; - export function isAimCamActive(): boolean; + export function setEntityAlwaysPrerender(entity: Entity | number, toggle: boolean): void; - export function isAimCamActiveInAccurateMode(): boolean; + export function setEntityRenderScorched(entity: Entity | number, toggle: boolean): void; - export function isFirstPersonAimCamActive(): boolean; + /** + * Example here: www.gtaforums.com/topic/830463-help-with-turning-lights-green-and-causing-peds-to-crash-into-each-other/#entry1068211340 + * 0 = green + * 1 = red + * 2 = yellow + * 3 = reset changes + * changing lights may not change the behavior of vehicles + */ + export function setEntityTrafficlightOverride(entity: Entity | number, state: number): void; - export function disableAimCamThisUpdate(): void; + export function setEntityIsInVehicle(entity: Entity | number): void; - export function getFirstPersonAimCamZoomFactor(): number; + /** + * Only works with objects! + */ + export function createModelSwap(x: number, y: number, z: number, radius: number, originalModel: number, newModel: number, p6: boolean): void; - export function setFirstPersonAimCamZoomFactor(zoomFactor: number): void; + export function removeModelSwap(x: number, y: number, z: number, radius: number, originalModel: number, newModel: number, p6: boolean): void; - export function setFirstPersonAimCamZoomFactorLimitsThisUpdate(p0: number, p1: number): void; + /** + * p5 = sets as true in scripts + * Same as the comment for CREATE_MODEL_SWAP unless for some reason p5 affects it this only works with objects as well. + * Network players do not see changes done with this. + */ + export function createModelHide(x: number, y: number, z: number, radius: number, modelHash: number, p5: boolean): void; - export function setFirstPersonAimCamRelativeHeadingLimitsThisUpdate(p0: number, p1: number): void; + export function createModelHideExcludingScriptObjects(x: number, y: number, z: number, radius: number, modelHash: number, p5: boolean): void; - export function setFirstPersonAimCamRelativePitchLimitsThisUpdate(p0: number, p1: number): void; + /** + * This native makes entities visible that are hidden by the native CREATE_MODEL_HIDE. + * p5 should be false, true does nothing + */ + export function removeModelHide(x: number, y: number, z: number, radius: number, modelHash: number, p5: boolean): void; - export function setFirstPersonAimCamNearClipThisUpdate(p0: number): void; + export function createForcedObject(x: number, y: number, z: number, p3: any, modelHash: number, p5: boolean): void; - export function setThirdPersonAimCamNearClipThisUpdate(p0: number): void; + export function removeForcedObject(x: number, y: number, z: number, p3: number, modelHash: number): void; - export function setAllowCustomVehicleDriveByCamThisUpdate(p0: boolean): void; + /** + * Calling this function disables collision between two entities. + * The importance of the order for entity1 and entity2 is unclear. + * The third parameter, `thisFrame`, decides whether the collision is to be disabled until it is turned back on, or if it's just this frame. + */ + export function setEntityNoCollisionEntity(entity1: Entity | number, entity2: Entity | number, thisFrameOnly: boolean): void; - export function forceTightspaceCustomFramingThisUpdate(): void; + export function setEntityMotionBlur(entity: Entity | number, toggle: boolean): void; - export function getFinalRenderedCamCoord(): Vector3; + /** + * p1 always false. + */ + export function setCanAutoVaultOnEntity(entity: Entity | number, toggle: boolean): void; /** - * Function is called faily often by CAM::CREATE_CAM_WITH_PARAMS - * @param rotationOrder seems to consistently be 2 across scripts - */ - export function getFinalRenderedCamRot(rotationOrder: number): Vector3; + * p1 always false. + */ + export function setCanClimbOnEntity(entity: Entity | number, toggle: boolean): void; - export function getFinalRenderedRemotePlayerCamRot(player: Player | number, rotationOrder: number): Vector3; + /** + * Only called within 1 script for x360. 'fm_mission_controller' and it used on an object. + * Ran after these 2 natives, + * set_object_targettable(uParam0, 0); + * set_entity_invincible(uParam0, 1); + */ + export function setWaitForCollisionsBeforeProbe(entity: Entity | number, toggle: boolean): void; + + export function setEntityNoweapondecals(entity: Entity | number, p1: boolean): void; + + export function setEntityUseMaxDistanceForWaterReflection(entity: Entity | number, p1: boolean): void; /** - * Gets some camera fov - */ - export function getFinalRenderedCamFov(): number; + * Gets the world rotation of the specified bone of the specified entity. + */ + export function getEntityBoneRotation(entity: Entity | number, boneIndex: number): Vector3; - export function getFinalRenderedRemotePlayerCamFov(player: Player | number): number; + /** + * Gets the world position of the specified bone of the specified entity. + */ + export function getEntityBonePostion(entity: Entity | number, boneIndex: number): Vector3; - export function getFinalRenderedCamNearClip(): number; + /** + * Gets the local rotation of the specified bone of the specified entity. + */ + export function getEntityBoneObjectRotation(entity: Entity | number, boneIndex: number): Vector3; - export function getFinalRenderedCamFarClip(): number; + export function getEntityBoneObjectPostion(entity: Entity | number, boneIndex: number): Vector3; - export function getFinalRenderedCamNearDof(): number; + export function getEntityBoneCount(entity: Entity | number): number; - export function getFinalRenderedCamFarDof(): number; + export function enableEntityBulletCollision(entity: Entity | number): void; - export function getFinalRenderedCamMotionBlurStrength(): number; + export function setEntityCanOnlyBeDamagedByEntity(entity1: Entity | number, entity2: Entity | number): void; - export function setGameplayCoordHint(x: number, y: number, z: number, duration: number, blendOutDuration: number, blendInDuration: number, p6: number): void; + export function setEntityCantCauseCollisionDamagedEntity(entity1: Entity | number, entity2: Entity | number): void; - export function setGameplayPedHint(ped: Player | number, x1: number, y1: number, z1: number, p4: boolean, duration: number, blendOutDuration: number, blendInDuration: number): void; + /** + * p1 is always set to 1 + */ + export function setAllowMigrateToSpectator(entity: Entity | number, p1: any): void; /** - * Focuses the camera on the specified vehicle. - */ - export function setGameplayVehicleHint(vehicle: Vehicle | number, offsetX: number, offsetY: number, offsetZ: number, p4: boolean, time: number, easeInTime: number, easeOutTime: number): void; + * Gets the handle of an entity with a specific model hash attached to another entity, such as an object attached to a ped. + * This native does not appear to have anything to do with pickups as in scripts it is used with objects. + * Example from fm_mission_controller_2020.c: + * iVar8 = ENTITY::GET_ENTITY_OF_TYPE_ATTACHED_TO_ENTITY(bParam0->f_9, joaat("p_cs_clipboard")); + */ + export function getEntityOfTypeAttachedToEntity(entity: Entity | number, modelHash: number): Entity | number; - export function setGameplayObjectHint(object: number, xOffset: number, yOffset: number, zOffset: number, p4: boolean, time: number, easeInTime: number, easeOutTime: number): void; + export function setPickUpByCargobobDisabled(entity: Entity | number, toggle: boolean): void; - /** - * -244429742 - * 0 - * 1726668277 - * 1844968929 - * @param p8 could be some sort of flag. Scripts use: - */ - export function setGameplayEntityHint(entity: Entity | number, xOffset: number, yOffset: number, zOffset: number, p4: boolean, time: number, easeInTime: number, easeOutTime: number, p8: number): void; + export function setDecisionMaker(ped: Ped | Player | number, name: number): void; - export function isGameplayHintActive(): boolean; + /** + * eventType: https://alloc8or.re/gta5/doc/enums/eEventType.txt + */ + export function clearDecisionMakerEventResponse(name: number, eventType: number): void; - export function stopGameplayHint(p0: boolean): void; + /** + * eventType: https://alloc8or.re/gta5/doc/enums/eEventType.txt + * This is limited to 4 blocked events at a time. + */ + export function blockDecisionMakerEvent(name: number, eventType: number): void; /** - * This native does absolutely nothing, just a nullsub - */ - export function stopGameplayHintBeingCancelledThisUpdate(p0: boolean): void; + * eventType: https://alloc8or.re/gta5/doc/enums/eEventType.txt + */ + export function unblockDecisionMakerEvent(name: number, eventType: number): void; - export function stopCodeGameplayHint(p0: boolean): void; + /** + * eventType: https://alloc8or.re/gta5/doc/enums/eEventType.txt + */ + export function addShockingEventAtPosition(eventType: number, x: number, y: number, z: number, duration: number): number; - export function isCodeGameplayHintActive(): boolean; + /** + * eventType: https://alloc8or.re/gta5/doc/enums/eEventType.txt + */ + export function addShockingEventForEntity(eventType: number, entity: Entity | number, duration: number): number; - export function setGameplayHintFov(FOV: number): void; + /** + * eventType: https://alloc8or.re/gta5/doc/enums/eEventType.txt + */ + export function isShockingEventInSphere(eventType: number, x: number, y: number, z: number, radius: number): boolean; - export function setGameplayHintFollowDistanceScalar(value: number): void; + export function removeShockingEvent(event: number): boolean; - export function setGameplayHintBaseOrbitPitchOffset(value: number): void; + export function removeAllShockingEvents(p0: boolean): void; - export function setGameplayHintCameraRelativeSideOffset(xOffset: number): void; + export function removeShockingEventSpawnBlockingAreas(): void; - export function setGameplayHintCameraRelativeVerticalOffset(yOffset: number): void; + export function suppressShockingEventsNextFrame(): void; - export function setGameplayHintCameraBlendToFollowPedMediumViewMode(toggle: boolean): void; + /** + * eventType: https://alloc8or.re/gta5/doc/enums/eEventType.txt + */ + export function suppressShockingEventTypeNextFrame(eventType: number): void; - export function setCinematicButtonActive(p0: boolean): void; + export function suppressAgitationEventsNextFrame(): void; - export function isCinematicCamRendering(): boolean; + /** + * Character types: + * 0 = Michael, + * 1 = Franklin, + * 2 = Trevor, + * 3 = MPMale, + * 4 = MPFemale + */ + export function getNumTattooShopDlcItems(character: number): number; /** - * Full list of cam shake types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/camShakeTypesCompact.json - * @param shakeType argument found in the b617d scripts: "DRUNK_SHAKE" - */ - export function shakeCinematicCam(shakeType: string | null, amount: number): void; + * Character types: + * 0 = Michael, + * 1 = Franklin, + * 2 = Trevor, + * 3 = MPMale, + * 4 = MPFemale + * enum TattooZoneData + * { + * ZONE_TORSO = 0, + * ZONE_HEAD = 1, + * ZONE_LEFT_ARM = 2, + * ZONE_RIGHT_ARM = 3, + * ZONE_LEFT_LEG = 4, + * ZONE_RIGHT_LEG = 5, + * ZONE_UNKNOWN = 6, + * ZONE_NONE = 7, + * }; + * struct outComponent + * { + * // these vars are suffixed with 4 bytes of padding each. + * uint unk; + * int unk2; + * uint tattooCollectionHash; + * uint tattooNameHash; + * int unk3; + * TattooZoneData zoneId; + * uint unk4; + * uint unk5; + * // maybe more, not sure exactly, decompiled scripts are very vague around this part. + * } + */ + export function getTattooShopDlcItemData(characterType: number, decorationIndex: number, outComponent?: any): [boolean, any]; - export function isCinematicCamShaking(): boolean; + /** + * Returns some sort of index/offset for overlays/decorations. + * Character types: + * 0 = Michael, + * 1 = Franklin, + * 2 = Trevor, + * 3 = MPMale, + * 4 = MPFemale + */ + export function getTattooShopDlcItemIndex(overlayHash: number, p1: any, character: number): number; - export function setCinematicCamShakeAmplitude(p0: number): void; + export function initShopPedComponent(outComponent?: any): [void, any]; - export function stopCinematicCamShaking(p0: boolean): void; + export function initShopPedProp(outProp?: any): [void, any]; - export function disableCinematicBonnetCameraThisUpdate(): void; + export function setupShopPedApparelQuery(p0: number, p1: number, p2: number, p3: number): number; - export function disableCinematicVehicleIdleModeThisUpdate(): void; + /** + * character is 0 for Michael, 1 for Franklin, 2 for Trevor, 3 for freemode male, and 4 for freemode female. + * componentId is between 0 and 11 and corresponds to the usual component slots. + * p1 could be the outfit number; unsure. + * p2 is usually -1; unknown function. + * p3 appears to be for selecting between clothes and props; false is used with components/clothes, true is used with props. + * p4 is usually -1; unknown function. + * componentId is -1 when p3 is true in decompiled scripts. + */ + export function setupShopPedApparelQueryTu(character: number, p1: number, p2: number, p3: boolean, p4: number, componentId: number): number; /** - * Resets the vehicle idle camera timer. Calling this in a loop will disable the idle camera. - */ - export function invalidateCinematicVehicleIdleMode(): void; + * See https://git.io/JtcRf for example and structs. + */ + export function getShopPedQueryComponent(componentId: number, outComponent?: any): [void, any]; /** - * Resets the idle camera timer. Calling that in a loop once every few seconds is enough to disable the idle cinematic camera. - */ - export function invalidateIdleCam(): void; + * Returns some sort of index/offset for components. + * Needs _GET_NUM_PROPS_FROM_OUTFIT to be called with p3 = false and componentId with the drawable's component slot first, returns -1 otherwise. + */ + export function getShopPedQueryComponentIndex(componentHash: number): number; - export function isCinematicIdleCamRendering(): boolean; + /** + * More info here: https://gist.github.com/root-cause/3b80234367b0c856d60bf5cb4b826f86 + */ + export function getShopPedComponent(componentHash: number, outComponent?: any): [void, any]; - export function isCinematicFirstPersonVehicleInteriorCamRendering(): boolean; + /** + * See https://git.io/JtcRf for example and structs. + */ + export function getShopPedQueryProp(componentId: number, outProp?: any): [void, any]; /** - * hash is always JOAAT("CAMERA_MAN_SHOT") in decompiled scripts - */ - export function createCinematicShot(p0: number, time: number, p2: boolean, entity: Entity | number): void; + * Returns some sort of index/offset for props. + * Needs _GET_NUM_PROPS_FROM_OUTFIT to be called with p3 = true and componentId = -1 first, returns -1 otherwise. + */ + export function getShopPedQueryPropIndex(componentHash: number): number; /** - * Hash is always JOAAT("CAMERA_MAN_SHOT") in decompiled scripts - */ - export function isCinematicShotActive(p0: number): boolean; + * More info here: https://gist.github.com/root-cause/3b80234367b0c856d60bf5cb4b826f86 + */ + export function getShopPedProp(componentHash: number, outProp?: any): [void, any]; + + export function getHashNameForComponent(entity: Entity | number, componentId: number, drawableVariant: number, textureVariant: number): number; + + export function getHashNameForProp(entity: Entity | number, componentId: number, propIndex: number, propTextureIndex: number): number; + + export function getShopPedApparelVariantComponentCount(componentHash: number): number; /** - * Only used once in carsteal3 with p0 set to -1096069633 (CAMERA_MAN_SHOT) - */ - export function stopCinematicShot(p0: number): void; + * `propHash`: Ped helmet prop hash? + * This native returns 1 when the player helmet has a visor (there is another prop index for the same helmet with closed/opened visor variant) that can be toggled. 0 if there's no alternative version with a visor for this helmet prop. + */ + export function getShopPedApparelVariantPropCount(propHash: number): number; - export function forceCinematicRenderingThisUpdate(toggle: boolean): void; + export function getVariantComponent(componentHash: number, variantComponentIndex: number, nameHash?: number, enumValue?: number, componentType?: number): [void, number, number, number]; - export function setCinematicNewsChannelActiveThisUpdate(): void; + export function getVariantProp(componentHash: number, variantPropIndex: number, nameHash?: number, enumValue?: number, anchorPoint?: number): [void, number, number, number]; /** - * Toggles the vehicle cinematic cam; requires the player ped to be in a vehicle to work. - */ - export function setCinematicModeActive(toggle: boolean): void; + * Returns number of possible values of the forcedComponentIndex argument of GET_FORCED_COMPONENT. + */ + export function getShopPedApparelForcedComponentCount(componentHash: number): number; - export function isInVehicleMobilePhoneCameraRendering(): boolean; + /** + * Returns number of possible values of the forcedPropIndex argument of GET_FORCED_PROP. + */ + export function getShopPedApparelForcedPropCount(componentHash: number): number; - export function disableCinematicSlowMoThisUpdate(): boolean; + export function getForcedComponent(componentHash: number, forcedComponentIndex: number, nameHash?: number, enumValue?: number, componentType?: number): [void, number, number, number]; - export function isBonnetCinematicCamRendering(): boolean; + export function getForcedProp(componentHash: number, forcedPropIndex: number, nameHash?: number, enumValue?: number, anchorPoint?: number): [void, number, number, number]; /** - * Tests some cinematic camera flags - */ - export function isCinematicCamInputActive(): boolean; + * Full list of restriction tags by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pedApparelRestrictionTags.json + * componentId/last parameter seems to be unused. + */ + export function doesShopPedApparelHaveRestrictionTag(componentHash: number, restrictionTagHash: number, componentId: number): boolean; - export function ignoreMenuPreferenceForBonnetCameraThisUpdate(): void; + export function doesCurrentPedComponentHaveRestrictionTag(ped: Ped | Player | number, componentId: number, restrictionTagHash: number): boolean; - export function bypassCutsceneCamRenderingThisUpdate(): void; + export function doesCurrentPedPropHaveRestrictionTag(ped: Ped | Player | number, componentId: number, restrictionTagHash: number): boolean; - export function stopCutsceneCamShaking(p0: any): void; + /** + * characters + * 0: Michael + * 1: Franklin + * 2: Trevor + * 3: MPMale + * 4: MPFemale + */ + export function setupShopPedOutfitQuery(character: number, p1: boolean): number; /** - * Hardcoded to only work in multiplayer. - */ - export function setCutsceneCamFarClipThisUpdate(p0: number): void; + * outfitIndex: from 0 to SETUP_SHOP_PED_OUTFIT_QUERY(characterIndex, false) - 1. + * See https://git.io/JtcB8 for example and outfit struct. + */ + export function getShopPedQueryOutfit(outfitIndex: number, outfit?: any): [void, any]; - export function getFocusPedOnScreen(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number, p7: number, p8: number): number; + export function getShopPedOutfit(p0: any, p1?: any): [void, any]; - export function disableNearClipScanThisUpdate(): void; + export function getShopPedOutfitLocate(p0: any): number; /** - * if p0 is 0, effect is cancelled - * if p0 is 1, effect zooms in, gradually tilts cam clockwise apx 30 degrees, wobbles slowly. Motion blur is active until cancelled. - * if p0 is 2, effect immediately tilts cam clockwise apx 30 degrees, begins to wobble slowly, then gradually tilts cam back to normal. The wobbling will continue until the effect is cancelled. - */ - export function setCamDeathFailEffectState(p0: number): void; + * See https://git.io/JtcBH for example and structs. + */ + export function getShopPedOutfitPropVariant(outfitHash: number, variantIndex: number, outPropVariant?: any): [boolean, any]; - export function setFirstPersonFlashEffectType(p0: any): void; + /** + * See https://git.io/JtcBH for example and structs. + */ + export function getShopPedOutfitComponentVariant(outfitHash: number, variantIndex: number, outComponentVariant?: any): [boolean, any]; + + export function getNumDlcVehicles(): number; /** - * From b617 scripts: - * CAM::SET_FIRST_PERSON_FLASH_EFFECT_VEHICLE_MODEL_NAME("DINGHY"); - * CAM::SET_FIRST_PERSON_FLASH_EFFECT_VEHICLE_MODEL_NAME("ISSI2"); - * CAM::SET_FIRST_PERSON_FLASH_EFFECT_VEHICLE_MODEL_NAME("SPEEDO"); - */ - export function setFirstPersonFlashEffectVehicleModelName(vehicleName: string | null): void; + * dlcVehicleIndex is 0 to GET_NUM_DLC_VEHICLS() - 1 + */ + export function getDlcVehicleModel(dlcVehicleIndex: number): number; - export function setFirstPersonFlashEffectVehicleModelHash(vehicleModel: number): void; + /** + * dlcVehicleIndex takes a number from 0 - GET_NUM_DLC_VEHICLES() - 1. + * outData is a struct of 3 8-byte items. + * The Second item in the struct *(Hash *)(outData + 1) is the vehicle hash. + */ + export function getDlcVehicleData(dlcVehicleIndex: number, outData?: any): [boolean, any]; - export function isAllowedIndependentCameraModes(): boolean; + export function getDlcVehicleFlags(dlcVehicleIndex: number): number; - export function cameraPreventCollisionSettingsForTripleheadInInteriorsThisUpdate(): void; + /** + * Returns the total number of DLC weapons. + */ + export function getNumDlcWeapons(): number; - export function replayGetMaxDistanceAllowedFromPlayer(): number; + /** + * Returns the total number of DLC weapons that are available in SP (availableInSP field in shop_weapon.meta). + */ + export function getNumDlcWeaponsSp(): number; /** - * SET_CLOCK_TIME(12, 34, 56); - */ - export function setClockTime(hour: number, minute: number, second: number): void; + * dlcWeaponIndex takes a number from 0 - GET_NUM_DLC_WEAPONS() - 1. + * struct DlcWeaponData + * { + * int emptyCheck; //use DLC1::IS_CONTENT_ITEM_LOCKED on this + * int padding1; + * int weaponHash; + * int padding2; + * int unk; + * int padding3; + * int weaponCost; + * int padding4; + * int ammoCost; + * int padding5; + * int ammoType; + * int padding6; + * int defaultClipSize; + * int padding7; + * char nameLabel[64]; + * char descLabel[64]; + * char desc2Label[64]; // usually "the" + name + * char upperCaseNameLabel[64]; + * }; + */ + export function getDlcWeaponData(dlcWeaponIndex: number, outData?: any): [boolean, any]; - export function pauseClock(toggle: boolean): void; + /** + * Same as GET_DLC_WEAPON_DATA but only works for DLC weapons that are available in SP. + */ + export function getDlcWeaponDataSp(dlcWeaponIndex: number, outData?: any): [boolean, any]; - export function advanceClockTimeTo(hour: number, minute: number, second: number): void; + /** + * Returns the total number of DLC weapon components. + */ + export function getNumDlcWeaponComponents(dlcWeaponIndex: number): number; - export function addToClockTime(hours: number, minutes: number, seconds: number): void; + /** + * Returns the total number of DLC weapon components that are available in SP. + */ + export function getNumDlcWeaponComponentsSp(dlcWeaponIndex: number): number; /** - * Gets the current ingame hour, expressed without zeros. (09:34 will be represented as 9) - */ - export function getClockHours(): number; + * p0 seems to be the weapon index + * p1 seems to be the weapon component index + * struct DlcComponentData{ + * int attachBone; + * int padding1; + * int bActiveByDefault; + * int padding2; + * int unk; + * int padding3; + * int componentHash; + * int padding4; + * int unk2; + * int padding5; + * int componentCost; + * int padding6; + * char nameLabel[64]; + * char descLabel[64]; + * }; + */ + export function getDlcWeaponComponentData(dlcWeaponIndex: number, dlcWeapCompIndex: number, ComponentDataPtr?: any): [boolean, any]; /** - * Gets the current ingame clock minute. - */ - export function getClockMinutes(): number; + * Same as GET_DLC_WEAPON_COMPONENT_DATA but only works for DLC components that are available in SP. + */ + export function getDlcWeaponComponentDataSp(dlcWeaponIndex: number, dlcWeapCompIndex: number, ComponentDataPtr?: any): [boolean, any]; + + export function isContentItemLocked(itemHash: number): boolean; + + export function isDlcVehicleMod(hash: number): boolean; + + export function getDlcVehicleModLockHash(hash: number): number; /** - * Gets the current ingame clock second. Note that ingame clock seconds change really fast since a day in GTA is only 48 minutes in real life. - */ - export function getClockSeconds(): number; + * From fm_deathmatch_creator and fm_race_creator: + * FILES::REVERT_CONTENT_CHANGESET_GROUP_FOR_ALL(joaat("GROUP_MAP_SP")); + * FILES::EXECUTE_CONTENT_CHANGESET_GROUP_FOR_ALL(joaat("GROUP_MAP")); + */ + export function executeContentChangesetGroupForAll(hash: number): void; - export function setClockDate(day: number, month: number, year: number): void; + /** + * From fm_deathmatch_creator and fm_race_creator: + * FILES::REVERT_CONTENT_CHANGESET_GROUP_FOR_ALL(joaat("GROUP_MAP_SP")); + * FILES::EXECUTE_CONTENT_CHANGESET_GROUP_FOR_ALL(joaat("GROUP_MAP")); + */ + export function revertContentChangesetGroupForAll(hash: number): void; /** - * Gets the current day of the week. - * 0: Sunday - * 1: Monday - * 2: Tuesday - * 3: Wednesday - * 4: Thursday - * 5: Friday - * 6: Saturday - */ - export function getClockDayOfWeek(): number; + * Starts a fire: + * xyz: Location of fire + * maxChildren: The max amount of times a fire can spread to other objects. Must be 25 or less, or the function will do nothing. + * isGasFire: Whether or not the fire is powered by gasoline. + */ + export function startScriptFire(X: number, Y: number, Z: number, maxChildren: number, isGasFire: boolean): number; - export function getClockDayOfMonth(): number; + export function removeScriptFire(fireHandle: number): void; - export function getClockMonth(): number; + export function startEntityFire(entity: Entity | number): number; - export function getClockYear(): number; + export function stopEntityFire(entity: Entity | number): void; - export function getMillisecondsPerGameMinute(): number; + export function isEntityOnFire(entity: Entity | number): boolean; + + export function getNumberOfFiresInRange(x: number, y: number, z: number, radius: number): number; + + export function setFlammabilityMultiplier(p0: number): void; + + export function stopFireInRange(x: number, y: number, z: number, radius: number): void; /** - * Gets system time as year, month, day, hour, minute and second. - * Example usage: - * int year; - * int month; - * int day; - * int hour; - * int minute; - * int second; - */ - export function getPosixTime(year?: number, month?: number, day?: number, hour?: number, minute?: number, second?: number): [void, number, number, number, number, number, number]; + * Returns TRUE if it found something. FALSE if not. + */ + export function getClosestFirePos(outPosition: Vector3, x: number, y: number, z: number): [boolean, Vector3]; /** - * Gets current UTC time - */ - export function getUtcTime(year?: number, month?: number, day?: number, hour?: number, minute?: number, second?: number): [void, number, number, number, number, number, number]; + * BOOL isAudible = If explosion makes a sound. + * BOOL isInvisible = If the explosion is invisible or not. + * explosionType: https://alloc8or.re/gta5/doc/enums/eExplosionTag.txt + */ + export function addExplosion(x: number, y: number, z: number, explosionType: number, damageScale: number, isAudible: boolean, isInvisible: boolean, cameraShake: number, noDamage: boolean): void; /** - * Gets local system time as year, month, day, hour, minute and second. - * Example usage: - * int year; - * int month; - * int day; - * int hour; - * int minute; - * int second; - * or use std::tm struct - */ - export function getLocalTime(year?: number, month?: number, day?: number, hour?: number, minute?: number, second?: number): [void, number, number, number, number, number, number]; + * isAudible: If explosion makes a sound. + * isInvisible: If the explosion is invisible or not. + * explosionType: See ADD_EXPLOSION. + */ + export function addOwnedExplosion(ped: Ped | Player | number, x: number, y: number, z: number, explosionType: number, damageScale: number, isAudible: boolean, isInvisible: boolean, cameraShake: number): void; /** - * Full list of cutscene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/cutsceneNames.json - * @param flags Usually 8 - */ - export function requestCutscene(cutsceneName: string | null, flags: number): void; + * isAudible: If explosion makes a sound. + * isInvisible: If the explosion is invisible or not. + * explosionType: See ADD_EXPLOSION. + */ + export function addExplosionWithUserVfx(x: number, y: number, z: number, explosionType: number, explosionFx: number, damageScale: number, isAudible: boolean, isInvisible: boolean, cameraShake: number): void; /** - * Example: 0x105 (bit 0, 2 and 8 set) will enable scene 1, 3 and 9. - * Full list of cutscene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/cutsceneNames.json - * @param playbackFlags Which scenes should be played. - * @param flags Usually 8 - */ - export function requestCutsceneWithPlaybackList(cutsceneName: string | null, playbackFlags: number, flags: number): void; + * explosionType: See ADD_EXPLOSION. + */ + export function isExplosionInArea(explosionType: number, x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): boolean; - export function removeCutscene(): void; + /** + * explosionType: See ADD_EXPLOSION. + */ + export function isExplosionActiveInArea(explosionType: number, x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): boolean; - export function hasCutsceneLoaded(): boolean; + /** + * explosionType: See ADD_EXPLOSION. + */ + export function isExplosionInSphere(explosionType: number, x: number, y: number, z: number, radius: number): boolean; /** - * Full list of cutscene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/cutsceneNames.json - */ - export function hasThisCutsceneLoaded(cutsceneName: string | null): boolean; + * explosionType: See ADD_EXPLOSION. + */ + export function getOwnerOfExplosionInSphere(explosionType: number, x: number, y: number, z: number, radius: number): Entity | number; /** - * Sets the cutscene's owning thread ID. - */ - export function setScriptCanStartCutscene(threadId: number): void; + * explosionType: See ADD_EXPLOSION, -1 for any explosion type + */ + export function isExplosionInAngledArea(explosionType: number, x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, width: number): boolean; - export function canRequestAssetsForCutsceneEntity(): boolean; + /** + * Returns a handle to the first entity within the a circle spawned inside the 2 points from a radius. + * explosionType: See ADD_EXPLOSION. + */ + export function getOwnerOfExplosionInAngledArea(explosionType: number, x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, radius: number): Entity | number; - export function isCutscenePlaybackFlagSet(flag: number): boolean; + /** + * NOTE: Debugging functions are not present in the retail version of the game. + */ + export function setDebugLinesAndSpheresDrawingActive(enabled: boolean): void; - export function setCutsceneEntityStreamingFlags(cutsceneEntName: string | null, p1: number, p2: number): void; + export function drawDebugLine(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, r: number, g: number, b: number, alpha: number): void; /** - * Simply loads the cutscene and doesn't do extra stuff that REQUEST_CUTSCENE does. - * Full list of cutscene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/cutsceneNames.json - */ - export function requestCutFile(cutsceneName: string | null): void; + * NOTE: Debugging functions are not present in the retail version of the game. + */ + export function drawDebugLineWithTwoColours(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, r1: number, g1: number, b1: number, r2: number, g2: number, b2: number, alpha1: number, alpha2: number): void; /** - * Simply checks if the cutscene has loaded and doesn't check via CutSceneManager as opposed to HAS_[THIS]_CUTSCENE_LOADED. - * Full list of cutscene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/cutsceneNames.json - */ - export function hasCutFileLoaded(cutsceneName: string | null): boolean; + * NOTE: Debugging functions are not present in the retail version of the game. + */ + export function drawDebugSphere(x: number, y: number, z: number, radius: number, red: number, green: number, blue: number, alpha: number): void; + + export function drawDebugBox(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, r: number, g: number, b: number, alpha: number): void; /** - * Simply unloads the cutscene and doesn't do extra stuff that REMOVE_CUTSCENE does. - * Full list of cutscene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/cutsceneNames.json - */ - export function removeCutFile(cutsceneName: string | null): void; + * NOTE: Debugging functions are not present in the retail version of the game. + */ + export function drawDebugCross(x: number, y: number, z: number, size: number, red: number, green: number, blue: number, alpha: number): void; /** - * Full list of cutscene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/cutsceneNames.json - */ - export function getCutFileConcatCount(cutsceneName: string | null): number; + * NOTE: Debugging functions are not present in the retail version of the game. + */ + export function drawDebugText(text: string, x: number, y: number, z: number, red: number, green: number, blue: number, alpha: number): void; + + /** + * NOTE: Debugging functions are not present in the retail version of the game. + */ + export function drawDebugText2d(text: string, x: number, y: number, z: number, red: number, green: number, blue: number, alpha: number): void; + + /** + * Draws a depth-tested line from one point to another. + * ---------------- + * x1, y1, z1 : Coordinates for the first point + * x2, y2, z2 : Coordinates for the second point + * r, g, b, alpha : Color with RGBA-Values + * I recommend using a predefined function to call this. + * [VB.NET] + * Public Sub DrawLine(from As Vector3, [to] As Vector3, col As Color) + * [Function].Call(Hash.DRAW_LINE, from.X, from.Y, from.Z, [to].X, [to].Y, [to].Z, col.R, col.G, col.B, col.A) + * End Sub + * [C#] + * public void DrawLine(Vector3 from, Vector3 to, Color col) + * { + * Function.Call(Hash.DRAW_LINE, from.X, from.Y, from.Z, to.X, to.Y, to.Z, col.R, col.G, col.B, col.A); + * } + */ + export function drawLine(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, red: number, green: number, blue: number, alpha: number): void; /** - * @param flags Usually 0. - */ - export function startCutscene(flags: number): void; + * x/y/z - Location of a vertex (in world coords), presumably. + * ---------------- + * x1, y1, z1 : Coordinates for the first point + * x2, y2, z2 : Coordinates for the second point + * x3, y3, z3 : Coordinates for the third point + * r, g, b, alpha : Color with RGBA-Values + * Keep in mind that only one side of the drawn triangle is visible: It's the side, in which the vector-product of the vectors heads to: (b-a)x(c-a) Or (b-a)x(c-b). + * But be aware: The function seems to work somehow differently. I have trouble having them drawn in rotated orientation. Try it yourself and if you somehow succeed, please edit this and post your solution. + * I recommend using a predefined function to call this. + * [VB.NET] + * Public Sub DrawPoly(a As Vector3, b As Vector3, c As Vector3, col As Color) + * [Function].Call(Hash.DRAW_POLY, a.X, a.Y, a.Z, b.X, b.Y, b.Z, c.X, c.Y, c.Z, col.R, col.G, col.B, col.A) + * End Sub + * [C#] + * public void DrawPoly(Vector3 a, Vector3 b, Vector3 c, Color col) + * { + * Function.Call(Hash.DRAW_POLY, a.X, a.Y, a.Z, b.X, b.Y, b.Z, c.X, c.Y, c.Z, col.R, col.G, col.B, col.A); + * } + * BTW: Intersecting triangles are not supported: They overlap in the order they were called. + */ + export function drawPoly(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, x3: number, y3: number, z3: number, red: number, green: number, blue: number, alpha: number): void; /** - * @param flags Usually 0. - */ - export function startCutsceneAtCoords(x: number, y: number, z: number, flags: number): void; + * Used for drawling Deadline trailing lights, see deadline.ytd + * p15 through p23 are values that appear to be related to illiumation, scaling, and rotation; more testing required. + * For UVW mapping (u,v,w parameters), reference your favourite internet resource for more details. + */ + export function drawTexturedPoly(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, x3: number, y3: number, z3: number, red: number, green: number, blue: number, alpha: number, textureDict: string, textureName: string, u1: number, v1: number, w1: number, u2: number, v2: number, w2: number, u3: number, v3: number, w3: number): void; + + /** + * Used for drawling Deadline trailing lights, see deadline.ytd + * Each vertex has its own colour that is blended/illuminated on the texture. Additionally, the R, G, and B components are floats that are int-casted internally. + * For UVW mapping (u,v,w parameters), reference your favourite internet resource for more details. + */ + export function drawTexturedPolyWithThreeColours(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, x3: number, y3: number, z3: number, red1: number, green1: number, blue1: number, alpha1: number, red2: number, green2: number, blue2: number, alpha2: number, red3: number, green3: number, blue3: number, alpha3: number, textureDict: string, textureName: string, u1: number, v1: number, w1: number, u2: number, v2: number, w2: number, u3: number, v3: number, w3: number): void; + + /** + * x,y,z = start pos + * x2,y2,z2 = end pos + * Draw's a 3D Box between the two x,y,z coords. + * -------------- + * Keep in mind that the edges of the box do only align to the worlds base-vectors. Therefore something like rotation cannot be applied. That means this function is pretty much useless, unless you want a static unicolor box somewhere. + * I recommend using a predefined function to call this. + * [VB.NET] + * Public Sub DrawBox(a As Vector3, b As Vector3, col As Color) + * [Function].Call(Hash.DRAW_BOX,a.X, a.Y, a.Z,b.X, b.Y, b.Z,col.R, col.G, col.B, col.A) + * End Sub + * [C#] + * public void DrawBox(Vector3 a, Vector3 b, Color col) + * { + * Function.Call(Hash.DRAW_BOX,a.X, a.Y, a.Z,b.X, b.Y, b.Z,col.R, col.G, col.B, col.A); + * } + */ + export function drawBox(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, red: number, green: number, blue: number, alpha: number): void; - export function stopCutscene(p0: boolean): void; + export function setBackfaceculling(toggle: boolean): void; - export function stopCutsceneImmediately(): void; + export function setDepthwriting(toggle: boolean): void; - /** - * @param p3 could be heading. Needs more research. - */ - export function setCutsceneOrigin(x: number, y: number, z: number, p3: number, p4: number): void; + export function beginTakeMissionCreatorPhoto(): boolean; - export function setCutsceneOriginAndOrientation(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, p6: number): void; + export function getStatusOfTakeMissionCreatorPhoto(): number; - export function getCutsceneTime(): number; + export function freeMemoryForMissionCreatorPhoto(): void; - export function getCutsceneTotalDuration(): number; + export function loadMissionCreatorPhoto(p0: any, p1: any, p2: any, p3: any): [boolean, any]; - export function getCutsceneEndTime(): number; + export function getStatusOfLoadMissionCreatorPhoto(p0?: any): [number, any]; - export function getCutscenePlayDuration(): number; + export function beginCreateMissionCreatorPhotoPreview(): boolean; - export function wasCutsceneSkipped(): boolean; + export function getStatusOfCreateMissionCreatorPhotoPreview(): number; - export function hasCutsceneFinished(): boolean; + export function freeMemoryForMissionCreatorPhotoPreview(): void; - export function isCutsceneActive(): boolean; + export function beginTakeHighQualityPhoto(): boolean; - export function isCutscenePlaying(): boolean; + export function getStatusOfTakeHighQualityPhoto(): number; - export function getCutsceneSectionPlaying(): number; + export function freeMemoryForHighQualityPhoto(): void; + + export function setTakenPhotoIsMugshot(toggle: boolean): void; + + export function setArenaThemeAndVariationForTakenPhoto(p0: any, p1: number): void; + + export function setOnIslandXForTakenPhoto(p0: any): void; - export function getEntityIndexOfCutsceneEntity(cutsceneEntName: string | null, modelHash: number): number; + /** + * 1 match in 1 script. cellphone_controller. + * p0 is -1 in scripts. + */ + export function saveHighQualityPhoto(unused: number): boolean; - export function getCutsceneConcatSectionPlaying(): number; + export function getStatusOfSaveHighQualityPhoto(): number; - /** - * @returns This function is hard-coded to always return 1. - */ - export function isCutsceneAuthorized(cutsceneName: string | null): boolean; + export function beginCreateLowQualityCopyOfPhoto(p0: any): boolean; - export function doesCutsceneHandleExist(cutsceneHandle: number): number; + export function getStatusOfCreateLowQualityCopyOfPhoto(p0: number): number; - export function registerEntityForCutscene(cutscenePed: Player | number, cutsceneEntName: string | null, p2: number, modelHash: number, p4: number): void; + export function freeMemoryForLowQualityPhoto(): void; - export function getEntityIndexOfRegisteredEntity(cutsceneEntName: string | null, modelHash: number): number; + export function drawLowQualityPhotoToPhone(p0: boolean, p1: boolean): void; /** - * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json - */ - export function setVehicleModelPlayerWillExitScene(modelHash: number): void; + * This function is hard-coded to always return 0. + */ + export function getMaximumNumberOfPhotos(): number; /** - * Only used twice in R* scripts - */ - export function setCutsceneTriggerArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): void; + * This function is hard-coded to always return 96. + */ + export function getMaximumNumberOfCloudPhotos(): number; + + export function getCurrentNumberOfCloudPhotos(): number; /** - * @param modelHash (p1) was always 0 in R* scripts - */ - export function canSetEnterStateForRegisteredEntity(cutsceneEntName: string | null, modelHash: number): boolean; + * 2 matches across 2 scripts. Only showed in appcamera & appmedia. Both were 0. + */ + export function queueOperationToCreateSortedListOfPhotos(p0: any): boolean; - export function canSetExitStateForRegisteredEntity(cutsceneEntName: string | null, modelHash: number): boolean; + /** + * 3 matches across 3 scripts. First 2 were 0, 3rd was 1. Possibly a bool. + * appcamera, appmedia, and cellphone_controller. + */ + export function getStatusOfSortedListOperation(p0: any): number; - export function canSetExitStateForCamera(p0: boolean): boolean; + export function clearStatusOfSortedListOperation(): void; /** - * Toggles a value (bool) for cutscenes. - */ - export function setPadCanShakeDuringCutscene(toggle: boolean): void; + * This function is hard-coded to always return 0. + */ + export function doesThisPhotoSlotContainAValidPhoto(p0: any): boolean; - export function setCutsceneFadeValues(p0: boolean, p1: boolean, p2: boolean, p3: boolean): void; + /** + * This function is hard-coded to always return 0. + */ + export function loadHighQualityPhoto(p0: any): boolean; - export function setCutsceneMultiheadFade(p0: boolean, p1: boolean, p2: boolean, p3: boolean): void; + /** + * Hardcoded to always return 2. + */ + export function getLoadHighQualityPhotoStatus(p0: number): number; - export function setCutsceneMultiheadFadeManual(p0: boolean): void; + export function drawLightWithRangeex(x: number, y: number, z: number, r: number, g: number, b: number, range: number, intensity: number, shadow: number): void; - export function isMultiheadFadeUp(): boolean; + export function drawLightWithRange(posX: number, posY: number, posZ: number, colorR: number, colorG: number, colorB: number, range: number, intensity: number): void; /** - * Stops current cutscene with a fade transition - * You will need to manually fade the screen back in - * SET_CUTSCENE_INPUTS_PARTIALLY_FADE? - * @param p0 always true in R* Scripts - */ - export function networkSetMocapCutsceneCanBeSkipped(p0: boolean): void; + * Parameters: + * * pos - coordinate where the spotlight is located + * * dir - the direction vector the spotlight should aim at from its current position + * * r,g,b - color of the spotlight + * * distance - the maximum distance the light can reach + * * brightness - the brightness of the light + * * roundness - "smoothness" of the circle edge + * * radius - the radius size of the spotlight + * * falloff - the falloff size of the light's edge (example: www.i.imgur.com/DemAWeO.jpg) + * Example in C# (spotlight aims at the closest vehicle): + * Vector3 myPos = Game.Player.Character.Position; + * Vehicle nearest = World.GetClosestVehicle(myPos , 1000f); + * Vector3 destinationCoords = nearest.Position; + * Vector3 dirVector = destinationCoords - myPos; + * dirVector.Normalize(); + * Function.Call(Hash.DRAW_SPOT_LIGHT, pos.X, pos.Y, pos.Z, dirVector.X, dirVector.Y, dirVector.Z, 255, 255, 255, 100.0f, 1f, 0.0f, 13.0f, 1f); + */ + export function drawSpotLight(posX: number, posY: number, posZ: number, dirX: number, dirY: number, dirZ: number, colorR: number, colorG: number, colorB: number, distance: number, brightness: number, hardness: number, radius: number, falloff: number): void; - export function setCarGeneratorsCanUpdateDuringCutscene(p0: boolean): void; + export function drawShadowedSpotLight(posX: number, posY: number, posZ: number, dirX: number, dirY: number, dirZ: number, colorR: number, colorG: number, colorB: number, distance: number, brightness: number, roundness: number, radius: number, falloff: number, shadowId: number): void; - export function canUseMobilePhoneDuringCutscene(): boolean; + export function fadeUpPedLight(p0: number): void; - export function setCutsceneCanBeSkipped(p0: boolean): void; + export function updateLightsOnEntity(entity: Entity | number): void; - export function setCanDisplayMinimapDuringCutsceneThisUpdate(): void; + export function setLightOverrideMaxIntensityScale(p0: any): void; + + export function getLightOverrideMaxIntensityScale(): number; + + /** + * enum MarkerTypes + * { + * MarkerTypeUpsideDownCone = 0, + * MarkerTypeVerticalCylinder = 1, + * MarkerTypeThickChevronUp = 2, + * MarkerTypeThinChevronUp = 3, + * MarkerTypeCheckeredFlagRect = 4, + * MarkerTypeCheckeredFlagCircle = 5, + * MarkerTypeVerticleCircle = 6, + * MarkerTypePlaneModel = 7, + * MarkerTypeLostMCDark = 8, + * MarkerTypeLostMCLight = 9, + * MarkerTypeNumber0 = 10, + * MarkerTypeNumber1 = 11, + * MarkerTypeNumber2 = 12, + * MarkerTypeNumber3 = 13, + * MarkerTypeNumber4 = 14, + * MarkerTypeNumber5 = 15, + * MarkerTypeNumber6 = 16, + * MarkerTypeNumber7 = 17, + * MarkerTypeNumber8 = 18, + * MarkerTypeNumber9 = 19, + * MarkerTypeChevronUpx1 = 20, + * MarkerTypeChevronUpx2 = 21, + * MarkerTypeChevronUpx3 = 22, + * MarkerTypeHorizontalCircleFat = 23, + * MarkerTypeReplayIcon = 24, + * MarkerTypeHorizontalCircleSkinny = 25, + * MarkerTypeHorizontalCircleSkinny_Arrow = 26, + * MarkerTypeHorizontalSplitArrowCircle = 27, + * MarkerTypeDebugSphere = 28, + * MarkerTypeDallorSign = 29, + * MarkerTypeHorizontalBars = 30, + * MarkerTypeWolfHead = 31 + * }; + * dirX/Y/Z represent a heading on each axis in which the marker should face, alternatively you can rotate each axis independently with rotX/Y/Z (and set dirX/Y/Z all to 0). + * faceCamera - Rotates only the y-axis (the heading) towards the camera + * p19 - no effect, default value in script is 2 + * rotate - Rotates only on the y-axis (the heading) + * textureDict - Name of texture dictionary to load texture from (e.g. "GolfPutting") + * textureName - Name of texture inside dictionary to load (e.g. "PuttingMarker") + * drawOnEnts - Draws the marker onto any entities that intersect it + * basically what he said, except textureDict and textureName are totally not const char*, or if so, then they are always set to 0/NULL/nullptr in every script I checked, eg: + * bj.c: graphics::draw_marker(6, vParam0, 0f, 0f, 1f, 0f, 0f, 0f, 4f, 4f, 4f, 240, 200, 80, iVar1, 0, 0, 2, 0, 0, 0, false); + * his is what I used to draw an amber downward pointing chevron "V", has to be redrawn every frame. The 180 is for 180 degrees rotation around the Y axis, the 50 is alpha, assuming max is 100, but it will accept 255. + * GRAPHICS::DRAW_MARKER(2, v.x, v.y, v.z + 2, 0, 0, 0, 0, 180, 0, 2, 2, 2, 255, 128, 0, 50, 0, 1, 1, 0, 0, 0, 0); + */ + export function drawMarker(type: number, posX: number, posY: number, posZ: number, dirX: number, dirY: number, dirZ: number, rotX: number, rotY: number, rotZ: number, scaleX: number, scaleY: number, scaleZ: number, red: number, green: number, blue: number, alpha: number, bobUpAndDown: boolean, faceCamera: boolean, p19: number, rotate: boolean, textureDict: string, textureName: string, drawOnEnts: boolean): void; + + export function drawMarkerEx(type: number, posX: number, posY: number, posZ: number, dirX: number, dirY: number, dirZ: number, rotX: number, rotY: number, rotZ: number, scaleX: number, scaleY: number, scaleZ: number, red: number, green: number, blue: number, alpha: number, bobUpAndDown: boolean, faceCamera: boolean, p19: any, rotate: boolean, textureDict: string, textureName: string, drawOnEnts: boolean, p24: boolean, p25: boolean): void; + + /** + * Draws a 3D sphere, typically seen in the GTA:O freemode event "Penned In". + * Example https://imgur.com/nCbtS4H + * alpha - The alpha for the sphere. Goes from 0.0 to 1.0. + */ + export function drawMarkerSphere(x: number, y: number, z: number, radius: number, red: number, green: number, blue: number, alpha: number): void; /** - * Full list of ped components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pedComponentVariations.json - */ - export function setCutscenePedComponentVariation(cutsceneEntName: string | null, componentId: number, drawableId: number, textureId: number, modelHash: number): void; + * Creates a checkpoint. Returns the handle of the checkpoint. + * 20/03/17 : Attention, checkpoints are already handled by the game itself, so you must not loop it like markers. + * Parameters: + * * type - The type of checkpoint to create. See below for a list of checkpoint types. + * * pos1 - The position of the checkpoint. + * * pos2 - The position of the next checkpoint to point to. + * * radius - The radius of the checkpoint. + * * color - The color of the checkpoint. + * * reserved - Special parameter, see below for details. Usually set to 0 in the scripts. + * Checkpoint types: + * 0-4---------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker + * 5-9---------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker + * 10-14-------Ring: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker + * 15-19-------1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker + * 20-24-------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker + * 25-29-------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker + * 30-34-------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker + * 35-38-------Ring: Airplane Up, Left, Right, UpsideDown + * 39----------? + * 40----------Ring: just a ring + * 41----------? + * 42-44-------Cylinder w/ number (uses 'reserved' parameter) + * 45-47-------Cylinder no arrow or number + * If using type 42-44, reserved sets number / number and shape to display + * 0-99------------Just numbers (0-99) + * 100-109-----------------Arrow (0-9) + * 110-119------------Two arrows (0-9) + * 120-129----------Three arrows (0-9) + * 130-139----------------Circle (0-9) + * 140-149------------CycleArrow (0-9) + * 150-159----------------Circle (0-9) + * 160-169----Circle w/ pointer (0-9) + * 170-179-------Perforated ring (0-9) + * 180-189----------------Sphere (0-9) + */ + export function createCheckpoint(type: number, posX1: number, posY1: number, posZ1: number, posX2: number, posY2: number, posZ2: number, diameter: number, red: number, green: number, blue: number, alpha: number, reserved: number): number; - export function setCutscenePedComponentVariationFromPed(cutsceneEntName: string | null, ped: Player | number, modelHash: number): void; + export function setCheckpointInsideCylinderHeightScale(checkpoint: number, scale: number): void; - export function doesCutsceneEntityExist(cutsceneEntName: string | null, modelHash: number): boolean; + export function setCheckpointInsideCylinderScale(checkpoint: number, scale: number): void; /** - * Thanks R*! ;) - * if ((l_161 == 0) || (l_161 == 2)) { - * sub_2ea27("Trying to set Jimmy prop variation"); - * CUTSCENE::SET_CUTSCENE_PED_PROP_VARIATION("Jimmy_Boston", 1, 0, 0, 0); - * } - * Full list of ped components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pedComponentVariations.json - */ - export function setCutscenePedPropVariation(cutsceneEntName: string | null, componentId: number, drawableId: number, textureId: number, modelHash: number): void; + * Sets the cylinder height of the checkpoint. + * Parameters: + * * nearHeight - The height of the checkpoint when inside of the radius. + * * farHeight - The height of the checkpoint when outside of the radius. + * * radius - The radius of the checkpoint. + */ + export function setCheckpointCylinderHeight(checkpoint: number, nearHeight: number, farHeight: number, radius: number): void; /** - * Possibly HAS_CUTSCENE_CUT_THIS_FRAME, needs more research. - */ - export function hasCutsceneCutThisFrame(): boolean; + * Sets the checkpoint color. + */ + export function setCheckpointRgba(checkpoint: number, red: number, green: number, blue: number, alpha: number): void; /** - * Adds the given requestID to the watch list. - */ - export function datafileWatchRequestId(requestId: number): void; - - export function datafileClearWatchList(): void; + * Sets the checkpoint icon color. + */ + export function setCheckpointRgba2(checkpoint: number, red: number, green: number, blue: number, alpha: number): void; - export function datafileIsValidRequestId(index: number): boolean; + /** + * This does not move an existing checkpoint... so wtf. + */ + export function setCheckpointClipplaneWithPosNorm(checkpoint: number, posX: number, posY: number, posZ: number, unkX: number, unkY: number, unkZ: number): void; - export function datafileHasLoadedFileData(requestId: number): boolean; + export function setCheckpointForceOldArrowPointing(checkpoint: number): void; - export function datafileHasValidFileData(requestId: number): boolean; + /** + * Unknown. Called after creating a checkpoint (type: 51) in the creators. + */ + export function setCheckpointDecalRotAlignedToCameraRot(checkpoint: number): void; - export function datafileSelectActiveFile(requestId: number, p1: any): boolean; + export function setCheckpointForceDirection(checkpoint: number): void; - export function datafileDeleteRequestedFile(requestId: number): boolean; + export function setCheckpointDirection(checkpoint: number, posX: number, posY: number, posZ: number): void; - export function ugcCreateContent(data: any | null, dataCount: number, contentName: string | null, description: string | null, tagsCsv: string | null, contentTypeName: string | null, publish: boolean, p7: any): [boolean, any]; + export function deleteCheckpoint(checkpoint: number): void; - export function ugcCreateMission(contentName: string | null, description: string | null, tagsCsv: string | null, contentTypeName: string | null, publish: boolean, p5: any): boolean; + export function dontRenderInGameUi(p0: boolean): void; - export function ugcUpdateContent(contentId: string | null, data: any | null, dataCount: number, contentName: string | null, description: string | null, tagsCsv: string | null, contentTypeName: string | null, p7: any): [boolean, any]; + export function forceRenderInGameUi(toggle: boolean): void; - export function ugcUpdateMission(contentId: string | null, contentName: string | null, description: string | null, tagsCsv: string | null, contentTypeName: string | null, p5: any): boolean; + /** + * This function can requests texture dictonaries from following RPFs: + * scaleform_generic.rpf + * scaleform_minigames.rpf + * scaleform_minimap.rpf + * scaleform_web.rpf + * last param isnt a toggle + */ + export function requestStreamedTextureDict(textureDict: string, p1: boolean): void; - export function ugcSetPlayerData(contentId: string | null, rating: number, contentTypeName: string | null, p3: any): boolean; + export function hasStreamedTextureDictLoaded(textureDict: string): boolean; - export function datafileSelectUgcData(p0: number, p1: any): boolean; + export function setStreamedTextureDictAsNoLongerNeeded(textureDict: string): void; - export function datafileSelectUgcStats(p0: number, p1: boolean, p2: any): boolean; + /** + * Draws a rectangle on the screen. + * -x: The relative X point of the center of the rectangle. (0.0-1.0, 0.0 is the left edge of the screen, 1.0 is the right edge of the screen) + * -y: The relative Y point of the center of the rectangle. (0.0-1.0, 0.0 is the top edge of the screen, 1.0 is the bottom edge of the screen) + * -width: The relative width of the rectangle. (0.0-1.0, 1.0 means the whole screen width) + * -height: The relative height of the rectangle. (0.0-1.0, 1.0 means the whole screen height) + * -R: Red part of the color. (0-255) + * -G: Green part of the color. (0-255) + * -B: Blue part of the color. (0-255) + * -A: Alpha part of the color. (0-255, 0 means totally transparent, 255 means totally opaque) + * The total number of rectangles to be drawn in one frame is apparently limited to 399. + */ + export function drawRect(x: number, y: number, width: number, height: number, r: number, g: number, b: number, a: number, p8: boolean): void; - export function datafileSelectUgcPlayerData(p0: number, p1: any): boolean; + /** + * Sets a flag defining whether or not script draw commands should continue being drawn behind the pause menu. This is usually used for TV channels and other draw commands that are used with a world render target. + */ + export function setScriptGfxDrawBehindPausemenu(toggle: boolean): void; - export function datafileSelectCreatorStats(p0: number, p1: any): boolean; + /** + * Sets the draw order for script draw commands. + * Examples from decompiled scripts: + * GRAPHICS::SET_SCRIPT_GFX_DRAW_ORDER(7); + * GRAPHICS::DRAW_RECT(0.5, 0.5, 3.0, 3.0, v_4, v_5, v_6, a_0._f172, 0); + * GRAPHICS::SET_SCRIPT_GFX_DRAW_ORDER(1); + * GRAPHICS::DRAW_RECT(0.5, 0.5, 1.5, 1.5, 0, 0, 0, 255, 0); + */ + export function setScriptGfxDrawOrder(drawOrder: number): void; /** - * Loads a User-Generated Content (UGC) file. These files can be found in "[GTA5]\data\ugc" and "[GTA5]\common\patch\ugc". They seem to follow a naming convention, most likely of "[name]_[part].ugc". See example below for usage. - * Returns whether or not the file was successfully loaded. - * Example: - * DATAFILE::DATAFILE_LOAD_OFFLINE_UGC("RockstarPlaylists") // loads "rockstarplaylists_00.ugc" - */ - export function datafileLoadOfflineUgc(filename: string | null, p1: any): boolean; + * horizontalAlign: The horizontal alignment. This can be 67 ('C'), 76 ('L'), or 82 ('R'). + * verticalAlign: The vertical alignment. This can be 67 ('C'), 66 ('B'), or 84 ('T'). + * This function anchors script draws to a side of the safe zone. This needs to be called to make the interface independent of the player's safe zone configuration. + * These values are equivalent to alignX and alignY in common:/data/ui/frontend.xml, which can be used as a baseline for default alignment. + * Using any other value (including 0) will result in the safe zone not being taken into account for this draw. The canonical value for this is 'I' (73). + * For example, you can use SET_SCRIPT_GFX_ALIGN(0, 84) to only scale on the Y axis (to the top), but not change the X axis. + * To reset the value, use RESET_SCRIPT_GFX_ALIGN. + */ + export function setScriptGfxAlign(horizontalAlign: number, verticalAlign: number): void; - export function datafileCreate(p0: number): void; + /** + * This function resets the alignment set using SET_SCRIPT_GFX_ALIGN and SET_SCRIPT_GFX_ALIGN_PARAMS to the default values ('I', 'I'; 0, 0, 0, 0). + * This should be used after having used the aforementioned functions in order to not affect any other scripts attempting to draw. + */ + export function resetScriptGfxAlign(): void; - export function datafileDelete(p0: number): void; + /** + * Sets the draw offset/calculated size for SET_SCRIPT_GFX_ALIGN. If using any alignment other than left/top, the game expects the width/height to be configured using this native in order to get a proper starting position for the draw command. + */ + export function setScriptGfxAlignParams(x: number, y: number, w: number, h: number): void; - export function datafileStoreMissionHeader(p0: number): void; + /** + * Calculates the effective X/Y fractions when applying the values set by SET_SCRIPT_GFX_ALIGN and SET_SCRIPT_GFX_ALIGN_PARAMS + */ + export function getScriptGfxAlignPosition(x: number, y: number, calculatedX?: number, calculatedY?: number): [void, number, number]; - export function datafileFlushMissionHeader(): void; + /** + * Gets the scale of safe zone. if the safe zone size scale is max, it will return 1.0. + */ + export function getSafeZoneSize(): number; - export function datafileGetFileDict(p0: number): any; + /** + * Draws a 2D sprite on the screen. + * Parameters: + * textureDict - Name of texture dictionary to load texture from (e.g. "CommonMenu", "MPWeaponsCommon", etc.) + * textureName - Name of texture to load from texture dictionary (e.g. "last_team_standing_icon", "tennis_icon", etc.) + * screenX/Y - Screen offset (0.5 = center) + * scaleX/Y - Texture scaling. Negative values can be used to flip the texture on that axis. (0.5 = half) + * heading - Texture rotation in degrees (default = 0.0) positive is clockwise, measured in degrees + * red,green,blue - Sprite color (default = 255/255/255) + * alpha - opacity level + */ + export function drawSprite(textureDict: string, textureName: string, screenX: number, screenY: number, width: number, height: number, heading: number, red: number, green: number, blue: number, alpha: number, p11: boolean, p12: any): void; + + /** + * Used in arcade games and Beam hack minigame in Doomsday Heist. I will most certainly dive into this to try replicate arcade games. + * x position must be between 0.0 and 1.0 (1.0 being the most right side of the screen) + * y position must be between 0.0 and 1.0 (1.0 being the most bottom side of the screen) + * width 0.0 - 1.0 is the reasonable amount generally + * height 0.0 - 1.0 is the reasonable amount generally + * p6 almost always 0.0 + * p11 seems to be unknown but almost always 0 int + */ + export function drawSpriteArx(textureDict: string, textureName: string, x: number, y: number, width: number, height: number, p6: number, red: number, green: number, blue: number, alpha: number, p11: any, p12: any): void; + + /** + * Similar to _DRAW_SPRITE, but seems to be some kind of "interactive" sprite, at least used by render targets. + * These seem to be the only dicts ever requested by this native: + * prop_screen_biker_laptop + * Prop_Screen_GR_Disruption + * Prop_Screen_TaleOfUs + * prop_screen_nightclub + * Prop_Screen_IE_Adhawk + * prop_screen_sm_free_trade_shipping + * prop_screen_hacker_truck + * MPDesktop + * Prop_Screen_Nightclub + * And a few others + */ + export function drawSpriteNamedRendertarget(textureDict: string, textureName: string, screenX: number, screenY: number, width: number, height: number, heading: number, red: number, green: number, blue: number, alpha: number, p11: any): void; + + /** + * Similar to DRAW_SPRITE, but allows to specify the texture coordinates used to draw the sprite. + * u1, v1 - texture coordinates for the top-left corner + * u2, v2 - texture coordinates for the bottom-right corner + */ + export function drawSpriteArxWithUv(textureDict: string, textureName: string, x: number, y: number, width: number, height: number, u1: number, v1: number, u2: number, v2: number, heading: number, red: number, green: number, blue: number, alpha: number, p15: any): void; + + /** + * Example: + * GRAPHICS::ADD_ENTITY_ICON(a_0, "MP_Arrow"); + * I tried this and nothing happened... + */ + export function addEntityIcon(entity: Entity | number, icon: string): number; - export function datafileStartSaveToCloud(filename: string | null, p1: any): boolean; + export function setEntityIconVisibility(entity: Entity | number, toggle: boolean): void; - export function datafileUpdateSaveToCloud(p0: boolean): [boolean, boolean]; + export function setEntityIconColor(entity: Entity | number, red: number, green: number, blue: number, alpha: number): void; - export function datafileIsSavePending(): boolean; + /** + * Sets the on-screen drawing origin for draw-functions (which is normally x=0,y=0 in the upper left corner of the screen) to a world coordinate. + * From now on, the screen coordinate which displays the given world coordinate on the screen is seen as x=0,y=0. + * Example in C#: + * Vector3 boneCoord = somePed.GetBoneCoord(Bone.SKEL_Head); + * Function.Call(Hash.SET_DRAW_ORIGIN, boneCoord.X, boneCoord.Y, boneCoord.Z, 0); + * Function.Call(Hash.DRAW_SPRITE, "helicopterhud", "hud_corner", -0.01, -0.015, 0.013, 0.013, 0.0, 255, 0, 0, 200); + * Function.Call(Hash.DRAW_SPRITE, "helicopterhud", "hud_corner", 0.01, -0.015, 0.013, 0.013, 90.0, 255, 0, 0, 200); + * Function.Call(Hash.DRAW_SPRITE, "helicopterhud", "hud_corner", -0.01, 0.015, 0.013, 0.013, 270.0, 255, 0, 0, 200); + * Function.Call(Hash.DRAW_SPRITE, "helicopterhud", "hud_corner", 0.01, 0.015, 0.013, 0.013, 180.0, 255, 0, 0, 200); + * Function.Call(Hash.CLEAR_DRAW_ORIGIN); + * Result: www11.pic-upload.de/19.06.15/bkqohvil2uao.jpg + * If the pedestrian starts walking around now, the sprites are always around her head, no matter where the head is displayed on the screen. + * This function also effects the drawing of texts and other UI-elements. + * The effect can be reset by calling GRAPHICS::CLEAR_DRAW_ORIGIN(). + */ + export function setDrawOrigin(x: number, y: number, z: number, p3: boolean): void; - export function datafileLoadOfflineUgcForAdditionalDataFile(p0: any, p1: any): boolean; + /** + * Resets the screen's draw-origin which was changed by the function GRAPHICS::SET_DRAW_ORIGIN(...) back to x=0,y=0. + * See GRAPHICS::SET_DRAW_ORIGIN(...) for further information. + */ + export function clearDrawOrigin(): void; - export function datafileDeleteForAdditionalDataFile(p0: any): void; + export function setBinkMovie(name: string): number; - export function datafileGetFileDictForAdditionalDataFile(p0: any): any; + export function playBinkMovie(binkMovie: number): void; - export function datadictSetBool(objectData: any | null, key: string | null, value: boolean): [void, any]; + export function stopBinkMovie(binkMovie: number): void; - export function datadictSetInt(objectData: any | null, key: string | null, value: number): [void, any]; + export function releaseBinkMovie(binkMovie: number): void; - export function datadictSetFloat(objectData: any | null, key: string | null, value: number): [void, any]; + export function drawBinkMovie(binkMovie: number, p1: number, p2: number, p3: number, p4: number, p5: number, r: number, g: number, b: number, a: number): void; - export function datadictSetString(objectData: any | null, key: string | null, value: string | null): [void, any]; + /** + * In percentage: 0.0 - 100.0 + */ + export function setBinkMovieTime(binkMovie: number, progress: number): void; - export function datadictSetVector(objectData: any | null, key: string | null, valueX: number, valueY: number, valueZ: number): [void, any]; + /** + * In percentage: 0.0 - 100.0 + */ + export function getBinkMovieTime(binkMovie: number): number; - export function datadictCreateDict(objectData: any | null, key: string | null): [any, any]; + /** + * binkMovie: Is return value from _SET_BINK_MOVIE. Has something to do with bink volume? (audRequestedSettings::SetVolumeCurveScale) + */ + export function setBinkMovieVolume(binkMovie: number, value: number): void; - export function datadictCreateArray(objectData: any | null, key: string | null): [any, any]; + /** + * Might be more appropriate in AUDIO? + */ + export function attachTvAudioToEntity(entity: Entity | number): void; - export function datadictGetBool(objectData: any | null, key: string | null): [boolean, any]; + export function setBinkMovieAudioFrontend(binkMovie: number, p1: boolean): void; - export function datadictGetInt(objectData: any | null, key: string | null): [number, any]; + /** + * Probably changes tvs from being a 3d audio to being "global" audio + */ + export function setTvAudioFrontend(toggle: boolean): void; - export function datadictGetFloat(objectData: any | null, key: string | null): [number, any]; + export function setBinkShouldSkip(binkMovie: number, bShouldSkip: boolean): void; - export function datadictGetString(objectData: any | null, key: string | null): [string, any]; + export function loadMovieMeshSet(movieMeshSetName: string): number; - export function datadictGetVector(objectData: any | null, key: string | null): [Vector3, any]; + export function releaseMovieMeshSet(movieMeshSet: number): void; - export function datadictGetDict(objectData: any | null, key: string | null): [any, any]; + export function queryMovieMeshSetState(p0: any): number; - export function datadictGetArray(objectData: any | null, key: string | null): [any, any]; + /** + * int screenresx,screenresy; + * GET_SCREEN_RESOLUTION(&screenresx,&screenresy); + */ + export function getScreenResolution(x?: number, y?: number): [void, number, number]; /** - * Types: - * 1 = Boolean - * 2 = Integer - * 3 = Float - * 4 = String - * 5 = Vector3 - * 6 = Object - * 7 = Array - */ - export function datadictGetType(objectData: any | null, key: string | null): [number, any]; + * Returns current screen resolution. + */ + export function getActualScreenResolution(x?: number, y?: number): [void, number, number]; - export function dataarrayAddBool(arrayData: any | null, value: boolean): [void, any]; + export function getAspectRatio(b: boolean): number; - export function dataarrayAddInt(arrayData: any | null, value: number): [void, any]; + export function getScreenAspectRatio(): number; - export function dataarrayAddFloat(arrayData: any | null, value: number): [void, any]; + /** + * Setting Aspect Ratio Manually in game will return: + * false - for Narrow format Aspect Ratios (3:2, 4:3, 5:4, etc. ) + * true - for Wide format Aspect Ratios (5:3, 16:9, 16:10, etc. ) + * Setting Aspect Ratio to "Auto" in game will return "false" or "true" based on the actual set Resolution Ratio. + */ + export function getIsWidescreen(): boolean; - export function dataarrayAddString(arrayData: any | null, value: string | null): [void, any]; + /** + * false = Any resolution < 1280x720 + * true = Any resolution >= 1280x720 + */ + export function getIsHidef(): boolean; - export function dataarrayAddVector(arrayData: any | null, valueX: number, valueY: number, valueZ: number): [void, any]; + export function adjustNextPosSizeAsNormalized169(): void; - export function dataarrayAddDict(arrayData: any): [any, any]; + /** + * Enables Night Vision. + * Example: + * C#: Function.Call(Hash.SET_NIGHTVISION, true); + * C++: GRAPHICS::SET_NIGHTVISION(true); + * BOOL toggle: + * true = turns night vision on for your player. + * false = turns night vision off for your player. + */ + export function setNightvision(toggle: boolean): void; - export function dataarrayGetBool(arrayData: any | null, arrayIndex: number): [boolean, any]; + export function getRequestingnightvision(): boolean; - export function dataarrayGetInt(arrayData: any | null, arrayIndex: number): [number, any]; + export function getUsingnightvision(): boolean; - export function dataarrayGetFloat(arrayData: any | null, arrayIndex: number): [number, any]; + export function setExposuretweak(toggle: boolean): void; - export function dataarrayGetString(arrayData: any | null, arrayIndex: number): [string, any]; + export function forceExposureReadback(toggle: boolean): void; - export function dataarrayGetVector(arrayData: any | null, arrayIndex: number): [Vector3, any]; + export function overrideNightvisionLightRange(p0: number): void; - export function dataarrayGetDict(arrayData: any | null, arrayIndex: number): [any, any]; + export function setNoiseoveride(toggle: boolean): void; - export function dataarrayGetCount(arrayData: any): [number, any]; + export function setNoisinessoveride(value: number): void; /** - * Types: - * 1 = Boolean - * 2 = Integer - * 3 = Float - * 4 = String - * 5 = Vector3 - * 6 = Object - * 7 = Array - */ - export function dataarrayGetType(arrayData: any | null, arrayIndex: number): [number, any]; - - export function decorSetTime(entity: Entity | number, propertyName: string | null, timestamp: number): boolean; + * Convert a world coordinate into its relative screen coordinate. (WorldToScreen) + * Returns a boolean; whether or not the operation was successful. It will return false if the coordinates given are not visible to the rendering camera. + * For .NET users... + * VB: + * Public Shared Function World3DToScreen2d(pos as vector3) As Vector2 + * Dim x2dp, y2dp As New Native.OutputArgument + * Native.Function.Call(Of Boolean)(Native.Hash.GET_SCREEN_COORD_FROM_WORLD_COORD , pos.x, pos.y, pos.z, x2dp, y2dp) + * Return New Vector2(x2dp.GetResult(Of Single), y2dp.GetResult(Of Single)) + * End Function + * C#: + * Vector2 World3DToScreen2d(Vector3 pos) + * { + * var x2dp = new OutputArgument(); + * var y2dp = new OutputArgument(); + * Function.Call(Hash.GET_SCREEN_COORD_FROM_WORLD_COORD , pos.X, pos.Y, pos.Z, x2dp, y2dp); + * return new Vector2(x2dp.GetResult(), y2dp.GetResult()); + * } + * //USE VERY SMALL VALUES FOR THE SCALE OF RECTS/TEXT because it is dramatically larger on screen than in 3D, e.g '0.05' small. + * Used to be called _WORLD3D_TO_SCREEN2D + * I thought we lost you from the scene forever. It does seem however that calling SET_DRAW_ORIGIN then your natives, then ending it. Seems to work better for certain things such as keeping boxes around people for a predator missile e.g. + */ + export function getScreenCoordFromWorldCoord(worldX: number, worldY: number, worldZ: number, screenX?: number, screenY?: number): [boolean, number, number]; /** - * This function sets metadata of type bool to specified entity. - */ - export function decorSetBool(entity: Entity | number, propertyName: string | null, value: boolean): boolean; - - export function decorSetFloat(entity: Entity | number, propertyName: string | null, value: number): boolean; + * Returns the texture resolution of the passed texture dict+name. + * Note: Most texture resolutions are doubled compared to the console version of the game. + */ + export function getTextureResolution(textureDict: string, textureName: string): Vector3; /** - * Sets property to int. - */ - export function decorSetInt(entity: Entity | number, propertyName: string | null, value: number): boolean; - - export function decorGetBool(entity: Entity | number, propertyName: string | null): boolean; + * Overriding ped badge texture to a passed texture. It's synced between players (even custom textures!), don't forget to request used dict on *all* clients to make it sync properly. Can be removed by passing empty strings. + */ + export function overridePedCrewLogoTexture(ped: Ped | Player | number, txd: string, txn: string): boolean; - export function decorGetFloat(entity: Entity | number, propertyName: string | null): number; - - export function decorGetInt(entity: Entity | number, propertyName: string | null): number; + export function setDistanceBlurStrengthOverride(p0: number): void; /** - * Returns whether or not the specified property is set for the entity. - */ - export function decorExistOn(entity: Entity | number, propertyName: string | null): boolean; - - export function decorRemove(entity: Entity | number, propertyName: string | null): boolean; + * Purpose of p0 and p1 unknown. + */ + export function setFlash(p0: number, p1: number, fadeIn: number, duration: number, fadeOut: number): void; - /** - * https://alloc8or.re/gta5/doc/enums/eDecorType.txt - */ - export function decorRegister(propertyName: string | null, type: number): void; + export function disableOcclusionThisFrame(): void; /** - * @param type see DECOR_REGISTER - */ - export function decorIsRegisteredAsType(propertyName: string | null, type: number): boolean; + * Does not affect weapons, particles, fire/explosions, flashlights or the sun. + * When set to true, all emissive textures (including ped components that have light effects), street lights, building lights, vehicle lights, etc will all be turned off. + * Used in Humane Labs Heist for EMP. + * state: True turns off all artificial light sources in the map: buildings, street lights, car lights, etc. False turns them back on. + */ + export function setArtificialLightsState(state: boolean): void; /** - * Called after all decorator type initializations. - */ - export function decorRegisterLock(): void; + * If "blackout" is enabled, this native allows you to ignore "blackout" for vehicles. + */ + export function setArtificialVehicleLightsState(toggle: boolean): void; - export function areAnyCcsPending(): boolean; + export function disableHdtexThisFrame(): void; /** - * Returns true if the given DLC pack is present. - */ - export function isDlcPresent(dlcHash: number): boolean; - - export function dlcCheckCloudDataCorrect(): boolean; - - export function getExtracontentCloudResult(): number; - - export function dlcCheckCompatPackConfiguration(): boolean; + * Creates a tracked point, useful for checking the visibility of a 3D point on screen. + */ + export function createTrackedPoint(): number; - export function getEverHadBadPackOrder(): boolean; + export function setTrackedPointInfo(point: number, x: number, y: number, z: number, radius: number): void; - export function getIsLoadingScreenActive(): boolean; + export function isTrackedPointVisible(point: number): boolean; - export function getIsInitialLoadingScreenActive(): boolean; + export function destroyTrackedPoint(point: number): void; /** - * Sets the value of the specified variable to 0. - * @returns Always returns true. - */ - export function hasCloudRequestsFinished(p0: boolean | null, unused: number): [boolean, boolean]; + * This function is hard-coded to always return 0. + */ + export function setGrassCullSphere(p0: number, p1: number, p2: number, p3: number): number; /** - * Unloads GROUP_MAP (GTAO/MP) DLC data and loads GROUP_MAP_SP DLC. Neither are loaded by default, ON_ENTER_MP is a cognate to this function and loads MP DLC (and unloads SP DLC by extension). - * Works in singleplayer. - */ - export function onEnterSp(): void; + * This native does absolutely nothing, just a nullsub + */ + export function removeGrassCullSphere(handle: number): void; - /** - * This loads the GTA:O dlc map parts (high end garages, apartments). - * Works in singleplayer. - * In order to use GTA:O heist IPL's you have to call this native with the following params: SET_INSTANCE_PRIORITY_MODE(1); - */ - export function onEnterMp(): void; + export function procgrassEnableCullsphere(handle: number, x: number, y: number, z: number, scale: number): void; - /** - * Checks whether an entity exists in the game world. - */ - export function doesEntityExist(entity: Entity | number): boolean; + export function procgrassDisableCullsphere(handle: number): void; - export function doesEntityBelongToThisScript(entity: Entity | number, p1: boolean): boolean; + export function procgrassIsCullsphereEnabled(handle: number): boolean; - export function doesEntityHaveDrawable(entity: Entity | number): boolean; + export function procgrassEnableAmbscalescan(): void; - export function doesEntityHavePhysics(entity: Entity | number): boolean; + export function procgrassDisableAmbscalescan(): void; - export function doesEntityHaveSkeleton(entity: Entity | number): boolean; + export function disableProcobjCreation(): void; - export function doesEntityHaveAnimDirector(entity: Entity | number): boolean; + export function enableProcobjCreation(): void; + + export function grassbatchEnableFlatteningExtInSphere(x: number, y: number, z: number, p3: any, p4: number, p5: number, p6: number, scale: number): void; /** - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - * @param p3 is always 3 as far as i cant tell - */ - export function hasEntityAnimFinished(entity: Entity | number, animDict: string | null, animName: string | null, p3: number): boolean; + * Wraps 0xAAE9BE70EC7C69AB with FLT_MAX as p7, Jenkins: 0x73E96210? + */ + export function grassbatchEnableFlatteningInSphere(x: number, y: number, z: number, radius: number, p4: number, p5: number, p6: number): void; - export function hasEntityBeenDamagedByAnyObject(entity: Entity | number): boolean; + export function grassbatchDisableFlattening(): void; - export function hasEntityBeenDamagedByAnyPed(entity: Entity | number): boolean; + export function cascadeShadowsInitSession(): void; - export function hasEntityBeenDamagedByAnyVehicle(entity: Entity | number): boolean; + export function cascadeShadowsSetCascadeBounds(p0: any, p1: boolean, p2: number, p3: number, p4: number, p5: number, p6: boolean, p7: number): void; - /** - * Entity 1 = Victim - * Entity 2 = Attacker - * @param p2 seems to always be 1 - */ - export function hasEntityBeenDamagedByEntity(entity1: Entity | number, entity2: Entity | number, p2: boolean): boolean; + export function cascadeShadowsSetCascadeBoundsScale(p0: number): void; - /** - * There is other codes used for traceType: - * 19 - in jewelry_prep1a - * 126 - in am_hunt_the_beast - * 256 & 287 - in fm_mission_controller - * @param traceType is always 17 in the scripts. - */ - export function hasEntityClearLosToEntity(entity1: Entity | number, entity2: Entity | number, traceType: number): boolean; + export function cascadeShadowsSetEntityTrackerScale(p0: number): void; - export function hasEntityClearLosToEntityAdjustForCover(entity1: Entity | number, entity2: Entity | number, traceType: number): boolean; + export function cascadeShadowsSetSplitZExpWeight(p0: number): void; - /** - * Has the entity1 got a clear line of sight to the other entity2 from the direction entity1 is facing. - * This is one of the most CPU demanding BOOL natives in the game; avoid calling this in things like nested for-loops - */ - export function hasEntityClearLosToEntityInFront(entity1: Entity | number, entity2: Entity | number): boolean; + export function cascadeShadowsSetBoundPosition(p0: any): void; /** - * Called on tick. - * Note: for vehicles, the wheels can touch the ground and it will still return false, but if the body of the vehicle touches the ground, it will return true. - * @returns Tested with vehicles, returns true whenever the vehicle is touching any entity. - */ - export function hasEntityCollidedWithAnything(entity: Entity | number): boolean; + * When this is set to ON, shadows only draw as you get nearer. + * When OFF, they draw from a further distance. + */ + export function cascadeShadowsEnableEntityTracker(toggle: boolean): void; - export function getLastEntityHitByEntity(entity: Entity | number): number; + export function cascadeShadowsSetScreenSizeCheckEnabled(p0: boolean): void; - export function getLastMaterialHitByEntity(entity: Entity | number): number; + /** + * Possible values: + * "CSM_ST_POINT" + * "CSM_ST_LINEAR" + * "CSM_ST_TWOTAP" + * "CSM_ST_BOX3x3" + * "CSM_ST_BOX4x4" + * "CSM_ST_DITHER2_LINEAR" + * "CSM_ST_CUBIC" + * "CSM_ST_DITHER4" + * "CSM_ST_DITHER16" + * "CSM_ST_SOFT16" + * "CSM_ST_DITHER16_RPDB" + * "CSM_ST_POISSON16_RPDB_GNORM" + * "CSM_ST_HIGHRES_BOX4x4" + * "CSM_ST_CLOUDS_SIMPLE" + * "CSM_ST_CLOUDS_LINEAR" + * "CSM_ST_CLOUDS_TWOTAP" + * "CSM_ST_CLOUDS_BOX3x3" + * "CSM_ST_CLOUDS_BOX4x4" + * "CSM_ST_CLOUDS_DITHER2_LINEAR" + * "CSM_ST_CLOUDS_SOFT16" + * "CSM_ST_CLOUDS_DITHER16_RPDB" + * "CSM_ST_CLOUDS_POISSON16_RPDB_GNORM" + */ + export function cascadeShadowsSetShadowSampleType(type: string): void; - export function getCollisionNormalOfLastHitForEntity(entity: Entity | number): Vector3; + export function cascadeShadowsClearShadowSampleType(): void; - /** - * Based on carmod_shop script decompile this takes a vehicle parameter. It is called when repair is done on initial enter. - */ - export function forceEntityAiAndAnimationUpdate(entity: Entity | number): void; + export function cascadeShadowsSetAircraftMode(p0: boolean): void; - /** - * Returns a float value representing animation's current playtime with respect to its total playtime. This value increasing in a range from [0 to 1] and wrap back to 0 when it reach 1. - * Example: - * 0.000000 - mark the starting of animation. - * 0.500000 - mark the midpoint of the animation. - * 1.000000 - mark the end of animation. - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - */ - export function getEntityAnimCurrentTime(entity: Entity | number, animDict: string | null, animName: string | null): number; + export function cascadeShadowsSetDynamicDepthMode(p0: boolean): void; - /** - * Returns a float value representing animation's total playtime in milliseconds. - * Example: - * GET_ENTITY_ANIM_TOTAL_TIME(PLAYER_ID(),"amb@world_human_yoga@female@base","base_b") - * return 20800.000000 - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - */ - export function getEntityAnimTotalTime(entity: Entity | number, animDict: string | null, animName: string | null): number; + export function cascadeShadowsSetDynamicDepthValue(p0: number): void; - /** - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - */ - export function getAnimDuration(animDict: string | null, animName: string | null): number; + export function cascadeShadowsEnableFreezer(p0: boolean): void; - export function getEntityAttachedTo(entity: Entity | number): number; + export function waterReflectionSetScriptObjectVisibility(p0: any): void; - /** - * Gets the current coordinates for a specified entity. - * `entity` = The entity to get the coordinates from. - * `alive` = Unused by the game, potentially used by debug builds of GTA in order to assert whether or not an entity was alive. - */ - export function getEntityCoords(entity: Entity | number, alive: boolean): Vector3; + export function golfTrailSetEnabled(toggle: boolean): void; /** - * Gets the entity's forward vector. - */ - export function getEntityForwardVector(entity: Entity | number): Vector3; + * p8 seems to always be false. + */ + export function golfTrailSetPath(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number, p7: number, p8: boolean): void; - /** - * Gets the X-component of the entity's forward vector. - */ - export function getEntityForwardX(entity: Entity | number): number; + export function golfTrailSetRadius(p0: number, p1: number, p2: number): void; - /** - * Gets the Y-component of the entity's forward vector. - */ - export function getEntityForwardY(entity: Entity | number): number; + export function golfTrailSetColour(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number, p7: number, p8: number, p9: number, p10: number, p11: number): void; - /** - * Returns the heading of the entity in degrees. Also know as the "Yaw" of an entity. - */ - export function getEntityHeading(entity: Entity | number): number; + export function golfTrailSetTessellation(p0: number, p1: number): void; - /** - * Gets the heading of the entity physics in degrees, which tends to be more accurate than just "GET_ENTITY_HEADING". This can be clearly seen while, for example, ragdolling a ped/player. - * NOTE: The name and description of this native are based on independent research. If you find this native to be more suitable under a different name and/or described differently, please feel free to do so. - */ - export function getEntityHeadingFromEulers(entity: Entity | number): number; + export function golfTrailSetFixedControlPointEnable(p0: boolean): void; /** - * Returns an integer value of entity's current health. - * Example of range for ped: - * - Player [0 to 200] - * - Ped [100 to 200] - * - Vehicle [0 to 1000] - * - Object [0 to 1000] - * Health is actually a float value but this native casts it to int. - * In order to get the actual value, do: - * float health = *(float *)(entityAddress + 0x280); - */ - export function getEntityHealth(entity: Entity | number): number; + * 12 matches across 4 scripts. All 4 scripts were job creators. + * type ranged from 0 - 2. + * p4 was always 0.2f. Likely scale. + * assuming p5 - p8 is RGBA, the graphic is always yellow (255, 255, 0, 255). + * Tested but noticed nothing. + */ + export function golfTrailSetFixedControlPoint(type: number, xPos: number, yPos: number, zPos: number, p4: number, red: number, green: number, blue: number, alpha: number): void; /** - * Return an integer value of entity's maximum health. - * Example: - * - Player = 200 - * - Ped = 150 - */ - export function getEntityMaxHealth(entity: Entity | number): number; + * Only appeared in Golf & Golf_mp. Parameters were all ptrs + */ + export function golfTrailSetShaderParams(p0: number, p1: number, p2: number, p3: number, p4: number): void; - /** - * For instance: ENTITY::SET_ENTITY_MAX_HEALTH(PLAYER::PLAYER_PED_ID(), 200); // director_mode.c4: 67849 - */ - export function setEntityMaxHealth(entity: Entity | number, value: number): void; + export function golfTrailSetFacing(p0: boolean): void; + + export function golfTrailGetMaxHeight(): number; - export function getEntityHeight(entity: Entity | number, X: number, Y: number, Z: number, atTop: boolean, inWorldCoords: boolean): number; + export function golfTrailGetVisualControlPoint(p0: number): Vector3; /** - * Return height (z-dimension) above ground. - * Example: The pilot in a titan plane is 1.844176 above ground. - * How can i convert it to meters? - * Everything seems to be in meters, probably this too. - */ - export function getEntityHeightAboveGround(entity: Entity | number): number; + * Toggles Heatvision on/off. + */ + export function setSeethrough(toggle: boolean): void; - export function getEntityMatrix(entity: Entity | number, forwardVector?: Vector3, rightVector?: Vector3, upVector?: Vector3, position?: Vector3): [void, Vector3, Vector3, Vector3, Vector3]; + export function getUsingseethrough(): boolean; - /** - * Returns the model hash from the entity - */ - export function getEntityModel(entity: Entity | number): number; + export function seethroughReset(): void; - /** - * Converts world coords (posX - Z) to coords relative to the entity - * Example: - * entity's x coord is 40 - * the returned x coord will then be 10 or -10, not sure haven't used this in a while (think it is 10 though). - * @param posX is given as 50 - * @param posY is given as 50 - * @param posZ is given as 50 - */ - export function getOffsetFromEntityGivenWorldCoords(entity: Entity | number, posX: number, posY: number, posZ: number): Vector3; + export function seethroughSetFadeStartdistance(distance: number): void; - /** - * Offset values are relative to the entity. - * x = left/right - * y = forward/backward - * z = up/down - */ - export function getOffsetFromEntityInWorldCoords(entity: Entity | number, offsetX: number, offsetY: number, offsetZ: number): Vector3; + export function seethroughSetFadeEnddistance(distance: number): void; - export function getEntityPitch(entity: Entity | number): number; + export function seethroughGetMaxThickness(): number; /** - * @param w is the correct parameter name! - */ - export function getEntityQuaternion(entity: Entity | number, x?: number, y?: number, z?: number, w?: number): [void, number, number, number, number]; + * 0.0 = you will not be able to see people behind the walls. 50.0 and more = you will see everyone through the walls. More value is "better" view. See https://gfycat.com/FirmFlippantGourami + * min: 1.0 + * max: 10000.0 + */ + export function seethroughSetMaxThickness(thickness: number): void; - /** - * Displays the current ROLL axis of the entity [-180.0000/180.0000+] - * (Sideways Roll) such as a vehicle tipped on its side - */ - export function getEntityRoll(entity: Entity | number): number; + export function seethroughSetNoiseMin(amount: number): void; - /** - * rotationOrder refers to the order yaw pitch roll is applied; value ranges from 0 to 5 and is usually *2* in scripts. - * What you use for rotationOrder when getting must be the same as rotationOrder when setting the rotation. - * What it returns is the yaw on the z part of the vector, which makes sense considering R* considers z as vertical. Here's a picture for those of you who don't understand pitch, yaw, and roll: www.allstar.fiu.edu/aero/images/pic5-1.gif - * Rotation Orders: - * 0: ZYX - Rotate around the z-axis, then the y-axis and finally the x-axis. - * 1: YZX - Rotate around the y-axis, then the z-axis and finally the x-axis. - * 2: ZXY - Rotate around the z-axis, then the x-axis and finally the y-axis. - * 3: XZY - Rotate around the x-axis, then the z-axis and finally the y-axis. - * 4: YXZ - Rotate around the y-axis, then the x-axis and finally the z-axis. - * 5: XYZ - Rotate around the x-axis, then the y-axis and finally the z-axis. - * @param rotationOrder is the order yaw, pitch and roll is applied. Usually 2. Returns a vector where the Z coordinate is the yaw. - * @returns rotationOrder is the order yaw, pitch and roll is applied. Usually 2. Returns a vector where the Z coordinate is the yaw. - */ - export function getEntityRotation(entity: Entity | number, rotationOrder: number): Vector3; + export function seethroughSetNoiseMax(amount: number): void; - export function getEntityRotationVelocity(entity: Entity | number): Vector3; + export function seethroughSetHilightIntensity(intensity: number): void; + + export function seethroughSetHighlightNoise(noise: number): void; /** - * Returns the name of the script that owns/created the entity or nullptr. Second parameter is unused, can just be a nullptr. - */ - export function getEntityScript(entity: Entity | number, script?: number): [string, number]; + * min: 0.0 + * max: 0.75 + */ + export function seethroughSetHeatscale(index: number, heatScale: number): void; + + export function seethroughSetColorNear(red: number, green: number, blue: number): void; /** - * result is in meters per second - * ------------------------------------------------------------ - * So would the conversion to mph and km/h, be along the lines of this. - * float speed = GET_ENTITY_SPEED(veh); - * float kmh = (speed * 3.6); - * float mph = (speed * 2.236936); - * ------------------------------------------------------------ - */ - export function getEntitySpeed(entity: Entity | number): number; + * Setter for GET_MOTIONBLUR_MAX_VEL_SCALER + */ + export function setMotionblurMaxVelScaler(p0: number): void; /** - * @param relative can be used for getting speed relative to the frame of the vehicle, to determine for example, if you are going in reverse (-y speed) or not (+y speed). - */ - export function getEntitySpeedVector(entity: Entity | number, relative: boolean): Vector3; + * Getter for SET_MOTIONBLUR_MAX_VEL_SCALER + */ + export function getMotionblurMaxVelScaler(): number; - export function getEntityUprightValue(entity: Entity | number): number; + export function setForceMotionblur(toggle: boolean): void; - export function getEntityVelocity(entity: Entity | number): Vector3; + export function togglePlayerDamageOverlay(toggle: boolean): void; /** - * @returns Simply returns whatever is passed to it (Regardless of whether the handle is valid or not). - */ - export function getObjectIndexFromEntityIndex(entity: Entity | number): number; + * Sets an value related to timecycles. + */ + export function resetAdaptation(p0: number): void; /** - * @returns Simply returns whatever is passed to it (Regardless of whether the handle is valid or not). - */ - export function getPedIndexFromEntityIndex(entity: Entity | number): number; + * time in ms to transition to fully blurred screen + */ + export function triggerScreenblurFadeIn(transitionTime: number): boolean; /** - * @returns Simply returns whatever is passed to it (Regardless of whether the handle is valid or not). - */ - export function getVehicleIndexFromEntityIndex(entity: Entity | number): number; + * time in ms to transition from fully blurred to normal + */ + export function triggerScreenblurFadeOut(transitionTime: number): boolean; + + export function disableScreenblurFade(): void; + + export function getScreenblurFadeCurrentTime(): number; /** - * Returns the coordinates of an entity-bone. - */ - export function getWorldPositionOfEntityBone(entity: Entity | number, boneIndex: number): Vector3; + * Returns whether screen transition to blur/from blur is running. + */ + export function isScreenblurFadeRunning(): boolean; - export function getNearestPlayerToEntity(entity: Entity | number): number; + export function togglePausedRenderphases(toggle: boolean): void; - export function getNearestPlayerToEntityOnTeam(entity: Entity | number, team: number): number; + export function getTogglePausedRenderphasesStatus(): boolean; - /** - * Returns: - * 0 = no entity - * 1 = ped - * 2 = vehicle - * 3 = object - */ - export function getEntityType(entity: Entity | number): number; + export function resetPausedRenderphases(): void; - /** - * A population type, from the following enum: https://alloc8or.re/gta5/doc/enums/ePopulationType.txt - */ - export function getEntityPopulationType(entity: Entity | number): number; + export function grabPausemenuOwnership(): void; - export function isAnEntity(handle: number): boolean; + export function setHidofOverride(p0: boolean, p1: boolean, nearplaneOut: number, nearplaneIn: number, farplaneOut: number, farplaneIn: number): void; - export function isEntityAPed(entity: Entity | number): boolean; + export function setLockAdaptiveDofDistance(p0: boolean): void; - export function isEntityAMissionEntity(entity: Entity | number): boolean; + export function phonephotoeditorToggle(p0: boolean): boolean; - export function isEntityAVehicle(entity: Entity | number): boolean; + export function phonephotoeditorIsActive(): boolean; - export function isEntityAnObject(entity: Entity | number): boolean; + export function phonephotoeditorSetFrameTxd(textureDict: string, p1: boolean): boolean; /** - * Checks if entity is within x/y/zSize distance of x/y/z. - * Last three are unknown ints, almost always p7 = 0, p8 = 1, p9 = 0 - */ - export function isEntityAtCoord(entity: Entity | number, xPos: number, yPos: number, zPos: number, xSize: number, ySize: number, zSize: number, p7: boolean, p8: boolean, p9: number): boolean; + * GRAPHICS::START_PARTICLE_FX_NON_LOOPED_AT_COORD("scr_paleto_roof_impact", -140.8576f, 6420.789f, 41.1391f, 0f, 0f, 267.3957f, 0x3F800000, 0, 0, 0); + * Axis - Invert Axis Flags + * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json + * ------------------------------------------------------------------- + * C# + * Function.Call(Hash.START_PARTICLE_FX_NON_LOOPED_AT_COORD, = you are calling this function. + * char *effectname = This is an in-game effect name, for e.g. "scr_fbi4_trucks_crash" is used to give the effects when truck crashes etc + * float x, y, z pos = this one is Simple, you just have to declare, where do you want this effect to take place at, so declare the ordinates + * float xrot, yrot, zrot = Again simple? just mention the value in case if you want the effect to rotate. + * float scale = is declare the scale of the effect, this may vary as per the effects for e.g 1.0f + * bool xaxis, yaxis, zaxis = To bool the axis values. + * example: + * Function.Call(Hash.START_PARTICLE_FX_NON_LOOPED_AT_COORD, "scr_fbi4_trucks_crash", GTA.Game.Player.Character.Position.X, GTA.Game.Player.Character.Position.Y, GTA.Game.Player.Character.Position.Z + 4f, 0, 0, 0, 5.5f, 0, 0, 0); + */ + export function startParticleFxNonLoopedAtCoord(effectName: string, xPos: number, yPos: number, zPos: number, xRot: number, yRot: number, zRot: number, scale: number, xAxis: boolean, yAxis: boolean, zAxis: boolean): boolean; /** - * Checks if entity1 is within the box defined by x/y/zSize of entity2. - * Last three parameters are almost alwasy p5 = 0, p6 = 1, p7 = 0 - */ - export function isEntityAtEntity(entity1: Entity | number, entity2: Entity | number, xSize: number, ySize: number, zSize: number, p5: boolean, p6: boolean, p7: number): boolean; + * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json + */ + export function startNetworkedParticleFxNonLoopedAtCoord(effectName: string, xPos: number, yPos: number, zPos: number, xRot: number, yRot: number, zRot: number, scale: number, xAxis: boolean, yAxis: boolean, zAxis: boolean, p11: boolean): boolean; /** - * Whether the entity is attached to any other entity. - */ - export function isEntityAttached(entity: Entity | number): boolean; - - export function isEntityAttachedToAnyObject(entity: Entity | number): boolean; + * GRAPHICS::START_PARTICLE_FX_NON_LOOPED_ON_PED_BONE("scr_sh_bong_smoke", PLAYER::PLAYER_PED_ID(), -0.025f, 0.13f, 0f, 0f, 0f, 0f, 31086, 0x3F800000, 0, 0, 0); + * Axis - Invert Axis Flags + * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json + */ + export function startParticleFxNonLoopedOnPedBone(effectName: string, ped: Ped | Player | number, offsetX: number, offsetY: number, offsetZ: number, rotX: number, rotY: number, rotZ: number, boneIndex: number, scale: number, axisX: boolean, axisY: boolean, axisZ: boolean): boolean; - export function isEntityAttachedToAnyPed(entity: Entity | number): boolean; + /** + * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json + */ + export function startNetworkedParticleFxNonLoopedOnPedBone(effectName: string, ped: Ped | Player | number, offsetX: number, offsetY: number, offsetZ: number, rotX: number, rotY: number, rotZ: number, boneIndex: number, scale: number, axisX: boolean, axisY: boolean, axisZ: boolean): boolean; - export function isEntityAttachedToAnyVehicle(entity: Entity | number): boolean; + /** + * Starts a particle effect on an entity for example your player. + * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json + * Example: + * C#: + * Function.Call(Hash.REQUEST_NAMED_PTFX_ASSET, "scr_rcbarry2"); Function.Call(Hash.USE_PARTICLE_FX_ASSET, "scr_rcbarry2"); Function.Call(Hash.START_PARTICLE_FX_NON_LOOPED_ON_ENTITY, "scr_clown_appears", Game.Player.Character, 0.0, 0.0, -0.5, 0.0, 0.0, 0.0, 1.0, false, false, false); + * Internally this calls the same function as GRAPHICS::START_PARTICLE_FX_NON_LOOPED_ON_PED_BONE + * however it uses -1 for the specified bone index, so it should be possible to start a non looped fx on an entity bone using that native + * -can confirm START_PARTICLE_FX_NON_LOOPED_ON_PED_BONE does NOT work on vehicle bones. + */ + export function startParticleFxNonLoopedOnEntity(effectName: string, entity: Entity | number, offsetX: number, offsetY: number, offsetZ: number, rotX: number, rotY: number, rotZ: number, scale: number, axisX: boolean, axisY: boolean, axisZ: boolean): boolean; - export function isEntityAttachedToEntity(from: Entity | number, to: Entity | number): boolean; + /** + * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json + */ + export function startNetworkedParticleFxNonLoopedOnEntity(effectName: string, entity: Entity | number, offsetX: number, offsetY: number, offsetZ: number, rotX: number, rotY: number, rotZ: number, scale: number, axisX: boolean, axisY: boolean, axisZ: boolean): boolean; - export function isEntityDead(entity: Entity | number, p1: boolean): boolean; + /** + * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json + */ + export function startParticleFxNonLoopedOnEntityBone(effectName: string, entity: Entity | number, offsetX: number, offsetY: number, offsetZ: number, rotX: number, rotY: number, rotZ: number, boneIndex: number, scale: number, axisX: boolean, axisY: boolean, axisZ: boolean): boolean; - export function isEntityInAir(entity: Entity | number): boolean; + /** + * only works on some fx's, not networked + */ + export function setParticleFxNonLoopedColour(r: number, g: number, b: number): void; /** - * `p8` is a debug flag invoking functions in the same path as ``DRAW_MARKER`` - * `p10` is some entity flag check, also used in `IS_ENTITY_AT_ENTITY`, `IS_ENTITY_IN_AREA`, and `IS_ENTITY_AT_COORD`. - * See IS_POINT_IN_ANGLED_AREA for the definition of an angled area. - */ - export function isEntityInAngledArea(entity: Entity | number, x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, width: number, debug: boolean, includeZ: boolean, p10: any): boolean; + * Usage example for C#: + * Function.Call(Hash.SET_PARTICLE_FX_NON_LOOPED_ALPHA, new InputArgument[] { 0.1f }); + * Note: the argument alpha ranges from 0.0f-1.0f ! + */ + export function setParticleFxNonLoopedAlpha(alpha: number): void; - export function isEntityInArea(entity: Entity | number, x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, p7: boolean, p8: boolean, p9: any): boolean; + export function setParticleFxNonLoopedScale(scale: number): void; - /** - * Full list of zones by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/zones.json - */ - export function isEntityInZone(entity: Entity | number, zone: string | null): boolean; + export function setParticleFxNonLoopedEmitterSize(p0: number, p1: number, scale: number): void; - export function isEntityInWater(entity: Entity | number): boolean; + /** + * Used only once in the scripts (taxi_clowncar) + */ + export function setParticleFxForceVehicleInterior(toggle: boolean): void; /** - * Get how much of the entity is submerged. 1.0f is whole entity. - */ - export function getEntitySubmergedLevel(entity: Entity | number): number; + * GRAPHICS::START_PARTICLE_FX_LOOPED_AT_COORD("scr_fbi_falling_debris", 93.7743f, -749.4572f, 70.86904f, 0f, 0f, 0f, 0x3F800000, 0, 0, 0, 0) + * p11 seems to be always 0 + * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json + */ + export function startParticleFxLoopedAtCoord(effectName: string, x: number, y: number, z: number, xRot: number, yRot: number, zRot: number, scale: number, xAxis: boolean, yAxis: boolean, zAxis: boolean, p11: boolean): number; - export function setEntityRequiresMoreExpensiveRiverCheck(entity: Entity | number, toggle: boolean): void; + /** + * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json + */ + export function startParticleFxLoopedOnPedBone(effectName: string, ped: Ped | Player | number, xOffset: number, yOffset: number, zOffset: number, xRot: number, yRot: number, zRot: number, boneIndex: number, scale: number, xAxis: boolean, yAxis: boolean, zAxis: boolean): number; /** - * Returns true if the entity is in between the minimum and maximum values for the 2d screen coords. - * Chipping - * @returns This means that it will return true even if the entity is behind a wall for example, as long as you're looking at their location. - */ - export function isEntityOnScreen(entity: Entity | number): boolean; + * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json + */ + export function startParticleFxLoopedOnEntity(effectName: string, entity: Entity | number, xOffset: number, yOffset: number, zOffset: number, xRot: number, yRot: number, zRot: number, scale: number, xAxis: boolean, yAxis: boolean, zAxis: boolean): number; /** - * See also PED::IS_SCRIPTED_SCENARIO_PED_USING_CONDITIONAL_ANIM 0x6EC47A344923E1ED 0x3C30B447 - * Taken from ENTITY::IS_ENTITY_PLAYING_ANIM(PLAYER::PLAYER_PED_ID(), "creatures@shark@move", "attack_player", 3) - * p4 is always 3 in the scripts. - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - */ - export function isEntityPlayingAnim(entity: Entity | number, animDict: string | null, animName: string | null, taskFlag: number): boolean; + * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json + */ + export function startParticleFxLoopedOnEntityBone(effectName: string, entity: Entity | number, xOffset: number, yOffset: number, zOffset: number, xRot: number, yRot: number, zRot: number, boneIndex: number, scale: number, xAxis: boolean, yAxis: boolean, zAxis: boolean): number; /** - * a static ped will not react to natives like "APPLY_FORCE_TO_ENTITY" or "SET_ENTITY_VELOCITY" and oftentimes will not react to task-natives like "TASK::TASK_COMBAT_PED". The only way I know of to make one of these peds react is to ragdoll them (or sometimes to use CLEAR_PED_TASKS_IMMEDIATELY(). Static peds include almost all far-away peds, beach-combers, peds in certain scenarios, peds crossing a crosswalk, peds walking to get back into their cars, and others. If anyone knows how to make a ped non-static without ragdolling them, please edit this with the solution. - * how can I make an entity static??? - */ - export function isEntityStatic(entity: Entity | number): boolean; + * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json + */ + export function startNetworkedParticleFxLoopedOnEntity(effectName: string, entity: Entity | number, xOffset: number, yOffset: number, zOffset: number, xRot: number, yRot: number, zRot: number, scale: number, xAxis: boolean, yAxis: boolean, zAxis: boolean, r: number, g: number, b: number, a: number): number; - export function isEntityTouchingEntity(entity: Entity | number, targetEntity: Entity | number): boolean; + /** + * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json + */ + export function startNetworkedParticleFxLoopedOnEntityBone(effectName: string, entity: Entity | number, xOffset: number, yOffset: number, zOffset: number, xRot: number, yRot: number, zRot: number, boneIndex: number, scale: number, xAxis: boolean, yAxis: boolean, zAxis: boolean, r: number, g: number, b: number, a: number): number; - export function isEntityTouchingModel(entity: Entity | number, modelHash: number): boolean; + /** + * p1 is always 0 in the native scripts + */ + export function stopParticleFxLooped(ptfxHandle: number, p1: boolean): void; - export function isEntityUpright(entity: Entity | number, angle: number): boolean; + export function removeParticleFx(ptfxHandle: number, p1: boolean): void; - export function isEntityUpsidedown(entity: Entity | number): boolean; + export function removeParticleFxFromEntity(entity: Entity | number): void; - export function isEntityVisible(entity: Entity | number): boolean; + export function removeParticleFxInRange(X: number, Y: number, Z: number, radius: number): void; - export function isEntityVisibleToScript(entity: Entity | number): boolean; + export function forceParticleFxInVehicleInterior(p0: any, p1: any): void; - export function isEntityOccluded(entity: Entity | number): boolean; + export function doesParticleFxLoopedExist(ptfxHandle: number): boolean; - export function wouldEntityBeOccluded(entityModelHash: number, x: number, y: number, z: number, p4: boolean): boolean; + export function setParticleFxLoopedOffsets(ptfxHandle: number, x: number, y: number, z: number, rotX: number, rotY: number, rotZ: number): void; - export function isEntityWaitingForWorldCollision(entity: Entity | number): boolean; + export function setParticleFxLoopedEvolution(ptfxHandle: number, propertyName: string, amount: number, noNetwork: boolean): void; /** - * Applies a force to the specified entity. - * **List of force types (p1)**: - * public enum ForceType - * { - * MinForce = 0, - * MaxForceRot = 1, - * MinForce2 = 2, - * MaxForceRot2 = 3, - * ForceNoRot = 4, - * See NativeDB for reference: http://natives.altv.mp/#/0x18FF00FC7EFF559E - */ - export function applyForceToEntityCenterOfMass(entity: Entity | number, forceType: number, x: number, y: number, z: number, p5: boolean, isDirectionRel: boolean, isForceRel: boolean, p8: boolean): void; + * only works on some fx's + * p4 = 0 + */ + export function setParticleFxLoopedColour(ptfxHandle: number, r: number, g: number, b: number, p4: boolean): void; - /** - * Documented here: - * gtaforums.com/topic/885669-precisely-define-object-physics/ - * gtaforums.com/topic/887362-apply-forces-and-momentums-to-entityobject/ - * First bit (lowest): Strong force flag, factor 100 - * Second bit: Unkown flag - * If higher bits are unequal 0 the function doesn't applay any forces at all. - * (As integer possible values are 0-7) - * 0: weak force - * 1: strong force - * See NativeDB for reference: http://natives.altv.mp/#/0xC5F68BE9613E2D18 - * @param x Momentum flag=1 (vector (x,y,z) is a momentum, more research needed) - * @param y Momentum flag=1 (vector (x,y,z) is a momentum, more research needed) - * @param boneIndex !!! Whenever I set this !=0, my script stopped. - */ - export function applyForceToEntity(entity: Entity | number, forceFlags: number, x: number, y: number, z: number, offX: number, offY: number, offZ: number, boneIndex: number, isDirectionRel: boolean, ignoreUpVec: boolean, isForceRel: boolean, p12: boolean, p13: boolean): void; + export function setParticleFxLoopedAlpha(ptfxHandle: number, alpha: number): void; - /** - * Attaches entity1 to bone (boneIndex) of entity2. - * @param boneIndex - this is different to boneID, use GET_PED_BONE_INDEX to get the index from the ID. use the index for attaching to specific bones. entity1 will be attached to entity2's centre if bone index given doesn't correspond to bone indexes for that entity type. - * @param useSoftPinning - if set to false attached entity will not detach when fixed - * @param collision - controls collision between the two entities (FALSE disables collision). - * @param isPed - pitch doesnt work when false and roll will only work on negative numbers (only peds) - * @param vertexIndex - position of vertex - * @param fixedRot - if false it ignores entity vector - */ - export function attachEntityToEntity(entity1: Entity | number, entity2: Entity | number, boneIndex: number, xPos: number, yPos: number, zPos: number, xRot: number, yRot: number, zRot: number, p9: boolean, useSoftPinning: boolean, collision: boolean, isPed: boolean, vertexIndex: number, fixedRot: boolean, p15: any): void; + export function setParticleFxLoopedScale(ptfxHandle: number, scale: number): void; - export function attachEntityBoneToEntityBone(entity1: Entity | number, entity2: Entity | number, boneIndex1: number, boneIndex2: number, p4: boolean, p5: boolean): void; + export function setParticleFxLoopedFarClipDist(ptfxHandle: number, range: number): void; - export function attachEntityBoneToEntityBoneYForward(entity1: Entity | number, entity2: Entity | number, boneIndex1: number, boneIndex2: number, p4: boolean, p5: boolean): void; + export function setParticleFxLoopedCameraBias(ptfxHandle: number, p1: number): void; - /** - * @param breakForce is the amount of force required to break the bond. - * @param fixedRot - is always 1 in scripts - * @param p15 - is 1 or 0 in scripts - unknoun what it does - * @param collision - controls collision between the two entities (FALSE disables collision). - * @param p17 - do not teleport entity to be attached to the position of the bone Index of the target entity (if 1, entity will not be teleported to target bone) - * @param p18 - is always 2 in scripts. - */ - export function attachEntityToEntityPhysically(entity1: Entity | number, entity2: Entity | number, boneIndex1: number, boneIndex2: number, xPos1: number, yPos1: number, zPos1: number, xPos2: number, yPos2: number, zPos2: number, xRot: number, yRot: number, zRot: number, breakForce: number, fixedRot: boolean, p15: boolean, collision: boolean, p17: boolean, p18: number): void; + export function setParticleFxCamInsideVehicle(p0: boolean): void; - /** - * Called to update entity attachments. - */ - export function processEntityAttachments(entity: Entity | number): void; + export function setParticleFxCamInsideNonplayerVehicle(vehicle: Vehicle | number, p1: boolean): void; - /** - * Returns the index of the bone. If the bone was not found, -1 will be returned. - * list: - * https://pastebin.com/D7JMnX1g - * BoneNames: - * chassis, - * windscreen, - * seat_pside_r, - * seat_dside_r, - * bodyshell, - * See NativeDB for reference: http://natives.altv.mp/#/0xFB71170B7E76ACBA - */ - export function getEntityBoneIndexByName(entity: Entity | number, boneName: string | null): number; + export function setParticleFxShootoutBoat(p0: any): void; - export function clearEntityLastDamageEntity(entity: Entity | number): void; + export function clearParticleFxShootoutBoat(): void; - /** - * Deletes the specified entity, then sets the handle pointed to by the pointer to NULL. - */ - export function deleteEntity(entity: Entity | number): [void, number]; + export function setParticleFxBloodScale(p0: any): void; - /** - * If `collision` is set to true, both entities won't collide with the other until the distance between them is above 4 meters. - * Set `dynamic` to true to keep velocity after dettaching - */ - export function detachEntity(entity: Entity | number, dynamic: boolean, collision: boolean): void; + export function disableInWaterPtfx(toggle: boolean): void; - /** - * Freezes or unfreezes an entity preventing its coordinates to change by the player if set to `true`. You can still change the entity position using SET_ENTITY_COORDS. - */ - export function freezeEntityPosition(entity: Entity | number, toggle: boolean): void; + export function disableDownwashPtfx(toggle: boolean): void; - /** - * True means it can be deleted by the engine when switching lobbies/missions/etc, false means the script is expected to clean it up. - * "Allow Freeze If No Collision" - */ - export function setEntityShouldFreezeWaitingOnCollision(entity: Entity | number, toggle: boolean): void; + export function setParticleFxSlipstreamLodrangeScale(scale: number): void; /** - * The only time bitset has a value is 0x4000 and the only time delta has a value is during stealth with usually <1.0f values. - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - * @param delta and bitset are guessed fields. They are based on the fact that most of the calls have 0 or nil field types passed in. - */ - export function playEntityAnim(entity: Entity | number, animName: string | null, animDict: string | null, p3: number, loop: boolean, stayInAnim: boolean, p6: boolean, delta: number, bitset: any): boolean; + * Creates cartoon effect when Michel smokes the weed + */ + export function enableClownBloodVfx(toggle: boolean): void; /** - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - * @param p4 and p7 are usually 1000.0f. - */ - export function playSynchronizedEntityAnim(entity: Entity | number, syncedScene: number, animation: string | null, propName: string | null, p4: number, p5: number, p6: any, p7: number): boolean; + * Creates a motion-blur sort of effect, this native does not seem to work, however by using the `START_SCREEN_EFFECT` native with `DrugsMichaelAliensFight` as the effect parameter, you should be able to get the effect. + */ + export function enableAlienBloodVfx(toggle: boolean): void; - /** - * p6,p7 probably animname and animdict - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - */ - export function playSynchronizedMapEntityAnim(x1: number, y1: number, z1: number, x2: number, y2: any, z2: number, p6: string | null, p7: string | null, p8: number, p9: number, p10: any, p11: number): boolean; + export function setParticleFxBulletImpactScale(scale: number): void; - export function stopSynchronizedMapEntityAnim(x1: number, y1: number, z1: number, x2: number, y2: any, z2: number): boolean; + export function setParticleFxBulletImpactLodrangeScale(p0: number): void; - /** - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - * RAGEPluginHook list: docs.ragepluginhook.net/html/62951c37-a440-478c-b389-c471230ddfc5.htm - */ - export function stopEntityAnim(entity: Entity | number, animation: string | null, animGroup: string | null, p3: number): boolean; + export function setParticleFxBulletTraceNoAngleReject(p0: boolean): void; - /** - * @param p1 sync task id? - */ - export function stopSynchronizedEntityAnim(entity: Entity | number, p1: number, p2: boolean): boolean; + export function setParticleFxBangScrapeLodrangeScale(p0: number): void; - /** - * if (ENTITY::HAS_ANIM_EVENT_FIRED(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("CreateObject"))) - */ - export function hasAnimEventFired(entity: Entity | number, actionHash: number): boolean; + export function setParticleFxFootLodrangeScale(p0: number): void; /** - * In the script "player_scene_t_bbfight.c4": - * "if (ENTITY::FIND_ANIM_EVENT_PHASE(&l_16E, &l_19F[v_416], v_9, &v_A, &v_B))" - * -- &l_16E (p0) is requested as an anim dictionary earlier in the script. - * -- &l_19F[v_416] (p1) is used in other natives in the script as the "animation" param. - * -- v_9 (p2) is instantiated as "victim_fall"; I'm guessing that's another anim - * --v_A and v_B (p3 & p4) are both set as -1.0, but v_A is used immediately after this native for: - * "if (v_A < ENTITY::GET_ENTITY_ANIM_CURRENT_TIME(...))" - * Both v_A and v_B are seemingly used to contain both Vector3's and floats, so I can't say what either really is other than that they are both output parameters. p4 looks more like a *Vector3 though - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - */ - export function findAnimEventPhase(animDictionary: string | null, animName: string | null, p2: string | null, p3?: any, p4?: any): [boolean, any, any]; + * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json + */ + export function setParticleFxFootOverrideName(p0: string): void; - /** - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - */ - export function setEntityAnimCurrentTime(entity: Entity | number, animDictionary: string | null, animName: string | null, time: number): void; + export function setSkidmarkRangeScale(scale: number): void; - /** - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - */ - export function setEntityAnimSpeed(entity: Entity | number, animDictionary: string | null, animName: string | null, speedMultiplier: number): void; + export function setPtfxForceVehicleInteriorFlag(p0: any): void; - /** - * Makes the specified entity (ped, vehicle or object) persistent. Persistent entities will not automatically be removed by the engine. - * maybe a quick disassembly will tell us what it does - * maybe a quick disassembly will tell us what it does - * @param p1 has no effect when either its on or off - * @param p2 has no effect when either its on or off - */ - export function setEntityAsMissionEntity(entity: Entity | number, p1: boolean, p2: boolean): void; + export function registerPostfxBulletImpact(weaponWorldPosX: number, weaponWorldPosY: number, weaponWorldPosZ: number, intensity: number): void; - /** - * Marks the specified entity (ped, vehicle or object) as no longer needed if its population type is set to the mission type. - * If the entity is ped, it will also clear their tasks immediately just like when CLEAR_PED_TASKS_IMMEDIATELY is called. - * Entities marked as no longer needed, will be deleted as the engine sees fit. - * Use this if you just want to just let the game delete the ped: - * void MarkPedAsAmbientPed(Ped ped) { - * auto addr = getScriptHandleBaseAddress(ped); - * if (!addr) { - * return; - * } - * See NativeDB for reference: http://natives.altv.mp/#/0xB736A491E64A32CF - */ - export function setEntityAsNoLongerNeeded(entity: Entity | number): [void, number]; + export function forcePostfxBulletImpactsAfterHud(p0: boolean): void; /** - * This is an alias of SET_ENTITY_AS_NO_LONGER_NEEDED. - */ - export function setPedAsNoLongerNeeded(ped: Player | number): [void, number]; + * From the b678d decompiled scripts: + * GRAPHICS::USE_PARTICLE_FX_ASSET("FM_Mission_Controler"); + * GRAPHICS::USE_PARTICLE_FX_ASSET("scr_apartment_mp"); + * GRAPHICS::USE_PARTICLE_FX_ASSET("scr_indep_fireworks"); + * GRAPHICS::USE_PARTICLE_FX_ASSET("scr_mp_cig_plane"); + * GRAPHICS::USE_PARTICLE_FX_ASSET("scr_mp_creator"); + * GRAPHICS::USE_PARTICLE_FX_ASSET("scr_ornate_heist"); + * GRAPHICS::USE_PARTICLE_FX_ASSET("scr_prison_break_heist_station"); + * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json + */ + export function useParticleFxAsset(name: string): void; /** - * This is an alias of SET_ENTITY_AS_NO_LONGER_NEEDED. - */ - export function setVehicleAsNoLongerNeeded(vehicle: Vehicle | number): [void, number]; + * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json + */ + export function setParticleFxOverride(oldAsset: string, newAsset: string): void; /** - * This is an alias of SET_ENTITY_AS_NO_LONGER_NEEDED. - */ - export function setObjectAsNoLongerNeeded(object: number): [void, number]; - - export function setEntityCanBeDamaged(entity: Entity | number, toggle: boolean): void; - - export function getEntityCanBeDamaged(entity: Entity | number): boolean; - - export function setEntityCanBeDamagedByRelationshipGroup(entity: Entity | number, bCanBeDamaged: boolean, relGroup: number): void; - - export function setEntityCanOnlyBeDamagedByScriptParticipants(entity: Entity | number, toggle: boolean): void; + * Resets the effect of SET_PARTICLE_FX_OVERRIDE + * Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json + */ + export function resetParticleFxOverride(name: string): void; /** - * Sets whether the entity can be targeted without being in line-of-sight. - */ - export function setEntityCanBeTargetedWithoutLos(entity: Entity | number, toggle: boolean): void; + * Returns ptfxHandle + * effectName: scr_sv_drag_burnout + */ + export function startVehicleParticleFxLooped(vehicle: Vehicle | number, effectName: string, frontBack: boolean, leftRight: boolean, localOnly: boolean): number; - export function setEntityCollision(entity: Entity | number, toggle: boolean, keepPhysics: boolean): void; - - export function getEntityCollisionDisabled(entity: Entity | number): boolean; + export function setWeatherPtfxUseOverrideSettings(p0: boolean): void; - export function setEntityCompletelyDisableCollision(entity: Entity | number, toggle: boolean, keepPhysics: boolean): void; + export function setWeatherPtfxOverrideCurrLevel(p0: number): void; - /** - * Often ends with 1, 0, 0, 1); in the scripts. It works. - * Axis - Invert Axis Flags - * @param clearArea is always 1 in the scripts. Set to 1, an area around the destination coords for the moved entity is cleared from other entities. - */ - export function setEntityCoords(entity: Entity | number, xPos: number, yPos: number, zPos: number, xAxis: boolean, yAxis: boolean, zAxis: boolean, clearArea: boolean): void; + export function washDecalsInRange(x: number, y: number, z: number, range: number, p4: number): void; - export function setEntityCoordsWithoutPlantsReset(entity: Entity | number, xPos: number, yPos: number, zPos: number, alive: boolean, deadFlag: boolean, ragdollFlag: boolean, clearArea: boolean): void; + export function washDecalsFromVehicle(vehicle: Vehicle | number, p1: number): void; /** - * Axis - Invert Axis Flags - */ - export function setEntityCoordsNoOffset(entity: Entity | number, xPos: number, yPos: number, zPos: number, xAxis: boolean, yAxis: boolean, zAxis: boolean): void; - - export function setEntityDynamic(entity: Entity | number, toggle: boolean): void; + * Fades nearby decals within the range specified + */ + export function fadeDecalsInRange(x: number, y: number, z: number, p3: number, p4: number): void; /** - * Set the heading of an entity in degrees also known as "Yaw". - */ - export function setEntityHeading(entity: Entity | number, heading: number): void; + * Removes all decals in range from a position, it includes the bullet holes, blood pools, petrol... + */ + export function removeDecalsInRange(x: number, y: number, z: number, range: number): void; - /** - * male ped ~= 100 - 200 - * female ped ~= 0 - 100 - * @param health >= 0 - */ - export function setEntityHealth(entity: Entity | number, health: number, p2: number): void; - - /** - * Sets a ped or an object totally invincible. It doesn't take any kind of damage. Peds will not ragdoll on explosions and the tazer animation won't apply either. - * If you use this for a ped and you want Ragdoll to stay enabled, then do: - * *(DWORD *)(pedAddress + 0x188) |= (1 << 9); - * Use this if you want to get the invincibility status: - * bool IsPedInvincible(Ped ped) - * { - * auto addr = getScriptHandleBaseAddress(ped); - * if (addr) - * { - * See NativeDB for reference: http://natives.altv.mp/#/0x3882114BDE571AD4 - * @returns return ((flag & (1 << 8)) != 0) || ((flag & (1 << 9)) != 0); - */ - export function setEntityInvincible(entity: Entity | number, toggle: boolean): void; + export function removeDecalsFromObject(obj: Object): void; - export function setEntityIsTargetPriority(entity: Entity | number, p1: boolean, p2: number): void; + export function removeDecalsFromObjectFacing(obj: Object, x: number, y: number, z: number): void; - export function setEntityLights(entity: Entity | number, toggle: boolean): void; + export function removeDecalsFromVehicle(vehicle: Vehicle | number): void; /** - * Loads collision grid for an entity spawned outside of a player's loaded area. This allows peds to execute tasks rather than sit dormant because of a lack of a physics grid. - * Certainly not the main usage of this native but when set to true for a Vehicle, it will prevent the vehicle to explode if it is spawned far away from the player. - */ - export function setEntityLoadCollisionFlag(entity: Entity | number, toggle: boolean, p2: any): void; + * decal types: + * public enum DecalTypes + * { + * splatters_blood = 1010, + * splatters_blood_dir = 1015, + * splatters_blood_mist = 1017, + * splatters_mud = 1020, + * splatters_paint = 1030, + * splatters_water = 1040, + * splatters_water_hydrant = 1050, + * splatters_blood2 = 1110, + * weapImpact_metal = 4010, + * weapImpact_concrete = 4020, + * weapImpact_mattress = 4030, + * weapImpact_mud = 4032, + * weapImpact_wood = 4050, + * weapImpact_sand = 4053, + * weapImpact_cardboard = 4040, + * weapImpact_melee_glass = 4100, + * weapImpact_glass_blood = 4102, + * weapImpact_glass_blood2 = 4104, + * weapImpact_shotgun_paper = 4200, + * weapImpact_shotgun_mattress, + * weapImpact_shotgun_metal, + * weapImpact_shotgun_wood, + * weapImpact_shotgun_dirt, + * weapImpact_shotgun_tvscreen, + * weapImpact_shotgun_tvscreen2, + * weapImpact_shotgun_tvscreen3, + * weapImpact_melee_concrete = 4310, + * weapImpact_melee_wood = 4312, + * weapImpact_melee_metal = 4314, + * burn1 = 4421, + * burn2, + * burn3, + * burn4, + * burn5, + * bang_concrete_bang = 5000, + * bang_concrete_bang2, + * bang_bullet_bang, + * bang_bullet_bang2 = 5004, + * bang_glass = 5031, + * bang_glass2, + * solidPool_water = 9000, + * solidPool_blood, + * solidPool_oil, + * solidPool_petrol, + * solidPool_mud, + * porousPool_water, + * porousPool_blood, + * porousPool_oil, + * porousPool_petrol, + * porousPool_mud, + * porousPool_water_ped_drip, + * liquidTrail_water = 9050 + * } + */ + export function addDecal(decalType: number, posX: number, posY: number, posZ: number, p4: number, p5: number, p6: number, p7: number, p8: number, p9: number, width: number, height: number, rCoef: number, gCoef: number, bCoef: number, opacity: number, timeout: number, p17: boolean, p18: boolean, p19: boolean): number; - export function hasCollisionLoadedAroundEntity(entity: Entity | number): boolean; + export function addPetrolDecal(x: number, y: number, z: number, groundLvl: number, width: number, transparency: number): number; - export function setEntityMaxSpeed(entity: Entity | number, speed: number): void; + export function addOilDecal(x: number, y: number, z: number, groundLvl: number, width: number, transparency: number): number; - export function setEntityOnlyDamagedByPlayer(entity: Entity | number, toggle: boolean): void; + export function startPetrolTrailDecals(p0: number): void; - export function setEntityOnlyDamagedByRelationshipGroup(entity: Entity | number, p1: boolean, p2: any): void; + export function addPetrolTrailDecalInfo(x: number, y: number, z: number, p3: number): void; - /** - * Enable / disable each type of damage. - * -------------- - * @param p7 is to to '1' in am_mp_property_ext/int: ENTITY::SET_ENTITY_PROOFS(uParam0->f_19, true, true, true, true, true, true, 1, true); - * @param waterProof is damage related to water not drowning - */ - export function setEntityProofs(entity: Entity | number, bulletProof: boolean, fireProof: boolean, explosionProof: boolean, collisionProof: boolean, meleeProof: boolean, steamProof: boolean, p7: boolean, waterProof: boolean): void; + export function endPetrolTrailDecals(): void; - export function getEntityProofs(entity: Entity | number, bulletProof?: boolean, fireProof?: boolean, explosionProof?: boolean, collisionProof?: boolean, meleeProof?: boolean, steamProof?: boolean, p7?: boolean, drownProof?: boolean): [boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean]; + export function removeDecal(decal: number): void; - /** - * @param w is the correct parameter name! - */ - export function setEntityQuaternion(entity: Entity | number, x: number, y: number, z: number, w: number): void; + export function isDecalAlive(decal: number): boolean; - export function setEntityRecordsCollisions(entity: Entity | number, toggle: boolean): void; + export function getDecalWashLevel(decal: number): number; - /** - * value ranges from 0 to 5. What you use for rotationOrder when setting must be the same as rotationOrder when getting the rotation. - * Unsure what value corresponds to what rotation order, more testing will be needed for that. - * For the most part R* uses 1 or 2 as the order. - * @param rotationOrder refers to the order yaw pitch roll is applied - * @param p5 is usually set as true - */ - export function setEntityRotation(entity: Entity | number, pitch: number, roll: number, yaw: number, rotationOrder: number, p5: boolean): void; + export function setDisablePetrolDecalsIgnitingThisFrame(): void; - /** - * @param p2 is always 0. - */ - export function setEntityVisible(entity: Entity | number, toggle: boolean, p2: boolean): void; + export function setDisablePetrolDecalsRecyclingThisFrame(): void; - export function setEntityWaterReflectionFlag(entity: Entity | number, toggle: boolean): void; + export function setDisableDecalRenderingThisFrame(): void; - export function setEntityMirrorReflectionFlag(entity: Entity | number, p1: boolean): void; + export function getIsPetrolDecalInRange(xCoord: number, yCoord: number, zCoord: number, radius: number): boolean; - /** - * Note that the third parameter(denoted as z) is "up and down" with positive numbers encouraging upwards movement. - */ - export function setEntityVelocity(entity: Entity | number, x: number, y: number, z: number): void; + export function patchDecalDiffuseMap(decalType: number, textureDict: string, textureName: string): void; - export function setEntityAngularVelocity(entity: Entity | number, x: number, y: number, z: number): void; + export function unpatchDecalDiffuseMap(decalType: number): void; - export function setEntityHasGravity(entity: Entity | number, toggle: boolean): void; + export function moveVehicleDecals(p0: any, p1: any): void; /** - * LOD distance can be 0 to 0xFFFF (higher values will result in 0xFFFF) as it is actually stored as a 16-bit value (aka uint16_t). - */ - export function setEntityLodDist(entity: Entity | number, value: number): void; + * boneIndex is always chassis_dummy in the scripts. The x/y/z params are location relative to the chassis bone. + */ + export function addVehicleCrewEmblem(vehicle: Vehicle | number, ped: Ped | Player | number, boneIndex: number, x1: number, x2: number, x3: number, y1: number, y2: number, y3: number, z1: number, z2: number, z3: number, scale: number, p13: any, alpha: number): boolean; - /** - * Returns the LOD distance of an entity. - */ - export function getEntityLodDist(entity: Entity | number): number; + export function abortVehicleCrewEmblemRequest(p0?: number): [boolean, number]; - /** - * Set entity alpha level. Ranging from 0 to 255 but chnages occur after every 20 percent (after every 51). - * @param skin - everything alpha except skin - */ - export function setEntityAlpha(entity: Entity | number, alphaLevel: number, skin: boolean): void; + export function removeVehicleCrewEmblem(vehicle: Vehicle | number, p1: number): void; - export function getEntityAlpha(entity: Entity | number): number; + export function getVehicleCrewEmblemRequestState(vehicle: Vehicle | number, p1: number): number; - export function resetEntityAlpha(entity: Entity | number): void; + export function doesVehicleHaveCrewEmblem(vehicle: Vehicle | number, p1: number): boolean; - /** - * Similar to RESET_ENTITY_ALPHA - */ - export function resetPickupEntityGlow(entity: Entity | number): void; + export function disableCompositeShotgunDecals(toggle: boolean): void; - export function setPickupCollidesWithProjectiles(p0: any, p1: any): void; + export function disableScuffDecals(toggle: boolean): void; - /** - * Only called once in the scripts. - * Related to weapon objects. - */ - export function setEntitySortBias(entity: Entity | number, p1: number): void; + export function setDecalBulletImpactRangeScale(p0: number): void; - export function setEntityAlwaysPrerender(entity: Entity | number, toggle: boolean): void; + export function overrideInteriorSmokeName(name: string): void; - export function setEntityRenderScorched(entity: Entity | number, toggle: boolean): void; + export function overrideInteriorSmokeLevel(level: number): void; + + export function overrideInteriorSmokeEnd(): void; /** - * Example here: www.gtaforums.com/topic/830463-help-with-turning-lights-green-and-causing-peds-to-crash-into-each-other/#entry1068211340 - * 0 = green - * 1 = red - * 2 = yellow - * 3 = reset changes - * changing lights may not change the behavior of vehicles - */ - export function setEntityTrafficlightOverride(entity: Entity | number, state: number): void; + * Used with 'NG_filmnoir_BW{01,02}' timecycles and the "NOIR_FILTER_SOUNDS" audioref. + */ + export function registerNoirLensEffect(): void; - export function setEntityIsInVehicle(entity: Entity | number): void; + export function disableVehicleDistantlights(toggle: boolean): void; - /** - * Only works with objects! - */ - export function createModelSwap(x: number, y: number, z: number, radius: number, originalModel: number, newModel: number, p6: boolean): void; + export function renderShadowedLightsWithNoShadows(p0: boolean): void; - export function removeModelSwap(x: number, y: number, z: number, radius: number, originalModel: number, newModel: number, p6: boolean): void; + export function requestEarlyLightCheck(): void; /** - * Same as the comment for CREATE_MODEL_SWAP unless for some reason p5 affects it this only works with objects as well. - * Network players do not see changes done with this. - * @param p5 = sets as true in scripts - */ - export function createModelHide(x: number, y: number, z: number, radius: number, modelHash: number, p5: boolean): void; + * Forces footstep tracks on all surfaces. + */ + export function useSnowFootVfxWhenUnsheltered(toggle: boolean): void; - export function createModelHideExcludingScriptObjects(x: number, y: number, z: number, radius: number, modelHash: number, p5: boolean): void; + export function forceAllowSnowFootVfxOnIce(toggle: boolean): void; /** - * This native makes entities visible that are hidden by the native CREATE_MODEL_HIDE. - * @param p5 should be false, true does nothing - */ - export function removeModelHide(x: number, y: number, z: number, radius: number, modelHash: number, p5: boolean): void; + * Forces vehicle trails on all surfaces. + */ + export function useSnowWheelVfxWhenUnsheltered(toggle: boolean): void; - export function createForcedObject(x: number, y: number, z: number, p3: any, modelHash: number, p5: boolean): void; + export function disableRegionVfx(p0: any): void; - export function removeForcedObject(x: number, y: number, z: number, p3: number, modelHash: number): void; + export function forceGroundSnowPass(toggle: boolean): void; /** - * Calling this function disables collision between two entities. - * The importance of the order for entity1 and entity2 is unclear. - * The third parameter, `thisFrame`, decides whether the collision is to be disabled until it is turned back on, or if it's just this frame. - */ - export function setEntityNoCollisionEntity(entity1: Entity | number, entity2: Entity | number, thisFrameOnly: boolean): void; - - export function setEntityMotionBlur(entity: Entity | number, toggle: boolean): void; + * Only one match in the scripts: + * GRAPHICS::PRESET_INTERIOR_AMBIENT_CACHE("int_carrier_hanger"); + */ + export function presetInteriorAmbientCache(timecycleModifierName: string): void; /** - * @param toggle always false. - */ - export function setCanAutoVaultOnEntity(entity: Entity | number, toggle: boolean): void; + * Loads the specified timecycle modifier. Modifiers are defined separately in another file (e.g. "timecycle_mods_1.xml") + * Parameters: + * modifierName - The modifier to load (e.g. "V_FIB_IT3", "scanline_cam", etc.) + * Full list of timecycle modifiers by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/timecycleModifiers.json + */ + export function setTimecycleModifier(modifierName: string): void; - /** - * @param toggle always false. - */ - export function setCanClimbOnEntity(entity: Entity | number, toggle: boolean): void; + export function setTimecycleModifierStrength(strength: number): void; /** - * Only called within 1 script for x360. 'fm_mission_controller' and it used on an object. - * Ran after these 2 natives, - * set_object_targettable(uParam0, 0); - * set_entity_invincible(uParam0, 1); - */ - export function setWaitForCollisionsBeforeProbe(entity: Entity | number, toggle: boolean): void; + * Full list of timecycle modifiers by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/timecycleModifiers.json + */ + export function setTransitionTimecycleModifier(modifierName: string, transition: number): void; - export function setEntityNoweapondecals(entity: Entity | number, p1: boolean): void; + export function setTransitionOutOfTimecycleModifier(strength: number): void; - export function setEntityUseMaxDistanceForWaterReflection(entity: Entity | number, p1: boolean): void; + export function clearTimecycleModifier(): void; /** - * Gets the world rotation of the specified bone of the specified entity. - */ - export function getEntityBoneRotation(entity: Entity | number, boneIndex: number): Vector3; + * Only use for this in the PC scripts is: + * if (GRAPHICS::GET_TIMECYCLE_MODIFIER_INDEX() != -1) + */ + export function getTimecycleModifierIndex(): number; - /** - * Gets the world position of the specified bone of the specified entity. - */ - export function getEntityBonePostion(entity: Entity | number, boneIndex: number): Vector3; + export function getTimecycleTransitionModifierIndex(): number; - /** - * Gets the local rotation of the specified bone of the specified entity. - */ - export function getEntityBoneObjectRotation(entity: Entity | number, boneIndex: number): Vector3; + export function getIsTimecycleTransitioningOut(): boolean; - export function getEntityBoneObjectPostion(entity: Entity | number, boneIndex: number): Vector3; + export function pushTimecycleModifier(): void; - export function getEntityBoneCount(entity: Entity | number): number; + export function popTimecycleModifier(): void; - export function enableEntityBulletCollision(entity: Entity | number): void; + export function setCurrentPlayerTcmodifier(modifierName: string): void; - export function setEntityCanOnlyBeDamagedByEntity(entity1: Entity | number, entity2: Entity | number): void; + export function setPlayerTcmodifierTransition(value: number): void; - export function setEntityCantCauseCollisionDamagedEntity(entity1: Entity | number, entity2: Entity | number): void; + export function setNextPlayerTcmodifier(modifierName: string): void; - /** - * @param p1 is always set to 1 - */ - export function setAllowMigrateToSpectator(entity: Entity | number, p1: any): void; + export function addTcmodifierOverride(modifierName1: string, modifierName2: string): void; - /** - * Gets the handle of an entity with a specific model hash attached to another entity, such as an object attached to a ped. - * This native does not appear to have anything to do with pickups as in scripts it is used with objects. - * Example from fm_mission_controller_2020.c: - * iVar8 = ENTITY::GET_ENTITY_OF_TYPE_ATTACHED_TO_ENTITY(bParam0->f_9, joaat("p_cs_clipboard")); - */ - export function getEntityOfTypeAttachedToEntity(entity: Entity | number, modelHash: number): number; + export function clearAllTcmodifierOverrides(p0: string): void; - export function setPickUpByCargobobDisabled(entity: Entity | number, toggle: boolean): void; + /** + * Full list of timecycle modifiers by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/timecycleModifiers.json + */ + export function setExtraTcmodifier(modifierName: string): void; - export function setDecisionMaker(ped: Player | number, name: number): void; + /** + * Clears the secondary timecycle modifier usually set with _SET_EXTRA_TIMECYCLE_MODIFIER + */ + export function clearExtraTcmodifier(): void; /** - * @param eventType https://alloc8or.re/gta5/doc/enums/eEventType.txt - */ - export function clearDecisionMakerEventResponse(name: number, eventType: number): void; + * See GET_TIMECYCLE_MODIFIER_INDEX for use, works the same just for the secondary timecycle modifier. + * Returns an integer representing the Timecycle modifier + */ + export function getExtraTcmodifier(): number; /** - * This is limited to 4 blocked events at a time. - * @param eventType https://alloc8or.re/gta5/doc/enums/eEventType.txt - */ - export function blockDecisionMakerEvent(name: number, eventType: number): void; + * The same as SET_TIMECYCLE_MODIFIER_STRENGTH but for the secondary timecycle modifier. + */ + export function enableMoonCycleOverride(strength: number): void; /** - * @param eventType https://alloc8or.re/gta5/doc/enums/eEventType.txt - */ - export function unblockDecisionMakerEvent(name: number, eventType: number): void; + * Resets the extra timecycle modifier strength normally set with 0x2C328AF17210F009 + */ + export function disableMoonCycleOverride(): void; + + export function requestScaleformMovie(scaleformName: string): number; /** - * @param eventType https://alloc8or.re/gta5/doc/enums/eEventType.txt - */ - export function addShockingEventAtPosition(eventType: number, x: number, y: number, z: number, duration: number): number; + * Another REQUEST_SCALEFORM_MOVIE equivalent. + */ + export function requestScaleformMovieWithIgnoreSuperWidescreen(scaleformName: string): number; + + export function requestScaleformMovieInstance(scaleformName: string): number; /** - * @param eventType https://alloc8or.re/gta5/doc/enums/eEventType.txt - */ - export function addShockingEventForEntity(eventType: number, entity: Entity | number, duration: number): number; + * Similar to REQUEST_SCALEFORM_MOVIE, but seems to be some kind of "interactive" scaleform movie? + * These seem to be the only scaleforms ever requested by this native: + * "breaking_news" + * "desktop_pc" + * "ECG_MONITOR" + * "Hacking_PC" + * "TEETH_PULLING" + * Note: Unless this hash is out-of-order, this native is next-gen only. + */ + export function requestScaleformMovieSkipRenderWhilePaused(scaleformName: string): number; + + export function hasScaleformMovieLoaded(scaleformHandle: number): boolean; /** - * @param eventType https://alloc8or.re/gta5/doc/enums/eEventType.txt - */ - export function isShockingEventInSphere(eventType: number, x: number, y: number, z: number, radius: number): boolean; + * val is 1-20 (0 will return false) + */ + export function isActiveScaleformMovieDeleting(val: number): boolean; - export function removeShockingEvent(event: number): boolean; + /** + * val is 1-20. Return is related to INSTRUCTIONAL_BUTTONS, COLOUR_SWITCHER_02, etc? + */ + export function isScaleformMovieDeleting(val: number): boolean; - export function removeAllShockingEvents(p0: boolean): void; + /** + * Only values used in the scripts are: + * "heist_mp" + * "heistmap_mp" + * "instructional_buttons" + * "heist_pre" + */ + export function hasScaleformMovieFilenameLoaded(scaleformName: string): boolean; - export function removeShockingEventSpawnBlockingAreas(): void; + export function hasScaleformContainerMovieLoadedIntoParent(scaleformHandle: number): boolean; - export function suppressShockingEventsNextFrame(): void; + export function setScaleformMovieAsNoLongerNeeded(scaleformHandle?: number): [void, number]; - /** - * @param eventType https://alloc8or.re/gta5/doc/enums/eEventType.txt - */ - export function suppressShockingEventTypeNextFrame(eventType: number): void; + export function setScaleformMovieToUseSystemTime(scaleform: number, toggle: boolean): void; - export function suppressAgitationEventsNextFrame(): void; + export function setScaleformMovieToUseLargeRt(scaleformHandle: number, toggle: boolean): void; /** - * 0 = Michael, - * 1 = Franklin, - * 2 = Trevor, - * 3 = MPMale, - * 4 = MPFemale - * @param character types: - */ - export function getNumTattooShopDlcItems(character: number): number; + * This native is used in some casino scripts to fit the scaleform in the rendertarget. + */ + export function setScaleformMovieToUseSuperLargeRt(scaleformHandle: number, toggle: boolean): void; - /** - * Character types: - * 0 = Michael, - * 1 = Franklin, - * 2 = Trevor, - * 3 = MPMale, - * 4 = MPFemale - * enum TattooZoneData - * { - * ZONE_TORSO = 0, - * See NativeDB for reference: http://natives.altv.mp/#/0xFF56381874F82086 - */ - export function getTattooShopDlcItemData(characterType: number, decorationIndex: number, outComponent?: any): [boolean, any]; + export function drawScaleformMovie(scaleformHandle: number, x: number, y: number, width: number, height: number, red: number, green: number, blue: number, alpha: number, p9: number): void; /** - * Returns some sort of index/offset for overlays/decorations. - * 0 = Michael, - * 1 = Franklin, - * 2 = Trevor, - * 3 = MPMale, - * 4 = MPFemale - * @param character types: - */ - export function getTattooShopDlcItemIndex(overlayHash: number, p1: any, character: number): number; + * unk is not used so no need + */ + export function drawScaleformMovieFullscreen(scaleform: number, red: number, green: number, blue: number, alpha: number, p5: number): void; - export function initShopPedComponent(outComponent: any): [void, any]; + export function drawScaleformMovieFullscreenMasked(scaleform1: number, scaleform2: number, red: number, green: number, blue: number, alpha: number): void; - export function initShopPedProp(outProp: any): [void, any]; + export function drawScaleformMovie3d(scaleform: number, posX: number, posY: number, posZ: number, rotX: number, rotY: number, rotZ: number, p7: number, p8: number, p9: number, scaleX: number, scaleY: number, scaleZ: number, rotationOrder: number): void; - export function setupShopPedApparelQuery(p0: number, p1: number, p2: number, p3: number): number; + export function drawScaleformMovie3dSolid(scaleform: number, posX: number, posY: number, posZ: number, rotX: number, rotY: number, rotZ: number, p7: number, p8: number, p9: number, scaleX: number, scaleY: number, scaleZ: number, rotationOrder: number): void; /** - * componentId is -1 when p3 is true in decompiled scripts. - * @param character is 0 for Michael, 1 for Franklin, 2 for Trevor, 3 for freemode male, and 4 for freemode female. - * @param p1 could be the outfit number; unsure. - * @param p2 is usually -1; unknown function. - * @param p3 appears to be for selecting between clothes and props; false is used with components/clothes, true is used with props. - * @param p4 is usually -1; unknown function. - * @param componentId is between 0 and 11 and corresponds to the usual component slots. - */ - export function setupShopPedApparelQueryTu(character: number, p1: number, p2: number, p3: boolean, p4: number, componentId: number): number; + * Calls the Scaleform function. + */ + export function callScaleformMovieMethod(scaleform: number, method: string): void; /** - * See https://git.io/JtcRf for example and structs. - */ - export function getShopPedQueryComponent(componentId: number, outComponent?: any): [void, any]; + * Calls the Scaleform function and passes the parameters as floats. + * The number of parameters passed to the function varies, so the end of the parameter list is represented by -1.0. + */ + export function callScaleformMovieMethodWithNumber(scaleform: number, methodName: string, param1: number, param2: number, param3: number, param4: number, param5: number): void; /** - * Returns some sort of index/offset for components. - * @returns Needs _GET_NUM_PROPS_FROM_OUTFIT to be called with p3 = false and componentId with the drawable's component slot first, returns -1 otherwise. - */ - export function getShopPedQueryComponentIndex(componentHash: number): number; + * Calls the Scaleform function and passes the parameters as strings. + * The number of parameters passed to the function varies, so the end of the parameter list is represented by 0 (NULL). + */ + export function callScaleformMovieMethodWithString(scaleform: number, methodName: string, param1: string, param2: string, param3: string, param4: string, param5: string): void; /** - * More info here: https://gist.github.com/root-cause/3b80234367b0c856d60bf5cb4b826f86 - */ - export function getShopPedComponent(componentHash: number, outComponent?: any): [void, any]; + * Calls the Scaleform function and passes both float and string parameters (in their respective order). + * The number of parameters passed to the function varies, so the end of the float parameters is represented by -1.0, and the end of the string parameters is represented by 0 (NULL). + * NOTE: The order of parameters in the function prototype is important! All float parameters must come first, followed by the string parameters. + * Examples: + * // function MY_FUNCTION(floatParam1, floatParam2, stringParam) + * GRAPHICS::CALL_SCALEFORM_MOVIE_METHOD_WITH_NUMBER_AND_STRING(scaleform, "MY_FUNCTION", 10.0, 20.0, -1.0, -1.0, -1.0, "String param", 0, 0, 0, 0); + * // function MY_FUNCTION_2(floatParam, stringParam1, stringParam2) + * GRAPHICS::CALL_SCALEFORM_MOVIE_METHOD_WITH_NUMBER_AND_STRING(scaleform, "MY_FUNCTION_2", 10.0, -1.0, -1.0, -1.0, -1.0, "String param #1", "String param #2", 0, 0, 0); + */ + export function callScaleformMovieMethodWithNumberAndString(scaleform: number, methodName: string, floatParam1: number, floatParam2: number, floatParam3: number, floatParam4: number, floatParam5: number, stringParam1: string, stringParam2: string, stringParam3: string, stringParam4: string, stringParam5: string): void; /** - * See https://git.io/JtcRf for example and structs. - */ - export function getShopPedQueryProp(componentId: number, outProp?: any): [void, any]; + * Pushes a function from the Hud component Scaleform onto the stack. Same behavior as GRAPHICS::BEGIN_SCALEFORM_MOVIE_METHOD, just a hud component id instead of a Scaleform. + * Known components: + * 19 - MP_RANK_BAR + * 20 - HUD_DIRECTOR_MODE + * This native requires more research - all information can be found inside of 'hud.gfx'. Using a decompiler, the different components are located under "scripts\__Packages\com\rockstargames\gtav\hud\hudComponents" and "scripts\__Packages\com\rockstargames\gtav\Multiplayer". + */ + export function beginScaleformScriptHudMovieMethod(hudComponent: number, methodName: string): boolean; /** - * Returns some sort of index/offset for props. - * @returns Needs _GET_NUM_PROPS_FROM_OUTFIT to be called with p3 = true and componentId = -1 first, returns -1 otherwise. - */ - export function getShopPedQueryPropIndex(componentHash: number): number; + * Push a function from the Scaleform onto the stack + */ + export function beginScaleformMovieMethod(scaleform: number, methodName: string): boolean; /** - * More info here: https://gist.github.com/root-cause/3b80234367b0c856d60bf5cb4b826f86 - */ - export function getShopPedProp(componentHash: number, outProp?: any): [void, any]; - - export function getHashNameForComponent(entity: Entity | number, componentId: number, drawableVariant: number, textureVariant: number): number; - - export function getHashNameForProp(entity: Entity | number, componentId: number, propIndex: number, propTextureIndex: number): number; - - export function getShopPedApparelVariantComponentCount(componentHash: number): number; + * Starts frontend (pause menu) scaleform movie methods. + * This can be used when you want to make custom frontend menus, and customize things like images or text in the menus etc. + * Use `BEGIN_SCALEFORM_MOVIE_METHOD_ON_FRONTEND_HEADER` for header scaleform functions. + */ + export function beginScaleformMovieMethodOnFrontend(methodName: string): boolean; /** - * `propHash`: Ped helmet prop hash? - * @returns This native returns 1 when the player helmet has a visor (there is another prop index for the same helmet with closed/opened visor variant) that can be toggled. 0 if there's no alternative version with a visor for this helmet prop. - */ - export function getShopPedApparelVariantPropCount(propHash: number): number; + * Starts frontend (pause menu) scaleform movie methods for header options. + * Use `BEGIN_SCALEFORM_MOVIE_METHOD_ON_FRONTEND` to customize the content inside the frontend menus. + */ + export function beginScaleformMovieMethodOnFrontendHeader(methodName: string): boolean; - export function getVariantComponent(componentHash: number, unkVariantComponentIndex: number, nameHash?: number, enumValue?: number, componentType?: number): [void, number, number, number]; + /** + * Pops and calls the Scaleform function on the stack + */ + export function endScaleformMovieMethod(): void; - export function getVariantProp(componentHash: number, unkVariantPropIndex: number, nameHash?: number, enumValue?: number, anchorPoint?: number): [void, number, number, number]; + export function endScaleformMovieMethodReturnValue(): number; /** - * Returns number of possible values of the forcedComponentIndex argument of GET_FORCED_COMPONENT. - */ - export function getShopPedApparelForcedComponentCount(componentHash: number): number; + * methodReturn: The return value of this native: END_SCALEFORM_MOVIE_METHOD_RETURN_VALUE + * Returns true if the return value of a scaleform function is ready to be collected (using GET_SCALEFORM_MOVIE_METHOD_RETURN_VALUE_STRING or GET_SCALEFORM_MOVIE_METHOD_RETURN_VALUE_INT). + */ + export function isScaleformMovieMethodReturnValueReady(methodReturn: number): boolean; /** - * Returns number of possible values of the forcedPropIndex argument of GET_FORCED_PROP. - */ - export function getShopPedApparelForcedPropCount(componentHash: number): number; - - export function getForcedComponent(componentHash: number, forcedComponentIndex: number, nameHash?: number, enumValue?: number, componentType?: number): [void, number, number, number]; - - export function getForcedProp(componentHash: number, forcedPropIndex: number, nameHash?: number, enumValue?: number, anchorPoint?: number): [void, number, number, number]; + * methodReturn: The return value of this native: END_SCALEFORM_MOVIE_METHOD_RETURN_VALUE + * Used to get a return value from a scaleform function. Returns an int in the same way GET_SCALEFORM_MOVIE_METHOD_RETURN_VALUE_STRING returns a string. + */ + export function getScaleformMovieMethodReturnValueInt(methodReturn: number): number; /** - * Full list of restriction tags by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pedApparelRestrictionTags.json - * componentId/last parameter seems to be unused. - */ - export function doesShopPedApparelHaveRestrictionTag(componentHash: number, restrictionTagHash: number, componentId: number): boolean; - - export function doesCurrentPedComponentHaveRestrictionTag(ped: Player | number, componentId: number, restrictionTagHash: number): boolean; - - export function doesCurrentPedPropHaveRestrictionTag(ped: Player | number, componentId: number, restrictionTagHash: number): boolean; + * methodReturn: The return value of this native: END_SCALEFORM_MOVIE_METHOD_RETURN_VALUE + */ + export function getScaleformMovieMethodReturnValueBool(methodReturn: number): boolean; /** - * characters - * 0: Michael - * 1: Franklin - * 2: Trevor - * 3: MPMale - * 4: MPFemale - */ - export function setupShopPedOutfitQuery(character: number, p1: boolean): number; + * methodReturn: The return value of this native: END_SCALEFORM_MOVIE_METHOD_RETURN_VALUE + * Used to get a return value from a scaleform function. Returns a string in the same way GET_SCALEFORM_MOVIE_METHOD_RETURN_VALUE_INT returns an int. + */ + export function getScaleformMovieMethodReturnValueString(methodReturn: number): string; /** - * See https://git.io/JtcB8 for example and outfit struct. - * @param outfitIndex from 0 to SETUP_SHOP_PED_OUTFIT_QUERY(characterIndex, false) - 1. - */ - export function getShopPedQueryOutfit(outfitIndex: number, outfit?: any): [void, any]; - - export function getShopPedOutfit(p0: any, p1?: any): [void, any]; + * Pushes an integer for the Scaleform function onto the stack. + */ + export function scaleformMovieMethodAddParamInt(value: number): void; - export function getShopPedOutfitLocate(p0: any): number; + /** + * Pushes a float for the Scaleform function onto the stack. + */ + export function scaleformMovieMethodAddParamFloat(value: number): void; /** - * See https://git.io/JtcBH for example and structs. - */ - export function getShopPedOutfitPropVariant(outfitHash: number, unkVariantIndex: number, outPropVariant?: any): [boolean, any]; + * Pushes a boolean for the Scaleform function onto the stack. + */ + export function scaleformMovieMethodAddParamBool(value: boolean): void; /** - * See https://git.io/JtcBH for example and structs. - */ - export function getShopPedOutfitComponentVariant(outfitHash: number, unkVariantIndex: number, outComponentVariant?: any): [boolean, any]; + * Called prior to adding a text component to the UI. After doing so, GRAPHICS::END_TEXT_COMMAND_SCALEFORM_STRING is called. + * Examples: + * GRAPHICS::BEGIN_TEXT_COMMAND_SCALEFORM_STRING("NUMBER"); + * HUD::ADD_TEXT_COMPONENT_INTEGER(MISC::ABSI(a_1)); + * GRAPHICS::END_TEXT_COMMAND_SCALEFORM_STRING(); + * GRAPHICS::BEGIN_TEXT_COMMAND_SCALEFORM_STRING("STRING"); + * HUD::ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(a_2); + * GRAPHICS::END_TEXT_COMMAND_SCALEFORM_STRING(); + * GRAPHICS::BEGIN_TEXT_COMMAND_SCALEFORM_STRING("STRTNM2"); + * HUD::ADD_TEXT_COMPONENT_SUBSTRING_TEXT_LABEL_HASH_KEY(v_3); + * HUD::ADD_TEXT_COMPONENT_SUBSTRING_TEXT_LABEL_HASH_KEY(v_4); + * GRAPHICS::END_TEXT_COMMAND_SCALEFORM_STRING(); + * GRAPHICS::BEGIN_TEXT_COMMAND_SCALEFORM_STRING("STRTNM1"); + * HUD::ADD_TEXT_COMPONENT_SUBSTRING_TEXT_LABEL_HASH_KEY(v_3); + * GRAPHICS::END_TEXT_COMMAND_SCALEFORM_STRING(); + */ + export function beginTextCommandScaleformString(componentType: string): void; - export function getNumDlcVehicles(): number; + export function endTextCommandScaleformString(): void; /** - * @param dlcVehicleIndex is 0 to GET_NUM_DLC_VEHICLS() - 1 - */ - export function getDlcVehicleModel(dlcVehicleIndex: number): number; + * Same as END_TEXT_COMMAND_SCALEFORM_STRING but does not perform HTML conversion for text tokens. + * END_TEXT_COMMAND_VIA_SPECIAL_MODIFIABLE_STRING? + */ + export function endTextCommandUnparsedScaleformString(): void; /** - * The Second item in the struct *(Hash *)(outData + 1) is the vehicle hash. - * @param dlcVehicleIndex takes a number from 0 - GET_NUM_DLC_VEHICLES() - 1. - * @param outData is a struct of 3 8-byte items. - */ - export function getDlcVehicleData(dlcVehicleIndex: number, outData?: any): [boolean, any]; + * Same as SCALEFORM_MOVIE_METHOD_ADD_PARAM_TEXTURE_NAME_STRING + * Both SCALEFORM_MOVIE_METHOD_ADD_PARAM_TEXTURE_NAME_STRING / _SCALEFORM_MOVIE_METHOD_ADD_PARAM_TEXTURE_NAME_STRING_2 works, but _SCALEFORM_MOVIE_METHOD_ADD_PARAM_TEXTURE_NAME_STRING_2 is usually used for "name" (organisation, players..). + */ + export function scaleformMovieMethodAddParamLiteralString(string: string): void; - export function getDlcVehicleFlags(dlcVehicleIndex: number): number; + export function scaleformMovieMethodAddParamTextureNameString(string: string): void; - /** - * Returns the total number of DLC weapons. - */ - export function getNumDlcWeapons(): number; + export function scaleformMovieMethodAddParamPlayerNameString(string: string): void; - /** - * Returns the total number of DLC weapons that are available in SP (availableInSP field in shop_weapon.meta). - */ - export function getNumDlcWeaponsSp(): number; + export function doesLatestBriefStringExist(p0: number): boolean; - /** - * struct DlcWeaponData - * { - * int emptyCheck; //use DLC1::IS_CONTENT_ITEM_LOCKED on this - * int padding1; - * int weaponHash; - * int padding2; - * int unk; - * int padding3; - * int weaponCost; - * See NativeDB for reference: http://natives.altv.mp/#/0x79923CD21BECE14E - * @param dlcWeaponIndex takes a number from 0 - GET_NUM_DLC_WEAPONS() - 1. - */ - export function getDlcWeaponData(dlcWeaponIndex: number, outData?: any): [boolean, any]; + export function scaleformMovieMethodAddParamLatestBriefString(value: number): void; - /** - * Same as GET_DLC_WEAPON_DATA but only works for DLC weapons that are available in SP. - */ - export function getDlcWeaponDataSp(dlcWeaponIndex: number, outData?: any): [boolean, any]; + export function requestScaleformScriptHudMovie(hudComponent: number): void; - /** - * Returns the total number of DLC weapon components. - */ - export function getNumDlcWeaponComponents(dlcWeaponIndex: number): number; + export function hasScaleformScriptHudMovieLoaded(hudComponent: number): boolean; - /** - * Returns the total number of DLC weapon components that are available in SP. - */ - export function getNumDlcWeaponComponentsSp(dlcWeaponIndex: number): number; + export function removeScaleformScriptHudMovie(hudComponent: number): void; - /** - * struct DlcComponentData{ - * int attachBone; - * int padding1; - * int bActiveByDefault; - * int padding2; - * int unk; - * int padding3; - * int componentHash; - * int padding4; - * See NativeDB for reference: http://natives.altv.mp/#/0x6CF598A2957C2BF8 - * @param dlcWeaponIndex seems to be the weapon index - * @param dlcWeapCompIndex seems to be the weapon component index - */ - export function getDlcWeaponComponentData(dlcWeaponIndex: number, dlcWeapCompIndex: number, ComponentDataPtr?: any): [boolean, any]; + export function passKeyboardInputToScaleform(scaleformHandle: number): boolean; - /** - * Same as GET_DLC_WEAPON_COMPONENT_DATA but only works for DLC components that are available in SP. - */ - export function getDlcWeaponComponentDataSp(dlcWeaponIndex: number, dlcWeapCompIndex: number, ComponentDataPtr?: any): [boolean, any]; + export function setTvChannel(channel: number): void; - export function isContentItemLocked(itemHash: number): boolean; + export function getTvChannel(): number; - export function isDlcVehicleMod(hash: number): boolean; + export function setTvVolume(volume: number): void; - export function getDlcVehicleModLockHash(hash: number): number; + export function getTvVolume(): number; /** - * From fm_deathmatch_creator and fm_race_creator: - * FILES::REVERT_CONTENT_CHANGESET_GROUP_FOR_ALL(joaat("GROUP_MAP_SP")); - * FILES::EXECUTE_CONTENT_CHANGESET_GROUP_FOR_ALL(joaat("GROUP_MAP")); - */ - export function executeContentChangesetGroupForAll(hash: number): void; + * All calls to this native are preceded by calls to GRAPHICS::SET_SCRIPT_GFX_DRAW_ORDER and GRAPHICS::SET_SCRIPT_GFX_DRAW_BEHIND_PAUSEMENU, respectively. + * "act_cinema.ysc", line 1483: + * HUD::SET_HUD_COMPONENT_POSITION(15, 0.0, -0.0375); + * HUD::SET_TEXT_RENDER_ID(l_AE); + * GRAPHICS::SET_SCRIPT_GFX_DRAW_ORDER(4); + * GRAPHICS::SET_SCRIPT_GFX_DRAW_BEHIND_PAUSEMENU(1); + * if (GRAPHICS::IS_TVSHOW_CURRENTLY_PLAYING(${movie_arthouse})) { + * GRAPHICS::DRAW_TV_CHANNEL(0.5, 0.5, 0.7375, 1.0, 0.0, 255, 255, 255, 255); + * } else { + * GRAPHICS::DRAW_TV_CHANNEL(0.5, 0.5, 1.0, 1.0, 0.0, 255, 255, 255, 255); + * } + * "am_mp_property_int.ysc", line 102545: + * if (ENTITY::DOES_ENTITY_EXIST(a_2._f3)) { + * if (HUD::IS_NAMED_RENDERTARGET_LINKED(ENTITY::GET_ENTITY_MODEL(a_2._f3))) { + * HUD::SET_TEXT_RENDER_ID(a_2._f1); + * GRAPHICS::SET_SCRIPT_GFX_DRAW_ORDER(4); + * GRAPHICS::SET_SCRIPT_GFX_DRAW_BEHIND_PAUSEMENU(1); + * GRAPHICS::DRAW_TV_CHANNEL(0.5, 0.5, 1.0, 1.0, 0.0, 255, 255, 255, 255); + * if (GRAPHICS::GET_TV_CHANNEL() == -1) { + * sub_a8fa5(a_2, 1); + * } else { + * sub_a8fa5(a_2, 1); + * GRAPHICS::ATTACH_TV_AUDIO_TO_ENTITY(a_2._f3); + * } + * HUD::SET_TEXT_RENDER_ID(HUD::GET_DEFAULT_SCRIPT_RENDERTARGET_RENDER_ID()); + * } + * } + */ + export function drawTvChannel(xPos: number, yPos: number, xScale: number, yScale: number, rotation: number, red: number, green: number, blue: number, alpha: number): void; /** - * From fm_deathmatch_creator and fm_race_creator: - * FILES::REVERT_CONTENT_CHANGESET_GROUP_FOR_ALL(joaat("GROUP_MAP_SP")); - * FILES::EXECUTE_CONTENT_CHANGESET_GROUP_FOR_ALL(joaat("GROUP_MAP")); - */ - export function revertContentChangesetGroupForAll(hash: number): void; + * Loads specified video sequence into the TV Channel + * TV_Channel ranges from 0-2 + * VideoSequence can be any of the following: + * "PL_STD_CNT" CNT Standard Channel + * "PL_STD_WZL" Weazel Standard Channel + * "PL_LO_CNT" + * "PL_LO_WZL" + * "PL_SP_WORKOUT" + * "PL_SP_INV" - Jay Norris Assassination Mission Fail + * "PL_SP_INV_EXP" - Jay Norris Assassination Mission Success + * "PL_LO_RS" - Righteous Slaughter Ad + * "PL_LO_RS_CUTSCENE" - Righteous Slaughter Cut-scene + * "PL_SP_PLSH1_INTRO" + * "PL_LES1_FAME_OR_SHAME" + * "PL_STD_WZL_FOS_EP2" + * "PL_MP_WEAZEL" - Weazel Logo on loop + * "PL_MP_CCTV" - Generic CCTV loop + * Restart: + * 0=video sequence continues as normal + * 1=sequence restarts from beginning every time that channel is selected + * The above playlists work as intended, and are commonly used, but there are many more playlists, as seen in `tvplaylists.xml`. A pastebin below outlines all playlists, they will be surronded by the name tag I.E. (PL_STD_CNT = PL_STD_CNT). + * https://pastebin.com/zUzGB6h7 + */ + export function setTvChannelPlaylist(tvChannel: number, playlistName: string, restart: boolean): void; + + export function setTvChannelPlaylistAtHour(tvChannel: number, playlistName: string, hour: number): void; + + export function setTvChannelPlaylistDirty(tvChannel: number, p1: boolean): void; - /** - * Starts a fire: - * xyz: Location of fire - * @param maxChildren The max amount of times a fire can spread to other objects. Must be 25 or less, or the function will do nothing. - * @param isGasFire Whether or not the fire is powered by gasoline. - */ - export function startScriptFire(X: number, Y: number, Z: number, maxChildren: number, isGasFire: boolean): number; + export function clearTvChannelPlaylist(tvChannel: number): void; - export function removeScriptFire(fireHandle: number): void; + export function isPlaylistOnChannel(tvChannel: number, p1: any): boolean; - export function startEntityFire(entity: Entity | number): number; + export function isTvshowCurrentlyPlaying(videoCliphash: number): boolean; - export function stopEntityFire(entity: Entity | number): void; + export function enableMovieKeyframeWait(toggle: boolean): void; - export function isEntityOnFire(entity: Entity | number): boolean; + export function setTvPlayerWatchingThisFrame(p0: any): void; - export function getNumberOfFiresInRange(x: number, y: number, z: number, radius: number): number; + export function getCurrentTvClipNamehash(): number; - export function setFlammabilityMultiplier(p0: number): void; + export function enableMovieSubtitles(toggle: boolean): void; - export function stopFireInRange(x: number, y: number, z: number, radius: number): void; + export function ui3dsceneIsAvailable(): boolean; /** - * Returns TRUE if it found something. FALSE if not. - */ - export function getClosestFirePos(outPosition: Vector3 | null, x: number, y: number, z: number): [boolean, Vector3]; + * All presets can be found in common\data\ui\uiscenes.meta + */ + export function ui3dscenePushPreset(presetName: string): boolean; /** - * BOOL isAudible = If explosion makes a sound. - * BOOL isInvisible = If the explosion is invisible or not. - * @param explosionType https://alloc8or.re/gta5/doc/enums/eExplosionTag.txt - */ - export function addExplosion(x: number, y: number, z: number, explosionType: number, damageScale: number, isAudible: boolean, isInvisible: boolean, cameraShake: number, noDamage: boolean): void; + * It's called after UI3DSCENE_IS_AVAILABLE and UI3DSCENE_PUSH_PRESET + * presetName was always "CELEBRATION_WINNER" + * All presets can be found in common\data\ui\uiscenes.meta + */ + export function ui3dsceneAssignPedToSlot(presetName: string, ped: Ped | Player | number, slot: number, posX: number, posY: number, posZ: number): boolean; + + export function ui3dsceneClearPatchedData(): void; + + export function ui3dsceneMakePushedPresetPersistent(toggle: boolean): void; /** - * @param explosionType See ADD_EXPLOSION. - * @param isAudible If explosion makes a sound. - * @param isInvisible If the explosion is invisible or not. - */ - export function addOwnedExplosion(ped: Player | number, x: number, y: number, z: number, explosionType: number, damageScale: number, isAudible: boolean, isInvisible: boolean, cameraShake: number): void; + * This native enables/disables the gold putting grid display (https://i.imgur.com/TC6cku6.png). + * This requires these two natives to be called as well to configure the grid: `TERRAINGRID_SET_PARAMS` and `TERRAINGRID_SET_COLOURS`. + */ + export function terraingridActivate(toggle: boolean): void; /** - * @param explosionType See ADD_EXPLOSION. - * @param isAudible If explosion makes a sound. - * @param isInvisible If the explosion is invisible or not. - */ - export function addExplosionWithUserVfx(x: number, y: number, z: number, explosionType: number, explosionFx: number, damageScale: number, isAudible: boolean, isInvisible: boolean, cameraShake: number): void; + * This native is used along with these two natives: `TERRAINGRID_ACTIVATE` and `TERRAINGRID_SET_COLOURS`. + * This native configures the location, size, rotation, normal height, and the difference ratio between min, normal and max. + * All those natives combined they will output something like this: https://i.imgur.com/TC6cku6.png + * This native renders a box at the given position, with a special shader that renders a grid on world geometry behind it. This box does not have backface culling. + * The forward args here are a direction vector, something similar to what's returned by GET_ENTITY_FORWARD_VECTOR. + * normalHeight and heightDiff are used for positioning the color gradient of the grid, colors specified via TERRAINGRID_SET_COLOURS. + * Example with box superimposed on the image to demonstrate: https://i.imgur.com/wdqskxd.jpg + */ + export function terraingridSetParams(x: number, y: number, z: number, forwardX: number, forwardY: number, forwardZ: number, sizeX: number, sizeY: number, sizeZ: number, gridScale: number, glowIntensity: number, normalHeight: number, heightDiff: number): void; /** - * @param explosionType See ADD_EXPLOSION. - */ - export function isExplosionInArea(explosionType: number, x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): boolean; + * This native is used along with these two natives: `TERRAINGRID_ACTIVATE` and `TERRAINGRID_SET_PARAMS`. + * This native sets the colors for the golf putting grid. the 'min...' values are for the lower areas that the grid covers, the 'max...' values are for the higher areas that the grid covers, all remaining values are for the 'normal' ground height. + * All those natives combined they will output something like this: https://i.imgur.com/TC6cku6.png + */ + export function terraingridSetColours(lowR: number, lowG: number, lowB: number, lowAlpha: number, r: number, g: number, b: number, alpha: number, highR: number, highG: number, highB: number, highAlpha: number): void; /** - * @param explosionType See ADD_EXPLOSION. - */ - export function isExplosionActiveInArea(explosionType: number, x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): boolean; + * duration - is how long to play the effect for in milliseconds. If 0, it plays the default length + * if loop is true, the effect won't stop until you call ANIMPOSTFX_STOP on it. (only loopable effects) + * Full list of animpostFX / screen effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animPostFxNamesCompact.json + */ + export function animpostfxPlay(effectName: string, duration: number, looped: boolean): void; /** - * @param explosionType See ADD_EXPLOSION. - */ - export function isExplosionInSphere(explosionType: number, x: number, y: number, z: number, radius: number): boolean; + * See ANIMPOSTFX_PLAY + * Full list of animpostFX / screen effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animPostFxNamesCompact.json + */ + export function animpostfxStop(effectName: string): void; /** - * @param explosionType See ADD_EXPLOSION. - */ - export function getOwnerOfExplosionInSphere(explosionType: number, x: number, y: number, z: number, radius: number): number; + * See ANIMPOSTFX_PLAY + * Full list of animpostFX / screen effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animPostFxNamesCompact.json + */ + export function animpostfxGetCurrentTime(effectName: string): number; /** - * @param explosionType See ADD_EXPLOSION, -1 for any explosion type - */ - export function isExplosionInAngledArea(explosionType: number, x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, width: number): boolean; + * Returns whether the specified effect is active. + * See ANIMPOSTFX_PLAY + * Full list of animpostFX / screen effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animPostFxNamesCompact.json + */ + export function animpostfxIsRunning(effectName: string): boolean; + + /** + * Stops ALL currently playing effects. + */ + export function animpostfxStopAll(): void; /** - * Returns a handle to the first entity within the a circle spawned inside the 2 points from a radius. - * @param explosionType See ADD_EXPLOSION. - */ - export function getOwnerOfExplosionInAngledArea(explosionType: number, x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, radius: number): number; - - /** - * Initializes the text entry for the the text next to a loading prompt. All natives for building UI texts can be used here - * e.g - * void StartLoadingMessage(char *text, int spinnerType = 3) - * { - * BEGIN_TEXT_COMMAND_BUSYSPINNER_ON("STRING"); - * ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(text); - * END_TEXT_COMMAND_BUSYSPINNER_ON(spinnerType); - * } - * OR - * See NativeDB for reference: http://natives.altv.mp/#/0xABA17D7CE615ADBF - */ - export function beginTextCommandBusyspinnerOn(string: string | null): void; - - /** - * enum eBusySpinnerType - * { - * BUSY_SPINNER_LEFT, - * BUSY_SPINNER_LEFT_2, - * BUSY_SPINNER_LEFT_3, - * BUSY_SPINNER_SAVE, - * BUSY_SPINNER_RIGHT, - * }; - */ + * Stops the effect and sets a value (bool) in its data (+0x199) to false. + * See ANIMPOSTFX_PLAY + * Full list of animpostFX / screen effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animPostFxNamesCompact.json + */ + export function animpostfxStopAndFlushRequests(effectName: string): void; + + /** + * Initializes the text entry for the the text next to a loading prompt. All natives for building UI texts can be used here + * e.g + * void StartLoadingMessage(char *text, int spinnerType = 3) + * { + * BEGIN_TEXT_COMMAND_BUSYSPINNER_ON("STRING"); + * ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(text); + * END_TEXT_COMMAND_BUSYSPINNER_ON(spinnerType); + * } + * /*OR*\/ + * void ShowLoadingMessage(char *text, int spinnerType = 3, int timeMs = 10000) + * { + * BEGIN_TEXT_COMMAND_BUSYSPINNER_ON("STRING"); + * ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(text); + * END_TEXT_COMMAND_BUSYSPINNER_ON(spinnerType); + * WAIT(timeMs); + * BUSYSPINNER_OFF(); + * } + * These are some localized strings used in the loading spinner. + * "PM_WAIT" = Please Wait + * "CELEB_WPLYRS" = Waiting For Players. + * "CELL_SPINNER2" = Scanning storage. + * "ERROR_CHECKYACHTNAME" = Registering your yacht's name. Please wait. + * "ERROR_CHECKPROFANITY" = Checking your text for profanity. Please wait. + * "FM_COR_AUTOD" = Just spinner no text + * "FM_IHELP_WAT2" = Waiting for other players + * "FM_JIP_WAITO" = Game options are being set + * "FMMC_DOWNLOAD" = Downloading + * "FMMC_PLYLOAD" = Loading + * "FMMC_STARTTRAN" = Launching session + * "HUD_QUITTING" = Quiting session + * "KILL_STRIP_IDM" = Waiting for to accept + * "MP_SPINLOADING" = Loading + */ + export function beginTextCommandBusyspinnerOn(string: string): void; + + /** + * enum eBusySpinnerType + * { + * BUSY_SPINNER_LEFT, + * BUSY_SPINNER_LEFT_2, + * BUSY_SPINNER_LEFT_3, + * BUSY_SPINNER_SAVE, + * BUSY_SPINNER_RIGHT, + * }; + */ export function endTextCommandBusyspinnerOn(busySpinnerType: number): void; /** - * Removes the loading prompt at the bottom right of the screen. - */ + * Removes the loading prompt at the bottom right of the screen. + */ export function busyspinnerOff(): void; export function preloadBusyspinner(): void; @@ -5552,27 +6043,27 @@ declare module "natives" { export function disablePausemenuSpinner(p0: boolean): void; /** - * Shows the cursor on screen for one frame. - */ + * Shows the cursor on screen for one frame. + */ export function setMouseCursorThisFrame(): void; /** - * Changes the mouse cursor's sprite. - * 1 = Normal - * 6 = Left Arrow - * 7 = Right Arrow - */ + * Changes the mouse cursor's sprite. + * 1 = Normal + * 6 = Left Arrow + * 7 = Right Arrow + */ export function setMouseCursorStyle(spriteId: number): void; /** - * Shows/hides the frontend cursor on the pause menu or similar menus. - * Clicking off and then on the game window will show it again. - */ + * Shows/hides the frontend cursor on the pause menu or similar menus. + * Clicking off and then on the game window will show it again. + */ export function setMouseCursorVisible(toggle: boolean): void; /** - * Returns TRUE if mouse is hovering above instructional buttons. Works with all buttons gfx, such as popup_warning, pause_menu_instructional_buttons, instructional_buttons, etc. Note: You have to call TOGGLE_MOUSE_BUTTONS on the scaleform if you want this native to work. - */ + * Returns TRUE if mouse is hovering above instructional buttons. Works with all buttons gfx, such as popup_warning, pause_menu_instructional_buttons, instructional_buttons, etc. Note: You have to call TOGGLE_MOUSE_BUTTONS on the scaleform if you want this native to work. + */ export function isMouseRolledOverInstructionalButtons(): boolean; export function getMouseEvent(scaleformHandle: number, p1?: any, p2?: any, p3?: any): [boolean, any, any, any]; @@ -5582,32 +6073,32 @@ declare module "natives" { export function thefeedSetScriptedMenuHeight(pos: number): void; /** - * Stops loading screen tips shown by invoking `THEFEED_SHOW` - */ + * Stops loading screen tips shown by invoking `THEFEED_SHOW` + */ export function thefeedHide(): void; /** - * Once called each frame hides all above radar notifications. - */ + * Once called each frame hides all above radar notifications. + */ export function thefeedHideThisFrame(): void; /** - * Displays loading screen tips, requires `THEFEED_AUTO_POST_GAMETIPS_ON` to be called beforehand. - */ + * Displays loading screen tips, requires `THEFEED_AUTO_POST_GAMETIPS_ON` to be called beforehand. + */ export function thefeedShow(): void; export function thefeedFlushQueue(): void; /** - * Removes a notification instantly instead of waiting for it to disappear - */ + * Removes a notification instantly instead of waiting for it to disappear + */ export function thefeedRemoveItem(notificationId: number): void; export function thefeedForceRenderOn(): void; /** - * Enables loading screen tips to be be shown (`THEFEED_SHOW`), blocks other kinds of notifications from being displayed (at least from current script). Call `0xADED7F5748ACAFE6` to display those again. - */ + * Enables loading screen tips to be be shown (`THEFEED_SHOW`), blocks other kinds of notifications from being displayed (at least from current script). Call `0xADED7F5748ACAFE6` to display those again. + */ export function thefeedForceRenderOff(): void; export function thefeedPause(): void; @@ -5621,38 +6112,38 @@ declare module "natives" { export function thefeedReportLogoOff(): void; /** - * Returns the handle for the notification currently displayed on the screen. Name may be a hash collision, but describes the function accurately. - */ + * Returns the handle for the notification currently displayed on the screen. Name may be a hash collision, but describes the function accurately. + */ export function thefeedGetLastShownPhoneActivatableFeedId(): number; /** - * Enables loading screen tips to be be shown (`THEFEED_SHOW`), blocks other kinds of notifications from being displayed (at least from current script). Call `THEFEED_AUTO_POST_GAMETIPS_OFF` to display those again. - */ + * Enables loading screen tips to be be shown (`THEFEED_SHOW`), blocks other kinds of notifications from being displayed (at least from current script). Call `THEFEED_AUTO_POST_GAMETIPS_OFF` to display those again. + */ export function thefeedAutoPostGametipsOn(): void; /** - * Displays "normal" notifications again after calling `THEFEED_AUTO_POST_GAMETIPS_ON` (those that were drawn before calling this native too), though those will have a weird offset and stay on screen forever (tested with notifications created from same script). - */ + * Displays "normal" notifications again after calling `THEFEED_AUTO_POST_GAMETIPS_ON` (those that were drawn before calling this native too), though those will have a weird offset and stay on screen forever (tested with notifications created from same script). + */ export function thefeedAutoPostGametipsOff(): void; /** - * From the decompiled scripts: - * HUD::THEFEED_SET_BACKGROUND_COLOR_FOR_NEXT_POST(6); - * HUD::THEFEED_SET_BACKGROUND_COLOR_FOR_NEXT_POST(184); - * HUD::THEFEED_SET_BACKGROUND_COLOR_FOR_NEXT_POST(190); - * sets background color for the next notification - * 6 = red - * 184 = green - * 190 = yellow - * Here is a list of some colors that can be used: https://gyazo.com/68bd384455fceb0a85a8729e48216e15 - */ + * From the decompiled scripts: + * HUD::THEFEED_SET_BACKGROUND_COLOR_FOR_NEXT_POST(6); + * HUD::THEFEED_SET_BACKGROUND_COLOR_FOR_NEXT_POST(184); + * HUD::THEFEED_SET_BACKGROUND_COLOR_FOR_NEXT_POST(190); + * sets background color for the next notification + * 6 = red + * 184 = green + * 190 = yellow + * Here is a list of some colors that can be used: https://gyazo.com/68bd384455fceb0a85a8729e48216e15 + */ export function thefeedSetBackgroundColorForNextPost(hudColorIndex: number): void; export function thefeedSetRgbaParameterForNextMessage(red: number, green: number, blue: number, alpha: number): void; /** - * Related to notification color flashing, setting count to 0 invalidates a `THEFEED_SET_RGBA_PARAMETER_FOR_NEXT_MESSAGE` call for the target notification. - */ + * Related to notification color flashing, setting count to 0 invalidates a `THEFEED_SET_RGBA_PARAMETER_FOR_NEXT_MESSAGE` call for the target notification. + */ export function thefeedSetFlashDurationParameterForNextMessage(count: number): void; export function thefeedSetVibrateParameterForNextMessage(toggle: boolean): void; @@ -5660,8 +6151,8 @@ declare module "natives" { export function thefeedResetAllParameters(): void; /** - * Requires manual management of game stream handles (i.e., 0xBE4390CB40B3E627). - */ + * Requires manual management of game stream handles (i.e., 0xBE4390CB40B3E627). + */ export function thefeedFreezeNextPost(): void; export function thefeedClearFrozenPost(): void; @@ -5669,89 +6160,111 @@ declare module "natives" { export function thefeedSetSnapFeedItemPositions(p0: boolean): void; /** - * Used in the native scripts to reference "GET_PEDHEADSHOT_TXD_STRING" and "CHAR_DEFAULT". - */ - export function thefeedUpdateItemTexture(txdString1: string | null, txnString1: string | null, txdString2: string | null, txnString2: string | null): void; - - /** - * Declares the entry type of a notification, for example "STRING". - * int ShowNotification(char *text) - * { - * BEGIN_TEXT_COMMAND_THEFEED_POST("STRING"); - * ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(text); - * return END_TEXT_COMMAND_THEFEED_POST_TICKER(1, 1); - * } - */ - export function beginTextCommandThefeedPost(text: string | null): void; - - /** - * List of picture names: https://pastebin.com/XdpJVbHz - * Example result: https://i.imgur.com/SdEZ22m.png - */ - export function endTextCommandThefeedPostStats(statTitle: string | null, iconEnum: number, stepVal: boolean, barValue: number, isImportant: boolean, pictureTextureDict: string | null, pictureTextureName: string | null): number; - - /** - * This function can show pictures of every texture that can be requested by REQUEST_STREAMED_TEXTURE_DICT. - * List of picNames: https://pastebin.com/XdpJVbHz - * iconTypes: - * 1 : Chat Box - * 2 : Email - * 3 : Add Friend Request - * 4 : Nothing - * 5 : Nothing - * 6 : Nothing - * See NativeDB for reference: http://natives.altv.mp/#/0x1CCD9A37359072CF - * @param flash is a bool for fading in. - */ - export function endTextCommandThefeedPostMessagetext(txdName: string | null, textureName: string | null, flash: boolean, iconType: number, sender: string | null, subject: string | null): number; - - /** - * This function can show pictures of every texture that can be requested by REQUEST_STREAMED_TEXTURE_DICT. - * Needs more research. - * Only one type of usage in the scripts: - * HUD::END_TEXT_COMMAND_THEFEED_POST_MESSAGETEXT_SUBTITLE_LABEL("CHAR_ACTING_UP", "CHAR_ACTING_UP", 0, 0, "DI_FEED_CHAR", a_0); - */ - export function endTextCommandThefeedPostMessagetextSubtitleLabel(txdName: string | null, textureName: string | null, flash: boolean, iconType: number, sender: string | null, subject: string | null): number; - - /** - * This function can show pictures of every texture that can be requested by REQUEST_STREAMED_TEXTURE_DICT. - * NOTE: 'duration' is a multiplier, so 1.0 is normal, 2.0 is twice as long (very slow), and 0.5 is half as long. - * Example, only occurrence in the scripts: - * v_8 = HUD::END_TEXT_COMMAND_THEFEED_POST_MESSAGETEXT_TU("CHAR_SOCIAL_CLUB", "CHAR_SOCIAL_CLUB", 0, 0, &v_9, "", a_5); - */ - export function endTextCommandThefeedPostMessagetextTu(txdName: string | null, textureName: string | null, flash: boolean, iconType: number, sender: string | null, subject: string | null, duration: number): number; - - /** - * This function can show pictures of every texture that can be requested by REQUEST_STREAMED_TEXTURE_DICT. - * List of picNames https://pastebin.com/XdpJVbHz - * iconTypes: - * 1 : Chat Box - * 2 : Email - * 3 : Add Friend Request - * 4 : Nothing - * 5 : Nothing - * 6 : Nothing - * See NativeDB for reference: http://natives.altv.mp/#/0x5CBF7BADE20DB93E - * @param flash is a bool for fading in. - */ - export function endTextCommandThefeedPostMessagetextWithCrewTag(txdName: string | null, textureName: string | null, flash: boolean, iconType: number, sender: string | null, subject: string | null, duration: number, clanTag: string | null): number; - - /** - * This function can show pictures of every texture that can be requested by REQUEST_STREAMED_TEXTURE_DICT. - * List of picNames: https://pastebin.com/XdpJVbHz - * iconTypes: - * 1 : Chat Box - * 2 : Email - * 3 : Add Friend Request - * 4 : Nothing - * 5 : Nothing - * 6 : Nothing - * See NativeDB for reference: http://natives.altv.mp/#/0x531B84E7DA981FB6 - * @param flash is a bool for fading in. - * @param iconType2 is a mirror of iconType. It shows in the "subject" line, right under the original iconType. - * @returns return END_TEXT_COMMAND_THEFEED_POST_TICKER(1, 1); - */ - export function endTextCommandThefeedPostMessagetextWithCrewTagAndAdditionalIcon(txdName: string | null, textureName: string | null, flash: boolean, iconType1: number, sender: string | null, subject: string | null, duration: number, clanTag: string | null, iconType2: number, p9: number): number; + * Used in the native scripts to reference "GET_PEDHEADSHOT_TXD_STRING" and "CHAR_DEFAULT". + */ + export function thefeedUpdateItemTexture(txdString1: string, txnString1: string, txdString2: string, txnString2: string): void; + + /** + * Declares the entry type of a notification, for example "STRING". + * int ShowNotification(char *text) + * { + * BEGIN_TEXT_COMMAND_THEFEED_POST("STRING"); + * ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(text); + * return END_TEXT_COMMAND_THEFEED_POST_TICKER(1, 1); + * } + */ + export function beginTextCommandThefeedPost(text: string): void; + + /** + * List of picture names: https://pastebin.com/XdpJVbHz + * Example result: https://i.imgur.com/SdEZ22m.png + */ + export function endTextCommandThefeedPostStats(statTitle: string, iconEnum: number, stepVal: boolean, barValue: number, isImportant: boolean, pictureTextureDict: string, pictureTextureName: string): number; + + /** + * This function can show pictures of every texture that can be requested by REQUEST_STREAMED_TEXTURE_DICT. + * List of picNames: https://pastebin.com/XdpJVbHz + * flash is a bool for fading in. + * iconTypes: + * 1 : Chat Box + * 2 : Email + * 3 : Add Friend Request + * 4 : Nothing + * 5 : Nothing + * 6 : Nothing + * 7 : Right Jumping Arrow + * 8 : RP Icon + * 9 : $ Icon + * "sender" is the very top header. This can be any old string. + * "subject" is the header under the sender. + */ + export function endTextCommandThefeedPostMessagetext(txdName: string, textureName: string, flash: boolean, iconType: number, sender: string, subject: string): number; + + /** + * This function can show pictures of every texture that can be requested by REQUEST_STREAMED_TEXTURE_DICT. + * Needs more research. + * Only one type of usage in the scripts: + * HUD::END_TEXT_COMMAND_THEFEED_POST_MESSAGETEXT_SUBTITLE_LABEL("CHAR_ACTING_UP", "CHAR_ACTING_UP", 0, 0, "DI_FEED_CHAR", a_0); + */ + export function endTextCommandThefeedPostMessagetextSubtitleLabel(txdName: string, textureName: string, flash: boolean, iconType: number, sender: string, subject: string): number; + + /** + * This function can show pictures of every texture that can be requested by REQUEST_STREAMED_TEXTURE_DICT. + * NOTE: 'duration' is a multiplier, so 1.0 is normal, 2.0 is twice as long (very slow), and 0.5 is half as long. + * Example, only occurrence in the scripts: + * v_8 = HUD::END_TEXT_COMMAND_THEFEED_POST_MESSAGETEXT_TU("CHAR_SOCIAL_CLUB", "CHAR_SOCIAL_CLUB", 0, 0, &v_9, "", a_5); + */ + export function endTextCommandThefeedPostMessagetextTu(txdName: string, textureName: string, flash: boolean, iconType: number, sender: string, subject: string, duration: number): number; + + /** + * This function can show pictures of every texture that can be requested by REQUEST_STREAMED_TEXTURE_DICT. + * List of picNames https://pastebin.com/XdpJVbHz + * flash is a bool for fading in. + * iconTypes: + * 1 : Chat Box + * 2 : Email + * 3 : Add Friend Request + * 4 : Nothing + * 5 : Nothing + * 6 : Nothing + * 7 : Right Jumping Arrow + * 8 : RP Icon + * 9 : $ Icon + * "sender" is the very top header. This can be any old string. + * "subject" is the header under the sender. + * "duration" is a multiplier, so 1.0 is normal, 2.0 is twice as long (very slow), and 0.5 is half as long. + * "clanTag" shows a crew tag in the "sender" header, after the text. You need to use 3 underscores as padding. Maximum length of this field seems to be 7. (e.g. "MK" becomes "___MK", "ACE" becomes "___ACE", etc.) + */ + export function endTextCommandThefeedPostMessagetextWithCrewTag(txdName: string, textureName: string, flash: boolean, iconType: number, sender: string, subject: string, duration: number, clanTag: string): number; + + /** + * This function can show pictures of every texture that can be requested by REQUEST_STREAMED_TEXTURE_DICT. + * List of picNames: https://pastebin.com/XdpJVbHz + * flash is a bool for fading in. + * iconTypes: + * 1 : Chat Box + * 2 : Email + * 3 : Add Friend Request + * 4 : Nothing + * 5 : Nothing + * 6 : Nothing + * 7 : Right Jumping Arrow + * 8 : RP Icon + * 9 : $ Icon + * "sender" is the very top header. This can be any old string. + * "subject" is the header under the sender. + * "duration" is a multiplier, so 1.0 is normal, 2.0 is twice as long (very slow), and 0.5 is half as long. + * "clanTag" shows a crew tag in the "sender" header, after the text. You need to use 3 underscores as padding. Maximum length of this field seems to be 7. (e.g. "MK" becomes "___MK", "ACE" becomes "___ACE", etc.) + * iconType2 is a mirror of iconType. It shows in the "subject" line, right under the original iconType. + * int IconNotification(char *text, char *text2, char *Subject) + * { + * BEGIN_TEXT_COMMAND_THEFEED_POST("STRING"); + * ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(text); + * _SET_NOTIFICATION_MESSAGE_CLAN_TAG_2("CHAR_SOCIAL_CLUB", "CHAR_SOCIAL_CLUB", 1, 7, text2, Subject, 1.0f, "__EXAMPLE", 7); + * return END_TEXT_COMMAND_THEFEED_POST_TICKER(1, 1); + * } + */ + export function endTextCommandThefeedPostMessagetextWithCrewTagAndAdditionalIcon(txdName: string, textureName: string, flash: boolean, iconType1: number, sender: string, subject: string, duration: number, clanTag: string, iconType2: number, p9: number): number; export function endTextCommandThefeedPostTicker(blink: boolean, p1: boolean): number; @@ -5760,184 +6273,187 @@ declare module "natives" { export function endTextCommandThefeedPostTickerWithTokens(blink: boolean, p1: boolean): number; /** - * Shows an "award" notification above the minimap, example: https://i.imgur.com/e2DNaKX.png - * Example: - * HUD::BEGIN_TEXT_COMMAND_THEFEED_POST("HUNT"); - * HUD::END_TEXT_COMMAND_THEFEED_POST_AWARD("Hunting", "Hunting_Gold_128", 0, 109, "HUD_MED_UNLKED"); - */ - export function endTextCommandThefeedPostAward(textureDict: string | null, textureName: string | null, rpBonus: number, colorOverlay: number, titleLabel: string | null): number; + * Shows an "award" notification above the minimap, example: https://i.imgur.com/e2DNaKX.png + * Example: + * HUD::BEGIN_TEXT_COMMAND_THEFEED_POST("HUNT"); + * HUD::END_TEXT_COMMAND_THEFEED_POST_AWARD("Hunting", "Hunting_Gold_128", 0, 109, "HUD_MED_UNLKED"); + */ + export function endTextCommandThefeedPostAward(textureDict: string, textureName: string, rpBonus: number, colorOverlay: number, titleLabel: string): number; - export function endTextCommandThefeedPostCrewtag(p0: boolean, p1: boolean, p2: number | null, p3: number, isLeader: boolean, unk0: boolean, clanDesc: number, R: number, G: number, B: number): [number, number]; + export function endTextCommandThefeedPostCrewtag(p0: boolean, p1: boolean, p2: number, p3: number, isLeader: boolean, unk0: boolean, clanDesc: number, R: number, G: number, B: number): [number, number]; - export function endTextCommandThefeedPostCrewtagWithGameName(p0: boolean, p1: boolean, p2: number | null, p3: number, isLeader: boolean, unk0: boolean, clanDesc: number, playerName: string | null, R: number, G: number, B: number): [number, number]; + export function endTextCommandThefeedPostCrewtagWithGameName(p0: boolean, p1: boolean, p2: number, p3: number, isLeader: boolean, unk0: boolean, clanDesc: number, playerName: string, R: number, G: number, B: number): [number, number]; - export function endTextCommandThefeedPostUnlock(gxtLabel1: string | null, p1: number, gxtLabel2: string | null): number; + export function endTextCommandThefeedPostUnlock(gxtLabel1: string, p1: number, gxtLabel2: string): number; - export function endTextCommandThefeedPostUnlockTu(gxtLabel1: string | null, p1: number, gxtLabel2: string | null, p3: number): number; + export function endTextCommandThefeedPostUnlockTu(gxtLabel1: string, p1: number, gxtLabel2: string, p3: number): number; export function endTextCommandThefeedPostUnlockTuWithColor(p0: any, p1: any, p2: any, p3: any, p4: any, p5: any): number; export function endTextCommandThefeedPostMpticker(blink: boolean, p1: boolean): number; - export function endTextCommandThefeedPostCrewRankupWithLiteralFlag(p0: string | null, p1: string | null, p2: string | null, p3: boolean, p4: boolean): number; - - /** - * This function can show pictures of every texture that can be requested by REQUEST_STREAMED_TEXTURE_DICT. - * List of picNames: https://pastebin.com/XdpJVbHz - * HUD colors and their values: https://pastebin.com/d9aHPbXN - * Shows a deathmatch score above the minimap, example: https://i.imgur.com/YmoMklG.png - */ - export function endTextCommandThefeedPostVersusTu(txdName1: string | null, textureName1: string | null, count1: number, txdName2: string | null, textureName2: string | null, count2: number, hudColor1: number, hudColor2: number): number; - - /** - * returns a notification handle, prints out a notification like below: - * if you set type to 1, image goes from 0 - 39 - Xbox you can add text to - * example: - * HUD::END_TEXT_COMMAND_THEFEED_POST_REPLAY_INPUT(1, 20, "Who you trynna get crazy with, ese? Don't you know I'm LOCO?!"); - * - https://imgur.com/lGBPCz3 - * @param type range: 0 - 2 - */ - export function endTextCommandThefeedPostReplay(type: number, image: number, text: string | null): number; - - /** - * returns a notification handle, prints out a notification like below: - * if you set type to 1, button accepts "~INPUT_SOMETHING~" - * example: - * HUD::END_TEXT_COMMAND_THEFEED_POST_REPLAY_INPUT(1, "~INPUT_TALK~", "Who you trynna get crazy with, ese? Don't you know I'm LOCO?!"); - * - https://imgur.com/UPy0Ial - * Examples from the scripts: - * l_D1[11]=HUD::END_TEXT_COMMAND_THEFEED_POST_REPLAY_INPUT(1,"~INPUT_REPLAY_START_STOP_RECORDING~",""); - * l_D1[21]=HUD::END_TEXT_COMMAND_THEFEED_POST_REPLAY_INPUT(1,"~INPUT_SAVE_REPLAY_CLIP~",""); - * l_D1[11]=HUD::END_TEXT_COMMAND_THEFEED_POST_REPLAY_INPUT(1,"~INPUT_REPLAY_START_STOP_RECORDING~",""); - * l_D1[21]=HUD::END_TEXT_COMMAND_THEFEED_POST_REPLAY_INPUT(1,"~INPUT_REPLAY_START_STOP_RECORDING_SECONDARY~",""); - * @param type range: 0 - 2 - */ - export function endTextCommandThefeedPostReplayInput(type: number, button: string | null, text: string | null): number; - - /** - * void ShowSubtitle(const char *text) - * { - * BEGIN_TEXT_COMMAND_PRINT("STRING"); - * ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(text); - * END_TEXT_COMMAND_PRINT(2000, true); - * } - */ - export function beginTextCommandPrint(GxtEntry: string | null): void; - - /** - * Draws the subtitle at middle center of the screen. - * int duration = time in milliseconds to show text on screen before disappearing - * Used to be known as _DRAW_SUBTITLE_TIMED - * @param drawImmediately = If true, the text will be drawn immediately, if false, the text will be drawn after the previous subtitle has finished - */ + export function endTextCommandThefeedPostCrewRankupWithLiteralFlag(p0: string, p1: string, p2: string, p3: boolean, p4: boolean): number; + + /** + * This function can show pictures of every texture that can be requested by REQUEST_STREAMED_TEXTURE_DICT. + * List of picNames: https://pastebin.com/XdpJVbHz + * HUD colors and their values: https://pastebin.com/d9aHPbXN + * Shows a deathmatch score above the minimap, example: https://i.imgur.com/YmoMklG.png + */ + export function endTextCommandThefeedPostVersusTu(txdName1: string, textureName1: string, count1: number, txdName2: string, textureName2: string, count2: number, hudColor1: number, hudColor2: number): number; + + /** + * returns a notification handle, prints out a notification like below: + * type range: 0 - 2 + * if you set type to 1, image goes from 0 - 39 - Xbox you can add text to + * example: + * HUD::END_TEXT_COMMAND_THEFEED_POST_REPLAY_INPUT(1, 20, "Who you trynna get crazy with, ese? Don't you know I'm LOCO?!"); + * - https://imgur.com/lGBPCz3 + */ + export function endTextCommandThefeedPostReplay(type: number, image: number, text: string): number; + + /** + * returns a notification handle, prints out a notification like below: + * type range: 0 - 2 + * if you set type to 1, button accepts "~INPUT_SOMETHING~" + * example: + * HUD::END_TEXT_COMMAND_THEFEED_POST_REPLAY_INPUT(1, "~INPUT_TALK~", "Who you trynna get crazy with, ese? Don't you know I'm LOCO?!"); + * - https://imgur.com/UPy0Ial + * Examples from the scripts: + * l_D1[1/*1*\/]=HUD::END_TEXT_COMMAND_THEFEED_POST_REPLAY_INPUT(1,"~INPUT_REPLAY_START_STOP_RECORDING~",""); + * l_D1[2/*1*\/]=HUD::END_TEXT_COMMAND_THEFEED_POST_REPLAY_INPUT(1,"~INPUT_SAVE_REPLAY_CLIP~",""); + * l_D1[1/*1*\/]=HUD::END_TEXT_COMMAND_THEFEED_POST_REPLAY_INPUT(1,"~INPUT_REPLAY_START_STOP_RECORDING~",""); + * l_D1[2/*1*\/]=HUD::END_TEXT_COMMAND_THEFEED_POST_REPLAY_INPUT(1,"~INPUT_REPLAY_START_STOP_RECORDING_SECONDARY~",""); + */ + export function endTextCommandThefeedPostReplayInput(type: number, button: string, text: string): number; + + /** + * void ShowSubtitle(const char *text) + * { + * BEGIN_TEXT_COMMAND_PRINT("STRING"); + * ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(text); + * END_TEXT_COMMAND_PRINT(2000, true); + * } + */ + export function beginTextCommandPrint(GxtEntry: string): void; + + /** + * Draws the subtitle at middle center of the screen. + * int duration = time in milliseconds to show text on screen before disappearing + * drawImmediately = If true, the text will be drawn immediately, if false, the text will be drawn after the previous subtitle has finished + * Used to be known as _DRAW_SUBTITLE_TIMED + */ export function endTextCommandPrint(duration: number, drawImmediately: boolean): void; /** - * nothin doin. - * BOOL Message(const char* text) - * { - * BEGIN_TEXT_COMMAND_IS_MESSAGE_DISPLAYED("STRING"); - * ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(text); - * } - * @returns return END_TEXT_COMMAND_IS_MESSAGE_DISPLAYED(); - */ - export function beginTextCommandIsMessageDisplayed(text: string | null): void; + * nothin doin. + * BOOL Message(const char* text) + * { + * BEGIN_TEXT_COMMAND_IS_MESSAGE_DISPLAYED("STRING"); + * ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(text); + * return END_TEXT_COMMAND_IS_MESSAGE_DISPLAYED(); + * } + */ + export function beginTextCommandIsMessageDisplayed(text: string): void; export function endTextCommandIsMessageDisplayed(): boolean; /** - * The following were found in the decompiled script files: - * STRING, TWOSTRINGS, NUMBER, PERCENTAGE, FO_TWO_NUM, ESMINDOLLA, ESDOLLA, MTPHPER_XPNO, AHD_DIST, CMOD_STAT_0, CMOD_STAT_1, CMOD_STAT_2, CMOD_STAT_3, DFLT_MNU_OPT, F3A_TRAFDEST, ES_HELP_SOC3 - * ESDOLLA - cash - * ESMINDOLLA - cash (negative) - * Used to be known as _SET_TEXT_ENTRY - */ - export function beginTextCommandDisplayText(text: string | null): void; + * The following were found in the decompiled script files: + * STRING, TWOSTRINGS, NUMBER, PERCENTAGE, FO_TWO_NUM, ESMINDOLLA, ESDOLLA, MTPHPER_XPNO, AHD_DIST, CMOD_STAT_0, CMOD_STAT_1, CMOD_STAT_2, CMOD_STAT_3, DFLT_MNU_OPT, F3A_TRAFDEST, ES_HELP_SOC3 + * ESDOLLA - cash + * ESMINDOLLA - cash (negative) + * Used to be known as _SET_TEXT_ENTRY + */ + export function beginTextCommandDisplayText(text: string): void; /** - * Used to be known as _DRAW_TEXT - */ + * After applying the properties to the text (See HUD::SET_TEXT_), this will draw the text in the applied position. Also 0.0f < x, y < 1.0f, percentage of the axis. + * Used to be known as _DRAW_TEXT + */ export function endTextCommandDisplayText(x: number, y: number, p2: number): void; - export function beginTextCommandGetScreenWidthOfDisplayText(text: string | null): void; + export function beginTextCommandGetScreenWidthOfDisplayText(text: string): void; export function endTextCommandGetScreenWidthOfDisplayText(p0: boolean): number; /** - * int GetLineCount(char *text, float x, float y) - * { - * BEGIN_TEXT_COMMAND_GET_NUMBER_OF_LINES_FOR_STRING("STRING"); - * ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(text); - * } - * @returns return BEGIN_TEXT_COMMAND_GET_NUMBER_OF_LINES_FOR_STRING(x, y); - */ - export function beginTextCommandGetNumberOfLinesForString(entry: string | null): void; + * int GetLineCount(char *text, float x, float y) + * { + * BEGIN_TEXT_COMMAND_GET_NUMBER_OF_LINES_FOR_STRING("STRING"); + * ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(text); + * return BEGIN_TEXT_COMMAND_GET_NUMBER_OF_LINES_FOR_STRING(x, y); + * } + */ + export function beginTextCommandGetNumberOfLinesForString(entry: string): void; /** - * Determines how many lines the text string will use when drawn on screen. - * Must use 0x521FB041D93DD0E4 for setting up - */ + * Determines how many lines the text string will use when drawn on screen. + * Must use 0x521FB041D93DD0E4 for setting up + */ export function endTextCommandGetNumberOfLinesForString(x: number, y: number): number; /** - * Used to be known as _SET_TEXT_COMPONENT_FORMAT - */ - export function beginTextCommandDisplayHelp(inputType: string | null): void; - - /** - * Example: - * void FloatingHelpText(const char* text) - * { - * BEGIN_TEXT_COMMAND_DISPLAY_HELP("STRING"); - * ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(text); - * END_TEXT_COMMAND_DISPLAY_HELP (0, 0, 1, -1); - * } - * Image: - * - imgbin.org/images/26209.jpg - * See NativeDB for reference: http://natives.altv.mp/#/0x238FFE5C7B0498A6 - * @param p0 is always 0. - * @param shape goes from -1 to 50 (may be more). - */ + * Used to be known as _SET_TEXT_COMPONENT_FORMAT + */ + export function beginTextCommandDisplayHelp(inputType: string): void; + + /** + * shape goes from -1 to 50 (may be more). + * p0 is always 0. + * Example: + * void FloatingHelpText(const char* text) + * { + * BEGIN_TEXT_COMMAND_DISPLAY_HELP("STRING"); + * ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(text); + * END_TEXT_COMMAND_DISPLAY_HELP (0, 0, 1, -1); + * } + * Image: + * - imgbin.org/images/26209.jpg + * more inputs/icons: + * - https://pastebin.com/nqNYWMSB + * Used to be known as _DISPLAY_HELP_TEXT_FROM_STRING_LABEL + */ export function endTextCommandDisplayHelp(p0: number, loop: boolean, beep: boolean, shape: number): void; /** - * BOOL IsContextActive(char *ctx) - * { - * BEGIN_TEXT_COMMAND_IS_THIS_HELP_MESSAGE_BEING_DISPLAYED(ctx); - * } - * @returns return END_TEXT_COMMAND_IS_THIS_HELP_MESSAGE_BEING_DISPLAYED(0); - */ - export function beginTextCommandIsThisHelpMessageBeingDisplayed(labelName: string | null): void; + * BOOL IsContextActive(char *ctx) + * { + * BEGIN_TEXT_COMMAND_IS_THIS_HELP_MESSAGE_BEING_DISPLAYED(ctx); + * return END_TEXT_COMMAND_IS_THIS_HELP_MESSAGE_BEING_DISPLAYED(0); + * } + */ + export function beginTextCommandIsThisHelpMessageBeingDisplayed(labelName: string): void; export function endTextCommandIsThisHelpMessageBeingDisplayed(p0: number): boolean; /** - * Starts a text command to change the name of a blip displayed in the pause menu. - * This should be paired with `END_TEXT_COMMAND_SET_BLIP_NAME`, once adding all required text components. - * Example: - * HUD::BEGIN_TEXT_COMMAND_SET_BLIP_NAME("STRING"); - * HUD::ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME("Name"); - * HUD::END_TEXT_COMMAND_SET_BLIP_NAME(blip); - */ - export function beginTextCommandSetBlipName(textLabel: string | null): void; + * Starts a text command to change the name of a blip displayed in the pause menu. + * This should be paired with `END_TEXT_COMMAND_SET_BLIP_NAME`, once adding all required text components. + * Example: + * HUD::BEGIN_TEXT_COMMAND_SET_BLIP_NAME("STRING"); + * HUD::ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME("Name"); + * HUD::END_TEXT_COMMAND_SET_BLIP_NAME(blip); + */ + export function beginTextCommandSetBlipName(textLabel: string): void; /** - * Finalizes a text command started with BEGIN_TEXT_COMMAND_SET_BLIP_NAME, setting the name of the specified blip. - */ + * Finalizes a text command started with BEGIN_TEXT_COMMAND_SET_BLIP_NAME, setting the name of the specified blip. + */ export function endTextCommandSetBlipName(blip: number): void; - export function beginTextCommandAddDirectlyToPreviousBriefs(p0: string | null): void; + export function beginTextCommandAddDirectlyToPreviousBriefs(p0: string): void; export function endTextCommandAddDirectlyToPreviousBriefs(p0: boolean): void; /** - * clears a print text command with this text - */ - export function beginTextCommandClearPrint(text: string | null): void; + * clears a print text command with this text + */ + export function beginTextCommandClearPrint(text: string): void; export function endTextCommandClearPrint(): void; - export function beginTextCommandOverrideButtonText(gxtEntry: string | null): void; + export function beginTextCommandOverrideButtonText(gxtEntry: string): void; export function endTextCommandOverrideButtonText(p0: number): void; @@ -5945,75 +6461,81 @@ declare module "natives" { export function addTextComponentFloat(value: number, decimalPlaces: number): void; - export function addTextComponentSubstringTextLabel(labelName: string | null): void; + export function addTextComponentSubstringTextLabel(labelName: string): void; /** - * It adds the localized text of the specified GXT entry name. Eg. if the argument is GET_HASH_KEY("ES_HELP"), adds "Continue". Just uses a text labels hash key - */ + * It adds the localized text of the specified GXT entry name. Eg. if the argument is GET_HASH_KEY("ES_HELP"), adds "Continue". Just uses a text labels hash key + */ export function addTextComponentSubstringTextLabelHashKey(gxtEntryHash: number): void; export function addTextComponentSubstringBlipName(blip: number): void; - export function addTextComponentSubstringPlayerName(text: string | null): void; + export function addTextComponentSubstringPlayerName(text: string): void; /** - * @param flags 00 - */ + * Adds a timer (e.g. "00:00:00:000"). The appearance of the timer depends on the flags, which needs more research. + */ export function addTextComponentSubstringTime(timestamp: number, flags: number): void; export function addTextComponentFormattedInteger(value: number, commaSeparated: boolean): void; /** - * @param p1 was always -1 - */ - export function addTextComponentSubstringPhoneNumber(p0: string | null, p1: number): void; + * p1 was always -1 + */ + export function addTextComponentSubstringPhoneNumber(p0: string, p1: number): void; /** - * This native (along with ADD_TEXT_COMPONENT_SUBSTRING_KEYBOARD_DISPLAY and ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME) do not actually filter anything. They simply add the provided text (as of 944) - */ - export function addTextComponentSubstringWebsite(website: string | null): void; + * This native (along with ADD_TEXT_COMPONENT_SUBSTRING_KEYBOARD_DISPLAY and ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME) do not actually filter anything. They simply add the provided text (as of 944) + */ + export function addTextComponentSubstringWebsite(website: string): void; - export function addTextComponentSubstringKeyboardDisplay(string: string | null): void; + export function addTextComponentSubstringKeyboardDisplay(string: string): void; export function setColourOfNextTextComponent(hudColor: number): void; /** - * Returns a substring of a specified length starting at a specified position. - * Example: - * // Get "STRING" text from "MY_STRING" - * subStr = HUD::GET_CHARACTER_FROM_AUDIO_CONVERSATION_FILENAME("MY_STRING", 3, 6); - */ - export function getCharacterFromAudioConversationFilename(text: string | null, position: number, length: number): string; - - /** - * Returns a substring of a specified length starting at a specified position. The result is guaranteed not to exceed the specified max length. - * NOTE: The 'maxLength' parameter might actually be the size of the buffer that is returned. More research is needed. -CL69 - * Example: - * // Condensed example of how Rockstar uses this function - * strLen = HUD::GET_LENGTH_OF_LITERAL_STRING(MISC::GET_ONSCREEN_KEYBOARD_RESULT()); - * subStr = HUD::GET_CHARACTER_FROM_AUDIO_CONVERSATION_FILENAME_WITH_BYTE_LIMIT(MISC::GET_ONSCREEN_KEYBOARD_RESULT(), 0, strLen, 63); - * -- - * "fm_race_creator.ysc", line 85115: - * // parameters modified for clarity - * See NativeDB for reference: http://natives.altv.mp/#/0xB2798643312205C5 - * @returns return FALSE; - */ - export function getCharacterFromAudioConversationFilenameWithByteLimit(text: string | null, position: number, length: number, maxLength: number): string; - - /** - * Returns a substring that is between two specified positions. The length of the string will be calculated using (endPosition - startPosition). - * Example: - * // Get "STRING" text from "MY_STRING" - * subStr = HUD::GET_CHARACTER_FROM_AUDIO_CONVERSATION_FILENAME_BYTES("MY_STRING", 3, 9); - * // Overflows are possibly replaced with underscores (needs verification) - * subStr = HUD::GET_CHARACTER_FROM_AUDIO_CONVERSATION_FILENAME_BYTES("MY_STRING", 3, 10); // "STRING_"? - */ - export function getCharacterFromAudioConversationFilenameBytes(text: string | null, startPosition: number, endPosition: number): string; - - /** - * Gets a string literal from a label name. - */ - export function getFilenameForAudioConversation(labelName: string | null): string; + * Returns a substring of a specified length starting at a specified position. + * Example: + * // Get "STRING" text from "MY_STRING" + * subStr = HUD::GET_CHARACTER_FROM_AUDIO_CONVERSATION_FILENAME("MY_STRING", 3, 6); + */ + export function getCharacterFromAudioConversationFilename(text: string, position: number, length: number): string; + + /** + * Returns a substring of a specified length starting at a specified position. The result is guaranteed not to exceed the specified max length. + * NOTE: The 'maxLength' parameter might actually be the size of the buffer that is returned. More research is needed. -CL69 + * Example: + * // Condensed example of how Rockstar uses this function + * strLen = HUD::GET_LENGTH_OF_LITERAL_STRING(MISC::GET_ONSCREEN_KEYBOARD_RESULT()); + * subStr = HUD::GET_CHARACTER_FROM_AUDIO_CONVERSATION_FILENAME_WITH_BYTE_LIMIT(MISC::GET_ONSCREEN_KEYBOARD_RESULT(), 0, strLen, 63); + * -- + * "fm_race_creator.ysc", line 85115: + * // parameters modified for clarity + * BOOL sub_8e5aa(char *text, int length) { + * for (i = 0; i <= (length - 2); i += 1) { + * if (!MISC::ARE_STRINGS_EQUAL(HUD::GET_CHARACTER_FROM_AUDIO_CONVERSATION_FILENAME_WITH_BYTE_LIMIT(text, i, i + 1, 1), " ")) { + * return FALSE; + * } + * } + * return TRUE; + * } + */ + export function getCharacterFromAudioConversationFilenameWithByteLimit(text: string, position: number, length: number, maxLength: number): string; + + /** + * Returns a substring that is between two specified positions. The length of the string will be calculated using (endPosition - startPosition). + * Example: + * // Get "STRING" text from "MY_STRING" + * subStr = HUD::GET_CHARACTER_FROM_AUDIO_CONVERSATION_FILENAME_BYTES("MY_STRING", 3, 9); + * // Overflows are possibly replaced with underscores (needs verification) + * subStr = HUD::GET_CHARACTER_FROM_AUDIO_CONVERSATION_FILENAME_BYTES("MY_STRING", 3, 10); // "STRING_"? + */ + export function getCharacterFromAudioConversationFilenameBytes(text: string, startPosition: number, endPosition: number): string; + + /** + * Gets a localized string literal from a label name. Can be used for output of e.g. VEHICLE::GET_LIVERY_NAME. To check if a GXT label can be localized with this, HUD::DOES_TEXT_LABEL_EXIST can be used. + */ + export function getFilenameForAudioConversation(labelName: string): string; export function clearPrints(): void; @@ -6022,20 +6544,20 @@ declare module "natives" { export function clearAllHelpMessages(): void; /** - * @param p0 found arguments in the b617d scripts: https://pastebin.com/X5akCN7z - */ - export function clearThisPrint(p0: string | null): void; + * p0: found arguments in the b617d scripts: https://pastebin.com/X5akCN7z + */ + export function clearThisPrint(p0: string): void; export function clearSmallPrints(): void; - export function doesTextBlockExist(gxt: string | null): boolean; + export function doesTextBlockExist(gxt: string): boolean; /** - * Request a gxt into the passed slot. - */ - export function requestAdditionalText(gxt: string | null, slot: number): void; + * Request a gxt into the passed slot. + */ + export function requestAdditionalText(gxt: string, slot: number): void; - export function requestAdditionalTextForDlc(gxt: string | null, slot: number): void; + export function requestAdditionalTextForDlc(gxt: string, slot: number): void; export function hasAdditionalTextLoaded(slot: number): boolean; @@ -6044,35 +6566,35 @@ declare module "natives" { export function isStreamingAdditionalText(p0: number): boolean; /** - * Checks if the specified gxt has loaded into the passed slot. - */ - export function hasThisAdditionalTextLoaded(gxt: string | null, slot: number): boolean; + * Checks if the specified gxt has loaded into the passed slot. + */ + export function hasThisAdditionalTextLoaded(gxt: string, slot: number): boolean; export function isMessageBeingDisplayed(): boolean; /** - * Checks if the passed gxt name exists in the game files. - */ - export function doesTextLabelExist(gxt: string | null): boolean; + * Checks if the passed gxt name exists in the game files. + */ + export function doesTextLabelExist(gxt: string): boolean; - export function getFirstNCharactersOfLiteralString(string: string | null, length: number): string; + export function getFirstNCharactersOfLiteralString(string: string, length: number): string; /** - * Returns the string length of the string from the gxt string . - */ - export function getLengthOfStringWithThisTextLabel(gxt: string | null): number; + * Returns the string length of the string from the gxt string . + */ + export function getLengthOfStringWithThisTextLabel(gxt: string): number; /** - * Returns the length of the string passed (much like strlen). - */ - export function getLengthOfLiteralString(string: string | null): number; + * Returns the length of the string passed (much like strlen). + */ + export function getLengthOfLiteralString(string: string): number; - export function getLengthOfLiteralStringInBytes(string: string | null): number; + export function getLengthOfLiteralStringInBytes(string: string): number; /** - * This functions converts the hash of a street name into a readable string. - * For how to get the hashes, see PATHFIND::GET_STREET_NAME_AT_COORD. - */ + * This functions converts the hash of a street name into a readable string. + * For how to get the hashes, see PATHFIND::GET_STREET_NAME_AT_COORD. + */ export function getStreetNameFromHashKey(hash: number): string; export function isHudPreferenceSwitchedOn(): boolean; @@ -6082,30 +6604,30 @@ declare module "natives" { export function isSubtitlePreferenceSwitchedOn(): boolean; /** - * If Hud should be displayed - */ + * If Hud should be displayed + */ export function displayHud(toggle: boolean): void; /** - * Enables drawing some hud components, such as help labels, this frame, when the player is dead. - */ + * Enables drawing some hud components, such as help labels, this frame, when the player is dead. + */ export function displayHudWhenNotInStateOfPlayThisFrame(): void; export function displayHudWhenPausedThisFrame(): void; /** - * If Minimap / Radar should be displayed. - */ + * If Minimap / Radar should be displayed. + */ export function displayRadar(toggle: boolean): void; /** - * Setter for GET_FAKE_SPECTATOR_MODE - */ + * Setter for GET_FAKE_SPECTATOR_MODE + */ export function setFakeSpectatorMode(toggle: boolean): void; /** - * Getter for SET_FAKE_SPECTATOR_MODE - */ + * Getter for SET_FAKE_SPECTATOR_MODE + */ export function getFakeSpectatorMode(): boolean; export function isHudHidden(): boolean; @@ -6116,13 +6638,15 @@ declare module "natives" { export function useVehicleTargetingReticule(p0: any): void; + export function useVehicleTargetingReticuleOnVehicles(enable: boolean): void; + export function addValidVehicleHitHash(p0: any): void; export function clearValidVehicleHitHashes(): void; /** - * Enable / disable showing route for the Blip-object. - */ + * Enable / disable showing route for the Blip-object. + */ export function setBlipRoute(blip: number, enabled: boolean): void; export function clearAllBlipRoutes(): void; @@ -6140,13 +6664,13 @@ declare module "natives" { export function forceNextMessageToPreviousBriefsList(p0: number): void; /** - * @param zoom ranges from 0 to 90f in R* Scripts - */ + * zoom ranges from 0 to 90f in R* Scripts + */ export function setRadarZoomPrecise(zoom: number): void; /** - * @param zoomLevel ranges from 0 to 1400 in R* Scripts - */ + * zoomLevel ranges from 0 to 1400 in R* Scripts + */ export function setRadarZoom(zoomLevel: number): void; export function setRadarZoomToBlip(blip: number, zoom: number): void; @@ -6154,25 +6678,25 @@ declare module "natives" { export function setRadarZoomToDistance(zoom: number): void; /** - * Does nothing (it's a nullsub). - */ + * Does nothing (it's a nullsub). + */ export function updateRadarZoomToBlip(): void; export function getHudColour(hudColorIndex: number, r?: number, g?: number, b?: number, a?: number): [void, number, number, number, number]; /** - * Sets the color of HUD_COLOUR_SCRIPT_VARIABLE - */ + * Sets the color of HUD_COLOUR_SCRIPT_VARIABLE + */ export function setScriptVariableHudColour(r: number, g: number, b: number, a: number): void; /** - * Sets the color of HUD_COLOUR_SCRIPT_VARIABLE_2 - */ + * Sets the color of HUD_COLOUR_SCRIPT_VARIABLE_2 + */ export function setSecondScriptVariableHudColour(r: number, g: number, b: number, a: number): void; /** - * makes hudColorIndex2 color into hudColorIndex color - */ + * makes hudColorIndex2 color into hudColorIndex color + */ export function replaceHudColour(hudColorIndex: number, hudColorIndex2: number): void; export function replaceHudColourWithRgba(hudColorIndex: number, r: number, g: number, b: number, a: number): void; @@ -6192,20 +6716,20 @@ declare module "natives" { export function setCustomMpHudColor(hudColorId: number): void; /** - * This gets the height of the FONT and not the total text. You need to get the number of lines your text uses, and get the height of a newline (I'm using a smaller value) to get the total text height. - */ + * This gets the height of the FONT and not the total text. You need to get the number of lines your text uses, and get the height of a newline (I'm using a smaller value) to get the total text height. + */ export function getRenderedCharacterHeight(size: number, font: number): number; /** - * @param scale is unknown and doesn't seem to have an effect, yet in the game scripts it changes to 1.0F sometimes. - * @param size range : 0F to 1.0F - */ + * Size range : 0F to 1.0F + * p0 is unknown and doesn't seem to have an effect, yet in the game scripts it changes to 1.0F sometimes. + */ export function setTextScale(scale: number, size: number): void; /** - * colors you input not same as you think? - * @param alpha for some reason its R B G A - */ + * colors you input not same as you think? + * A: for some reason its R B G A + */ export function setTextColour(red: number, green: number, blue: number, alpha: number): void; export function setTextCentre(align: boolean): void; @@ -6213,63 +6737,66 @@ declare module "natives" { export function setTextRightJustify(toggle: boolean): void; /** - * Types - - * 0: Center-Justify - * 1: Left-Justify - * 2: Right-Justify - * Right-Justify requires SET_TEXT_WRAP, otherwise it will draw to the far right of the screen - */ + * Types - + * 0: Center-Justify + * 1: Left-Justify + * 2: Right-Justify + * Right-Justify requires SET_TEXT_WRAP, otherwise it will draw to the far right of the screen + */ export function setTextJustification(justifyType: number): void; + export function setTextLineHeightMult(lineHeightMult: number): void; + /** - * It sets the text in a specified box and wraps the text if it exceeds the boundries. Both values are for X axis. Useful when positioning text set to center or aligned to the right. - * @param start - left boundry on screen position (0.0 - 1.0) - * @param end - right boundry on screen position (0.0 - 1.0) - */ + * It sets the text in a specified box and wraps the text if it exceeds the boundries. Both values are for X axis. Useful when positioning text set to center or aligned to the right. + * start - left boundry on screen position (0.0 - 1.0) + * end - right boundry on screen position (0.0 - 1.0) + */ export function setTextWrap(start: number, end: number): void; export function setTextLeading(p0: number): void; /** - * This native does absolutely nothing, just a nullsub - */ + * This native does absolutely nothing, just a nullsub + */ export function setTextProportional(p0: boolean): void; /** - * fonts that mess up your text where made for number values/misc stuff - */ + * fonts that mess up your text where made for number values/misc stuff + */ export function setTextFont(fontType: number): void; export function setTextDropShadow(): void; /** - * @param distance - shadow distance in pixels, both horizontal and vertical - * @param r color - * @param g color - * @param b color - */ + * distance - shadow distance in pixels, both horizontal and vertical + * r, g, b, a - color + */ export function setTextDropshadow(distance: number, r: number, g: number, b: number, a: number): void; export function setTextOutline(): void; /** - * This native does absolutely nothing, just a nullsub - */ + * This native does absolutely nothing, just a nullsub + */ export function setTextEdge(p0: number, r: number, g: number, b: number, a: number): void; export function setTextRenderId(renderId: number): void; + /** + * This function is hard-coded to always return 1. + */ export function getDefaultScriptRendertargetRenderId(): number; - export function registerNamedRendertarget(name: string | null, p1: boolean): boolean; + export function registerNamedRendertarget(name: string, p1: boolean): boolean; - export function isNamedRendertargetRegistered(name: string | null): boolean; + export function isNamedRendertargetRegistered(name: string): boolean; - export function releaseNamedRendertarget(name: string | null): boolean; + export function releaseNamedRendertarget(name: string): boolean; export function linkNamedRendertarget(modelHash: number): void; - export function getNamedRendertargetRenderId(name: string | null): number; + export function getNamedRendertargetRenderId(name: string): number; export function isNamedRendertargetLinked(modelHash: number): boolean; @@ -6302,56 +6829,56 @@ declare module "natives" { export function getBlipInfoIdDisplay(blip: number): number; /** - * Returns a value based on what the blip is attached to - * 1 - Vehicle - * 2 - Ped - * 3 - Object - * 4 - Coord - * 5 - unk - * 6 - Pickup - * 7 - Radius - */ + * Returns a value based on what the blip is attached to + * 1 - Vehicle + * 2 - Ped + * 3 - Object + * 4 - Coord + * 5 - unk + * 6 - Pickup + * 7 - Radius + */ export function getBlipInfoIdType(blip: number): number; - export function getBlipInfoIdEntityIndex(blip: number): number; + export function getBlipInfoIdEntityIndex(blip: number): Entity | number; /** - * @returns This function is hard-coded to always return 0. - */ + * This function is hard-coded to always return 0. + */ export function getBlipInfoIdPickupIndex(blip: number): number; /** - * Returns the Blip handle of given Entity. - */ + * Returns the Blip handle of given Entity. + */ export function getBlipFromEntity(entity: Entity | number): number; export function addBlipForRadius(posX: number, posY: number, posZ: number, radius: number): number; /** - * Adds a rectangular blip for the specified coordinates/area. - * It is recommended to use SET_BLIP_ROTATION and SET_BLIP_COLOUR to make the blip not rotate along with the camera. - * By default, the blip will show as a _regular_ blip with the specified color/sprite if it is outside of the minimap view. - * Example image: - * minimap https://w.wew.wtf/pdcjig.png - * big map https://w.wew.wtf/zgcjcm.png - * (Native name is _likely_ to actually be ADD_BLIP_FOR_AREA, but due to the usual reasons this can't be confirmed) - */ + * Adds a rectangular blip for the specified coordinates/area. + * It is recommended to use SET_BLIP_ROTATION and SET_BLIP_COLOUR to make the blip not rotate along with the camera. + * By default, the blip will show as a _regular_ blip with the specified color/sprite if it is outside of the minimap view. + * Example image: + * minimap https://w.wew.wtf/pdcjig.png + * big map https://w.wew.wtf/zgcjcm.png + * (Native name is _likely_ to actually be ADD_BLIP_FOR_AREA, but due to the usual reasons this can't be confirmed) + */ export function addBlipForArea(x: number, y: number, z: number, width: number, height: number): number; /** - * Returns red ( default ) blip attached to entity. - * Example: - * Blip blip; //Put this outside your case or option - * blip = HUD::ADD_BLIP_FOR_ENTITY(YourPedOrBodyguardName); - * HUD::SET_BLIP_AS_FRIENDLY(blip, true); - */ + * Returns red ( default ) blip attached to entity. + * Example: + * Blip blip; //Put this outside your case or option + * blip = HUD::ADD_BLIP_FOR_ENTITY(YourPedOrBodyguardName); + * HUD::SET_BLIP_AS_FRIENDLY(blip, true); + */ export function addBlipForEntity(entity: Entity | number): number; export function addBlipForPickup(pickup: number): number; /** - * @returns Creates an orange ( default ) Blip-object. Returns a Blip-object which can then be modified. - */ + * Creates an orange ( default ) Blip-object. Returns a Blip-object which can then be modified. + */ export function addBlipForCoord(x: number, y: number, z: number): number; export function triggerSonarBlip(posX: number, posY: number, posZ: number, radius: number, p4: number): void; @@ -6363,18 +6890,18 @@ declare module "natives" { export function getBlipCoords(blip: number): Vector3; /** - * Sets the displayed sprite for a specific blip.. - * You may have your own list, but since dev-c didn't show it I was bored and started looking through scripts and functions to get a presumable almost positive list of a majority of blip IDs - * https://pastebin.com/Bpj9Sfft - * Blips Images + IDs: - * https://gtaxscripting.blogspot.com/2016/05/gta-v-blips-id-and-image.html - */ + * Sets the displayed sprite for a specific blip.. + * You may have your own list, but since dev-c didn't show it I was bored and started looking through scripts and functions to get a presumable almost positive list of a majority of blip IDs + * https://pastebin.com/Bpj9Sfft + * Blips Images + IDs: + * https://gtaxscripting.blogspot.com/2016/05/gta-v-blips-id-and-image.html + */ export function setBlipSprite(blip: number, spriteId: number): void; /** - * Blips Images + IDs: - * gtaxscripting.blogspot.com/2016/05/gta-v-blips-id-and-image.html - */ + * Blips Images + IDs: + * gtaxscripting.blogspot.com/2016/05/gta-v-blips-id-and-image.html + */ export function getBlipSprite(blip: number): number; export function setCopBlipSprite(p0: number, p1: number): void; @@ -6382,19 +6909,19 @@ declare module "natives" { export function setCopBlipSpriteAsStandard(): void; /** - * Doesn't work if the label text of gxtEntry is >= 80. - */ - export function setBlipNameFromTextFile(blip: number, gxtEntry: string | null): void; + * Doesn't work if the label text of gxtEntry is >= 80. + */ + export function setBlipNameFromTextFile(blip: number, gxtEntry: string): void; export function setBlipNameToPlayerName(blip: number, player: Player | number): void; /** - * Sets alpha-channel for blip color. - * Example: - * HUD::SET_BLIP_COLOUR(blip , 3); - * HUD::SET_BLIP_ALPHA(blip , 64); - * @param blip blip = HUD::ADD_BLIP_FOR_ENTITY(entity); - */ + * Sets alpha-channel for blip color. + * Example: + * Blip blip = HUD::ADD_BLIP_FOR_ENTITY(entity); + * HUD::SET_BLIP_COLOUR(blip , 3); + * HUD::SET_BLIP_ALPHA(blip , 64); + */ export function setBlipAlpha(blip: number, alpha: number): void; export function getBlipAlpha(blip: number): number; @@ -6402,37 +6929,37 @@ declare module "natives" { export function setBlipFade(blip: number, opacity: number, duration: number): void; /** - * Returns -1, 0, +1, depending on if the blip is fading out, doing nothing, or fading in respectively. - */ + * Returns -1, 0, +1, depending on if the blip is fading out, doing nothing, or fading in respectively. + */ export function getBlipFadeDirection(blip: number): number; /** - * After some testing, looks like you need to use CEIL() on the rotation (vehicle/ped heading) before using it there. - */ + * After some testing, looks like you need to use CEIL() on the rotation (vehicle/ped heading) before using it there. + */ export function setBlipRotation(blip: number, rotation: number): void; /** - * Does not require whole number/integer rotations. - */ + * Does not require whole number/integer rotations. + */ export function setBlipRotationWithFloat(blip: number, heading: number): void; export function getBlipRotation(blip: number): number; /** - * Adds up after viewing multiple R* scripts. I believe that the duration is in miliseconds. - */ + * Adds up after viewing multiple R* scripts. I believe that the duration is in miliseconds. + */ export function setBlipFlashTimer(blip: number, duration: number): void; export function setBlipFlashInterval(blip: number, p1: any): void; /** - * @param color //gtaforums.com/topic/864881-all-blip-color-ids-pictured/ - */ + * https://gtaforums.com/topic/864881-all-blip-color-ids-pictured/ + */ export function setBlipColour(blip: number, color: number): void; /** - * Can be used to give blips any RGB colour with SET_BLIP_COLOUR(blip, 84). - */ + * Can be used to give blips any RGB colour with SET_BLIP_COLOUR(blip, 84). + */ export function setBlipSecondaryColour(blip: number, r: number, g: number, b: number): void; export function getBlipColour(blip: number): number; @@ -6472,69 +6999,82 @@ declare module "natives" { export function isBlipFlashing(blip: number): boolean; /** - * Sets whether or not the specified blip should only be displayed when nearby, or on the minimap. - */ + * Sets whether or not the specified blip should only be displayed when nearby, or on the minimap. + */ export function setBlipAsShortRange(blip: number, toggle: boolean): void; export function setBlipScale(blip: number, scale: number): void; /** - * See https://imgur.com/a/lLkEsMN - */ + * See https://imgur.com/a/lLkEsMN + */ export function setBlipScale2d(blip: number, xScale: number, yScale: number): void; /** - * See this topic for more details : gtaforums.com/topic/717612-v-scriptnative-documentation-and-research/page-35?p=1069477935 - */ + * See this topic for more details : gtaforums.com/topic/717612-v-scriptnative-documentation-and-research/page-35?p=1069477935 + */ export function setBlipPriority(blip: number, priority: number): void; /** - * Display Id behaviours: - * 0 = Doesn't show up, ever, anywhere. - * 1 = Doesn't show up, ever, anywhere. - * 2 = Shows on both main map and minimap. (Selectable on map) - * 3 = Shows on main map only. (Selectable on map) - * 4 = Shows on main map only. (Selectable on map) - * 5 = Shows on minimap only. - * 6 = Shows on both main map and minimap. (Selectable on map) - * 7 = Doesn't show up, ever, anywhere. - * See NativeDB for reference: http://natives.altv.mp/#/0x9029B2F3DA924928 - */ + * Display Id behaviours: + * 0 = Doesn't show up, ever, anywhere. + * 1 = Doesn't show up, ever, anywhere. + * 2 = Shows on both main map and minimap. (Selectable on map) + * 3 = Shows on main map only. (Selectable on map) + * 4 = Shows on main map only. (Selectable on map) + * 5 = Shows on minimap only. + * 6 = Shows on both main map and minimap. (Selectable on map) + * 7 = Doesn't show up, ever, anywhere. + * 8 = Shows on both main map and minimap. (Not selectable on map) + * 9 = Shows on minimap only. + * 10 = Shows on both main map and minimap. (Not selectable on map) + * Anything higher than 10 seems to be exactly the same as 10. + */ export function setBlipDisplay(blip: number, displayId: number): void; /** - * Example: https://i.imgur.com/skY6vAJ.png - * 1 = No distance shown in legend - * 2 = Distance shown in legend - * 7 = "Other Players" category, also shows distance in legend - * 10 = "Property" category - * 11 = "Owned Property" category - * Any other value behaves like index = 1, index wraps around after 255 - * Blips with categories 7, 10 or 11 will all show under the specific categories listing in the map legend, regardless of sprite or name. - * Legend entries: - * See NativeDB for reference: http://natives.altv.mp/#/0x234CDD44D996FD9A - */ + * Example: https://i.imgur.com/skY6vAJ.png + * Index: + * 1 = No distance shown in legend + * 2 = Distance shown in legend + * 7 = "Other Players" category, also shows distance in legend + * 10 = "Property" category + * 11 = "Owned Property" category + * Any other value behaves like index = 1, index wraps around after 255 + * Blips with categories 7, 10 or 11 will all show under the specific categories listing in the map legend, regardless of sprite or name. + * Legend entries: + * 7 = Other Players (BLIP_OTHPLYR) + * 10 = Property (BLIP_PROPCAT) + * 11 = Owned Property (BLIP_APARTCAT) + * Category needs to be `7` in order for blip names to show on the expanded minimap when using DISPLAY_PLAYER_NAME_TAGS_ON_BLIPS. + */ export function setBlipCategory(blip: number, index: number): void; /** - * In the C++ SDK, this seems not to work-- the blip isn't removed immediately. I use it for saving cars. - * E.g.: - * Ped pped = PLAYER::PLAYER_PED_ID(); - * Vehicle v = PED::GET_VEHICLE_PED_IS_USING(pped); - * works fine. - * But later attempting to delete it with: - * Blip b = HUD::GET_BLIP_FROM_ENTITY(v); - * if (HUD::DOES_BLIP_EXIST(b)) HUD::REMOVE_BLIP(&b); - * doesn't work. And yes, doesn't work without the DOES_BLIP_EXIST check either. Also, if you attach multiple blips to the same thing (say, a vehicle), and that thing disappears, the blips randomly attach to other things (in my case, a vehicle). - * See NativeDB for reference: http://natives.altv.mp/#/0x86A652570E5F25DD - * @param blip b = HUD::ADD_BLIP_FOR_ENTITY(v); - */ - export function removeBlip(blip: number): [void, number]; - - /** - * false for enemy - * true for friendly - */ + * In the C++ SDK, this seems not to work-- the blip isn't removed immediately. I use it for saving cars. + * E.g.: + * Ped pped = PLAYER::PLAYER_PED_ID(); + * Vehicle v = PED::GET_VEHICLE_PED_IS_USING(pped); + * Blip b = HUD::ADD_BLIP_FOR_ENTITY(v); + * works fine. + * But later attempting to delete it with: + * Blip b = HUD::GET_BLIP_FROM_ENTITY(v); + * if (HUD::DOES_BLIP_EXIST(b)) HUD::REMOVE_BLIP(&b); + * doesn't work. And yes, doesn't work without the DOES_BLIP_EXIST check either. Also, if you attach multiple blips to the same thing (say, a vehicle), and that thing disappears, the blips randomly attach to other things (in my case, a vehicle). + * Thus for me, HUD::REMOVE_BLIP(&b) only works if there's one blip, (in my case) the vehicle is marked as no longer needed, you drive away from it and it eventually despawns, AND there is only one blip attached to it. I never intentionally attach multiple blips but if the user saves the car, this adds a blip. Then if they delete it, it is supposed to remove the blip, but it doesn't. Then they can immediately save it again, causing another blip to re-appear. + * ------------- + * Passing the address of the variable instead of the value works for me. + * e.g. + * int blip = HUD::ADD_BLIP_FOR_ENTITY(ped); + * HUD::REMOVE_BLIP(&blip); + * Remove blip will currently crash your game, just artificially remove the blip by setting the sprite to a id that is 'invisible'. + */ + export function removeBlip(blip?: number): [void, number]; + + /** + * false for enemy + * true for friendly + */ export function setBlipAsFriendly(blip: number, toggle: boolean): void; export function pulseBlip(blip: number): void; @@ -6546,44 +7086,44 @@ declare module "natives" { export function showHeightOnBlip(blip: number, toggle: boolean): void; /** - * Adds a green checkmark on top of a blip. - */ + * Adds a green checkmark on top of a blip. + */ export function showTickOnBlip(blip: number, toggle: boolean): void; /** - * Adds a orange checkmark on top of a given blip handle: https://imgur.com/a/aw5OTMF - * _SHOW_FRIEND_INDICATOR_ON_BLIP* - _SHOW_HEADING_INDICATOR_ON_BLIP* - */ + * Adds a orange checkmark on top of a given blip handle: https://imgur.com/a/aw5OTMF + * _SHOW_FRIEND_INDICATOR_ON_BLIP* - _SHOW_HEADING_INDICATOR_ON_BLIP* + */ export function showGoldTickOnBlip(blip: number, toggle: boolean): void; export function showForSaleIconOnBlip(blip: number, toggle: boolean): void; /** - * Adds the GTA: Online player heading indicator to a blip. - */ + * Adds the GTA: Online player heading indicator to a blip. + */ export function showHeadingIndicatorOnBlip(blip: number, toggle: boolean): void; /** - * Highlights a blip by a cyan color circle. - * Color can be changed with SET_BLIP_SECONDARY_COLOUR - */ + * Highlights a blip by a cyan color circle. + * Color can be changed with SET_BLIP_SECONDARY_COLOUR + */ export function showOutlineIndicatorOnBlip(blip: number, toggle: boolean): void; /** - * Highlights a blip by a half cyan circle on the right side of the blip. https://i.imgur.com/FrV9M4e.png - * .Indicating that that player is a friend (in GTA:O). This color can not be changed. - * @param blip `SHOW_CREW_INDICATOR_ON_BLIP` - */ + * Highlights a blip by a half cyan circle on the right side of the blip. https://i.imgur.com/FrV9M4e.png + * .Indicating that that player is a friend (in GTA:O). This color can not be changed. + * To toggle the left side (crew member indicator) of the half circle around the blip, use: `SHOW_CREW_INDICATOR_ON_BLIP` + */ export function showFriendIndicatorOnBlip(blip: number, toggle: boolean): void; /** - * Enables or disables the blue half circle https://i.imgur.com/iZes9Ec.png around the specified blip on the left side of the blip. This is used to indicate that the player is in your crew in GTA:O. Color is changeable by using `SET_BLIP_SECONDARY_COLOUR`. - */ + * Enables or disables the blue half circle https://i.imgur.com/iZes9Ec.png around the specified blip on the left side of the blip. This is used to indicate that the player is in your crew in GTA:O. Color is changeable by using `SET_BLIP_SECONDARY_COLOUR`. + */ export function showCrewIndicatorOnBlip(blip: number, toggle: boolean): void; /** - * Must be toggled before being queued for animation - */ + * Must be toggled before being queued for animation + */ export function setBlipExtendedHeightThreshold(blip: number, toggle: boolean): void; export function setBlipShortHeightThreshold(p0: any, p1: any): void; @@ -6591,25 +7131,25 @@ declare module "natives" { export function setBlipUseHeightIndicatorOnEdge(blip: number, p1: any): void; /** - * Makes a blip go small when off the minimap. - */ + * Makes a blip go small when off the minimap. + */ export function setBlipAsMinimalOnEdge(blip: number, toggle: boolean): void; /** - * Enabling this on a radius blip will make it outline only. See https://cdn.discordapp.com/attachments/553235301632573459/575132227935928330/unknown.png - */ + * Enabling this on a radius blip will make it outline only. See https://cdn.discordapp.com/attachments/553235301632573459/575132227935928330/unknown.png + */ export function setRadiusBlipEdge(blip: number, toggle: boolean): void; export function doesBlipExist(blip: number): boolean; /** - * This native removes the current waypoint from the map. - * Example: - * C#: - * Function.Call(Hash.SET_WAYPOINT_OFF); - * C++: - * HUD::SET_WAYPOINT_OFF(); - */ + * This native removes the current waypoint from the map. + * Example: + * C#: + * Function.Call(Hash.SET_WAYPOINT_OFF); + * C++: + * HUD::SET_WAYPOINT_OFF(); + */ export function setWaypointOff(): void; export function deleteWaypointsFromThisPlayer(): void; @@ -6623,14 +7163,14 @@ declare module "natives" { export function setBlipBright(blip: number, toggle: boolean): void; /** - * As of b2189, the third parameter sets the color of the cone (before b2189 it was ignored). Note that it uses HUD colors, not blip colors. - */ + * As of b2189, the third parameter sets the color of the cone (before b2189 it was ignored). Note that it uses HUD colors, not blip colors. + */ export function setBlipShowCone(blip: number, toggle: boolean, hudColorIndex: number): void; /** - * Interesting fact: A hash collision for this is RESET_JETPACK_MODEL_SETTINGS - */ - export function removeCopBlipFromPed(ped: Player | number): void; + * Interesting fact: A hash collision for this is RESET_JETPACK_MODEL_SETTINGS + */ + export function removeCopBlipFromPed(ped: Ped | Player | number): void; export function setupFakeConeData(blip: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number, p7: any, p8: number): void; @@ -6639,9 +7179,14 @@ declare module "natives" { export function clearFakeConeArray(): void; /** - * This native is used to colorize certain map components like the army base at the top of the map. - * @param overrideColor appears to be always -1. If p2 is -1 then native wouldn't change the color. See https://gfycat.com/SkinnyPinkChupacabra - */ + * Applies to new eBlipParams _BLIP_CHANGE_46* and _BLIP_CHANGE_47* + */ + export function setBlipGpsRouteDisplayDistance(blip: number, blipChangeParam46: number, blipChangeParam47: boolean): void; + + /** + * This native is used to colorize certain map components like the army base at the top of the map. + * p2 appears to be always -1. If p2 is -1 then native wouldn't change the color. See https://gfycat.com/SkinnyPinkChupacabra + */ export function setMinimapComponent(componentId: number, toggle: boolean, overrideColor: number): boolean; export function setMinimapSonarSweep(toggle: boolean): void; @@ -6655,9 +7200,9 @@ declare module "natives" { export function hideLoadingOnFadeThisFrame(): void; /** - * List of interior hashes: https://pastebin.com/1FUyXNqY - * Not for every interior zoom > 0 available. - */ + * List of interior hashes: https://pastebin.com/1FUyXNqY + * Not for every interior zoom > 0 available. + */ export function setRadarAsInteriorThisFrame(interior: number, x: number, y: number, z: number, zoom: number): void; export function setInsideVerySmallInterior(toggle: boolean): void; @@ -6667,14 +7212,14 @@ declare module "natives" { export function setRadarAsExteriorThisFrame(): void; /** - * Sets the position of the arrow icon representing the player on both the minimap and world map. - * Too bad this wouldn't work over the network (obviously not). Could spoof where we would be. - */ + * Sets the position of the arrow icon representing the player on both the minimap and world map. + * Too bad this wouldn't work over the network (obviously not). Could spoof where we would be. + */ export function setFakePausemapPlayerPositionThisFrame(x: number, y: number): void; /** - * @param p2 maybe z float? - */ + * p2 maybe z float? + */ export function setFakeGpsPlayerPositionThisFrame(x: number, y: number, p2: any): void; export function isPausemapInInteriorMode(): boolean; @@ -6684,13 +7229,15 @@ declare module "natives" { export function hideMinimapInteriorMapThisFrame(): void; /** - * Toggles the Cayo Perico map. - */ + * Toggles the Cayo Perico map. + */ export function setUseIslandMap(toggle: boolean): void; + export function setPauseExteriorRenderingWhileInInterior(): void; + /** - * When calling this, the current frame will have the players "arrow icon" be focused on the dead center of the radar. - */ + * When calling this, the current frame will have the players "arrow icon" be focused on the dead center of the radar. + */ export function dontTiltMinimapThisFrame(): void; export function dontZoomMinimapWhenRunningThisFrame(): void; @@ -6702,37 +7249,37 @@ declare module "natives" { export function displayAreaName(toggle: boolean): void; /** - * "DISPLAY_CASH(false);" makes the cash amount render on the screen when appropriate - * "DISPLAY_CASH(true);" disables cash amount rendering - */ + * "DISPLAY_CASH(false);" makes the cash amount render on the screen when appropriate + * "DISPLAY_CASH(true);" disables cash amount rendering + */ export function displayCash(toggle: boolean): void; /** - * Related to displaying cash on the HUD - * Always called before HUD::CHANGE_FAKE_MP_CASH in decompiled scripts - */ + * Related to displaying cash on the HUD + * Always called before HUD::CHANGE_FAKE_MP_CASH in decompiled scripts + */ export function useFakeMpCash(toggle: boolean): void; /** - * Displays cash change notifications on HUD. - */ + * Displays cash change notifications on HUD. + */ export function changeFakeMpCash(cash: number, bank: number): void; export function displayAmmoThisFrame(display: boolean): void; /** - * Displays the crosshair for this frame. - */ + * Displays the crosshair for this frame. + */ export function displaySniperScopeThisFrame(): void; /** - * Hides HUD and radar this frame and prohibits switching to other weapons (or accessing the weapon wheel) - */ + * Hides HUD and radar this frame and prohibits switching to other weapons (or accessing the weapon wheel) + */ export function hideHudAndRadarThisFrame(): void; /** - * Controls whether to display 'Cash'/'Bank' next to the money balance HUD in Multiplayer (https://i.imgur.com/MiYUtNl.png) - */ + * Controls whether to display 'Cash'/'Bank' next to the money balance HUD in Multiplayer (https://i.imgur.com/MiYUtNl.png) + */ export function allowDisplayOfMultiplayerCashText(allow: boolean): void; export function setMultiplayerWalletCash(): void; @@ -6744,13 +7291,13 @@ declare module "natives" { export function removeMultiplayerBankCash(): void; /** - * This native does absolutely nothing, just a nullsub - */ + * This native does absolutely nothing, just a nullsub + */ export function setMultiplayerHudCash(p0: number, p1: boolean): void; /** - * Removes multiplayer cash hud each frame - */ + * Removes multiplayer cash hud each frame + */ export function removeMultiplayerHudCash(): void; export function hideHelpTextThisFrame(): void; @@ -6758,105 +7305,105 @@ declare module "natives" { export function isImeInProgress(): boolean; /** - * The messages are localized strings. - * Examples: - * "No_bus_money" - * "Enter_bus" - * "Tour_help" - * "LETTERS_HELP2" - * "Dummy" - * **The bool appears to always be false (if it even is a bool, as it's represented by a zero)** - * -------- - * picture of where on the screen this is displayed? - * @param p1 doesn't seem to make a difference, regardless of the state it's in. - */ - export function displayHelpTextThisFrame(message: string | null, p1: boolean): void; + * The messages are localized strings. + * Examples: + * "No_bus_money" + * "Enter_bus" + * "Tour_help" + * "LETTERS_HELP2" + * "Dummy" + * **The bool appears to always be false (if it even is a bool, as it's represented by a zero)** + * -------- + * p1 doesn't seem to make a difference, regardless of the state it's in. + * picture of where on the screen this is displayed? + */ + export function displayHelpTextThisFrame(message: string, p1: boolean): void; /** - * Forces the weapon wheel to show/hide. - */ + * Forces the weapon wheel to show/hide. + */ export function hudForceWeaponWheel(show: boolean): void; /** - * Displays "blazer_wheels_up" and "blazer_wheels_down" "weapon" icons when switching between jetski and quadbike modes. Works only on vehicles using "VEHICLE_TYPE_AMPHIBIOUS_QUADBIKE" vehicle type. Needs to be called every time prior to switching modes, otherwise the icon will only appear when switching modes once. - */ + * Displays "blazer_wheels_up" and "blazer_wheels_down" "weapon" icons when switching between jetski and quadbike modes. Works only on vehicles using "VEHICLE_TYPE_AMPHIBIOUS_QUADBIKE" vehicle type. Needs to be called every time prior to switching modes, otherwise the icon will only appear when switching modes once. + */ export function hudForceSpecialVehicleWeaponWheel(): void; /** - * Calling this each frame, stops the player from receiving a weapon via the weapon wheel. - */ + * Calling this each frame, stops the player from receiving a weapon via the weapon wheel. + */ export function hudSuppressWeaponWheelResultsThisFrame(): void; /** - * Returns the weapon hash to the selected/highlighted weapon in the wheel - */ + * Returns the weapon hash to the selected/highlighted weapon in the wheel + */ export function hudGetWeaponWheelCurrentlyHighlighted(): number; /** - * Set the active slotIndex in the wheel weapon to the slot associated with the provided Weapon hash - */ + * Set the active slotIndex in the wheel weapon to the slot associated with the provided Weapon hash + */ export function hudSetWeaponWheelTopSlot(weaponHash: number): void; /** - * Returns the weapon hash active in a specific weapon wheel slotList - */ + * Returns the weapon hash active in a specific weapon wheel slotList + */ export function hudGetWeaponWheelTopSlot(weaponTypeIndex: number): number; /** - * Sets a global that disables many weapon input tasks (shooting, aiming, etc.). Does not work with vehicle weapons, only used in selector.ysc - */ + * Sets a global that disables many weapon input tasks (shooting, aiming, etc.). Does not work with vehicle weapons, only used in selector.ysc + */ export function hudShowingCharacterSwitchSelection(toggle: boolean): void; /** - * Only the script that originally called SET_GPS_FLAGS can set them again. Another script cannot set the flags, until the first script that called it has called CLEAR_GPS_FLAGS. - * Doesn't seem like the flags are actually read by the game at all. - */ + * Only the script that originally called SET_GPS_FLAGS can set them again. Another script cannot set the flags, until the first script that called it has called CLEAR_GPS_FLAGS. + * Doesn't seem like the flags are actually read by the game at all. + */ export function setGpsFlags(p0: number, p1: number): void; /** - * Clears the GPS flags. Only the script that originally called SET_GPS_FLAGS can clear them. - * Doesn't seem like the flags are actually read by the game at all. - */ + * Clears the GPS flags. Only the script that originally called SET_GPS_FLAGS can clear them. + * Doesn't seem like the flags are actually read by the game at all. + */ export function clearGpsFlags(): void; export function setRaceTrackRender(toggle: boolean): void; /** - * Does the same as SET_RACE_TRACK_RENDER(false); - */ + * Does the same as SET_RACE_TRACK_RENDER(false); + */ export function clearGpsRaceTrack(): void; /** - * Starts a new GPS custom-route, allowing you to plot lines on the map. - * Lines are drawn directly between points. - * The GPS custom route works like the GPS multi route, except it does not follow roads. - * Example result: https://i.imgur.com/BDm5pzt.png - * @param hudColor The HUD color of the GPS path. - * @param displayOnFoot Draws the path regardless if the player is in a vehicle or not. - * @param followPlayer Draw the path partially between the previous and next point based on the players position between them. When false, the GPS appears to not disappear after the last leg is completed. - */ + * Starts a new GPS custom-route, allowing you to plot lines on the map. + * Lines are drawn directly between points. + * The GPS custom route works like the GPS multi route, except it does not follow roads. + * Example result: https://i.imgur.com/BDm5pzt.png + * hudColor: The HUD color of the GPS path. + * displayOnFoot: Draws the path regardless if the player is in a vehicle or not. + * followPlayer: Draw the path partially between the previous and next point based on the players position between them. When false, the GPS appears to not disappear after the last leg is completed. + */ export function startGpsCustomRoute(hudColor: number, displayOnFoot: boolean, followPlayer: boolean): void; export function addPointToGpsCustomRoute(x: number, y: number, z: number): void; /** - * @param radarThickness The width of the GPS route on the radar - * @param mapThickness The width of the GPS route on the map - */ + * radarThickness: The width of the GPS route on the radar + * mapThickness: The width of the GPS route on the map + */ export function setGpsCustomRouteRender(toggle: boolean, radarThickness: number, mapThickness: number): void; export function clearGpsCustomRoute(): void; /** - * Starts a new GPS multi-route, allowing you to create custom GPS paths. - * GPS functions like the waypoint, except it can contain multiple points it's forced to go through. - * Once the player has passed a point, the GPS will no longer force its path through it. - * Works independently from the player-placed waypoint and blip routes. - * Example result: https://i.imgur.com/ZZHQatX.png - * @param hudColor The HUD color of the GPS path. - * @param routeFromPlayer Makes the GPS draw a path from the player to the next point, rather than the original path from the previous point. - * @param displayOnFoot Draws the GPS path regardless if the player is in a vehicle or not. - */ + * Starts a new GPS multi-route, allowing you to create custom GPS paths. + * GPS functions like the waypoint, except it can contain multiple points it's forced to go through. + * Once the player has passed a point, the GPS will no longer force its path through it. + * Works independently from the player-placed waypoint and blip routes. + * Example result: https://i.imgur.com/ZZHQatX.png + * hudColor: The HUD color of the GPS path. + * routeFromPlayer: Makes the GPS draw a path from the player to the next point, rather than the original path from the previous point. + * displayOnFoot: Draws the GPS path regardless if the player is in a vehicle or not. + */ export function startGpsMultiRoute(hudColor: number, routeFromPlayer: boolean, displayOnFoot: boolean): void; export function addPointToGpsMultiRoute(x: number, y: number, z: number): void; @@ -6864,8 +7411,8 @@ declare module "natives" { export function setGpsMultiRouteRender(toggle: boolean): void; /** - * Does the same as SET_GPS_MULTI_ROUTE_RENDER(false); - */ + * Does the same as SET_GPS_MULTI_ROUTE_RENDER(false); + */ export function clearGpsMultiRoute(): void; export function clearGpsPlayerWaypoint(): void; @@ -6875,34 +7422,34 @@ declare module "natives" { export function setPlayerIconColour(color: number): void; /** - * adds a short flash to the Radar/Minimap - * Usage: UI.FLASH_MINIMAP_DISPLAY - */ + * adds a short flash to the Radar/Minimap + * Usage: UI.FLASH_MINIMAP_DISPLAY + */ export function flashMinimapDisplay(): void; export function flashMinimapDisplayWithColor(hudColorIndex: number): void; export function toggleStealthRadar(toggle: boolean): void; - export function setMinimapInSpectatorMode(toggle: boolean, ped: Player | number): void; + export function setMinimapInSpectatorMode(toggle: boolean, ped: Ped | Player | number): void; - export function setMissionName(p0: boolean, name: string | null): void; + export function setMissionName(p0: boolean, name: string): void; - export function setMissionNameForUgcMission(p0: boolean, name: string | null): void; + export function setMissionNameForUgcMission(p0: boolean, name: string): void; - export function setDescriptionForUgcMissionEightStrings(p0: boolean, p1: string | null, p2: string | null, p3: string | null, p4: string | null, p5: string | null, p6: string | null, p7: string | null, p8: string | null): void; + export function setDescriptionForUgcMissionEightStrings(p0: boolean, p1: string, p2: string, p3: string, p4: string, p5: string, p6: string, p7: string, p8: string): void; export function setMinimapBlockWaypoint(toggle: boolean): void; /** - * Toggles the North Yankton map - */ + * Toggles the North Yankton map + */ export function setMinimapInPrologue(toggle: boolean): void; /** - * If true, the entire map will be revealed. - * FOW = Fog of War - */ + * If true, the entire map will be revealed. + * FOW = Fog of War + */ export function setMinimapHideFow(toggle: boolean): void; export function getMinimapFowDiscoveryRatio(): number; @@ -6912,39 +7459,39 @@ declare module "natives" { export function setMinimapFowDoNotUpdate(p0: boolean): void; /** - * Up to eight coordinates may be revealed per frame - */ + * Up to eight coordinates may be revealed per frame + */ export function setMinimapFowRevealCoordinate(x: number, y: number, z: number): void; /** - * Not much is known so far on what it does _exactly_. - * All I know for sure is that it draws the specified hole ID on the pause menu map as well as on the mini-map/radar. This native also seems to change some other things related to the pause menu map's behaviour, for example: you can no longer set waypoints, the pause menu map starts up in a 'zoomed in' state. This native does not need to be executed every tick. - * You need to center the minimap manually as well as change/lock it's zoom and angle in order for it to appear correctly on the minimap. - * You'll also need to use the `GOLF` scaleform in order to get the correct minmap border to show up. - * Use `0x35edd5b2e3ff01c0` to reset the map when you no longer want to display any golf holes (you still need to unlock zoom, position and angle of the radar manually after calling this). - */ + * Not much is known so far on what it does _exactly_. + * All I know for sure is that it draws the specified hole ID on the pause menu map as well as on the mini-map/radar. This native also seems to change some other things related to the pause menu map's behaviour, for example: you can no longer set waypoints, the pause menu map starts up in a 'zoomed in' state. This native does not need to be executed every tick. + * You need to center the minimap manually as well as change/lock it's zoom and angle in order for it to appear correctly on the minimap. + * You'll also need to use the `GOLF` scaleform in order to get the correct minmap border to show up. + * Use `0x35edd5b2e3ff01c0` to reset the map when you no longer want to display any golf holes (you still need to unlock zoom, position and angle of the radar manually after calling this). + */ export function setMinimapGolfCourse(hole: number): void; export function setMinimapGolfCourseOff(): void; /** - * Locks the minimap to the specified angle in integer degrees. - * @param angle The angle in whole degrees. If less than 0 or greater than 360, unlocks the angle. - */ + * Locks the minimap to the specified angle in integer degrees. + * angle: The angle in whole degrees. If less than 0 or greater than 360, unlocks the angle. + */ export function lockMinimapAngle(angle: number): void; export function unlockMinimapAngle(): void; /** - * Locks the minimap to the specified world position. - */ + * Locks the minimap to the specified world position. + */ export function lockMinimapPosition(x: number, y: number): void; export function unlockMinimapPosition(): void; /** - * Argument must be 0.0f or above 38.0f, or it will be ignored. - */ + * Argument must be 0.0f or above 38.0f, or it will be ignored. + */ export function setFakeMinimapMaxAltimeterHeight(altitude: number, p1: boolean, p2: any): void; export function setHealthHudDisplayValues(health: number, capacity: number, wasAdded: boolean): void; @@ -6954,22 +7501,37 @@ declare module "natives" { export function setMaxArmourHudDisplay(maximumValue: number): void; /** - * Toggles the big minimap state like in GTA:Online. - */ + * Toggles the big minimap state like in GTA:Online. + */ export function setBigmapActive(toggleBigMap: boolean, showFullMap: boolean): void; /** - * Full list of components below - * HUD = 0; - * HUD_WANTED_STARS = 1; - * HUD_WEAPON_ICON = 2; - * HUD_CASH = 3; - * HUD_MP_CASH = 4; - * HUD_MP_MESSAGE = 5; - * HUD_VEHICLE_NAME = 6; - * HUD_AREA_NAME = 7; - * See NativeDB for reference: http://natives.altv.mp/#/0xBC4C9EA5391ECC0D - */ + * Full list of components below + * HUD = 0; + * HUD_WANTED_STARS = 1; + * HUD_WEAPON_ICON = 2; + * HUD_CASH = 3; + * HUD_MP_CASH = 4; + * HUD_MP_MESSAGE = 5; + * HUD_VEHICLE_NAME = 6; + * HUD_AREA_NAME = 7; + * HUD_VEHICLE_CLASS = 8; + * HUD_STREET_NAME = 9; + * HUD_HELP_TEXT = 10; + * HUD_FLOATING_HELP_TEXT_1 = 11; + * HUD_FLOATING_HELP_TEXT_2 = 12; + * HUD_CASH_CHANGE = 13; + * HUD_RETICLE = 14; + * HUD_SUBTITLE_TEXT = 15; + * HUD_RADIO_STATIONS = 16; + * HUD_SAVING_GAME = 17; + * HUD_GAME_STREAM = 18; + * HUD_WEAPON_WHEEL = 19; + * HUD_WEAPON_WHEEL_STATS = 20; + * MAX_HUD_COMPONENTS = 21; + * MAX_HUD_WEAPONS = 22; + * MAX_SCRIPTED_HUD_COMPONENTS = 141; + */ export function isHudComponentActive(id: number): boolean; export function isScriptedHudComponentActive(id: number): boolean; @@ -6981,36 +7543,66 @@ declare module "natives" { export function isScriptedHudComponentHiddenThisFrame(id: number): boolean; /** - * This function hides various HUD (Heads-up Display) components. - * Listed below are the integers and the corresponding HUD component. - * - 1 : WANTED_STARS - * - 2 : WEAPON_ICON - * - 3 : CASH - * - 4 : MP_CASH - * - 5 : MP_MESSAGE - * - 6 : VEHICLE_NAME - * - 7 : AREA_NAME - * See NativeDB for reference: http://natives.altv.mp/#/0x6806C51AD12B83B8 - */ + * This function hides various HUD (Heads-up Display) components. + * Listed below are the integers and the corresponding HUD component. + * - 1 : WANTED_STARS + * - 2 : WEAPON_ICON + * - 3 : CASH + * - 4 : MP_CASH + * - 5 : MP_MESSAGE + * - 6 : VEHICLE_NAME + * - 7 : AREA_NAME + * - 8 : VEHICLE_CLASS + * - 9 : STREET_NAME + * - 10 : HELP_TEXT + * - 11 : FLOATING_HELP_TEXT_1 + * - 12 : FLOATING_HELP_TEXT_2 + * - 13 : CASH_CHANGE + * - 14 : RETICLE + * - 15 : SUBTITLE_TEXT + * - 16 : RADIO_STATIONS + * - 17 : SAVING_GAME + * - 18 : GAME_STREAM + * - 19 : WEAPON_WHEEL + * - 20 : WEAPON_WHEEL_STATS + * - 21 : HUD_COMPONENTS + * - 22 : HUD_WEAPONS + * These integers also work for the `SHOW_HUD_COMPONENT_THIS_FRAME` native, but instead shows the HUD Component. + */ export function hideHudComponentThisFrame(id: number): void; /** - * This function hides various HUD (Heads-up Display) components. - * Listed below are the integers and the corresponding HUD component. - * - 1 : WANTED_STARS - * - 2 : WEAPON_ICON - * - 3 : CASH - * - 4 : MP_CASH - * - 5 : MP_MESSAGE - * - 6 : VEHICLE_NAME - * - 7 : AREA_NAME - * See NativeDB for reference: http://natives.altv.mp/#/0x0B4DF1FA60C0E664 - */ + * This function hides various HUD (Heads-up Display) components. + * Listed below are the integers and the corresponding HUD component. + * - 1 : WANTED_STARS + * - 2 : WEAPON_ICON + * - 3 : CASH + * - 4 : MP_CASH + * - 5 : MP_MESSAGE + * - 6 : VEHICLE_NAME + * - 7 : AREA_NAME + * - 8 : VEHICLE_CLASS + * - 9 : STREET_NAME + * - 10 : HELP_TEXT + * - 11 : FLOATING_HELP_TEXT_1 + * - 12 : FLOATING_HELP_TEXT_2 + * - 13 : CASH_CHANGE + * - 14 : RETICLE + * - 15 : SUBTITLE_TEXT + * - 16 : RADIO_STATIONS + * - 17 : SAVING_GAME + * - 18 : GAME_STREAM + * - 19 : WEAPON_WHEEL + * - 20 : WEAPON_WHEEL_STATS + * - 21 : HUD_COMPONENTS + * - 22 : HUD_WEAPONS + * These integers also work for the `HIDE_HUD_COMPONENT_THIS_FRAME` native, but instead hides the HUD Component. + */ export function showHudComponentThisFrame(id: number): void; /** - * Hides area and vehicle name HUD components for one frame. - */ + * Hides area and vehicle name HUD components for one frame. + */ export function hideStreetAndCarNamesThisFrame(): void; export function resetReticuleValues(): void; @@ -7022,18 +7614,18 @@ declare module "natives" { export function getHudComponentPosition(id: number): Vector3; /** - * This native does absolutely nothing, just a nullsub - */ + * This native does absolutely nothing, just a nullsub + */ export function clearReminderMessage(): void; /** - * World to relative screen coords, this world to screen will keep the text on screen. Was named _GET_SCREEN_COORD_FROM_WORLD_COORD, but this conflicts with 0x34E82F05DF2974F5. As that hash actually matches GET_SCREEN_COORD_FROM_WORLD_COORD that one supercedes and this one was renamed to _GET_2D_COORD_FROM_3D_COORD - */ + * World to relative screen coords, this world to screen will keep the text on screen. Was named _GET_SCREEN_COORD_FROM_WORLD_COORD, but this conflicts with 0x34E82F05DF2974F5. As that hash actually matches GET_SCREEN_COORD_FROM_WORLD_COORD that one supercedes and this one was renamed to _GET_2D_COORD_FROM_3D_COORD + */ export function getHudScreenPositionFromWorldPosition(worldX: number, worldY: number, worldZ: number, screenX?: number, screenY?: number): [number, number, number]; /** - * Shows a menu for reporting UGC content. - */ + * Shows a menu for reporting UGC content. + */ export function openReportugcMenu(): void; export function forceCloseReportugcMenu(): void; @@ -7053,16 +7645,16 @@ declare module "natives" { export function clearFloatingHelp(hudIndex: number, p1: boolean): void; /** - * @param clanFlag takes a number 0-5 - */ - export function createMpGamerTagWithCrewColor(player: Player | number, username: string | null, pointedClanTag: boolean, isRockstarClan: boolean, clanTag: string | null, clanFlag: number, r: number, g: number, b: number): void; + * clanFlag: takes a number 0-5 + */ + export function createMpGamerTagWithCrewColor(player: Player | number, username: string, pointedClanTag: boolean, isRockstarClan: boolean, clanTag: string, clanFlag: number, r: number, g: number, b: number): void; export function isMpGamerTagMovieActive(): boolean; /** - * @param clanFlag takes a number 0-5 - */ - export function createFakeMpGamerTag(ped: Player | number, username: string | null, pointedClanTag: boolean, isRockstarClan: boolean, clanTag: string | null, clanFlag: number): number; + * clanFlag: takes a number 0-5 + */ + export function createFakeMpGamerTag(ped: Ped | Player | number, username: string, pointedClanTag: boolean, isRockstarClan: boolean, clanTag: string, clanFlag: number): number; export function removeMpGamerTag(gamerTagId: number): void; @@ -7071,24 +7663,47 @@ declare module "natives" { export function isMpGamerTagFree(gamerTagId: number): boolean; /** - * enum eMpGamerTagComponent - * { - * MP_TAG_GAMER_NAME, - * MP_TAG_CREW_TAG, - * MP_TAG_HEALTH_ARMOUR, - * MP_TAG_BIG_TEXT, - * MP_TAG_AUDIO_ICON, - * MP_TAG_USING_MENU, - * MP_TAG_PASSIVE_MODE, - * See NativeDB for reference: http://natives.altv.mp/#/0x63BB75ABEDC1F6A0 - */ + * enum eMpGamerTagComponent + * { + * MP_TAG_GAMER_NAME, + * MP_TAG_CREW_TAG, + * MP_TAG_HEALTH_ARMOUR, + * MP_TAG_BIG_TEXT, + * MP_TAG_AUDIO_ICON, + * MP_TAG_USING_MENU, + * MP_TAG_PASSIVE_MODE, + * MP_TAG_WANTED_STARS, + * MP_TAG_DRIVER, + * MP_TAG_CO_DRIVER, + * MP_TAG_TAGGED, + * MP_TAG_GAMER_NAME_NEARBY, + * MP_TAG_ARROW, + * MP_TAG_PACKAGES, + * MP_TAG_INV_IF_PED_FOLLOWING, + * MP_TAG_RANK_TEXT, + * MP_TAG_TYPING, + * MP_TAG_BAG_LARGE, + * MP_TAG_ARROW, + * MP_TAG_GANG_CEO, + * MP_TAG_GANG_BIKER, + * MP_TAG_BIKER_ARROW, + * MP_TAG_MC_ROLE_PRESIDENT, + * MP_TAG_MC_ROLE_VICE_PRESIDENT, + * MP_TAG_MC_ROLE_ROAD_CAPTAIN, + * MP_TAG_MC_ROLE_SARGEANT, + * MP_TAG_MC_ROLE_ENFORCER, + * MP_TAG_MC_ROLE_PROSPECT, + * MP_TAG_TRANSMITTER, + * MP_TAG_BOMB + * }; + */ export function setMpGamerTagVisibility(gamerTagId: number, component: number, toggle: boolean, p3: any): void; export function setAllMpGamerTagsVisibility(gamerTagId: number, toggle: boolean): void; /** - * Displays a bunch of icons above the players name, and level, and their name twice - */ + * Displays a bunch of icons above the players name, and level, and their name twice + */ export function setMpGamerTagsShouldUseVehicleHealth(gamerTagId: number, toggle: boolean): void; export function setMpGamerTagsShouldUsePointsHealth(gamerTagId: number, toggle: boolean): void; @@ -7096,52 +7711,52 @@ declare module "natives" { export function setMpGamerTagsPointHealth(gamerTagId: number, value: number, maximumValue: number): void; /** - * Sets a gamer tag's component colour - * Ranges from 0 to 255. 0 is grey health bar, ~50 yellow, 200 purple. - * @param gamerTagId is obtained using for example CREATE_FAKE_MP_GAMER_TAG - */ + * Sets a gamer tag's component colour + * gamerTagId is obtained using for example CREATE_FAKE_MP_GAMER_TAG + * Ranges from 0 to 255. 0 is grey health bar, ~50 yellow, 200 purple. + */ export function setMpGamerTagColour(gamerTagId: number, component: number, hudColorIndex: number): void; /** - * Ranges from 0 to 255. 0 is grey health bar, ~50 yellow, 200 purple. - * Should be enabled as flag (2). Has 0 opacity by default. - * - This was _SET_MP_GAMER_TAG_HEALTH_BAR_COLOR, - * -> Rockstar use the EU spelling of 'color' so I hashed the same name with COLOUR and it came back as the correct hash, so it has been corrected above. - */ + * Ranges from 0 to 255. 0 is grey health bar, ~50 yellow, 200 purple. + * Should be enabled as flag (2). Has 0 opacity by default. + * - This was _SET_MP_GAMER_TAG_HEALTH_BAR_COLOR, + * -> Rockstar use the EU spelling of 'color' so I hashed the same name with COLOUR and it came back as the correct hash, so it has been corrected above. + */ export function setMpGamerTagHealthBarColour(gamerTagId: number, hudColorIndex: number): void; /** - * Sets flag's sprite transparency. 0-255. - */ + * Sets flag's sprite transparency. 0-255. + */ export function setMpGamerTagAlpha(gamerTagId: number, component: number, alpha: number): void; /** - * displays wanted star above head - */ + * displays wanted star above head + */ export function setMpGamerTagWantedLevel(gamerTagId: number, wantedlvl: number): void; export function setMpGamerTagNumPackages(gamerTagId: number, p1: number): void; - export function setMpGamerTagName(gamerTagId: number, string: string | null): void; + export function setMpGamerTagName(gamerTagId: number, string: string): void; export function isUpdatingMpGamerTagNameAndCrewDetails(gamerTagId: number): boolean; - export function setMpGamerTagBigText(gamerTagId: number, string: string | null): void; + export function setMpGamerTagBigText(gamerTagId: number, string: string): void; export function getCurrentWebpageId(): number; export function getCurrentWebsiteId(): number; /** - * Returns the ActionScript flagValue. - * ActionScript flags are global flags that scaleforms use - * Flags found during testing - * 1: Returns 1 if the player has clicked back twice on the opening page, otherwise 0 (web_browser) - * 2: Returns how many links the player has clicked in the web_browser scaleform, returns 0 when the browser gets closed - * 9: Returns the current selection on the mobile phone scaleform - * There are 20 flags in total. - * @returns 0: Returns 1 if the web_browser keyboard is open, otherwise 0 - */ + * Returns the ActionScript flagValue. + * ActionScript flags are global flags that scaleforms use + * Flags found during testing + * 0: Returns 1 if the web_browser keyboard is open, otherwise 0 + * 1: Returns 1 if the player has clicked back twice on the opening page, otherwise 0 (web_browser) + * 2: Returns how many links the player has clicked in the web_browser scaleform, returns 0 when the browser gets closed + * 9: Returns the current selection on the mobile phone scaleform + * There are 20 flags in total. + */ export function getGlobalActionscriptFlag(flagIndex: number): number; export function resetGlobalActionscriptFlag(flagIndex: number): void; @@ -7149,70 +7764,109 @@ declare module "natives" { export function isWarningMessageReadyForControl(): boolean; /** - * You can only use text entries. No custom text. - * Example: SET_WARNING_MESSAGE("t20", 3, "adder", false, -1, 0, 0, true); - * @param errorCode shows an error code at the bottom left if nonzero - */ - export function setWarningMessage(titleMsg: string | null, flags: number, promptMsg: string | null, p3: boolean, p4: number, p5: string | null, p6: string | null, showBackground: boolean, errorCode: number): void; - - /** - * Shows a warning message on screen with a header. - * Note: You can only use text entries. No custom text. You can recreate this easily with scaleforms. - * Example: https://i.imgur.com/ITJt8bJ.png - */ - export function setWarningMessageWithHeader(entryHeader: string | null, entryLine1: string | null, instructionalKey: number, entryLine2: string | null, p4: boolean, p5: any, showBackground: any | null, p7: any | null, p8: boolean, p9: any): [void, any, any]; - - /** - * You can use this native for custom input, without having to use any scaleform-related natives. - * The native must be called on tick. - * The entryHeader must be a valid label. - * For Single lines use JL_INVITE_N as entryLine1, JL_INVITE_ND for multiple. - * Notes: - * - additionalIntInfo: replaces first occurrence of ~1~ in provided label with an integer - * - additionalTextInfoLine1: replaces first occurrence of ~a~ in provided label, with your custom text - * - additionalTextInfoLine2: replaces second occurrence of ~a~ in provided label, with your custom text - * - showBackground: shows black background of the warning screen - * See NativeDB for reference: http://natives.altv.mp/#/0x701919482C74B5AB - */ - export function setWarningMessageWithHeaderAndSubstringFlags(entryHeader: string | null, entryLine1: string | null, instructionalKey: number, entryLine2: string | null, p4: boolean, p5: any, additionalIntInfo: any, additionalTextInfoLine1: string | null, additionalTextInfoLine2: string | null, showBackground: boolean, errorCode: number): void; - - export function setWarningMessageWithHeaderExtended(entryHeader: string | null, entryLine1: string | null, flags: number, entryLine2: string | null, p4: boolean, p5: any, p6: any | null, p7: any | null, showBg: boolean, p9: any, p10: any): [void, any, any]; - - /** - * labelMsg: Label of the alert's message. - * labelMsg2: Label of another message line - * instructionalKey enum list: - * Buttons = { - * Empty = 0, - * Select = 1, -- (RETURN) - * Ok = 2, -- (RETURN) - * Yes = 4, -- (RETURN) - * Back = 8, -- (ESC) - * See NativeDB for reference: http://natives.altv.mp/#/0x15803FEC3B9A872B - * @param labelTitle Label of the alert's title. - * @param p2 This is an enum, check the description for a list. - * @param p3 This is an enum, check the description for a list. - * @param p5 usually 0 - * @param p6 usually -1 - * @param p7 usually 0 - * @param p8 unknown label - * @param p9 unknown label - * @param background Set to anything other than 0 or false (even any string) and it will draw a background. Setting it to 0 or false will draw no background. - * @param errorCode Error code, shown at the bottom left if set to value other than 0. - */ - export function setWarningMessageWithHeaderAndSubstringFlagsExtended(labelTitle: string | null, labelMessage: string | null, p2: number, p3: number, labelMessage2: string | null, p5: boolean, p6: number, p7: number, p8: string | null, p9: string | null, background: boolean, errorCode: number): void; - - /** - * Has to do with the confirmation overlay (E.g. confirm exit) - */ + * You can only use text entries. No custom text. + * Example: SET_WARNING_MESSAGE("t20", 3, "adder", false, -1, 0, 0, true); + * errorCode: shows an error code at the bottom left if nonzero + */ + export function setWarningMessage(titleMsg: string, flags: number, promptMsg: string, p3: boolean, p4: number, p5: string, p6: string, showBackground: boolean, errorCode: number): void; + + /** + * Shows a warning message on screen with a header. + * Note: You can only use text entries. No custom text. You can recreate this easily with scaleforms. + * Example: https://i.imgur.com/ITJt8bJ.png + */ + export function setWarningMessageWithHeader(entryHeader: string, entryLine1: string, instructionalKey: number, entryLine2: string, p4: boolean, p5: any, showBackground: any, p7: any, p8: boolean, p9: any): [void, any, any]; + + /** + * You can use this native for custom input, without having to use any scaleform-related natives. + * The native must be called on tick. + * The entryHeader must be a valid label. + * For Single lines use JL_INVITE_N as entryLine1, JL_INVITE_ND for multiple. + * Notes: + * - additionalIntInfo: replaces first occurrence of ~1~ in provided label with an integer + * - additionalTextInfoLine1: replaces first occurrence of ~a~ in provided label, with your custom text + * - additionalTextInfoLine2: replaces second occurrence of ~a~ in provided label, with your custom text + * - showBackground: shows black background of the warning screen + * - errorCode: shows an error code at the bottom left if nonzero + * Example of usage: + * SET_WARNING_MESSAGE_WITH_HEADER_AND_SUBSTRING_FLAGS("ALERT", "JL_INVITE_ND", 66, "", true, -1, -1, "Testing line 1", "Testing line 2", true, 0); + * Screenshot: + * https://imgur.com/a/IYA7vJ8 + */ + export function setWarningMessageWithHeaderAndSubstringFlags(entryHeader: string, entryLine1: string, instructionalKey: number, entryLine2: string, p4: boolean, p5: any, additionalIntInfo: any, additionalTextInfoLine1: string, additionalTextInfoLine2: string, showBackground: boolean, errorCode: number): void; + + export function setWarningMessageWithHeaderExtended(entryHeader: string, entryLine1: string, flags: number, entryLine2: string, p4: boolean, p5: any, p6: any, p7: any, showBg: boolean, p9: any, p10: any): [void, any, any]; + + /** + * labelTitle: Label of the alert's title. + * labelMsg: Label of the alert's message. + * p2: This is an enum, check the description for a list. + * p3: This is an enum, check the description for a list. + * labelMsg2: Label of another message line + * p5: usually 0 + * p6: usually -1 + * p7: usually 0 + * p8: unknown label + * p9: unknown label + * background: Set to anything other than 0 or false (even any string) and it will draw a background. Setting it to 0 or false will draw no background. + * errorCode: Error code, shown at the bottom left if set to value other than 0. + * instructionalKey enum list: + * Buttons = { + * Empty = 0, + * Select = 1, -- (RETURN) + * Ok = 2, -- (RETURN) + * Yes = 4, -- (RETURN) + * Back = 8, -- (ESC) + * Cancel = 16, -- (ESC) + * No = 32, -- (ESC) + * RetrySpace = 64, -- (SPACE) + * Restart = 128, -- (SPACE) + * Skip = 256, -- (SPACE) + * Quit = 512, -- (ESC) + * Adjust = 1024, -- (ARROWS) + * SpaceKey = 2048, -- (SPACE) + * Share = 4096, -- (SPACE) + * SignIn = 8192, -- (SPACE) + * Continue = 16384, -- (RETURN) + * AdjustLeftRight = 32768, -- (SCROLL L/R) + * AdjustUpDown = 65536, -- (SCROLL U/D) + * Overwrite = 131072, -- (SPACE) + * SocialClubSignup = 262144, -- (RETURN) + * Confirm = 524288, -- (RETURN) + * Queue = 1048576, -- (RETURN) + * RetryReturn = 2097152, -- (RETURN) + * BackEsc = 4194304, -- (ESC) + * SocialClub = 8388608, -- (RETURN) + * Spectate = 16777216, -- (SPACE) + * OkEsc = 33554432, -- (ESC) + * CancelTransfer = 67108864, -- (ESC) + * LoadingSpinner = 134217728, + * NoReturnToGTA = 268435456, -- (ESC) + * CancelEsc = 536870912, -- (ESC) + * } + * Alt = { + * Empty = 0, + * No = 1, -- (SPACE) + * Host = 2, -- (ESC) + * SearchForJob = 4, -- (RETURN) + * ReturnKey = 8, -- (TURN) + * Freemode = 16, -- (ESC) + * } + * Example: https://i.imgur.com/TvmNF4k.png + */ + export function setWarningMessageWithHeaderAndSubstringFlagsExtended(labelTitle: string, labelMessage: string, p2: number, p3: number, labelMessage2: string, p5: boolean, p6: number, p7: number, p8: string, p9: string, background: boolean, errorCode: number): void; + + /** + * Has to do with the confirmation overlay (E.g. confirm exit) + */ export function getWarningScreenMessageHash(): number; /** - * Some sort of list displayed in a warning message. Yet unknown how to prevent repeating. - * Param names copied from the corresponding scaleform function "SET_LIST_ROW". - * Example: https://i.imgur.com/arKvOYx.png - */ - export function setWarningMessageOptionItems(index: number, name: string | null, cash: number, rp: number, lvl: number, colour: number): boolean; + * Some sort of list displayed in a warning message. Yet unknown how to prevent repeating. + * Param names copied from the corresponding scaleform function "SET_LIST_ROW". + * Example: https://i.imgur.com/arKvOYx.png + */ + export function setWarningMessageOptionItems(index: number, name: string, cash: number, rp: number, lvl: number, colour: number): boolean; export function setWarningMessageOptionHighlight(p0: any): boolean; @@ -7223,71 +7877,100 @@ declare module "natives" { export function clearDynamicPauseMenuErrorMessage(): void; /** - * If toggle is true, the map is shown in full screen - * If toggle is false, the map is shown in normal mode - */ + * If toggle is true, the map is shown in full screen + * If toggle is false, the map is shown in normal mode + */ export function customMinimapSetActive(toggle: boolean): void; /** - * Sets the sprite of the next BLIP_GALLERY blip, values used in the native scripts: 143 (ObjectiveBlue), 144 (ObjectiveGreen), 145 (ObjectiveRed), 146 (ObjectiveYellow). - */ + * Sets the sprite of the next BLIP_GALLERY blip, values used in the native scripts: 143 (ObjectiveBlue), 144 (ObjectiveGreen), 145 (ObjectiveRed), 146 (ObjectiveYellow). + */ export function customMinimapSetBlipObject(spriteId: number): void; /** - * Add a BLIP_GALLERY at the specific coordinate. Used in fm_maintain_transition_players to display race track points. - */ + * Add a BLIP_GALLERY at the specific coordinate. Used in fm_maintain_transition_players to display race track points. + */ export function customMinimapCreateBlip(x: number, y: number, z: number): number; export function customMinimapClearBlips(): void; + /** + * Doesn't actually return anything. + */ export function forceSonarBlipsThisFrame(): boolean; export function getNorthBlidIndex(): number; /** - * Toggles whether or not name labels are shown on the expanded minimap next to player blips, like in GTA:O. - * Doesn't need to be called every frame. - * Preview: https://i.imgur.com/DfqKWfJ.png - * Make sure to call SET_BLIP_CATEGORY with index 7 for this to work on the desired blip. - */ + * Toggles whether or not name labels are shown on the expanded minimap next to player blips, like in GTA:O. + * Doesn't need to be called every frame. + * Preview: https://i.imgur.com/DfqKWfJ.png + * Make sure to call SET_BLIP_CATEGORY with index 7 for this to work on the desired blip. + */ export function displayPlayerNameTagsOnBlips(toggle: boolean): void; /** - * This native does absolutely nothing, just a nullsub - */ + * This native does absolutely nothing, just a nullsub + */ export function drawFrontendBackgroundThisFrame(): void; export function drawHudOverFadeThisFrame(): void; /** - * Does stuff like this: - * gyazo.com/7fcb78ea3520e3dbc5b2c0c0f3712617 - * Example: - * int GetHash = GET_HASH_KEY("fe_menu_version_corona_lobby"); - * ACTIVATE_FRONTEND_MENU(GetHash, 0, -1); - * BOOL p1 is a toggle to define the game in pause. - * int p2 is unknown but -1 always works, not sure why though. - * [30/03/2017] ins1de : - * the int p2 is actually a component variable. When the pause menu is visible, it opens the tab related to it. - * See NativeDB for reference: http://natives.altv.mp/#/0xEF01D36B9C9D0C7B - */ + * Does stuff like this: + * gyazo.com/7fcb78ea3520e3dbc5b2c0c0f3712617 + * Example: + * int GetHash = GET_HASH_KEY("fe_menu_version_corona_lobby"); + * ACTIVATE_FRONTEND_MENU(GetHash, 0, -1); + * BOOL p1 is a toggle to define the game in pause. + * int p2 is unknown but -1 always works, not sure why though. + * [30/03/2017] ins1de : + * the int p2 is actually a component variable. When the pause menu is visible, it opens the tab related to it. + * Example : Function.Call(Hash.ACTIVATE_FRONTEND_MENU,-1171018317, 0, 42); + * Result : Opens the "Online" tab without pausing the menu, with -1 it opens the map.Below is a list of all known Frontend Menu Hashes. + * - FE_MENU_VERSION_SP_PAUSE + * - FE_MENU_VERSION_MP_PAUSE + * - FE_MENU_VERSION_CREATOR_PAUSE + * - FE_MENU_VERSION_CUTSCENE_PAUSE + * - FE_MENU_VERSION_SAVEGAME + * - FE_MENU_VERSION_PRE_LOBBY + * - FE_MENU_VERSION_LOBBY + * - FE_MENU_VERSION_MP_CHARACTER_SELECT + * - FE_MENU_VERSION_MP_CHARACTER_CREATION + * - FE_MENU_VERSION_EMPTY + * - FE_MENU_VERSION_EMPTY_NO_BACKGROUND + * - FE_MENU_VERSION_TEXT_SELECTION + * - FE_MENU_VERSION_CORONA + * - FE_MENU_VERSION_CORONA_LOBBY + * - FE_MENU_VERSION_CORONA_JOINED_PLAYERS + * - FE_MENU_VERSION_CORONA_INVITE_PLAYERS + * - FE_MENU_VERSION_CORONA_INVITE_FRIENDS + * - FE_MENU_VERSION_CORONA_INVITE_CREWS + * - FE_MENU_VERSION_CORONA_INVITE_MATCHED_PLAYERS + * - FE_MENU_VERSION_CORONA_INVITE_LAST_JOB_PLAYERS + * - FE_MENU_VERSION_CORONA_RACE + * - FE_MENU_VERSION_CORONA_BETTING + * - FE_MENU_VERSION_JOINING_SCREEN + * - FE_MENU_VERSION_LANDING_MENU + * - FE_MENU_VERSION_LANDING_KEYMAPPING_MENU + */ export function activateFrontendMenu(menuhash: number, togglePause: boolean, component: number): void; /** - * Before using this native click the native above and look at the decription. - * Example: - * int GetHash = Function.Call(Hash.GET_HASH_KEY, "fe_menu_version_corona_lobby"); - * Function.Call(Hash.ACTIVATE_FRONTEND_MENU, GetHash, 0, -1); - * Function.Call(Hash.RESTART_FRONTEND_MENU(GetHash, -1); - * This native refreshes the frontend menu. - * p2 = Unknown but always works with -1. - * @param p1 = Hash of Menu - */ + * Before using this native click the native above and look at the decription. + * Example: + * int GetHash = Function.Call(Hash.GET_HASH_KEY, "fe_menu_version_corona_lobby"); + * Function.Call(Hash.ACTIVATE_FRONTEND_MENU, GetHash, 0, -1); + * Function.Call(Hash.RESTART_FRONTEND_MENU(GetHash, -1); + * This native refreshes the frontend menu. + * p1 = Hash of Menu + * p2 = Unknown but always works with -1. + */ export function restartFrontendMenu(menuHash: number, p1: number): void; /** - * if (HUD::GET_CURRENT_FRONTEND_MENU_VERSION() == joaat("fe_menu_version_empty_no_background")) - */ + * if (HUD::GET_CURRENT_FRONTEND_MENU_VERSION() == joaat("fe_menu_version_empty_no_background")) + */ export function getCurrentFrontendMenuVersion(): number; export function setPauseMenuActive(toggle: boolean): void; @@ -7297,8 +7980,8 @@ declare module "natives" { export function suppressFrontendRenderingThisFrame(): void; /** - * Allows opening the pause menu this frame, when the player is dead. - */ + * Allows opening the pause menu this frame, when the player is dead. + */ export function allowPauseWhenNotInStateOfPlayThisFrame(): void; export function setFrontendActive(active: boolean): void; @@ -7308,16 +7991,16 @@ declare module "natives" { export function isStorePendingNetworkShutdownToOpen(): boolean; /** - * Returns: - * 0 - * 5 - * 10 - * 15 - * 20 - * 25 - * 30 - * 35 - */ + * Returns: + * 0 + * 5 + * 10 + * 15 + * 20 + * 25 + * 30 + * 35 + */ export function getPauseMenuState(): number; export function getPauseMenuPosition(): Vector3; @@ -7325,10 +8008,10 @@ declare module "natives" { export function isPauseMenuRestarting(): boolean; /** - * Not present in retail version of the game, actual definiton seems to be - * _LOG_DEBUG_INFO(const char* category, const char* debugText); - */ - export function forceScriptedGfxWhenFrontendActive(p0: string | null): void; + * Not present in retail version of the game, actual definiton seems to be + * _LOG_DEBUG_INFO(const char* category, const char* debugText); + */ + export function forceScriptedGfxWhenFrontendActive(p0: string): void; export function pauseMenuceptionGoDeeper(page: number): void; @@ -7337,12 +8020,12 @@ declare module "natives" { export function pauseToggleFullscreenMap(p0: any): void; /** - * Activates the specified frontend menu context. - * pausemenu.xml defines some specific menu options using 'context'. Context is basically a 'condition'. - * The `*ALL*` part of the context means that whatever is being defined, will be active when any or all of those conditions after `*ALL*` are met. - * The `*NONE*` part of the context section means that whatever is being defined, will NOT be active if any or all of the conditions after `*NONE*` are met. - * This basically allows you to hide certain menu sections, or things like instructional buttons. - */ + * Activates the specified frontend menu context. + * pausemenu.xml defines some specific menu options using 'context'. Context is basically a 'condition'. + * The `*ALL*` part of the context means that whatever is being defined, will be active when any or all of those conditions after `*ALL*` are met. + * The `*NONE*` part of the context section means that whatever is being defined, will NOT be active if any or all of the conditions after `*NONE*` are met. + * This basically allows you to hide certain menu sections, or things like instructional buttons. + */ export function pauseMenuActivateContext(contextHash: number): void; export function pauseMenuDeactivateContext(contextHash: number): void; @@ -7368,15 +8051,15 @@ declare module "natives" { export function isFrontendReadyForControl(): boolean; /** - * Disables frontend (works in custom frontends, not sure about regular pause menu) navigation keys on keyboard. Not sure about controller. Does not disable mouse controls. No need to call this every tick. - * To enable the keys again, use `0x14621BB1DF14E2B2`. - */ + * Disables frontend (works in custom frontends, not sure about regular pause menu) navigation keys on keyboard. Not sure about controller. Does not disable mouse controls. No need to call this every tick. + * To enable the keys again, use `0x14621BB1DF14E2B2`. + */ export function takeControlOfFrontend(): void; /** - * Enables frontend (works in custom frontends, not sure about regular pause menu) navigation keys on keyboard if they were disabled using the native below. - * To disable the keys, use `0xEC9264727EEC0F28` - */ + * Enables frontend (works in custom frontends, not sure about regular pause menu) navigation keys on keyboard if they were disabled using the native below. + * To disable the keys, use `0xEC9264727EEC0F28` + */ export function releaseControlOfFrontend(): void; export function codeWantsScriptToTakeControl(): boolean; @@ -7394,62 +8077,64 @@ declare module "natives" { export function getMenuTriggerEventDetails(lastItemMenuId?: number, selectedItemUniqueId?: number): [void, number, number]; /** - * when the pausemenu is closed: - * lastItemMenuId = -1 - * selectedItemMenuId = -1 - * selectedItemUniqueId = 0 - * when the header gains focus: - * lastItemMenuId updates as normal or 0 if the pausemenu was just opened - * selectedItemMenuId becomes a unique id for the pausemenu page that focus was taken from (?) or 0 if the pausemenu was just opened - * selectedItemUniqueId = -1 - * when focus is moved from the header to a pausemenu page: - * See NativeDB for reference: http://natives.altv.mp/#/0x7E17BE53E1AAABAF - * @param lastItemMenuId this is the menuID of the last selected item minus 1000 (lastItem.menuID - 1000) - * @param selectedItemMenuId same as lastItemMenuId except for the currently selected menu item - * @param selectedItemUniqueId this is uniqueID of the currently selected menu item - */ + * lastItemMenuId: this is the menuID of the last selected item minus 1000 (lastItem.menuID - 1000) + * selectedItemMenuId: same as lastItemMenuId except for the currently selected menu item + * selectedItemUniqueId: this is uniqueID of the currently selected menu item + * when the pausemenu is closed: + * lastItemMenuId = -1 + * selectedItemMenuId = -1 + * selectedItemUniqueId = 0 + * when the header gains focus: + * lastItemMenuId updates as normal or 0 if the pausemenu was just opened + * selectedItemMenuId becomes a unique id for the pausemenu page that focus was taken from (?) or 0 if the pausemenu was just opened + * selectedItemUniqueId = -1 + * when focus is moved from the header to a pausemenu page: + * lastItemMenuId becomes a unique id for the pausemenu page that focus was moved to (?) + * selectedItemMenuId = -1 + * selectedItemUniqueId updates as normal + */ export function getMenuLayoutChangedEventDetails(lastItemMenuId?: number, selectedItemMenuId?: number, selectedItemUniqueId?: number): [void, number, number, number]; export function getPmPlayerCrewColor(r?: number, g?: number, b?: number): [boolean, number, number, number]; export function getMenuPedIntStat(p0: any, p1?: any): [boolean, any]; - export function getCharacterMenuPedIntStat(p0: any, p1: any | null, p2: any): [boolean, any]; + export function getCharacterMenuPedIntStat(p0: any, p1: any, p2: any): [boolean, any]; - export function getMenuPedMaskedIntStat(statHash: number, outValue: number | null, mask: number, p3: boolean): [boolean, number]; + export function getMenuPedMaskedIntStat(statHash: number, outValue: number, mask: number, p3: boolean): [boolean, number]; - export function getCharacterMenuPedMaskedIntStat(statHash: number, outValue: any | null, p2: number, mask: number, p4: boolean): [boolean, any]; + export function getCharacterMenuPedMaskedIntStat(statHash: number, outValue: any, p2: number, mask: number, p4: boolean): [boolean, any]; export function getMenuPedFloatStat(statHash: number, outValue?: number): [boolean, number]; - export function getCharacterMenuPedFloatStat(statHash: number, outValue: number | null, p2: boolean): [boolean, number]; + export function getCharacterMenuPedFloatStat(statHash: number, outValue: number, p2: boolean): [boolean, number]; /** - * @param statHash was always 0xAE2602A3. - */ + * p0 was always 0xAE2602A3. + */ export function getMenuPedBoolStat(statHash: number, outValue?: boolean): [boolean, boolean]; export function clearPedInPauseMenu(): void; /** - * @param p1 is either 1 or 2 in the PC scripts. - */ - export function givePedToPauseMenu(ped: Player | number, p1: number): void; + * p1 is either 1 or 2 in the PC scripts. + */ + export function givePedToPauseMenu(ped: Ped | Player | number, p1: number): void; /** - * Toggles the light state for the pause menu ped in frontend menus. - * This is used by R* in combination with `SET_PAUSE_MENU_PED_SLEEP_STATE` to toggle the "offline" or "online" state in the "friends" tab of the pause menu in GTA Online. - * Example: - * Lights On: https://vespura.com/hi/i/2019-04-01_16-09_540ee_1015.png - * Lights Off: https://vespura.com/hi/i/2019-04-01_16-10_8b5e7_1016.png - */ + * Toggles the light state for the pause menu ped in frontend menus. + * This is used by R* in combination with `SET_PAUSE_MENU_PED_SLEEP_STATE` to toggle the "offline" or "online" state in the "friends" tab of the pause menu in GTA Online. + * Example: + * Lights On: https://vespura.com/hi/i/2019-04-01_16-09_540ee_1015.png + * Lights Off: https://vespura.com/hi/i/2019-04-01_16-10_8b5e7_1016.png + */ export function setPauseMenuPedLighting(state: boolean): void; /** - * Toggles the pause menu ped sleep state for frontend menus. - * Example: https://vespura.com/hi/i/2019-04-01_15-51_8ed38_1014.gif - * `state` 0 will make the ped slowly fall asleep, 1 will slowly wake the ped up. - */ + * Toggles the pause menu ped sleep state for frontend menus. + * Example: https://vespura.com/hi/i/2019-04-01_15-51_8ed38_1014.gif + * `state` 0 will make the ped slowly fall asleep, 1 will slowly wake the ped up. + */ export function setPauseMenuPedSleepState(state: boolean): void; export function openOnlinePoliciesMenu(): void; @@ -7457,24 +8142,25 @@ declare module "natives" { export function areOnlinePoliciesUpToDate(): boolean; /** - * Returns the same as IS_SOCIAL_CLUB_ACTIVE - */ + * Returns the same as IS_SOCIAL_CLUB_ACTIVE + */ export function isOnlinePoliciesMenuActive(): boolean; /** - * Uses the `SOCIAL_CLUB2` scaleform. - */ - export function openSocialClubMenu(): void; + * Uses the `SOCIAL_CLUB2` scaleform. + * menu: GALLERY, MISSIONS, CREWS, MIGRATE, PLAYLISTS, JOBS + */ + export function openSocialClubMenu(menu: number): void; export function closeSocialClubMenu(): void; /** - * HUD::SET_SOCIAL_CLUB_TOUR("Gallery"); - * HUD::SET_SOCIAL_CLUB_TOUR("Missions"); - * HUD::SET_SOCIAL_CLUB_TOUR("General"); - * HUD::SET_SOCIAL_CLUB_TOUR("Playlists"); - */ - export function setSocialClubTour(name: string | null): void; + * HUD::SET_SOCIAL_CLUB_TOUR("Gallery"); + * HUD::SET_SOCIAL_CLUB_TOUR("Missions"); + * HUD::SET_SOCIAL_CLUB_TOUR("General"); + * HUD::SET_SOCIAL_CLUB_TOUR("Playlists"); + */ + export function setSocialClubTour(name: string): void; export function isSocialClubActive(): boolean; @@ -7487,8 +8173,8 @@ declare module "natives" { export function overrideMpTextChatTeamString(gxtEntryHash: number): void; /** - * Returns whether or not the text chat (MULTIPLAYER_CHAT Scaleform component) is active. - */ + * Returns whether or not the text chat (MULTIPLAYER_CHAT Scaleform component) is active. + */ export function isMpTextChatTyping(): boolean; export function closeMpTextChat(): void; @@ -7498,50 +8184,50 @@ declare module "natives" { export function overrideMpTextChatColor(p0: number, hudColor: number): void; /** - * Hides the chat history, closes the input box and makes it unable to be opened unless called again with FALSE. - */ + * Hides the chat history, closes the input box and makes it unable to be opened unless called again with FALSE. + */ export function mpTextChatDisable(toggle: boolean): void; export function flagPlayerContextInTournament(toggle: boolean): void; /** - * This native turns on the AI blip on the specified ped. It also disappears automatically when the ped is too far or if the ped is dead. You don't need to control it with other natives. - * See gtaforums.com/topic/884370-native-research-ai-blips for further information. - */ - export function setPedHasAiBlip(ped: Player | number, hasCone: boolean): void; + * This native turns on the AI blip on the specified ped. It also disappears automatically when the ped is too far or if the ped is dead. You don't need to control it with other natives. + * See gtaforums.com/topic/884370-native-research-ai-blips for further information. + */ + export function setPedHasAiBlip(ped: Ped | Player | number, hasCone: boolean): void; /** - * @param color see SET_BLIP_COLOUR - */ - export function setPedHasAiBlipWithColour(ped: Player | number, hasCone: boolean, color: number): void; + * color: see SET_BLIP_COLOUR + */ + export function setPedHasAiBlipWithColour(ped: Ped | Player | number, hasCone: boolean, color: number): void; - export function doesPedHaveAiBlip(ped: Player | number): boolean; + export function doesPedHaveAiBlip(ped: Ped | Player | number): boolean; - export function setPedAiBlipGangId(ped: Player | number, gangId: number): void; + export function setPedAiBlipGangId(ped: Ped | Player | number, gangId: number): void; - export function setPedAiBlipHasCone(ped: Player | number, toggle: boolean): void; + export function setPedAiBlipHasCone(ped: Ped | Player | number, toggle: boolean): void; - export function setPedAiBlipForcedOn(ped: Player | number, toggle: boolean): void; + export function setPedAiBlipForcedOn(ped: Ped | Player | number, toggle: boolean): void; - export function setPedAiBlipNoticeRange(ped: Player | number, range: number): void; + export function setPedAiBlipNoticeRange(ped: Ped | Player | number, range: number): void; - export function setPedAiBlipSprite(ped: Player | number, spriteId: number): void; + export function setPedAiBlipSprite(ped: Ped | Player | number, spriteId: number): void; - export function getAiPedPedBlipIndex(ped: Player | number): number; + export function getAiPedPedBlipIndex(ped: Ped | Player | number): number; /** - * Returns the current AI BLIP for the specified ped - */ - export function getAiPedVehicleBlipIndex(ped: Player | number): number; + * Returns the current AI BLIP for the specified ped + */ + export function getAiPedVehicleBlipIndex(ped: Ped | Player | number): number; export function hasDirectorModeBeenLaunchedByCode(): boolean; export function setDirectorModeLaunchedByScript(): void; /** - * If toggle is true, hides special ability bar / character name in the pause menu - * If toggle is false, shows special ability bar / character name in the pause menu - */ + * If toggle is true, hides special ability bar / character name in the pause menu + * If toggle is false, shows special ability bar / character name in the pause menu + */ export function setPlayerIsInDirectorMode(toggle: boolean): void; export function setDirectorModeAvailable(toggle: boolean): void; @@ -7553,8 +8239,22 @@ declare module "natives" { export function getInteriorLocationAndNamehash(interior: number, position?: Vector3, nameHash?: number): [void, Vector3, number]; /** - * Returns the group ID of the specified interior. For example, regular interiors have group 0, subway interiors have group 1. There are a few other groups too. - */ + * Returns the group ID of the specified interior. + * 0 = default + * 1 = subway station, subway tracks, sewers + * 3 = train tunnel under mirror park + * 5 = tunnel near del perro + * 6 = train tunnel near chilliad + * 7 = train tunnel near josiah + * 8 = train tunnel in sandy shores + * 9 = braddock tunnel (near chilliad) + * 12 = tunnel under fort zancudo + * 14 = train tunnel under cypress flats + * 18 = rockford plaza parking garage + * 19 = arcadius parking garage + * 20 = union depository parking garage + * 21 = fib parking garage + */ export function getInteriorGroupId(interior: number): number; export function getOffsetFromInteriorInWorldCoords(interior: number, x: number, y: number, z: number): Vector3; @@ -7568,25 +8268,25 @@ declare module "natives" { export function forceRoomForEntity(entity: Entity | number, interior: number, roomHashKey: number): void; /** - * @returns Gets the room hash key from the room that the specified entity is in. Each room in every interior has a unique key. Returns 0 if the entity is outside. - */ + * Gets the room hash key from the room that the specified entity is in. Each room in every interior has a unique key. Returns 0 if the entity is outside. + */ export function getRoomKeyFromEntity(entity: Entity | number): number; /** - * Seems to do the exact same as INTERIOR::GET_ROOM_KEY_FROM_ENTITY - */ + * Seems to do the exact same as INTERIOR::GET_ROOM_KEY_FROM_ENTITY + */ export function getKeyForEntityInRoom(entity: Entity | number): number; /** - * @returns Returns the handle of the interior that the entity is in. Returns 0 if outside. - */ + * Returns the handle of the interior that the entity is in. Returns 0 if outside. + */ export function getInteriorFromEntity(entity: Entity | number): number; export function retainEntityInInterior(entity: Entity | number, interior: number): void; /** - * Immediately removes entity from an interior. Like sets entity to `limbo` room. - */ + * Immediately removes entity from an interior. Like sets entity to `limbo` room. + */ export function clearInteriorStateOfEntity(entity: Entity | number): void; export function forceActivatingTrackingOnEntity(p0: any, p1: any): void; @@ -7594,14 +8294,14 @@ declare module "natives" { export function forceRoomForGameViewport(interiorID: number, roomHashKey: number): void; /** - * Example of use (carmod_shop) - * INTERIOR::SET_ROOM_FOR_GAME_VIEWPORT_BY_NAME("V_CarModRoom"); - */ - export function setRoomForGameViewportByName(roomName: string | null): void; + * Example of use (carmod_shop) + * INTERIOR::SET_ROOM_FOR_GAME_VIEWPORT_BY_NAME("V_CarModRoom"); + */ + export function setRoomForGameViewportByName(roomName: string): void; /** - * Usage: INTERIOR::SET_ROOM_FOR_GAME_VIEWPORT_BY_KEY(INTERIOR::GET_KEY_FOR_ENTITY_IN_ROOM(PLAYER::PLAYER_PED_ID())); - */ + * Usage: INTERIOR::SET_ROOM_FOR_GAME_VIEWPORT_BY_KEY(INTERIOR::GET_KEY_FOR_ENTITY_IN_ROOM(PLAYER::PLAYER_PED_ID())); + */ export function setRoomForGameViewportByKey(roomHashKey: number): void; export function getRoomKeyForGameViewport(): number; @@ -7609,56 +8309,53 @@ declare module "natives" { export function clearRoomForGameViewport(): void; /** - * Returns the current interior id from gameplay camera - */ + * Returns the current interior id from gameplay camera + */ export function getInteriorFromPrimaryView(): number; /** - * Example for VB.NET - * @param x Native.Function.Call(Of Integer)(Hash.GET_INTERIOR_AT_COORDS, X, Y, Z) - * @param y Native.Function.Call(Of Integer)(Hash.GET_INTERIOR_AT_COORDS, X, Y, Z) - * @returns Returns interior ID from specified coordinates. If coordinates are outside, then it returns 0. - */ + * Returns interior ID from specified coordinates. If coordinates are outside, then it returns 0. + * Example for VB.NET + * Dim interiorID As Integer = Native.Function.Call(Of Integer)(Hash.GET_INTERIOR_AT_COORDS, X, Y, Z) + */ export function getInteriorAtCoords(x: number, y: number, z: number): number; - export function addPickupToInteriorRoomByName(pickup: number, roomName: string | null): void; + export function addPickupToInteriorRoomByName(pickup: number, roomName: string): void; export function pinInteriorInMemory(interior: number): void; /** - * Does something similar to INTERIOR::DISABLE_INTERIOR. - * You don't fall through the floor but everything is invisible inside and looks the same as when INTERIOR::DISABLE_INTERIOR is used. Peds behaves normally inside. - */ + * Does something similar to INTERIOR::DISABLE_INTERIOR. + * You don't fall through the floor but everything is invisible inside and looks the same as when INTERIOR::DISABLE_INTERIOR is used. Peds behaves normally inside. + */ export function unpinInterior(interior: number): void; export function isInteriorReady(interior: number): boolean; /** - * Only used once in the entire game scripts. - * @returns Does not actually return anything. - */ + * Only used once in the entire game scripts. + * Does not actually return anything. + */ export function setInteriorInUse(interior: number): boolean; /** - * Returns the interior ID representing the requested interior at that location (if found?). The supplied interior string is not the same as the one used to load the interior. - * Interior types include: "V_Michael", "V_Franklins", "V_Franklinshouse", etc.. you can find them in the scripts. - * Not a very useful native as you could just use GET_INTERIOR_AT_COORDS instead and get the same result, without even having to specify the interior type. - * @param x INTERIOR - * @param y INTERIOR - * @param z INTERIOR - */ - export function getInteriorAtCoordsWithType(x: number, y: number, z: number, interiorType: string | null): number; + * Returns the interior ID representing the requested interior at that location (if found?). The supplied interior string is not the same as the one used to load the interior. + * Use: INTERIOR::UNPIN_INTERIOR(INTERIOR::GET_INTERIOR_AT_COORDS_WITH_TYPE(x, y, z, interior)) + * Interior types include: "V_Michael", "V_Franklins", "V_Franklinshouse", etc.. you can find them in the scripts. + * Not a very useful native as you could just use GET_INTERIOR_AT_COORDS instead and get the same result, without even having to specify the interior type. + */ + export function getInteriorAtCoordsWithType(x: number, y: number, z: number, interiorType: string): number; /** - * Hashed version of GET_INTERIOR_AT_COORDS_WITH_TYPE - */ + * Hashed version of GET_INTERIOR_AT_COORDS_WITH_TYPE + */ export function getInteriorAtCoordsWithTypehash(x: number, y: number, z: number, typeHash: number): number; export function activateInteriorGroupsUsingCamera(): void; /** - * Returns true if the collision at the specified coords is marked as being outside (false if there's an interior) - */ + * Returns true if the collision at the specified coords is marked as being outside (false if there's an interior) + */ export function isCollisionMarkedOutside(x: number, y: number, z: number): boolean; export function getInteriorFromCollision(x: number, y: number, z: number): number; @@ -7666,48 +8363,48 @@ declare module "natives" { export function enableStadiumProbesThisFrame(toggle: boolean): void; /** - * More info: http://gtaforums.com/topic/836367-adding-props-to-interiors/ - * Full list of IPLs and interior entity sets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ipls.json - */ - export function activateInteriorEntitySet(interior: number, entitySetName: string | null): void; + * More info: http://gtaforums.com/topic/836367-adding-props-to-interiors/ + * Full list of IPLs and interior entity sets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ipls.json + */ + export function activateInteriorEntitySet(interior: number, entitySetName: string): void; /** - * Full list of IPLs and interior entity sets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ipls.json - */ - export function deactivateInteriorEntitySet(interior: number, entitySetName: string | null): void; + * Full list of IPLs and interior entity sets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ipls.json + */ + export function deactivateInteriorEntitySet(interior: number, entitySetName: string): void; /** - * Full list of IPLs and interior entity sets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ipls.json - */ - export function isInteriorEntitySetActive(interior: number, entitySetName: string | null): boolean; + * Full list of IPLs and interior entity sets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ipls.json + */ + export function isInteriorEntitySetActive(interior: number, entitySetName: string): boolean; /** - * @param color https - */ - export function setInteriorEntitySetTintIndex(interior: number, entitySetName: string | null, color: number): void; + * Full list of IPLs and interior entity sets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ipls.json + */ + export function setInteriorEntitySetTintIndex(interior: number, entitySetName: string, color: number): void; export function refreshInterior(interior: number): void; /** - * This is the native that is used to hide the exterior of GTA Online apartment buildings when you are inside an apartment. - * More info: http://gtaforums.com/topic/836301-hiding-gta-online-apartment-exteriors/ - */ + * This is the native that is used to hide the exterior of GTA Online apartment buildings when you are inside an apartment. + * More info: http://gtaforums.com/topic/836301-hiding-gta-online-apartment-exteriors/ + */ export function enableExteriorCullModelThisFrame(mapObjectHash: number): void; export function enableShadowCullModelThisFrame(mapObjectHash: number): void; /** - * Example: - * This removes the interior from the strip club and when trying to walk inside the player just falls: - * @param interior :DISABLE_INTERIOR(118018, true); - */ + * Example: + * This removes the interior from the strip club and when trying to walk inside the player just falls: + * INTERIOR::DISABLE_INTERIOR(118018, true); + */ export function disableInterior(interior: number, toggle: boolean): void; export function isInteriorDisabled(interior: number): boolean; /** - * Does something similar to INTERIOR::DISABLE_INTERIOR - */ + * Does something similar to INTERIOR::DISABLE_INTERIOR + */ export function capInterior(interior: number, toggle: boolean): void; export function isInteriorCapped(interior: number): boolean; @@ -7715,8 +8412,8 @@ declare module "natives" { export function disableMetroSystem(toggle: boolean): void; /** - * Jenkins hash _might_ be 0xFC227584. - */ + * Jenkins hash _might_ be 0xFC227584. + */ export function setIsExteriorOnly(entity: Entity | number, toggle: boolean): void; export function createItemset(p0: boolean): number; @@ -7737,6 +8434,9 @@ declare module "natives" { export function cleanItemset(itemset: number): void; + /** + * This function is hard-coded to always return 0. + */ export function lobbyAutoMultiplayerMenu(): boolean; export function lobbyAutoMultiplayerFreemode(): boolean; @@ -7753,22 +8453,31 @@ declare module "natives" { export function shutdownSessionClearsAutoMultiplayer(toggle: boolean): void; + /** + * Same return values as GET_CURRENT_LANGUAGE + */ export function localizationGetSystemLanguage(): number; /** - * 0 = american (en-US) - * 1 = french (fr-FR) - * 2 = german (de-DE) - * 3 = italian (it-IT) - * 4 = spanish (es-ES) - * 5 = brazilian (pt-BR) - * 6 = polish (pl-PL) - * 7 = russian (ru-RU) - * 8 = korean (ko-KR) - * See NativeDB for reference: http://natives.altv.mp/#/0x2BDD44CC428A7EAE - */ + * 0 = american (en-US) + * 1 = french (fr-FR) + * 2 = german (de-DE) + * 3 = italian (it-IT) + * 4 = spanish (es-ES) + * 5 = brazilian (pt-BR) + * 6 = polish (pl-PL) + * 7 = russian (ru-RU) + * 8 = korean (ko-KR) + * 9 = chinesetrad (zh-TW) + * 10 = japanese (ja-JP) + * 11 = mexican (es-MX) + * 12 = chinesesimp (zh-CN) + */ export function getCurrentLanguage(): number; + /** + * Possible return values: 0, 1, 2 + */ export function localizationGetSystemDateType(): number; export function getAllocatedStackSize(): number; @@ -7778,155 +8487,176 @@ declare module "natives" { export function setRandomSeed(seed: number): void; /** - * Maximum value is 1. - * At a value of 0 the game will still run at a minimum time scale. - * Slow Motion 1: 0.6 - * Slow Motion 2: 0.4 - * Slow Motion 3: 0.2 - */ + * Maximum value is 1. + * At a value of 0 the game will still run at a minimum time scale. + * Slow Motion 1: 0.6 + * Slow Motion 2: 0.4 + * Slow Motion 3: 0.2 + */ export function setTimeScale(timeScale: number): void; /** - * If true, the player can't save the game. - * If the parameter is true, sets the mission flag to true, if the parameter is false, the function does nothing at all. - * ^ also, if the mission flag is already set, the function does nothing at all - */ + * If true, the player can't save the game. + * If the parameter is true, sets the mission flag to true, if the parameter is false, the function does nothing at all. + * ^ also, if the mission flag is already set, the function does nothing at all + */ export function setMissionFlag(toggle: boolean): void; export function getMissionFlag(): boolean; /** - * 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. - */ + * 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. + */ export function setRandomEventFlag(toggle: boolean): void; export function getRandomEventFlag(): boolean; /** - * Returns pointer to an empty string. - */ + * Returns pointer to an empty string. + */ export function getContentToLoad(): string; /** - * Does nothing (it's a nullsub). Seems to be PS4 specific. - */ - export function activityFeedCreate(p0: string | null, p1: string | null): void; + * Does nothing (it's a nullsub). Seems to be PS4 specific. + */ + export function activityFeedCreate(p0: string, p1: string): void; /** - * Does nothing (it's a nullsub). Seems to be PS4 specific. - */ - export function activityFeedAddSubstringToCaption(p0: string | null): void; + * Does nothing (it's a nullsub). Seems to be PS4 specific. + */ + export function activityFeedAddSubstringToCaption(p0: string): void; /** - * Does nothing (it's a nullsub). Seems to be PS4 specific. - */ - export function activityFeedAddLiteralSubstringToCaption(p0: string | null): void; + * Does nothing (it's a nullsub). Seems to be PS4 specific. + */ + export function activityFeedAddLiteralSubstringToCaption(p0: string): void; /** - * Does nothing (it's a nullsub). Seems to be PS4 specific. - */ + * Does nothing (it's a nullsub). Seems to be PS4 specific. + */ export function activityFeedAddIntToCaption(p0: any): void; /** - * Does nothing (it's a nullsub). Seems to be PS4 specific. - */ - export function activityFeedLargeImageUrl(p0: string | null): void; + * Does nothing (it's a nullsub). Seems to be PS4 specific. + */ + export function activityFeedLargeImageUrl(p0: string): void; /** - * Does nothing (it's a nullsub). Seems to be PS4 specific. - */ - export function activityFeedActionStartWithCommandLine(p0: string | null, p1: string | null): void; + * Does nothing (it's a nullsub). Seems to be PS4 specific. + */ + export function activityFeedActionStartWithCommandLine(p0: string, p1: string): void; /** - * Does nothing (it's a nullsub). Seems to be PS4 specific. - */ - export function activityFeedActionStartWithCommandLineAdd(p0: string | null): void; + * Does nothing (it's a nullsub). Seems to be PS4 specific. + */ + export function activityFeedActionStartWithCommandLineAdd(p0: string): void; /** - * Does nothing (it's a nullsub). Seems to be PS4 specific. - */ + * Does nothing (it's a nullsub). Seems to be PS4 specific. + */ export function activityFeedPost(): void; /** - * Does nothing (it's a nullsub). Seems to be PS4 specific. - * Used only once in the scripts (ingamehud) with p0 = "AF_GAMEMODE" - */ - export function activityFeedOnlinePlayedWithPost(p0: string | null): void; + * Does nothing (it's a nullsub). Seems to be PS4 specific. + * Used only once in the scripts (ingamehud) with p0 = "AF_GAMEMODE" + */ + export function activityFeedOnlinePlayedWithPost(p0: string): void; + /** + * Hardcoded to return false. + */ export function hasResumedFromSuspend(): boolean; /** - * Sets GtaThread+0x14A - */ + * Sets GtaThread+0x14A + */ export function setScriptHighPrio(toggle: boolean): void; /** - * Sets bit 3 in GtaThread+0x150 - */ + * Sets bit 3 in GtaThread+0x150 + */ export function setThisIsATriggerScript(toggle: boolean): void; - export function informCodeOfContentIdOfCurrentUgcMission(p0: string | null): void; + export function informCodeOfContentIdOfCurrentUgcMission(p0: string): void; - export function getBaseElementLocationFromMetadataBlock(p0: any | null, p1: any | null, p2: any, p3: boolean): [boolean, any, any]; + export function getBaseElementLocationFromMetadataBlock(p0: any, p1: any, p2: any, p3: boolean): [boolean, any, any]; /** - * Returns current weather name hash - */ + * Returns current weather name hash + */ export function getPrevWeatherTypeHashName(): number; /** - * Returns weather name hash - */ + * Returns weather name hash + */ export function getNextWeatherTypeHashName(): number; - export function isPrevWeatherType(weatherType: string | null): boolean; - - export function isNextWeatherType(weatherType: string | null): boolean; - - /** - * The following weatherTypes are used in the scripts: - * "CLEAR" - * "EXTRASUNNY" - * "CLOUDS" - * "OVERCAST" - * "RAIN" - * "CLEARING" - * "THUNDER" - * "SMOG" - * See NativeDB for reference: http://natives.altv.mp/#/0x704983DF373B198F - */ - export function setWeatherTypePersist(weatherType: string | null): void; - - /** - * The following weatherTypes are used in the scripts: - * "CLEAR" - * "EXTRASUNNY" - * "CLOUDS" - * "OVERCAST" - * "RAIN" - * "CLEARING" - * "THUNDER" - * "SMOG" - * See NativeDB for reference: http://natives.altv.mp/#/0xED712CA327900C8A - */ - export function setWeatherTypeNowPersist(weatherType: string | null): void; - - /** - * The following weatherTypes are used in the scripts: - * "CLEAR" - * "EXTRASUNNY" - * "CLOUDS" - * "OVERCAST" - * "RAIN" - * "CLEARING" - * "THUNDER" - * "SMOG" - * See NativeDB for reference: http://natives.altv.mp/#/0x29B487C359E19889 - */ - export function setWeatherTypeNow(weatherType: string | null): void; - - export function setWeatherTypeOvertimePersist(weatherType: string | null, time: number): void; + export function isPrevWeatherType(weatherType: string): boolean; + + export function isNextWeatherType(weatherType: string): boolean; + + /** + * The following weatherTypes are used in the scripts: + * "CLEAR" + * "EXTRASUNNY" + * "CLOUDS" + * "OVERCAST" + * "RAIN" + * "CLEARING" + * "THUNDER" + * "SMOG" + * "FOGGY" + * "XMAS" + * "SNOW" + * "SNOWLIGHT" + * "BLIZZARD" + * "HALLOWEEN" + * "NEUTRAL" + */ + export function setWeatherTypePersist(weatherType: string): void; + + /** + * The following weatherTypes are used in the scripts: + * "CLEAR" + * "EXTRASUNNY" + * "CLOUDS" + * "OVERCAST" + * "RAIN" + * "CLEARING" + * "THUNDER" + * "SMOG" + * "FOGGY" + * "XMAS" + * "SNOW" + * "SNOWLIGHT" + * "BLIZZARD" + * "HALLOWEEN" + * "NEUTRAL" + */ + export function setWeatherTypeNowPersist(weatherType: string): void; + + /** + * The following weatherTypes are used in the scripts: + * "CLEAR" + * "EXTRASUNNY" + * "CLOUDS" + * "OVERCAST" + * "RAIN" + * "CLEARING" + * "THUNDER" + * "SMOG" + * "FOGGY" + * "XMAS" + * "SNOW" + * "SNOWLIGHT" + * "BLIZZARD" + * "HALLOWEEN" + * "NEUTRAL" + */ + export function setWeatherTypeNow(weatherType: string): void; + + export function setWeatherTypeOvertimePersist(weatherType: string, time: number): void; export function setRandomWeatherType(): void; @@ -7937,29 +8667,39 @@ declare module "natives" { export function getCurrWeatherState(weatherType1?: number, weatherType2?: number, percentWeather2?: number): [void, number, number, number]; /** - * execute "NativeFunction.Natives.x578C752848ECFA0C(Game.GetHashKey(""RAIN""), Game.GetHashKey(""SMOG""), 0.50f); - * Note that unlike most of the other weather natives, this native takes the hash of the weather name, not the plain string. These are the weather names and their hashes: - * CLEAR 0x36A83D84 - * EXTRASUNNY 0x97AA0A79 - * CLOUDS 0x30FDAF5C - * OVERCAST 0xBB898D2D - * RAIN 0x54A69840 - * CLEARING 0x6DB1A50D - * THUNDER 0xB677829F - * See NativeDB for reference: http://natives.altv.mp/#/0x578C752848ECFA0C - */ + * Mixes two weather types. If percentWeather2 is set to 0.0f, then the weather will be entirely of weatherType1, if it is set to 1.0f it will be entirely of weatherType2. If it's set somewhere in between, there will be a mixture of weather behaviors. To test, try this in the RPH console, and change the float to different values between 0 and 1: + * execute "NativeFunction.Natives.x578C752848ECFA0C(Game.GetHashKey(""RAIN""), Game.GetHashKey(""SMOG""), 0.50f); + * Note that unlike most of the other weather natives, this native takes the hash of the weather name, not the plain string. These are the weather names and their hashes: + * CLEAR 0x36A83D84 + * EXTRASUNNY 0x97AA0A79 + * CLOUDS 0x30FDAF5C + * OVERCAST 0xBB898D2D + * RAIN 0x54A69840 + * CLEARING 0x6DB1A50D + * THUNDER 0xB677829F + * SMOG 0x10DCF4B5 + * FOGGY 0xAE737644 + * XMAS 0xAAC9C895 + * SNOWLIGHT 0x23FB812B + * BLIZZARD 0x27EA2814 + * /* OLD INVALID INFO BELOW *\/ + * Not tested. Based purely on disassembly. Instantly sets the weather to sourceWeather, then transitions to targetWeather over the specified transitionTime in seconds. + * If an invalid hash is specified for sourceWeather, the current weather type will be used. + * If an invalid hash is specified for targetWeather, the next weather type will be used. + * If an invalid hash is specified for both sourceWeather and targetWeather, the function just changes the transition time of the current transition. + */ export function setCurrWeatherState(weatherType1: number, weatherType2: number, percentWeather2: number): void; /** - * Appears to have an optional bool parameter that is unused in the scripts. - * If you pass true, something will be set to zero. - */ - export function setOverrideWeather(weatherType: string | null): void; + * Appears to have an optional bool parameter that is unused in the scripts. + * If you pass true, something will be set to zero. + */ + export function setOverrideWeather(weatherType: string): void; /** - * Identical to SET_OVERRIDE_WEATHER but has an additional BOOL param that sets some weather var to 0 if true - */ - export function setOverrideWeatherex(weatherType: string | null, p1: boolean): void; + * Identical to SET_OVERRIDE_WEATHER but has an additional BOOL param that sets some weather var to 0 if true + */ + export function setOverrideWeatherex(weatherType: string, p1: boolean): void; export function clearOverrideWeather(): void; @@ -7986,11 +8726,11 @@ declare module "natives" { export function waterOverrideSetRippledisturb(disturb: number): void; /** - * This seems to edit the water wave, intensity around your current location. - * 0.0f = Normal - * 1.0f = So Calm and Smooth, a boat will stay still. - * 3.0f = Really Intense. - */ + * This seems to edit the water wave, intensity around your current location. + * 0.0f = Normal + * 1.0f = So Calm and Smooth, a boat will stay still. + * 3.0f = Really Intense. + */ export function waterOverrideSetStrength(strength: number): void; export function waterOverrideFadeIn(p0: number): void; @@ -7998,30 +8738,30 @@ declare module "natives" { export function waterOverrideFadeOut(p0: number): void; /** - * Sets the the normalized wind speed value. The wind speed clamps always at 12.0, SET_WIND sets the wind in a percentage, 0.0 is 0 and 1.0 is 12.0. Setting this value to a negative number resumes the random wind speed changes provided by the game. - */ + * Sets the the normalized wind speed value. The wind speed clamps always at 12.0, SET_WIND sets the wind in a percentage, 0.0 is 0 and 1.0 is 12.0. Setting this value to a negative number resumes the random wind speed changes provided by the game. + */ export function setWind(speed: number): void; /** - * Using this native will set the absolute wind speed value. The wind speed clamps to a range of 0.0- 12.0. Setting this value to a negative number resumes the random wind speed changes provided by the game. - */ + * Using this native will set the absolute wind speed value. The wind speed clamps to a range of 0.0- 12.0. Setting this value to a negative number resumes the random wind speed changes provided by the game. + */ export function setWindSpeed(speed: number): void; export function getWindSpeed(): number; /** - * The wind direction in radians - * 180 degrees (PI), wind will blow from the south. Setting this value to a negative number resumes the random wind direction changes provided by the game. - */ + * The wind direction in radians + * 180 degrees (PI), wind will blow from the south. Setting this value to a negative number resumes the random wind direction changes provided by the game. + */ export function setWindDirection(direction: number): void; export function getWindDirection(): Vector3; /** - * With an `intensity` higher than `0.5f`, only the creation of puddles gets faster, rain and rain sound won't increase after that. - * With an `intensity` of `0.0f` rain and rain sounds are disabled and there won't be any new puddles. - * To use the rain intensity of the current weather, call this native with `-1f` as `intensity`. - */ + * With an `intensity` higher than `0.5f`, only the creation of puddles gets faster, rain and rain sound won't increase after that. + * With an `intensity` of `0.0f` rain and rain sounds are disabled and there won't be any new puddles. + * To use the rain intensity of the current weather, call this native with `-1f` as `intensity`. + */ export function setRain(intensity: number): void; export function getRainLevel(): number; @@ -8031,29 +8771,40 @@ declare module "natives" { export function getSnowLevel(): number; /** - * creates single lightning+thunder at random position - */ + * creates single lightning+thunder at random position + */ export function forceLightningFlash(): void; - export function setCloudSettingsOverride(p0: string | null): void; - - export function preloadCloudHat(name: string | null): void; - - /** - * The following cloudhats are useable: - * altostratus - * Cirrus - * cirrocumulus - * Clear 01 - * Cloudy 01 - * Contrails - * Horizon - * horizonband1 - * See NativeDB for reference: http://natives.altv.mp/#/0xFC4842A34657BFCB - */ - export function loadCloudHat(name: string | null, transitionTime: number): void; - - export function unloadCloudHat(name: string | null, p1: number): void; + export function setCloudSettingsOverride(p0: string): void; + + export function preloadCloudHat(name: string): void; + + /** + * The following cloudhats are useable: + * altostratus + * Cirrus + * cirrocumulus + * Clear 01 + * Cloudy 01 + * Contrails + * Horizon + * horizonband1 + * horizonband2 + * horizonband3 + * horsey + * Nimbus + * Puffs + * RAIN + * Snowy 01 + * Stormy 01 + * stratoscumulus + * Stripey + * shower + * Wispy + */ + export function loadCloudHat(name: string, transitionTime: number): void; + + export function unloadCloudHat(name: string, p1: number): void; export function unloadAllCloudHats(): void; @@ -8076,19 +8827,19 @@ declare module "natives" { export function getRandomMwcIntInRange(startRange: number, endRange: number): number; /** - * Gets the ground elevation at the specified position. Note that if the specified position is below ground level, the function will output zero! - * Bear in mind this native can only calculate the elevation when the coordinates are within the client's render distance. - * @param x Position on the X-axis to get ground elevation at. - * @param y Position on the Y-axis to get ground elevation at. - * @param z Position on the Z-axis to get ground elevation at. - * @param groundZ The ground elevation at the specified position. - * @param ignoreWater Nearly always 0, very rarely 1 in the scripts: https://gfycat.com/NiftyTatteredCricket - */ - export function getGroundZFor3dCoord(x: number, y: number, z: number, groundZ: number | null, ignoreWater: boolean, p5: boolean): [boolean, number]; + * Gets the ground elevation at the specified position. Note that if the specified position is below ground level, the function will output zero! + * x: Position on the X-axis to get ground elevation at. + * y: Position on the Y-axis to get ground elevation at. + * z: Position on the Z-axis to get ground elevation at. + * groundZ: The ground elevation at the specified position. + * ignoreWater: Nearly always 0, very rarely 1 in the scripts: https://gfycat.com/NiftyTatteredCricket + * Bear in mind this native can only calculate the elevation when the coordinates are within the client's render distance. + */ + export function getGroundZFor3dCoord(x: number, y: number, z: number, groundZ: number, ignoreWater: boolean, p5: boolean): [boolean, number]; export function getGroundZAndNormalFor3dCoord(x: number, y: number, z: number, groundZ?: number, normal?: Vector3): [boolean, number, Vector3]; - export function getGroundZExcludingObjectsFor3dCoord(x: number, y: number, z: number, groundZ: number | null, p4: boolean, p5: boolean): [boolean, number]; + export function getGroundZExcludingObjectsFor3dCoord(x: number, y: number, z: number, groundZ: number, p4: boolean, p5: boolean): [boolean, number]; export function asin(p0: number): number; @@ -8101,28 +8852,28 @@ declare module "natives" { export function atan2(p0: number, p1: number): number; /** - * Returns the distance between two three-dimensional points, optionally ignoring the Z values. - * If useZ is false, only the 2D plane (X-Y) will be considered for calculating the distance. - * Consider using this faster native instead: SYSTEM::VDIST - DVIST always takes in consideration the 3D coordinates. - */ + * Returns the distance between two three-dimensional points, optionally ignoring the Z values. + * If useZ is false, only the 2D plane (X-Y) will be considered for calculating the distance. + * Consider using this faster native instead: SYSTEM::VDIST - DVIST always takes in consideration the 3D coordinates. + */ export function getDistanceBetweenCoords(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, useZ: boolean): number; export function getAngleBetween2dVectors(x1: number, y1: number, x2: number, y2: number): number; /** - * @param dx = x1 - x2 - * @param dy = y1 - y2 - */ + * dx = x1 - x2 + * dy = y1 - y2 + */ export function getHeadingFromVector2d(dx: number, dy: number): number; /** - * returns a float between 0.0 and 1.0, clamp: sets whether the product should be clamped between the given coordinates - */ + * returns a float between 0.0 and 1.0, clamp: sets whether the product should be clamped between the given coordinates + */ export function getRatioOfClosestPointOnLine(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, x3: number, y3: number, z3: number, clamp: boolean): number; /** - * @param clamp sets whether the product should be clamped between the given coordinates - */ + * clamp: sets whether the product should be clamped between the given coordinates + */ export function getClosestPointOnLine(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, x3: number, y3: number, z3: number, clamp: boolean): Vector3; export function getLinePlaneIntersection(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number, p7: number, p8: number, p9: number, p10: number, p11: number, p12?: number): [boolean, number]; @@ -8130,31 +8881,33 @@ declare module "natives" { export function getPointAreaOverlap(p0: any, p1: any, p2: any, p3: any, p4: any, p5: any, p6: any, p7: any, p8: any, p9: any, p10: any, p11: any, p12: any, p13: any): boolean; /** - * This sets bit [offset] of [address] to on. - * The offsets used are different bits to be toggled on and off, typically there is only one address used in a script. - * Example: - * To check if this bit has been enabled: - * Please note, this method may assign a value to [address] when used. - * @returns MISC::IS_BIT_SET(bitAddress, 1); // will return 1 afterwards - */ - export function setBit(address: number | null, offset: number): [void, number]; + * This sets bit [offset] of [address] to on. + * The offsets used are different bits to be toggled on and off, typically there is only one address used in a script. + * Example: + * MISC::SET_BIT(&bitAddress, 1); + * To check if this bit has been enabled: + * MISC::IS_BIT_SET(bitAddress, 1); // will return 1 afterwards + * Please note, this method may assign a value to [address] when used. + */ + export function setBit(address: number, offset: number): [void, number]; /** - * This sets bit [offset] of [address] to off. - * Example: - * To check if this bit has been enabled: - * @returns MISC::IS_BIT_SET(bitAddress, 1); // will return 0 afterwards - */ - export function clearBit(address: number | null, offset: number): [void, number]; + * This sets bit [offset] of [address] to off. + * Example: + * MISC::CLEAR_BIT(&bitAddress, 1); + * To check if this bit has been enabled: + * MISC::IS_BIT_SET(bitAddress, 1); // will return 0 afterwards + */ + export function clearBit(address: number, offset: number): [void, number]; /** - * This native converts its past string to hash. It is hashed using jenkins one at a time method. - */ - export function getHashKey(string: string | null): number; + * This native converts its past string to hash. It is hashed using jenkins one at a time method. + */ + export function getHashKey(string: string): number; /** - * This native always come right before SET_ENTITY_QUATERNION where its final 4 parameters are SLERP_NEAR_QUATERNION p9 to p12 - */ + * This native always come right before SET_ENTITY_QUATERNION where its final 4 parameters are SLERP_NEAR_QUATERNION p9 to p12 + */ export function slerpNearQuaternion(t: number, x: number, y: number, z: number, w: number, x1: number, y1: number, z1: number, w1: number, outX?: number, outY?: number, outZ?: number, outW?: number): [void, number, number, number, number]; export function isAreaOccupied(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: boolean, p7: boolean, p8: boolean, p9: boolean, p10: boolean, p11: any, p12: boolean): boolean; @@ -8162,61 +8915,64 @@ declare module "natives" { export function isAreaOccupiedSlow(p0: any, p1: any, p2: any, p3: any, p4: any, p5: any, p6: any, p7: any, p8: any, p9: any, p10: any, p11: any, p12: any): boolean; /** - * `checkVehicle`: Check for any vehicles in that area. - * `checkPeds`: Check for any peds in that area. - * `ignoreEntity`: This entity will be ignored if it's in the area. Set to 0 if you don't want to exclude any entities. - * The BOOL parameters that are documented have not been confirmed. They are just documented from what I've found during testing. They may not work as expected in all cases. - * Returns true if there is anything in that location matching the provided parameters. - * @param range The range, seems to not be very accurate during testing. - * @returns `p4`: Unknown, when set to true it seems to always return true no matter what I try. - */ + * `range`: The range, seems to not be very accurate during testing. + * `p4`: Unknown, when set to true it seems to always return true no matter what I try. + * `checkVehicle`: Check for any vehicles in that area. + * `checkPeds`: Check for any peds in that area. + * `ignoreEntity`: This entity will be ignored if it's in the area. Set to 0 if you don't want to exclude any entities. + * The BOOL parameters that are documented have not been confirmed. They are just documented from what I've found during testing. They may not work as expected in all cases. + * Returns true if there is anything in that location matching the provided parameters. + */ export function isPositionOccupied(x: number, y: number, z: number, range: number, p4: boolean, checkVehicles: boolean, checkPeds: boolean, p7: boolean, p8: boolean, ignoreEntity: Entity | number, p10: boolean): boolean; export function isPointObscuredByAMissionEntity(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: any): boolean; /** - * Example: CLEAR_AREA(0, 0, 0, 30, true, false, false, false); - */ + * Example: CLEAR_AREA(0, 0, 0, 30, true, false, false, false); + */ export function clearArea(X: number, Y: number, Z: number, radius: number, p4: boolean, ignoreCopCars: boolean, ignoreObjects: boolean, p7: boolean): void; + /** + * MISC::CLEAR_AREA_LEAVE_VEHICLE_HEALTH(x, y, z, radius, false, false, false, false); seem to make all objects go away, peds, vehicles etc. All booleans set to true doesn't seem to change anything. + */ export function clearAreaLeaveVehicleHealth(x: number, y: number, z: number, radius: number, p4: boolean, p5: boolean, p6: boolean, p7: boolean): void; /** - * Example: - * CLEAR_AREA_OF_VEHICLES(0.0f, 0.0f, 0.0f, 10000.0f, false, false, false, false, false, false); - */ + * Example: + * CLEAR_AREA_OF_VEHICLES(0.0f, 0.0f, 0.0f, 10000.0f, false, false, false, false, false, false); + */ export function clearAreaOfVehicles(x: number, y: number, z: number, radius: number, p4: boolean, p5: boolean, p6: boolean, p7: boolean, p8: boolean, p9: boolean, p10: any): void; export function clearAngledAreaOfVehicles(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, width: number, p7: boolean, p8: boolean, p9: boolean, p10: boolean, p11: boolean, p12: any, p13: any): void; /** - * I looked through the PC scripts that this site provides you with a link to find. It shows the last param mainly uses, (0, 2, 6, 16, and 17) so I am going to assume it is a type of flag. - */ + * I looked through the PC scripts that this site provides you with a link to find. It shows the last param mainly uses, (0, 2, 6, 16, and 17) so I am going to assume it is a type of flag. + */ export function clearAreaOfObjects(x: number, y: number, z: number, radius: number, flags: number): void; /** - * Example: CLEAR_AREA_OF_PEDS(0, 0, 0, 10000, 1); - */ + * Example: CLEAR_AREA_OF_PEDS(0, 0, 0, 10000, 1); + */ export function clearAreaOfPeds(x: number, y: number, z: number, radius: number, flags: number): void; /** - * @param flags appears to always be 0 - */ + * flags appears to always be 0 + */ export function clearAreaOfCops(x: number, y: number, z: number, radius: number, flags: number): void; /** - * @param flags is usually 0 in the scripts. - */ + * flags is usually 0 in the scripts. + */ export function clearAreaOfProjectiles(x: number, y: number, z: number, radius: number, flags: number): void; /** - * Possibly used to clear scenario points. - */ + * Possibly used to clear scenario points. + */ export function clearScenarioSpawnHistory(): void; /** - * @param ignoreVehicle - bypasses vehicle check of the local player (it will not open if you are in a vehicle and this is set to false) - */ + * ignoreVehicle - bypasses vehicle check of the local player (it will not open if you are in a vehicle and this is set to false) + */ export function setSaveMenuActive(ignoreVehicle: boolean): void; export function getStatusOfManualSave(): number; @@ -8229,29 +8985,29 @@ declare module "natives" { export function areCreditsRunning(): boolean; - export function terminateAllScriptsWithThisName(scriptName: string | null): void; + export function terminateAllScriptsWithThisName(scriptName: string): void; export function networkSetScriptIsSafeForNetworkGame(): void; /** - * Returns the index of the newly created hospital spawn point. - * @param p3 might be radius? - */ + * Returns the index of the newly created hospital spawn point. + * p3 might be radius? + */ export function addHospitalRestart(x: number, y: number, z: number, p3: number, p4: any): number; /** - * The game by default has 5 hospital respawn points. Disabling them all will cause the player to respawn at the last position they were. - */ + * The game by default has 5 hospital respawn points. Disabling them all will cause the player to respawn at the last position they were. + */ export function disableHospitalRestart(hospitalIndex: number, toggle: boolean): void; export function addPoliceRestart(p0: number, p1: number, p2: number, p3: number, p4: any): number; /** - * Disables the spawn point at the police house on the specified index. - * - Nacorpio - * @param policeIndex The police house index. - * @param toggle true to enable the spawn point, false to disable. - */ + * Disables the spawn point at the police house on the specified index. + * policeIndex: The police house index. + * toggle: true to enable the spawn point, false to disable. + * - Nacorpio + */ export function disablePoliceRestart(policeIndex: number, toggle: boolean): void; export function setRestartCoordOverride(x: number, y: number, z: number, heading: number): void; @@ -8263,26 +9019,26 @@ declare module "natives" { export function ignoreNextRestart(toggle: boolean): void; /** - * Sets whether the game should fade out after the player dies. - */ + * Sets whether the game should fade out after the player dies. + */ export function setFadeOutAfterDeath(toggle: boolean): void; /** - * Sets whether the game should fade out after the player is arrested. - */ + * Sets whether the game should fade out after the player is arrested. + */ export function setFadeOutAfterArrest(toggle: boolean): void; /** - * Sets whether the game should fade in after the player dies or is arrested. - */ + * Sets whether the game should fade in after the player dies or is arrested. + */ export function setFadeInAfterDeathArrest(toggle: boolean): void; export function setFadeInAfterLoad(toggle: boolean): void; /** - * returns savehouseHandle - */ - export function registerSaveHouse(x: number, y: number, z: number, p3: number, p4: string | null, p5: any, p6: any): number; + * returns savehouseHandle + */ + export function registerSaveHouse(x: number, y: number, z: number, p3: number, p4: string, p5: any, p6: any): number; export function setSaveHouse(savehouseHandle: number, p1: boolean, p2: boolean): void; @@ -8293,8 +9049,8 @@ declare module "natives" { export function doAutoSave(): void; /** - * Returns true if profile setting 208 is equal to 0. - */ + * Returns true if profile setting 208 is equal to 0. + */ export function getIsAutoSaveOff(): boolean; export function isAutoSaveInProgress(): boolean; @@ -8324,9 +9080,9 @@ declare module "natives" { export function queueMissionRepeatLoad(): boolean; /** - * Shows the screen which is visible before you redo a mission? The game will make a restoration point where you will cameback when the mission is over. - * Returns 1 if the message isn't currently on screen - */ + * Shows the screen which is visible before you redo a mission? The game will make a restoration point where you will cameback when the mission is over. + * Returns 1 if the message isn't currently on screen + */ export function queueMissionRepeatSave(): boolean; export function queueMissionRepeatSaveForBenchmarkTest(): boolean; @@ -8335,30 +9091,30 @@ declare module "natives" { export function isMemoryCardInUse(): boolean; - export function shootSingleBulletBetweenCoords(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, damage: number, p7: boolean, weaponHash: number, ownerPed: Player | number, isAudible: boolean, isInvisible: boolean, speed: number): void; + export function shootSingleBulletBetweenCoords(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, damage: number, p7: boolean, weaponHash: number, ownerPed: Ped | Player | number, isAudible: boolean, isInvisible: boolean, speed: number): void; /** - * @param entity - entity to ignore - */ - export function shootSingleBulletBetweenCoordsIgnoreEntity(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, damage: number, p7: boolean, weaponHash: number, ownerPed: Player | number, isAudible: boolean, isInvisible: boolean, speed: number, entity: Entity | number, p14: any): void; + * entity - entity to ignore + */ + export function shootSingleBulletBetweenCoordsIgnoreEntity(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, damage: number, p7: boolean, weaponHash: number, ownerPed: Ped | Player | number, isAudible: boolean, isInvisible: boolean, speed: number, entity: Entity | number, p14: any): void; /** - * @param entity - entity to ignore - * @param targetEntity - entity to home in on, if the weapon hash provided supports homing - */ - export function shootSingleBulletBetweenCoordsIgnoreEntityNew(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, damage: number, p7: boolean, weaponHash: number, ownerPed: Player | number, isAudible: boolean, isInvisible: boolean, speed: number, entity: Entity | number, p14: boolean, p15: boolean, targetEntity: Entity | number, p17: boolean, p18: any, p19: any, p20: any): void; + * entity - entity to ignore + * targetEntity - entity to home in on, if the weapon hash provided supports homing + */ + export function shootSingleBulletBetweenCoordsIgnoreEntityNew(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, damage: number, p7: boolean, weaponHash: number, ownerPed: Ped | Player | number, isAudible: boolean, isInvisible: boolean, speed: number, entity: Entity | number, p14: boolean, p15: boolean, targetEntity: Entity | number, p17: boolean, p18: any, p19: any, p20: any): void; /** - * Gets the dimensions of a model. - * Calculate (maximum - minimum) to get the size, in which case, Y will be how long the model is. - * Example from the scripts: MISC::GET_MODEL_DIMENSIONS(ENTITY::GET_ENTITY_MODEL(PLAYER::PLAYER_PED_ID()), &v_1A, &v_17); - */ + * Gets the dimensions of a model. + * Calculate (maximum - minimum) to get the size, in which case, Y will be how long the model is. + * Example from the scripts: MISC::GET_MODEL_DIMENSIONS(ENTITY::GET_ENTITY_MODEL(PLAYER::PLAYER_PED_ID()), &v_1A, &v_17); + */ export function getModelDimensions(modelHash: number, minimum?: Vector3, maximum?: Vector3): [void, Vector3, Vector3]; /** - * Sets a visually fake wanted level on the user interface. Used by Rockstar's scripts to "override" regular wanted levels and make custom ones while the real wanted level and multipliers are still in effect. - * Max is 6, anything above this makes it just 6. Also the mini-map gets the red & blue flashing effect. - */ + * Sets a visually fake wanted level on the user interface. Used by Rockstar's scripts to "override" regular wanted levels and make custom ones while the real wanted level and multipliers are still in effect. + * Max is 6, anything above this makes it just 6. Also the mini-map gets the red & blue flashing effect. + */ export function setFakeWantedLevel(fakeWantedLevel: number): void; export function getFakeWantedLevel(): number; @@ -8373,76 +9129,85 @@ declare module "natives" { export function isThisAMinigameScript(): boolean; + /** + * This function is hard-coded to always return 0. + */ export function isSniperInverted(): boolean; /** - * Returns true if the game is using the metric measurement system (profile setting 227), false if imperial is used. - */ + * Returns true if the game is using the metric measurement system (profile setting 227), false if imperial is used. + */ export function shouldUseMetricMeasurements(): boolean; export function getProfileSetting(profileSetting: number): number; - export function areStringsEqual(string1: string | null, string2: string | null): boolean; - - /** - * Compares two strings up to a specified number of characters. - * Parameters: - * Returns: - * A value indicating the relationship between the strings: - * <0 - The first non-matching character in 'str1' is less than the one in 'str2'. (e.g. 'A' < 'B', so result = -1) - * 0 - The contents of both strings are equal. - * >0 - The first non-matching character in 'str1' is less than the one in 'str2'. (e.g. 'B' > 'A', so result = 1) - * Examples: - * MISC::COMPARE_STRINGS("STRING", "string", false, -1); // 0; equal - * See NativeDB for reference: http://natives.altv.mp/#/0x1E34710ECD4AB0EB - * @param str1 - String to be compared. - * @param str2 - String to be compared. - * @param matchCase - Comparison will be case-sensitive. - * @param maxLength - Maximum number of characters to compare. A value of -1 indicates an infinite length. - */ - export function compareStrings(str1: string | null, str2: string | null, matchCase: boolean, maxLength: number): number; + export function areStringsEqual(string1: string, string2: string): boolean; + + /** + * Compares two strings up to a specified number of characters. + * Parameters: + * str1 - String to be compared. + * str2 - String to be compared. + * matchCase - Comparison will be case-sensitive. + * maxLength - Maximum number of characters to compare. A value of -1 indicates an infinite length. + * Returns: + * A value indicating the relationship between the strings: + * <0 - The first non-matching character in 'str1' is less than the one in 'str2'. (e.g. 'A' < 'B', so result = -1) + * 0 - The contents of both strings are equal. + * >0 - The first non-matching character in 'str1' is less than the one in 'str2'. (e.g. 'B' > 'A', so result = 1) + * Examples: + * MISC::COMPARE_STRINGS("STRING", "string", false, -1); // 0; equal + * MISC::COMPARE_STRINGS("TESTING", "test", false, 4); // 0; equal + * MISC::COMPARE_STRINGS("R2D2", "R2xx", false, 2); // 0; equal + * MISC::COMPARE_STRINGS("foo", "bar", false, -1); // 4; 'f' > 'b' + * MISC::COMPARE_STRINGS("A", "A", true, 1); // 0; equal + * When comparing case-sensitive strings, lower-case characters are greater than upper-case characters: + * MISC::COMPARE_STRINGS("A", "a", true, 1); // -1; 'A' < 'a' + * MISC::COMPARE_STRINGS("a", "A", true, 1); // 1; 'a' > 'A' + */ + export function compareStrings(str1: string, str2: string, matchCase: boolean, maxLength: number): number; export function absi(value: number): number; export function absf(value: number): number; /** - * Determines whether there is a sniper bullet within the specified coordinates. The coordinates form an axis-aligned bounding box. - */ + * Determines whether there is a sniper bullet within the specified coordinates. The coordinates form an axis-aligned bounding box. + */ export function isSniperBulletInArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): boolean; /** - * Determines whether there is a projectile within the specified coordinates. The coordinates form a rectangle. - * - Nacorpio - * @param ownedByPlayer = only projectiles fired by the player will be detected. - */ + * Determines whether there is a projectile within the specified coordinates. The coordinates form a rectangle. + * - Nacorpio + * ownedByPlayer = only projectiles fired by the player will be detected. + */ export function isProjectileInArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, ownedByPlayer: boolean): boolean; /** - * Determines whether there is a projectile of a specific type within the specified coordinates. The coordinates form a axis-aligned bounding box. - */ + * Determines whether there is a projectile of a specific type within the specified coordinates. The coordinates form a axis-aligned bounding box. + */ export function isProjectileTypeInArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, type: number, ownedByPlayer: boolean): boolean; /** - * See IS_POINT_IN_ANGLED_AREA for the definition of an angled area. - */ + * See IS_POINT_IN_ANGLED_AREA for the definition of an angled area. + */ export function isProjectileTypeInAngledArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, width: number, p7: any, ownedByPlayer: boolean): boolean; export function isProjectileTypeWithinDistance(x: number, y: number, z: number, projectileHash: number, radius: number, ownedByPlayer: boolean): boolean; - export function getCoordsOfProjectileTypeInArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, projectileHash: number, projectilePos: Vector3 | null, ownedByPlayer: boolean): [boolean, Vector3]; + export function getCoordsOfProjectileTypeInArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, projectileHash: number, projectilePos: Vector3, ownedByPlayer: boolean): [boolean, Vector3]; - export function getCoordsOfProjectileTypeInAngledArea(vecAngledAreaPoint1X: number, vecAngledAreaPoint1Y: number, vecAngledAreaPoint1Z: number, vecAngledAreaPoint2X: number, vecAngledAreaPoint2Y: number, vecAngledAreaPoint2Z: number, distanceOfOppositeFace: number, weaponType: number, positionOut: Vector3 | null, bIsPlayer: boolean): [boolean, Vector3]; + export function getCoordsOfProjectileTypeInAngledArea(vecAngledAreaPoint1X: number, vecAngledAreaPoint1Y: number, vecAngledAreaPoint1Z: number, vecAngledAreaPoint2X: number, vecAngledAreaPoint2Y: number, vecAngledAreaPoint2Z: number, distanceOfOppositeFace: number, weaponType: number, positionOut: Vector3, bIsPlayer: boolean): [boolean, Vector3]; - export function getCoordsOfProjectileTypeWithinDistance(ped: Player | number, weaponHash: number, distance: number, outCoords: Vector3 | null, p4: boolean): [boolean, Vector3]; + export function getCoordsOfProjectileTypeWithinDistance(ped: Ped | Player | number, weaponHash: number, distance: number, outCoords: Vector3, p4: boolean): [boolean, Vector3]; - export function getProjectileOfProjectileTypeWithinDistance(ped: Player | number, weaponHash: number, distance: number, outCoords: Vector3 | null, outProjectile: number | null, p5: boolean): [boolean, Vector3, number]; + export function getProjectileOfProjectileTypeWithinDistance(ped: Ped | Player | number, weaponHash: number, distance: number, outCoords: Vector3, outProjectile: Object, p5: boolean): [boolean, Vector3, Object]; /** - * For projectiles, see: IS_PROJECTILE_TYPE_IN_ANGLED_AREA - * See IS_POINT_IN_ANGLED_AREA for the definition of an angled area. - * Returns True if a bullet, as maintained by a pool within CWeaponManager, has been fired into the defined angled area. - */ + * For projectiles, see: IS_PROJECTILE_TYPE_IN_ANGLED_AREA + * See IS_POINT_IN_ANGLED_AREA for the definition of an angled area. + * Returns True if a bullet, as maintained by a pool within CWeaponManager, has been fired into the defined angled area. + */ export function isBulletInAngledArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, width: number, ownedByPlayer: boolean): boolean; export function isBulletInArea(x: number, y: number, z: number, radius: number, ownedByPlayer: boolean): boolean; @@ -8450,20 +9215,20 @@ declare module "natives" { export function isBulletInBox(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, ownedByPlayer: boolean): boolean; /** - * @param p3 - possibly radius? - */ + * p3 - possibly radius? + */ export function hasBulletImpactedInArea(x: number, y: number, z: number, p3: number, p4: boolean, p5: boolean): boolean; export function hasBulletImpactedInBox(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: boolean, p7: boolean): boolean; /** - * PS4 - */ + * PS4 + */ export function isOrbisVersion(): boolean; /** - * XBOX ONE - */ + * XBOX ONE + */ export function isDurangoVersion(): boolean; export function isXbox360Version(): boolean; @@ -8475,8 +9240,8 @@ declare module "natives" { export function isSteamVersion(): boolean; /** - * Used to block some of the prostitute stuff due to laws in Australia. - */ + * Used to block some of the prostitute stuff due to laws in Australia. + */ export function isAussieVersion(): boolean; export function isJapaneseVersion(): boolean; @@ -8484,63 +9249,55 @@ declare module "natives" { export function isXboxPlatform(): boolean; /** - * Xbox Series (Scarlett) version... - */ + * Xbox Series (Scarlett) version... + */ export function isScarlettVersion(): boolean; export function isScePlatform(): boolean; /** - * PS5 (Prospero) version... - */ + * PS5 (Prospero) version... + */ export function isProsperoVersion(): boolean; - export function isStringNull(string: string | null): boolean; + export function isStringNull(string: string): boolean; - export function isStringNullOrEmpty(string: string | null): boolean; + export function isStringNullOrEmpty(string: string): boolean; /** - * 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. - * @returns If all checks have passed successfully, the return value will be set to whatever strtol(string, 0i64, 10); returns. - */ - export function stringToInt(string: string | null, outInteger?: number): [boolean, number]; + * 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. + * If all checks have passed successfully, the return value will be set to whatever strtol(string, 0i64, 10); returns. + */ + export function stringToInt(string: string, outInteger?: number): [boolean, number]; - export function setBitsInRange(unkVar: number | null, rangeStart: number, rangeEnd: number, p3: number): [void, number]; + export function setBitsInRange(value: number, rangeStart: number, rangeEnd: number, p3: number): [void, number]; - export function getBitsInRange(unkVar: number, rangeStart: number, rangeEnd: number): number; + export function getBitsInRange(value: number, rangeStart: number, rangeEnd: number): number; /** - * See description of `ADD_STUNT_JUMP_ANGLED` for detailed info. The only difference really is this one does not have the radius (or angle, not sure) floats parameters for entry and landing zones. - */ + * See description of `ADD_STUNT_JUMP_ANGLED` for detailed info. The only difference really is this one does not have the radius (or angle, not sure) floats parameters for entry and landing zones. + */ export function addStuntJump(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, x3: number, y3: number, z3: number, x4: number, y4: number, z4: number, camX: number, camY: number, camZ: number, p15: number, p16: number, p17: number): number; /** - * Creates a new stunt jump. - * The radius1 and radius2 might actually not be a radius at all, but that's what it seems to me testing them in-game. But they may be 'angle' floats instead, considering this native is named ADD_STUNT_JUMP_**ANGLED**. - * Info about the specific 'parameter sections': - * First coordinates are for the jump entry area, and the radius that will be checked around that area. So if you're not exactly within the coordinates, but you are within the outter radius limit then it will still register as entering the stunt jump. Note as mentioned above, the radius is just a guess, I'm not really sure about it's exact purpose. - * Next part is the landing area, again starting with the left bottom (nearest to the stunt jump entry zone) coordinate, and the second one being the top right furthest away part of the landing area. Followed by another (most likely) radius float, this is usually slightly larger than the entry zone 'radius' float value, just because you have quite a lot of places where you can land (I'm guessing). - * The final coordinate in this native is the Camera position. Rotation and zoom/FOV is managed by the game itself, you just need to provide the camera location. - * **unk1, unk2 and unk3:** - * Not sure what these are for, but they're always `150, 0, 0` in decompiled scripts. - * Here is a list of almost all of the stunt jumps from GTA V (taken from decompiled scripts): https://pastebin.com/EW1jBPkY - * @param x1 ** - * @param y1 ** - * @param z1 ** - * @param x2 ** - * @param y2 ** - * @param x3 ** - * @param y3 ** - * @param z3 ** - * @param x4 ** - * @param y4 ** - * @param camX ** - */ + * Creates a new stunt jump. + * The radius1 and radius2 might actually not be a radius at all, but that's what it seems to me testing them in-game. But they may be 'angle' floats instead, considering this native is named ADD_STUNT_JUMP_**ANGLED**. + * Info about the specific 'parameter sections': + * **x1, y1, z1, x2, y2, z2 and radius1:** + * First coordinates are for the jump entry area, and the radius that will be checked around that area. So if you're not exactly within the coordinates, but you are within the outter radius limit then it will still register as entering the stunt jump. Note as mentioned above, the radius is just a guess, I'm not really sure about it's exact purpose. + * **x3, y3, z3, x4, y4, z4 and radius2:** + * Next part is the landing area, again starting with the left bottom (nearest to the stunt jump entry zone) coordinate, and the second one being the top right furthest away part of the landing area. Followed by another (most likely) radius float, this is usually slightly larger than the entry zone 'radius' float value, just because you have quite a lot of places where you can land (I'm guessing). + * **camX, camY and camZ:** + * The final coordinate in this native is the Camera position. Rotation and zoom/FOV is managed by the game itself, you just need to provide the camera location. + * **unk1, unk2 and unk3:** + * Not sure what these are for, but they're always `150, 0, 0` in decompiled scripts. + * Here is a list of almost all of the stunt jumps from GTA V (taken from decompiled scripts): https://pastebin.com/EW1jBPkY + */ export function addStuntJumpAngled(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, radius1: number, x3: number, y3: number, z3: number, x4: number, y4: number, z4: number, radius2: number, camX: number, camY: number, camZ: number, p17: number, p18: number, p19: number): number; /** - * Toggles some stunt jump stuff. - */ + * Toggles some stunt jump stuff. + */ export function toggleShowOptionalStuntJumpCamera(toggle: boolean): void; export function deleteStuntJump(p0: number): void; @@ -8562,8 +9319,8 @@ declare module "natives" { export function cancelStuntJump(): void; /** - * 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 which means you will lose control and the game remains in paused mode until you exit GTA5.exe - */ + * 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 which means you will lose control and the game remains in paused mode until you exit GTA5.exe + */ export function setGamePaused(toggle: boolean): void; export function setThisScriptCanBePaused(toggle: boolean): void; @@ -8571,124 +9328,127 @@ declare module "natives" { export function setThisScriptCanRemoveBlipsCreatedByAnyScript(toggle: boolean): void; /** - * INT_SCORES_SCORTED was a hash collision - * @param hash game. Credits to ThreeSocks for the info. The hash contains the combination, while the "amount" represents the amount of buttons used in a combination. The following page can be used to make a button combination: gta5offset.com/ts/hash/ - */ + * This native appears on the cheat_controller script and tracks a combination of buttons, which may be used to toggle cheats in-game. Credits to ThreeSocks for the info. The hash contains the combination, while the "amount" represents the amount of buttons used in a combination. The following page can be used to make a button combination: gta5offset.com/ts/hash/ + * INT_SCORES_SCORTED was a hash collision + */ export function hasCheatWithHashBeenActivated(hash: number, amount: number): boolean; /** - * Get inputted "Cheat code", for example: - * while (TRUE) - * { - * if (MISC::HAS_PC_CHEAT_WITH_HASH_BEEN_ACTIVATED(${fugitive})) - * { - * // Do something. - * } - * SYSTEM::WAIT(0); - * } - * Calling this will also set the last saved string hash to zero. - */ + * Get inputted "Cheat code", for example: + * while (TRUE) + * { + * if (MISC::HAS_PC_CHEAT_WITH_HASH_BEEN_ACTIVATED(${fugitive})) + * { + * // Do something. + * } + * SYSTEM::WAIT(0); + * } + * Calling this will also set the last saved string hash to zero. + */ export function hasPcCheatWithHashBeenActivated(hash: number): boolean; export function overrideFreezeFlags(p0: boolean): void; /** - * Formerly known as _LOWER_MAP_PROP_DENSITY and wrongly due to idiots as _ENABLE_MP_DLC_MAPS. - * Sets the maximum prop density and changes a loading screen flag from 'loading story mode' to 'loading GTA Online'. Does not touch DLC map data at all. - * In fact, I doubt this changes the flag whatsoever, that's the OTHER native idiots use together with this that does so, this one only causes a loading screen to show as it reloads map data. - */ + * Formerly known as _LOWER_MAP_PROP_DENSITY and wrongly due to idiots as _ENABLE_MP_DLC_MAPS. + * Sets the maximum prop density and changes a loading screen flag from 'loading story mode' to 'loading GTA Online'. Does not touch DLC map data at all. + * In fact, I doubt this changes the flag whatsoever, that's the OTHER native idiots use together with this that does so, this one only causes a loading screen to show as it reloads map data. + */ export function setInstancePriorityMode(p0: number): void; /** - * Sets an unknown flag used by CScene in determining which entities from CMapData scene nodes to draw, similar to SET_INSTANCE_PRIORITY_MODE. - */ + * Sets an unknown flag used by CScene in determining which entities from CMapData scene nodes to draw, similar to SET_INSTANCE_PRIORITY_MODE. + */ export function setInstancePriorityHint(flag: number): void; + /** + * This function is hard-coded to always return 0. + */ export function isFrontendFading(): boolean; /** - * spawns a few distant/out-of-sight peds, vehicles, animals etc each time it is called - */ + * spawns a few distant/out-of-sight peds, vehicles, animals etc each time it is called + */ export function populateNow(): void; export function getIndexOfCurrentLevel(): number; /** - * 0: 9.8 - normal - * 1: 2.4 - low - * 2: 0.1 - very low - * 3: 0.0 - off - * @param level can be from 0 to 3 - */ + * level can be from 0 to 3 + * 0: 9.8 - normal + * 1: 2.4 - low + * 2: 0.1 - very low + * 3: 0.0 - off + */ export function setGravityLevel(level: number): void; - export function startSaveData(p0: any | null, p1: any, p2: boolean): [void, any]; + export function startSaveData(p0: any, p1: any, p2: boolean): [void, any]; export function stopSaveData(): void; export function getSizeOfSaveData(p0: boolean): number; - export function registerIntToSave(p0: any | null, name: string | null): [void, any]; + export function registerIntToSave(p0: any, name: string): [void, any]; - export function registerInt64ToSave(p0: any | null, name: string | null): [void, any]; + export function registerInt64ToSave(p0: any, name: string): [void, any]; - export function registerEnumToSave(p0: any | null, name: string | null): [void, any]; + export function registerEnumToSave(p0: any, name: string): [void, any]; - export function registerFloatToSave(p0: any | null, name: string | null): [void, any]; + export function registerFloatToSave(p0: any, name: string): [void, any]; - export function registerBoolToSave(p0: any | null, name: string | null): [void, any]; + export function registerBoolToSave(p0: any, name: string): [void, any]; - export function registerTextLabelToSave(p0: any | null, name: string | null): [void, any]; + export function registerTextLabelToSave(p0: any, name: string): [void, any]; /** - * MISC::REGISTER_TEXT_LABEL_15_TO_SAVE(&a_0._f1, "tlPlateText"); - * MISC::REGISTER_TEXT_LABEL_15_TO_SAVE(&a_0._f1C, "tlPlateText_pending"); - * MISC::REGISTER_TEXT_LABEL_15_TO_SAVE(&a_0._f10B, "tlCarAppPlateText"); - */ - export function registerTextLabel15ToSave(p0: any | null, name: string | null): [void, any]; + * MISC::REGISTER_TEXT_LABEL_15_TO_SAVE(&a_0._f1, "tlPlateText"); + * MISC::REGISTER_TEXT_LABEL_15_TO_SAVE(&a_0._f1C, "tlPlateText_pending"); + * MISC::REGISTER_TEXT_LABEL_15_TO_SAVE(&a_0._f10B, "tlCarAppPlateText"); + */ + export function registerTextLabel15ToSave(p0: any, name: string): [void, any]; /** - * Only found 3 times in decompiled scripts. - * MISC::REGISTER_TEXT_LABEL_23_TO_SAVE(a_0, "Movie_Name_For_This_Player"); - * MISC::REGISTER_TEXT_LABEL_23_TO_SAVE(&a_0._fB, "Ringtone_For_This_Player"); - * MISC::REGISTER_TEXT_LABEL_23_TO_SAVE(&a_0._f1EC4._f12[v_A6], &v_13); // where v_13 is "MPATMLOGSCRS0" thru "MPATMLOGSCRS15" - */ - export function registerTextLabel23ToSave(p0: any | null, name: string | null): [void, any]; + * Only found 3 times in decompiled scripts. + * MISC::REGISTER_TEXT_LABEL_23_TO_SAVE(a_0, "Movie_Name_For_This_Player"); + * MISC::REGISTER_TEXT_LABEL_23_TO_SAVE(&a_0._fB, "Ringtone_For_This_Player"); + * MISC::REGISTER_TEXT_LABEL_23_TO_SAVE(&a_0._f1EC4._f12[v_A/*6*\/], &v_13); // where v_13 is "MPATMLOGSCRS0" thru "MPATMLOGSCRS15" + */ + export function registerTextLabel23ToSave(p0: any, name: string): [void, any]; /** - * Only found 2 times in decompiled scripts. - * MISC::REGISTER_TEXT_LABEL_31_TO_SAVE(&a_0._f1F5A._f6[08], "TEMPSTAT_LABEL"); // gets saved in a struct called "g_SaveData_STRING_ScriptSaves" - * MISC::REGISTER_TEXT_LABEL_31_TO_SAVE(&a_0._f4B4[v_1A8], &v_5); // where v_5 is "Name0" thru "Name9", gets saved in a struct called "OUTFIT_Name" - */ - export function registerTextLabel31ToSave(p0: any | null, name: string | null): [void, any]; + * Only found 2 times in decompiled scripts. + * MISC::REGISTER_TEXT_LABEL_31_TO_SAVE(&a_0._f1F5A._f6[0/*8*\/], "TEMPSTAT_LABEL"); // gets saved in a struct called "g_SaveData_STRING_ScriptSaves" + * MISC::REGISTER_TEXT_LABEL_31_TO_SAVE(&a_0._f4B4[v_1A/*8*\/], &v_5); // where v_5 is "Name0" thru "Name9", gets saved in a struct called "OUTFIT_Name" + */ + export function registerTextLabel31ToSave(p0: any, name: string): [void, any]; /** - * MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(a_0, "Thumb_label"); - * MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(&a_0._f10, "Photo_label"); - * MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(a_0, "GXTlabel"); - * MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(&a_0._f21, "StringComp"); - * MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(&a_0._f43, "SecondStringComp"); - * MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(&a_0._f53, "ThirdStringComp"); - * MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(&a_0._f32, "SenderStringComp"); - * MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(&a_0._f726[v_1A16], &v_20); // where v_20 is "LastJobTL_0_1" thru "LastJobTL_2_1", gets saved in a struct called "LAST_JobGamer_TL" - * MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(&a_0._f4B, "PAID_PLAYER"); - * MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(&a_0._f5B, "RADIO_STATION"); - */ - export function registerTextLabel63ToSave(p0: any | null, name: string | null): [void, any]; + * MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(a_0, "Thumb_label"); + * MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(&a_0._f10, "Photo_label"); + * MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(a_0, "GXTlabel"); + * MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(&a_0._f21, "StringComp"); + * MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(&a_0._f43, "SecondStringComp"); + * MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(&a_0._f53, "ThirdStringComp"); + * MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(&a_0._f32, "SenderStringComp"); + * MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(&a_0._f726[v_1A/*16*\/], &v_20); // where v_20 is "LastJobTL_0_1" thru "LastJobTL_2_1", gets saved in a struct called "LAST_JobGamer_TL" + * MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(&a_0._f4B, "PAID_PLAYER"); + * MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(&a_0._f5B, "RADIO_STATION"); + */ + export function registerTextLabel63ToSave(p0: any, name: string): [void, any]; - export function startSaveStructWithSize(p0: any | null, size: number, structName: string | null): [void, any]; + export function startSaveStructWithSize(p0: any, size: number, structName: string): [void, any]; export function stopSaveStruct(): void; - export function startSaveArrayWithSize(p0: any | null, size: number, arrayName: string | null): [void, any]; + export function startSaveArrayWithSize(p0: any, size: number, arrayName: string): [void, any]; export function stopSaveArray(): void; - export function copyScriptStruct(dst: any | null, src: any | null, size: number): [void, any, any]; + export function copyScriptStruct(dst: any, src: any, size: number): [void, any, any]; /** - * https://alloc8or.re/gta5/doc/enums/DispatchType.txt - */ + * https://alloc8or.re/gta5/doc/enums/DispatchType.txt + */ export function enableDispatchService(dispatchService: number, toggle: boolean): void; export function blockDispatchServiceResourceCreation(dispatchService: number, toggle: boolean): void; @@ -8696,40 +9456,40 @@ declare module "natives" { export function getNumberResourcesAllocatedToWantedLevel(dispatchService: number): number; /** - * As for the 'police' incident, it will call police cars to you, but unlike PedsInCavalcades & Merryweather they won't start shooting at you unless you shoot first or shoot at them. The top 2 however seem to cancel theirselves if there is noone dead around you or a fire. I only figured them out as I found out the 3rd param is definately the amountOfPeople and they called incident 3 in scripts with 4 people (which the firetruck has) and incident 5 with 2 people (which the ambulence has). The 4 param I cant say is radius, but for the pedsInCavalcades and Merryweather R* uses 0.0f and for the top 3 (Emergency Services) they use 3.0f. - * Side Note: It seems calling the pedsInCavalcades or Merryweather then removing it seems to break you from calling the EmergencyEvents and I also believe pedsInCavalcades. (The V cavalcades of course not IV). - * Side Note 2: I say it breaks as if you call this proper, - * ===================================================== - * @returns if(CREATE_INCIDENT) etc it will return false if you do as I said above. - */ - export function createIncident(dispatchService: number, x: number, y: number, z: number, numUnits: number, radius: number, outIncidentID: number | null, p7: any, p8: any): [boolean, number]; + * As for the 'police' incident, it will call police cars to you, but unlike PedsInCavalcades & Merryweather they won't start shooting at you unless you shoot first or shoot at them. The top 2 however seem to cancel theirselves if there is noone dead around you or a fire. I only figured them out as I found out the 3rd param is definately the amountOfPeople and they called incident 3 in scripts with 4 people (which the firetruck has) and incident 5 with 2 people (which the ambulence has). The 4 param I cant say is radius, but for the pedsInCavalcades and Merryweather R* uses 0.0f and for the top 3 (Emergency Services) they use 3.0f. + * Side Note: It seems calling the pedsInCavalcades or Merryweather then removing it seems to break you from calling the EmergencyEvents and I also believe pedsInCavalcades. (The V cavalcades of course not IV). + * Side Note 2: I say it breaks as if you call this proper, + * if(CREATE_INCIDENT) etc it will return false if you do as I said above. + * ===================================================== + */ + export function createIncident(dispatchService: number, x: number, y: number, z: number, numUnits: number, radius: number, outIncidentID: number, p7: any, p8: any): [boolean, number]; /** - * As for the 'police' incident, it will call police cars to you, but unlike PedsInCavalcades & Merryweather they won't start shooting at you unless you shoot first or shoot at them. The top 2 however seem to cancel theirselves if there is noone dead around you or a fire. I only figured them out as I found out the 3rd param is definately the amountOfPeople and they called incident 3 in scripts with 4 people (which the firetruck has) and incident 5 with 2 people (which the ambulence has). The 4 param I cant say is radius, but for the pedsInCavalcades and Merryweather R* uses 0.0f and for the top 3 (Emergency Services) they use 3.0f. - * Side Note: It seems calling the pedsInCavalcades or Merryweather then removing it seems to break you from calling the EmergencyEvents and I also believe pedsInCavalcades. (The V cavalcades of course not IV). - * Side Note 2: I say it breaks as if you call this proper, - * ===================================================== - * @returns if(CREATE_INCIDENT) etc it will return false if you do as I said above. - */ - export function createIncidentWithEntity(dispatchService: number, ped: Player | number, numUnits: number, radius: number, outIncidentID: number | null, p5: any, p6: any): [boolean, number]; + * As for the 'police' incident, it will call police cars to you, but unlike PedsInCavalcades & Merryweather they won't start shooting at you unless you shoot first or shoot at them. The top 2 however seem to cancel theirselves if there is noone dead around you or a fire. I only figured them out as I found out the 3rd param is definately the amountOfPeople and they called incident 3 in scripts with 4 people (which the firetruck has) and incident 5 with 2 people (which the ambulence has). The 4 param I cant say is radius, but for the pedsInCavalcades and Merryweather R* uses 0.0f and for the top 3 (Emergency Services) they use 3.0f. + * Side Note: It seems calling the pedsInCavalcades or Merryweather then removing it seems to break you from calling the EmergencyEvents and I also believe pedsInCavalcades. (The V cavalcades of course not IV). + * Side Note 2: I say it breaks as if you call this proper, + * if(CREATE_INCIDENT) etc it will return false if you do as I said above. + * ===================================================== + */ + export function createIncidentWithEntity(dispatchService: number, ped: Ped | Player | number, numUnits: number, radius: number, outIncidentID: number, p5: any, p6: any): [boolean, number]; /** - * Delete an incident with a given id. - * ======================================================= - * Correction, I have change this to int, instead of int* - * as it doesn't use a pointer to the createdIncident. - * If you try it you will crash (or) freeze. - * ======================================================= - */ + * Delete an incident with a given id. + * ======================================================= + * Correction, I have change this to int, instead of int* + * as it doesn't use a pointer to the createdIncident. + * If you try it you will crash (or) freeze. + * ======================================================= + */ export function deleteIncident(incidentId: number): void; /** - * ======================================================= - * Correction, I have change this to int, instead of int* - * as it doesn't use a pointer to the createdIncident. - * If you try it you will crash (or) freeze. - * ======================================================= - */ + * ======================================================= + * Correction, I have change this to int, instead of int* + * as it doesn't use a pointer to the createdIncident. + * If you try it you will crash (or) freeze. + * ======================================================= + */ export function isIncidentValid(incidentId: number): boolean; export function setIncidentRequestedUnits(incidentId: number, dispatchService: number, numUnits: number): void; @@ -8737,10 +9497,10 @@ declare module "natives" { export function setIdealSpawnDistanceForIncident(incidentId: number, p1: number): void; /** - * Finds a position ahead of the player by predicting the players next actions. - * The positions match path finding node positions. - * When roads diverge, the position may rapidly change between two or more positions. This is due to the engine not being certain of which path the player will take. - */ + * Finds a position ahead of the player by predicting the players next actions. + * The positions match path finding node positions. + * When roads diverge, the position may rapidly change between two or more positions. This is due to the engine not being certain of which path the player will take. + */ export function findSpawnPointInDirection(posX: number, posY: number, posZ: number, fwdVecX: number, fwdVecY: number, fwdVecZ: number, distance: number, spawnPoint?: Vector3): [boolean, Vector3]; export function addPopMultiplierArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, p6: number, p7: number, p8: boolean, p9: boolean): number; @@ -8752,43 +9512,43 @@ declare module "natives" { export function isPopMultiplierAreaNetworked(id: number): boolean; /** - * @returns This native is adding a zone, where you can change density settings. For example, you can add a zone on 0.0, 0.0, 0.0 with radius 900.0 and vehicleMultiplier 0.0, and you will not see any new population vehicle spawned in a radius of 900.0 from 0.0, 0.0, 0.0. Returns the id. You can have only 15 zones at the same time. You can remove zone using REMOVE_POP_MULTIPLIER_SPHERE - */ + * This native is adding a zone, where you can change density settings. For example, you can add a zone on 0.0, 0.0, 0.0 with radius 900.0 and vehicleMultiplier 0.0, and you will not see any new population vehicle spawned in a radius of 900.0 from 0.0, 0.0, 0.0. Returns the id. You can have only 15 zones at the same time. You can remove zone using REMOVE_POP_MULTIPLIER_SPHERE + */ export function addPopMultiplierSphere(x: number, y: number, z: number, radius: number, pedMultiplier: number, vehicleMultiplier: number, p6: boolean, p7: boolean): number; export function doesPopMultiplierSphereExist(id: number): boolean; /** - * Removes population multiplier sphere - */ + * Removes population multiplier sphere + */ export function removePopMultiplierSphere(id: number, p1: boolean): void; /** - * Makes the ped jump around like they're in a tennis match - */ - export function enableTennisMode(ped: Player | number, toggle: boolean, p2: boolean): void; + * Makes the ped jump around like they're in a tennis match + */ + export function enableTennisMode(ped: Ped | Player | number, toggle: boolean, p2: boolean): void; - export function isTennisMode(ped: Player | number): boolean; + export function isTennisMode(ped: Ped | Player | number): boolean; /** - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - */ - export function playTennisSwingAnim(ped: Player | number, animDict: string | null, animName: string | null, p3: number, p4: number, p5: boolean): void; + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function playTennisSwingAnim(ped: Ped | Player | number, animDict: string, animName: string, p3: number, p4: number, p5: boolean): void; - export function getTennisSwingAnimComplete(ped: Player | number): boolean; + export function getTennisSwingAnimComplete(ped: Ped | Player | number): boolean; - export function getTennisSwingAnimCanBeInterrupted(ped: Player | number): boolean; + export function getTennisSwingAnimCanBeInterrupted(ped: Ped | Player | number): boolean; - export function getTennisSwingAnimSwung(ped: Player | number): boolean; + export function getTennisSwingAnimSwung(ped: Ped | Player | number): boolean; - export function playTennisDiveAnim(ped: Player | number, p1: number, p2: number, p3: number, p4: number, p5: boolean): void; + export function playTennisDiveAnim(ped: Ped | Player | number, p1: number, p2: number, p3: number, p4: number, p5: boolean): void; /** - * From the scripts: - * MISC::SET_TENNIS_MOVE_NETWORK_SIGNAL_FLOAT(sub_aa49(a_0), "ForcedStopDirection", v_E); - * Related to tennis mode. - */ - export function setTennisMoveNetworkSignalFloat(ped: Player | number, p1: string | null, p2: number): void; + * From the scripts: + * MISC::SET_TENNIS_MOVE_NETWORK_SIGNAL_FLOAT(sub_aa49(a_0), "ForcedStopDirection", v_E); + * Related to tennis mode. + */ + export function setTennisMoveNetworkSignalFloat(ped: Ped | Player | number, p1: string, p2: number): void; export function resetDispatchSpawnLocation(): void; @@ -8805,9 +9565,9 @@ declare module "natives" { export function setDispatchTimeBetweenSpawnAttemptsMultiplier(p0: any, p1: number): void; /** - * To remove, see: REMOVE_DISPATCH_SPAWN_BLOCKING_AREA - * See IS_POINT_IN_ANGLED_AREA for the definition of an angled area. - */ + * To remove, see: REMOVE_DISPATCH_SPAWN_BLOCKING_AREA + * See IS_POINT_IN_ANGLED_AREA for the definition of an angled area. + */ export function addDispatchSpawnAngledBlockingArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, width: number): number; export function addDispatchSpawnSphereBlockingArea(x1: number, y1: number, x2: number, y2: number): number; @@ -8825,58 +9585,80 @@ declare module "natives" { export function clearTacticalNavMeshPoints(): void; /** - * Activates (usused?) riot mode. All NPCs are being hostile to each other (including player). Also the game will give weapons (pistols, smgs) to random NPCs. - */ + * Activates (usused?) riot mode. All NPCs are being hostile to each other (including player). Also the game will give weapons (pistols, smgs) to random NPCs. + */ export function setRiotModeEnabled(toggle: boolean): void; - export function displayOnscreenKeyboardWithLongerInitialString(p0: number, windowTitle: string | null, p2: any | null, defaultText: string | null, defaultConcat1: string | null, defaultConcat2: string | null, defaultConcat3: string | null, defaultConcat4: string | null, defaultConcat5: string | null, defaultConcat6: string | null, defaultConcat7: string | null, maxInputLength: number): [void, any]; - - /** - * sfink: note, p0 is set to 6 for PC platform in at least 1 script, or to `unk::_get_ui_language_id() == 0` otherwise. - * NOTE: windowTitle uses text labels, and an invalid value will display nothing. - * www.gtaforums.com/topic/788343-vrel-script-hook-v/?p=1067380474 - * windowTitle's - * ----------------- - * CELL_EMAIL_BOD = "Enter your Eyefind message" - * CELL_EMAIL_BODE = "Message too long. Try again" - * CELL_EMAIL_BODF = "Forbidden message. Try again" - * CELL_EMAIL_SOD = "Enter your Eyefind subject" - * See NativeDB for reference: http://natives.altv.mp/#/0x00DC833F2568DBF6 - */ - export function displayOnscreenKeyboard(p0: number, windowTitle: string | null, p2: string | null, defaultText: string | null, defaultConcat1: string | null, defaultConcat2: string | null, defaultConcat3: string | null, maxInputLength: number): void; - - /** - * Returns the current status of the onscreen keyboard, and updates the output. - * Status Codes: - * -1: Keyboard isn't active - * 0: User still editing - * 1: User has finished editing - * 2: User has canceled editing - */ + export function displayOnscreenKeyboardWithLongerInitialString(p0: number, windowTitle: string, p2: any, defaultText: string, defaultConcat1: string, defaultConcat2: string, defaultConcat3: string, defaultConcat4: string, defaultConcat5: string, defaultConcat6: string, defaultConcat7: string, maxInputLength: number): [void, any]; + + /** + * sfink: note, p0 is set to 6 for PC platform in at least 1 script, or to `unk::_get_ui_language_id() == 0` otherwise. + * NOTE: windowTitle uses text labels, and an invalid value will display nothing. + * www.gtaforums.com/topic/788343-vrel-script-hook-v/?p=1067380474 + * windowTitle's + * ----------------- + * CELL_EMAIL_BOD = "Enter your Eyefind message" + * CELL_EMAIL_BODE = "Message too long. Try again" + * CELL_EMAIL_BODF = "Forbidden message. Try again" + * CELL_EMAIL_SOD = "Enter your Eyefind subject" + * CELL_EMAIL_SODE = "Subject too long. Try again" + * CELL_EMAIL_SODF = "Forbidden text. Try again" + * CELL_EMASH_BOD = "Enter your Eyefind message" + * CELL_EMASH_BODE = "Message too long. Try again" + * CELL_EMASH_BODF = "Forbidden message. Try again" + * CELL_EMASH_SOD = "Enter your Eyefind subject" + * CELL_EMASH_SODE = "Subject too long. Try again" + * CELL_EMASH_SODF = "Forbidden Text. Try again" + * FMMC_KEY_TIP10 = "Enter Synopsis" + * FMMC_KEY_TIP12 = "Enter Custom Team Name" + * FMMC_KEY_TIP12F = "Forbidden Text. Try again" + * FMMC_KEY_TIP12N = "Custom Team Name" + * FMMC_KEY_TIP8 = "Enter Message" + * FMMC_KEY_TIP8F = "Forbidden Text. Try again" + * FMMC_KEY_TIP8FS = "Invalid Message. Try again" + * FMMC_KEY_TIP8S = "Enter Message" + * FMMC_KEY_TIP9 = "Enter Outfit Name" + * FMMC_KEY_TIP9F = "Invalid Outfit Name. Try again" + * FMMC_KEY_TIP9N = "Outfit Name" + * PM_NAME_CHALL = "Enter Challenge Name" + */ + export function displayOnscreenKeyboard(p0: number, windowTitle: string, p2: string, defaultText: string, defaultConcat1: string, defaultConcat2: string, defaultConcat3: string, maxInputLength: number): void; + + /** + * Returns the current status of the onscreen keyboard, and updates the output. + * Status Codes: + * -1: Keyboard isn't active + * 0: User still editing + * 1: User has finished editing + * 2: User has canceled editing + */ export function updateOnscreenKeyboard(): number; + /** + * Returns NULL unless UPDATE_ONSCREEN_KEYBOARD() returns 1 in the same tick. + */ export function getOnscreenKeyboardResult(): string; /** - * DO NOT use this as it doesn't clean up the text input box properly and your script will get stuck in the UPDATE_ONSCREEN_KEYBOARD() loop. - * Use FORCE_CLOSE_TEXT_INPUT_BOX instead. - */ + * DO NOT use this as it doesn't clean up the text input box properly and your script will get stuck in the UPDATE_ONSCREEN_KEYBOARD() loop. + * Use FORCE_CLOSE_TEXT_INPUT_BOX instead. + */ export function cancelOnscreenKeyboard(): void; /** - * Called before calling DISPLAY_ONSCREEN_KEYBOARD if the input needs to be saved. - * @param p0 was always 2 in R* scripts. - */ + * p0 was always 2 in R* scripts. + * Called before calling DISPLAY_ONSCREEN_KEYBOARD if the input needs to be saved. + */ export function nextOnscreenKeyboardResultWillDisplayUsingTheseFonts(p0: number): void; /** - * Appears to remove stealth kill action from memory - */ + * Appears to remove stealth kill action from memory + */ export function actionManagerEnableAction(hash: number, enable: boolean): void; /** - * GET_GAME_TIMER() / 1000 - */ + * GET_GAME_TIMER() / 1000 + */ export function getRealWorldTime(): number; export function supressRandomEventThisFrame(eventType: number, suppress: boolean): void; @@ -8902,17 +9684,17 @@ declare module "natives" { export function preventArrestStateThisFrame(): void; /** - * Sets the localplayer playerinfo state back to playing (State 0) - * States are: - * -1: "Invalid" - * 0: "Playing" - * 1: "Died" - * 2: "Arrested" - * 3: "Failed Mission" - * 4: "Left Game" - * 5: "Respawn" - * 6: "In MP Cutscene" - */ + * Sets the localplayer playerinfo state back to playing (State 0) + * States are: + * -1: "Invalid" + * 0: "Playing" + * 1: "Died" + * 2: "Arrested" + * 3: "Failed Mission" + * 4: "Left Game" + * 5: "Respawn" + * 6: "In MP Cutscene" + */ export function forceGameStatePlaying(): void; export function scriptRaceInit(p0: number, p1: number, p2: any, p3: any): void; @@ -8930,75 +9712,78 @@ declare module "natives" { export function resetEndUserBenchmark(): void; /** - * Saves the benchmark recording to %USERPROFILE%\Documents\Rockstar Games\GTA V\Benchmarks and submits some metrics. - */ + * Saves the benchmark recording to %USERPROFILE%\Documents\Rockstar Games\GTA V\Benchmarks and submits some metrics. + */ export function saveEndUserBenchmark(): void; /** - * Returns true if the current frontend menu is FE_MENU_VERSION_SP_PAUSE - */ + * Returns true if the current frontend menu is FE_MENU_VERSION_SP_PAUSE + */ export function uiStartedEndUserBenchmark(): boolean; /** - * Returns true if the current frontend menu is FE_MENU_VERSION_LANDING_MENU - */ + * Returns true if the current frontend menu is FE_MENU_VERSION_LANDING_MENU + */ export function landingScreenStartedEndUserBenchmark(): boolean; /** - * Returns true if command line option '-benchmark' is set. - */ + * Returns true if command line option '-benchmark' is set. + */ export function isCommandlineEndUserBenchmark(): boolean; /** - * Returns value of the '-benchmarkIterations' command line option. - */ + * Returns value of the '-benchmarkIterations' command line option. + */ export function getBenchmarkIterations(): number; /** - * Returns value of the '-benchmarkPass' command line option. - */ + * Returns value of the '-benchmarkPass' command line option. + */ export function getBenchmarkPass(): number; /** - * In singleplayer it does exactly what the name implies. In FiveM / GTA:Online it shows `Disconnecting from GTA Online` HUD and then quits the game. - */ + * In singleplayer it does exactly what the name implies. In FiveM / GTA:Online it shows `Disconnecting from GTA Online` HUD and then quits the game. + */ export function restartGame(): void; /** - * Exits the game and downloads a fresh social club update on next restart. - */ + * Exits the game and downloads a fresh social club update on next restart. + */ export function quitGame(): void; + /** + * Hardcoded to always return true. + */ export function hasAsyncInstallFinished(): boolean; export function cleanupAsyncInstall(): void; /** - * aka "constrained" - */ + * aka "constrained" + */ export function plmIsInConstrainedMode(): boolean; /** - * Returns duration of how long the game has been in power-saving mode (aka "constrained") in milliseconds. - */ + * Returns duration of how long the game has been in power-saving mode (aka "constrained") in milliseconds. + */ export function plmGetConstrainedDurationMs(): number; /** - * If toggle is true, the ped's head is shown in the pause menu - * If toggle is false, the ped's head is not shown in the pause menu - */ + * If toggle is true, the ped's head is shown in the pause menu + * If toggle is false, the ped's head is not shown in the pause menu + */ export function setPlayerIsInAnimalForm(toggle: boolean): void; /** - * Although we don't have a jenkins hash for this one, the name is 100% confirmed. - */ + * Although we don't have a jenkins hash for this one, the name is 100% confirmed. + */ export function getIsPlayerInAnimalForm(): boolean; export function setPlayerIsRepeatingAMission(toggle: boolean): void; /** - * Does nothing (it's a nullsub). - */ + * Does nothing (it's a nullsub). + */ export function disableScreenDimmingThisFrame(): void; export function getCityDensity(): number; @@ -9009,62 +9794,69 @@ declare module "natives" { export function getContentIdIndex(contentId: number): number; + export function setContentPropType(model: number, type: number): void; + /** - * Creates a mobile phone of the specified type. - * Possible phone types: - * 0 - Default phone / Michael's phone - * 1 - Trevor's phone - * 2 - Franklin's phone - * 3 - Unused police phone - * 4 - Prologue phone - * Higher values may crash your game. - */ + * Returns prop type for given model hash + */ + export function getContentPropType(model: number): number; + + /** + * Creates a mobile phone of the specified type. + * Possible phone types: + * 0 - Default phone / Michael's phone + * 1 - Trevor's phone + * 2 - Franklin's phone + * 3 - Unused police phone + * 4 - Prologue phone + * Higher values may crash your game. + */ export function createMobilePhone(phoneType: number): void; /** - * Destroys the currently active mobile phone. - */ + * Destroys the currently active mobile phone. + */ export function destroyMobilePhone(): void; /** - * The minimum/default is 500.0f. If you plan to make it bigger set it's position as well. Also this seems to need to be called in a loop as when you close the phone the scale is reset. If not in a loop you'd need to call it everytime before you re-open the phone. - */ + * The minimum/default is 500.0f. If you plan to make it bigger set it's position as well. Also this seems to need to be called in a loop as when you close the phone the scale is reset. If not in a loop you'd need to call it everytime before you re-open the phone. + */ export function setMobilePhoneScale(scale: number): void; /** - * Last parameter is unknown and always zero. - */ + * Last parameter is unknown and always zero. + */ export function setMobilePhoneRotation(rotX: number, rotY: number, rotZ: number, p3: any): void; - export function getMobilePhoneRotation(rotation: Vector3 | null, p1: Vehicle | number): [void, Vector3]; + export function getMobilePhoneRotation(rotation: Vector3, p1: Vehicle | number): [void, Vector3]; export function setMobilePhonePosition(posX: number, posY: number, posZ: number): void; - export function getMobilePhonePosition(position: Vector3): [void, Vector3]; + export function getMobilePhonePosition(position?: Vector3): [void, Vector3]; /** - * If bool Toggle = true so the mobile is hide to screen. - * If bool Toggle = false so the mobile is show to screen. - */ + * If bool Toggle = true so the mobile is hide to screen. + * If bool Toggle = false so the mobile is show to screen. + */ export function scriptIsMovingMobilePhoneOffscreen(toggle: boolean): void; /** - * I can confirm the above. This function is hard-coded to always return 1. - * @returns This one is weird and seems to return a TRUE state regardless of whether the phone is visible on screen or tucked away. - */ + * This one is weird and seems to return a TRUE state regardless of whether the phone is visible on screen or tucked away. + * I can confirm the above. This function is hard-coded to always return 1. + */ export function canPhoneBeSeenOnScreen(): boolean; export function setMobilePhoneDofState(toggle: boolean): void; /** - * For move the finger of player, the value of int goes 1 at 5. - */ + * For move the finger of player, the value of int goes 1 at 5. + */ export function cellSetInput(direction: number): void; /** - * if the bool "Toggle" is "true" so the phone is lean. - * if the bool "Toggle" is "false" so the phone is not lean. - */ + * if the bool "Toggle" is "true" so the phone is lean. + * if the bool "Toggle" is "false" so the phone is not lean. + */ export function cellHorizontalModeToggle(toggle: boolean): void; export function cellCamActivate(p0: boolean, p1: boolean): void; @@ -9091,13 +9883,13 @@ declare module "natives" { export function cellCamIsCharVisibleNoFaceCheck(entity: Entity | number): boolean; - export function getMobilePhoneRenderId(renderId: number): [void, number]; + export function getMobilePhoneRenderId(renderId?: number): [void, number]; export function networkInitializeCash(wallet: number, bank: number): void; /** - * Note the 2nd parameters are always 1, 0. I have a feeling it deals with your money, wallet, bank. So when you delete the character it of course wipes the wallet cash at that time. So if that was the case, it would be eg, NETWORK_DELETE_CHARACTER(characterIndex, deleteWalletCash, deleteBankCash); - */ + * Note the 2nd parameters are always 1, 0. I have a feeling it deals with your money, wallet, bank. So when you delete the character it of course wipes the wallet cash at that time. So if that was the case, it would be eg, NETWORK_DELETE_CHARACTER(characterIndex, deleteWalletCash, deleteBankCash); + */ export function networkDeleteCharacter(characterSlot: number, p1: boolean, p2: boolean): void; export function networkManualDeleteCharacter(characterSlot: number): void; @@ -9113,35 +9905,57 @@ declare module "natives" { export function networkCanShareJobCash(): boolean; /** - * index - * ------- - * See function sub_1005 in am_boat_taxi.ysc - * context - * ---------- - * "BACKUP_VAGOS" - * "BACKUP_LOST" - * "BACKUP_FAMILIES" - * "HIRE_MUGGER" - * See NativeDB for reference: http://natives.altv.mp/#/0xF9C812CD7C46E817 - */ - export function networkRefundCash(index: number, context: string | null, reason: string | null, p3: boolean): void; - - export function networkDeductCash(amount: number, p1: string | null, p2: string | null, p3: boolean, p4: boolean, p5: boolean): void; + * index + * ------- + * See function sub_1005 in am_boat_taxi.ysc + * context + * ---------- + * "BACKUP_VAGOS" + * "BACKUP_LOST" + * "BACKUP_FAMILIES" + * "HIRE_MUGGER" + * "HIRE_MERCENARY" + * "BUY_CARDROPOFF" + * "HELI_PICKUP" + * "BOAT_PICKUP" + * "CLEAR_WANTED" + * "HEAD_2_HEAD" + * "CHALLENGE" + * "SHARE_LAST_JOB" + * "DEFAULT" + * reason + * --------- + * "NOTREACHTARGET" + * "TARGET_ESCAPE" + * "DELIVERY_FAIL" + * "NOT_USED" + * "TEAM_QUIT" + * "SERVER_ERROR" + * "RECEIVE_LJ_L" + * "CHALLENGE_PLAYER_LEFT" + * "DEFAULT" + * unk + * ----- + * Unknown bool value + */ + export function networkRefundCash(index: number, context: string, reason: string, p3: boolean): void; + + export function networkDeductCash(amount: number, p1: string, p2: string, p3: boolean, p4: boolean, p5: boolean): void; export function networkMoneyCanBet(amount: number, p1: boolean, p2: boolean): boolean; export function networkCanBet(amount: number): boolean; /** - * GTAO_CASINO_HOUSE - * GTAO_CASINO_INSIDETRACK - * GTAO_CASINO_LUCKYWHEEL - * GTAO_CASINO_BLACKJACK - * GTAO_CASINO_ROULETTE - * GTAO_CASINO_SLOTS - * GTAO_CASINO_PURCHASE_CHIPS - * NETWORK_C* - */ + * GTAO_CASINO_HOUSE + * GTAO_CASINO_INSIDETRACK + * GTAO_CASINO_LUCKYWHEEL + * GTAO_CASINO_BLACKJACK + * GTAO_CASINO_ROULETTE + * GTAO_CASINO_SLOTS + * GTAO_CASINO_PURCHASE_CHIPS + * NETWORK_C* + */ export function networkCasinoCanBet(hash: number): boolean; export function networkCasinoCanBetPvc(): boolean; @@ -9155,8 +9969,8 @@ declare module "natives" { export function networkCasinoSellChips(p0: number, p1: number): boolean; /** - * Does nothing (it's a nullsub). - */ + * Does nothing (it's a nullsub). + */ export function networkDeferCashTransactionsUntilShopSave(): void; export function canPayAmountToBoss(p0: number, p1: number, amount: number, p3?: number): [boolean, number]; @@ -9170,26 +9984,26 @@ declare module "natives" { export function networkEarnAssassinateTargetKilled(amount: number): void; /** - * For the money bags that drop a max of $40,000. Often called 40k bags. - * Most likely NETWORK_EARN_FROM_ROB*** - */ + * For the money bags that drop a max of $40,000. Often called 40k bags. + * Most likely NETWORK_EARN_FROM_ROB*** + */ export function networkEarnFromRobArmoredCars(amount: number): void; export function networkEarnFromCrateDrop(amount: number): void; - export function networkEarnFromBetting(amount: number, p1: string | null): void; + export function networkEarnFromBetting(amount: number, p1: string): void; - export function networkEarnFromJob(amount: number, p1: string | null): void; + export function networkEarnFromJob(amount: number, p1: string): void; - export function networkEarnFromJobx2(amount: number, p1: string | null): void; + export function networkEarnFromJobx2(amount: number, p1: string): void; - export function networkEarnFromPremiumJob(amount: number, p1: string | null): void; + export function networkEarnFromPremiumJob(amount: number, p1: string): void; - export function networkEarnFromBendJob(amount: number, heistHash: string | null): void; + export function networkEarnFromBendJob(amount: number, heistHash: string): void; - export function networkEarnFromChallengeWin(p0: any, p1: any | null, p2: boolean): [void, any]; + export function networkEarnFromChallengeWin(p0: any, p1: any, p2: boolean): [void, any]; - export function networkEarnFromBounty(amount: number, gamerHandle: any | null, p2: any | null, p3: any): [void, any, any]; + export function networkEarnFromBounty(amount: number, gamerHandle: any, p2: any, p3: any): [void, any, any]; export function networkEarnFromImportExport(amount: number, modelHash: number): void; @@ -9198,27 +10012,25 @@ declare module "natives" { export function networkEarnFromProperty(amount: number, propertyName: number): void; /** - * DSPORT - */ + * DSPORT + */ export function networkEarnFromAiTargetKill(p0: any, p1: any): void; export function networkEarnFromNotBadsport(amount: number): void; - export function networkEarnFromRockstar(amount: number): void; - export function networkEarnFromVehicle(p0: any, p1: any, p2: any, p3: any, p4: any, p5: any, p6: any, p7: any): void; export function networkEarnFromPersonalVehicle(p0: any, p1: any, p2: any, p3: any, p4: any, p5: any, p6: any, p7: any, p8: any): void; /** - * @param type either Monthly,Weekly,Daily - */ - export function networkEarnFromDailyObjectives(amount: number, type: string | null, characterSlot: number): void; + * type either Monthly,Weekly,Daily + */ + export function networkEarnFromDailyObjectives(amount: number, type: string, characterSlot: number): void; /** - * Example for p1: "AM_DISTRACT_COPS" - */ - export function networkEarnFromAmbientJob(p0: number, p1: string | null, p2?: any): [void, any]; + * Example for p1: "AM_DISTRACT_COPS" + */ + export function networkEarnFromAmbientJob(p0: number, p1: string, p2?: any): [void, any]; export function networkEarnFromJobBonus(p0: any, p1?: any, p2?: any): [void, any, any]; @@ -9238,9 +10050,9 @@ declare module "natives" { export function networkEarnFromContraband(amount: number, p1: any): void; - export function networkEarnFromDestroyingContraband(p0: any): void; + export function networkEarnFromDestroyingContraband(p0: any, p1: any, p2: any): void; - export function networkEarnFromSmugglerWork(p0: any, p1: any, p2: any, p3: any, p4: any): void; + export function networkEarnFromSmugglerWork(p0: any, p1: any, p2: any, p3: any, p4: any, p5: any): void; export function networkEarnFromHangarTrade(p0: any, p1: any): void; @@ -9268,17 +10080,17 @@ declare module "natives" { export function networkCanSpendMoney(p0: any, p1: boolean, p2: boolean, p3: boolean, p4: any, p5: any): boolean; - export function networkCanSpendMoney2(p0: any, p1: boolean, p2: boolean, p3: boolean, p4: any | null, p5: any, p6: any): [boolean, any]; + export function networkCanSpendMoney2(p0: any, p1: boolean, p2: boolean, p3: boolean, p4: any, p5: any, p6: any): [boolean, any]; - export function networkBuyItem(amount: number, item: number, p2: any, p3: any, p4: boolean, item_name: string | null, p6: any, p7: any, p8: any, p9: boolean): void; + export function networkBuyItem(amount: number, item: number, p2: any, p3: any, p4: boolean, item_name: string, p6: any, p7: any, p8: any, p9: boolean): void; export function networkSpentTaxi(amount: number, p1: boolean, p2: boolean, p3: any, p4: any): void; export function networkPayEmployeeWage(p0: any, p1: boolean, p2: boolean): void; - export function networkPayMatchEntryFee(amount: number, matchId: string | null, p2: boolean, p3: boolean): void; + export function networkPayMatchEntryFee(amount: number, matchId: string, p2: boolean, p3: boolean): void; - export function networkSpentBetting(amount: number, p1: number, matchId: string | null, p3: boolean, p4: boolean): void; + export function networkSpentBetting(amount: number, p1: number, matchId: string, p3: boolean, p4: boolean): void; export function networkSpentWager(p0: any, p1: any, amount: number): void; @@ -9287,24 +10099,24 @@ declare module "natives" { export function networkBuyHealthcare(cost: number, p1: boolean, p2: boolean): void; /** - * @param p1 = 0 (always) - * @param p2 = 1 (always) - */ + * p1 = 0 (always) + * p2 = 1 (always) + */ export function networkBuyAirstrike(cost: number, p1: boolean, p2: boolean, p3: any): void; - export function networkBuyBackupGang(p0: number, p1: number, p2: boolean, p3: boolean): void; + export function networkBuyBackupGang(p0: number, p1: number, p2: boolean, p3: boolean, npcProvider: number): void; /** - * @param p1 = 0 (always) - * @param p2 = 1 (always) - */ + * p1 = 0 (always) + * p2 = 1 (always) + */ export function networkBuyHeliStrike(cost: number, p1: boolean, p2: boolean, p3: any): void; export function networkSpentAmmoDrop(p0: any, p1: boolean, p2: boolean, p3: any): void; /** - * @param victim is just an assumption. p2 was false and p3 was true. - */ + * p1 is just an assumption. p2 was false and p3 was true. + */ export function networkBuyBounty(amount: number, victim: Player | number, p2: boolean, p3: boolean, p4: any): void; export function networkBuyProperty(cost: number, propertyName: number, p2: boolean, p3: boolean): void; @@ -9320,17 +10132,17 @@ declare module "natives" { export function networkSpentCashDrop(amount: number, p1: boolean, p2: boolean): void; /** - * Only used once in a script (am_contact_requests) - * @param p1 = 0 - * @param p2 = 1 - */ + * Only used once in a script (am_contact_requests) + * p1 = 0 + * p2 = 1 + */ export function networkSpentHireMugger(p0: any, p1: boolean, p2: boolean, p3: any): void; export function networkSpentRobbedByMugger(amount: number, p1: boolean, p2: boolean, p3: any): void; export function networkSpentHireMercenary(p0: any, p1: boolean, p2: boolean, p3: any): void; - export function networkSpentBuyWantedlevel(p0: any, p1: any | null, p2: boolean, p3: boolean, p4: any): [void, any]; + export function networkSpentBuyWantedlevel(p0: any, p1: any, p2: boolean, p3: boolean, p4: any): [void, any]; export function networkSpentBuyOfftheradar(p0: any, p1: boolean, p2: boolean, p3: any): void; @@ -9353,31 +10165,31 @@ declare module "natives" { export function networkSpentArrestBail(p0: any, p1: boolean, p2: boolean): void; /** - * According to how I understood this in the freemode script alone, - * The second parameter whoever put it was right, they call GET_ENTITY_MODEL with the vehicle as the paremeter. - * The third parameter is the network handle as they call their little struct<13> func or atleast how the script decompiled it to look which in lamens terms just returns the network handle of the previous owner based on DECOR_GET_INT(vehicle, "Previous_Owner"). - * The fourth parameter is a bool that returns true/false depending on if your bank balance is greater then 0. - * The fifth and last parameter is a bool that returns true/false depending on if you have the money for the car based on the cost returned by func_5749. In the freemode script eg, - * bool hasTheMoney = MONEY::_GET_BANK_BALANCE() < carCost. - * @returns The first parameter is determined by a function named, func_5749 within the freemode script which has a list of all the vehicles and a set price to return which some vehicles deals with globals as well. So the first parameter is basically the set in stone insurance cost it's gonna charge you for that specific vehicle model. - */ - export function networkSpentPayVehicleInsurancePremium(amount: number, vehicleModel: number, gamerHandle: any | null, notBankrupt: boolean, hasTheMoney: boolean): [void, any]; + * According to how I understood this in the freemode script alone, + * The first parameter is determined by a function named, func_5749 within the freemode script which has a list of all the vehicles and a set price to return which some vehicles deals with globals as well. So the first parameter is basically the set in stone insurance cost it's gonna charge you for that specific vehicle model. + * The second parameter whoever put it was right, they call GET_ENTITY_MODEL with the vehicle as the paremeter. + * The third parameter is the network handle as they call their little struct<13> func or atleast how the script decompiled it to look which in lamens terms just returns the network handle of the previous owner based on DECOR_GET_INT(vehicle, "Previous_Owner"). + * The fourth parameter is a bool that returns true/false depending on if your bank balance is greater then 0. + * The fifth and last parameter is a bool that returns true/false depending on if you have the money for the car based on the cost returned by func_5749. In the freemode script eg, + * bool hasTheMoney = MONEY::_GET_BANK_BALANCE() < carCost. + */ + export function networkSpentPayVehicleInsurancePremium(amount: number, vehicleModel: number, gamerHandle: any, notBankrupt: boolean, hasTheMoney: boolean): [void, any]; - export function networkSpentCallPlayer(p0: any, p1: any | null, p2: boolean, p3: boolean): [void, any]; + export function networkSpentCallPlayer(p0: any, p1: any, p2: boolean, p3: boolean): [void, any]; export function networkSpentBounty(p0: any, p1: boolean, p2: boolean): void; export function networkSpentFromRockstar(p0: number, p1: boolean, p2: boolean): void; /** - * @returns Hardcoded to return 0. - */ + * Hardcoded to return 0. + */ export function networkSpendEarnedFromBankAndWallets(amount: number): number; /** - * This isn't a hash collision. - */ - export function processCashGift(p0: number | null, p1: number | null, p2: string | null): [string, number, number]; + * This isn't a hash collision. + */ + export function processCashGift(p0: number, p1: number, p2: string): [string, number, number]; export function networkSpentMoveSubmarine(p0: any, p1: any, p2: any): void; @@ -9392,16 +10204,16 @@ declare module "natives" { export function networkSpentRequestHeist(p0: any, p1: boolean, p2: boolean, p3: any): void; /** - * The last 3 parameters are, - * 2,0,1 in the am_ferriswheel.c - * 1,0,1 in the am_rollercoaster.c - * @returns The first parameter is the amount spent which is store in a global when this native is called. The global returns 10. Which is the price for both rides. - */ + * The first parameter is the amount spent which is store in a global when this native is called. The global returns 10. Which is the price for both rides. + * The last 3 parameters are, + * 2,0,1 in the am_ferriswheel.c + * 1,0,1 in the am_rollercoaster.c + */ export function networkBuyFairgroundRide(amount: number, p1: any, p2: boolean, p3: boolean, p4: any): void; export function networkEconomyHasFixedCrazyNumbers(): boolean; - export function networkSpentJobSkip(amount: number, matchId: string | null, p2: boolean, p3: boolean): void; + export function networkSpentJobSkip(amount: number, matchId: string, p2: boolean, p3: boolean): void; export function networkSpentBossGoon(amount: number, p1: boolean, p2: boolean): boolean; @@ -9411,7 +10223,7 @@ declare module "natives" { export function networkSpentMoveYacht(amount: number, p1: boolean, p2: boolean): void; - export function networkSpentRenameOrganization(p0: any, p1: any, p2: any): void; + export function networkSpentRenameOrganization(p0: any, p1: any, p2: any, p3: any): void; export function networkBuyContrabandMission(p0: number, p1: number, p2: number, p3: boolean, p4: boolean): void; @@ -9427,15 +10239,15 @@ declare module "natives" { export function networkSpentPaHeliPickup(p0: any, p1: any, p2: any, p3: any): void; - export function networkSpentPurchaseOfficeProperty(p0: any, p1: any, p2: any, p3: any): void; + export function networkSpentPurchaseOfficeProperty(p0: any, p1: any, p2: any, p3: any, p4: any): void; - export function networkSpentUpgradeOfficeProperty(p0: any, p1: any, p2: any, p3: any): void; + export function networkSpentUpgradeOfficeProperty(p0: any, p1: any, p2: any, p3: any, p4: any): void; export function networkSpentPurchaseWarehouseProperty(p0: any, p1: any, p2: any, p3: any): void; export function networkSpentUpgradeWarehouseProperty(p0: any, p1: any, p2: any, p3: any): void; - export function networkSpentPurchaseImpexpWarehouseProperty(amount: number, data: any | null, p2: boolean, p3: boolean): [void, any]; + export function networkSpentPurchaseImpexpWarehouseProperty(amount: number, data: any, p2: boolean, p3: boolean): [void, any]; export function networkSpentUpgradeImpexpWarehouseProperty(p0: any, p1: any, p2: any, p3: any): void; @@ -9525,9 +10337,9 @@ declare module "natives" { export function networkEarnDoomsdayFinaleBonus(amount: number, vehicleHash: number): void; - export function networkEarnGangopsAward(amount: number, p1: string | null, p2: any): void; + export function networkEarnGangopsAward(amount: number, p1: string, p2: any): void; - export function networkEarnGangopsElite(amount: number, p1: string | null, actIndex: number): void; + export function networkEarnGangopsElite(amount: number, p1: string, actIndex: number): void; export function networkServiceEarnGangopsRivalDelivery(earnedMoney: number): void; @@ -9537,9 +10349,9 @@ declare module "natives" { export function networkEarnGangopsPrepParticipation(amount: number): void; - export function networkEarnGangopsSetup(amount: number, p1: string | null): void; + export function networkEarnGangopsSetup(amount: number, p1: string): void; - export function networkEarnGangopsFinale(amount: number, p1: string | null): void; + export function networkEarnGangopsFinale(amount: number, p1: string): void; export function networkSpendGangopsRepairCost(p0: any, p1: any, p2: any): void; @@ -9581,13 +10393,13 @@ declare module "natives" { export function networkSpendMakeItRain(amount: number, p1: boolean, p2: boolean): void; - export function networkSpendBuyArena(amount: number, p1: boolean, p2: boolean, p3: string | null): void; + export function networkSpendBuyArena(amount: number, p1: boolean, p2: boolean, p3: string): void; - export function networkSpendUpgradeArena(amount: number, p1: boolean, p2: boolean, p3: string | null): void; + export function networkSpendUpgradeArena(amount: number, p1: boolean, p2: boolean, p3: string): void; /** - * @param type either, 1 for cam spectate, 2 for drone - */ + * type either, 1 for cam spectate, 2 for drone + */ export function networkSpendArenaSpectatorBox(amount: number, type: number, p2: boolean, p3: boolean): void; export function networkSpendSpinTheWheelPayment(amount: number, p1: any, p2: boolean): void; @@ -9819,13 +10631,13 @@ declare module "natives" { export function networkEarnJuggaloStoryMissionParticipation(p0: any, p1: any): void; /** - * JUGGALO_PHONE_MISSION... - */ + * JUGGALO_PHONE_MISSION... + */ export function networkEarnFooliganJob(p0: any, p1: any): void; /** - * JUGGALO_PHONE_MISSION_PARTICIPATION... - */ + * JUGGALO_PHONE_MISSION_PARTICIPATION... + */ export function networkEarnFooliganJobParticipation(p0: any, p1: any): void; export function networkEarnTaxiJob(p0: any, p1: any): void; @@ -9834,6 +10646,40 @@ declare module "natives" { export function networkEarnDailyStashHouseParticipation(p0: any, p1: any): void; + /** + * Used for SERVICE_EARN_AVENGER_OPERATIONS & SERVICE_EARN_AVENGER_OPS_BONUS + */ + export function networkEarnAvenger(amount: number, p1: number): void; + + export function networkEarnSmugglerOps(p0: any, p1: any, p2: any): void; + + export function networkEarnBonusObjective(amount: number, p1: any, p2: any): void; + + export function networkEarnProgressHub(p0: any, p1: any): void; + + export function networkSpentAirFreight(hangarCargoSourcingPrice: number, fromBank: boolean, fromBankAndWallet: boolean, cost: number, warehouseId: number, warehouseSlot: number): void; + + export function networkSpentSkipCargoSourceSetup(amount: number, fromBank: boolean, fromBankAndWallet: boolean, cost: number): void; + + /** + * Hash p3 = STEALTH_MODULE + */ + export function networkSpentStealthModule(amount: number, fromBank: boolean, fromBankAndWallet: boolean, p3: number): void; + + /** + * Hash p3 = MISSILE_JAMMER + */ + export function networkSpentMissileJammer(amount: number, fromBank: boolean, fromBankAndWallet: boolean, p3: number): void; + + export function networkSpentGeneric(price: number, p1: boolean, p2: boolean, stat: number, spent: number, p5: string, p6: string, data?: any): [void, any]; + + /** + * _NETWORK_EARN_G* + */ + export function networkEarnGeneric(amount: number, earn: number, p2: string, p3: string, data?: any): [void, any]; + + export function networkClearTransactionTelemetryNonce(): void; + export function networkGetVcBankBalance(): number; export function networkGetVcWalletBalance(characterSlot: number): number; @@ -9848,69 +10694,69 @@ declare module "natives" { export function networkGetStringBankBalance(): string; - export function networkGetStringBankWalletBalance(): string; + export function networkGetStringBankWalletBalance(character: number): string; /** - * Returns true if wallet balance >= amount. - */ + * Returns true if wallet balance >= amount. + */ export function networkGetCanSpendFromWallet(amount: number, characterSlot: number): boolean; /** - * Returns true if bank balance >= amount. - */ + * Returns true if bank balance >= amount. + */ export function networkGetCanSpendFromBank(amount: number): boolean; /** - * Returns true if bank balance + wallet balance >= amount. - */ + * Returns true if bank balance + wallet balance >= amount. + */ export function networkGetCanSpendFromBankAndWallet(amount: number, characterSlot: number): boolean; /** - * Retturns the same value as NETWORK_GET_REMAINING_TRANSFER_BALANCE. - */ + * Retturns the same value as NETWORK_GET_REMAINING_TRANSFER_BALANCE. + */ export function networkGetPvcTransferBalance(): number; /** - * Returns false if amount > wallet balance or daily transfer limit has been hit. - */ + * Returns false if amount > wallet balance or daily transfer limit has been hit. + */ export function networkGetCanTransferCash(amount: number): boolean; export function networkCanReceivePlayerCash(p0: any, p1: any, p2: any, p3: any): boolean; /** - * Returns the same value as NETWORK_GET_PVC_TRANSFER_BALANCE. - */ + * Returns the same value as NETWORK_GET_PVC_TRANSFER_BALANCE. + */ export function networkGetRemainingTransferBalance(): number; /** - * @returns Does nothing and always returns 0. - */ + * Does nothing and always returns 0. + */ export function withdrawVc(amount: number): number; /** - * @returns Does nothing and always returns false. - */ + * Does nothing and always returns false. + */ export function depositVc(amount: number): boolean; /** - * @returns This function is hard-coded to always return 1. - */ + * This function is hard-coded to always return 1. + */ export function hasVcWithdrawalCompleted(p0: any): boolean; /** - * @returns This function is hard-coded to always return 1. - */ + * This function is hard-coded to always return 1. + */ export function wasVcWithdrawalSuccessful(p0: any): boolean; export function netGameserverUseServerTransactions(): boolean; - export function netGameserverCatalogItemIsValid(name: string | null): boolean; + export function netGameserverCatalogItemIsValid(name: string): boolean; export function netGameserverCatalogItemKeyIsValid(hash: number): boolean; /** - * bool is always true in game scripts - */ + * bool is always true in game scripts + */ export function netGameserverGetPrice(itemHash: number, categoryHash: number, p2: boolean): number; export function netGameserverCatalogIsValid(): boolean; @@ -9921,19 +10767,19 @@ declare module "natives" { export function netGameserverRefreshServerCatalog(): boolean; - export function netGameserverRetrieveCatalogRefreshStatus(state: number): [boolean, number]; + export function netGameserverRetrieveCatalogRefreshStatus(state?: number): [boolean, number]; export function netGameserverInitSession(): boolean; - export function netGameserverRetrieveInitSessionStatus(p0: number): [boolean, number]; + export function netGameserverRetrieveInitSessionStatus(p0?: number): [boolean, number]; export function netGameserverStartSession(charSlot: number): boolean; export function netGameserverStartSessionPending(): boolean; - export function netGameserverRetrieveStartSessionStatus(p0: number): [boolean, number]; + export function netGameserverRetrieveStartSessionStatus(p0?: number): [boolean, number]; - export function netGameserverRetrieveSessionErrorCode(p0: number): [boolean, number]; + export function netGameserverRetrieveSessionErrorCode(p0?: number): [boolean, number]; export function netGameserverIsSessionValid(charSlot: number): boolean; @@ -9944,21 +10790,21 @@ declare module "natives" { export function netGameserverIsSessionRefreshPending(): boolean; /** - * Note: only one of the arguments can be set to true at a time - */ + * Note: only one of the arguments can be set to true at a time + */ export function netGameserverStartSessionRestart(inventory: boolean, playerbalance: boolean): boolean; export function netGameserverTransactionInProgress(): boolean; export function netGameserverGetSessionStateAndStatus(p0?: number, p1?: boolean): [boolean, number, boolean]; - export function netGameserverBasketStart(transactionId: number | null, categoryHash: number, actionHash: number, flags: number): [boolean, number]; + export function netGameserverBasketStart(transactionId: number, categoryHash: number, actionHash: number, flags: number): [boolean, number]; export function netGameserverBasketEnd(): boolean; export function netGameserverBasketIsActive(): boolean; - export function netGameserverBasketAddItem(itemData: any | null, quantity: number): [boolean, any]; + export function netGameserverBasketAddItem(itemData: any, quantity: number): [boolean, any]; export function netGameserverBasketIsFull(): boolean; @@ -9966,7 +10812,7 @@ declare module "natives" { export function netGameserverCheckoutStart(transactionId: number): boolean; - export function netGameserverBeginService(transactionId: number | null, categoryHash: number, itemHash: number, actionTypeHash: number, value: number, flags: number): [boolean, number]; + export function netGameserverBeginService(transactionId: number, categoryHash: number, itemHash: number, actionTypeHash: number, value: number, flags: number): [boolean, number]; export function netGameserverEndService(transactionId: number): boolean; @@ -9981,68 +10827,80 @@ declare module "natives" { export function netGameserverTransferWalletToBank(charSlot: number, amount: number): boolean; /** - * Same as 0x350AA5EBC03D3BD2 - */ + * Same as 0x350AA5EBC03D3BD2 + */ export function netGameserverTransferBankToWalletGetStatus(): number; /** - * Same as 0x23789E777D14CE44 - */ + * Same as 0x23789E777D14CE44 + */ export function netGameserverTransferWalletToBankGetStatus(): number; /** - * Used to be NETWORK_SHOP_CASH_TRANSFER_SET_TELEMETRY_NONCE_SEED - */ + * Used to be NETWORK_SHOP_CASH_TRANSFER_SET_TELEMETRY_NONCE_SEED + */ export function netGameserverTransferCashSetTelemetryNonceSeed(): boolean; export function netGameserverSetTelemetryNonceSeed(p0: number): boolean; /** - * Online version is defined here: update\update.rpf\common\data\version.txt - * Example: - * [ONLINE_VERSION_NUMBER] - * 1.33 - * @returns _GET_ONLINE_VERSION() will return "1.33" - */ + * Online version is defined here: update\update.rpf\common\data\version.txt + * Example: + * [ONLINE_VERSION_NUMBER] + * 1.33 + * _GET_ONLINE_VERSION() will return "1.33" + */ export function getOnlineVersion(): string; /** - * Returns whether the player is signed into Social Club. - */ + * Returns whether the player is signed into Social Club. + */ export function networkIsSignedIn(): boolean; /** - * Returns whether the game is not in offline mode. - * seemed not to work for some ppl - */ + * Returns whether the game is not in offline mode. + * seemed not to work for some ppl + */ export function networkIsSignedOnline(): boolean; + /** + * This function is hard-coded to always return 1. + */ export function networkIsNpAvailable(): boolean; + /** + * This function is hard-coded to always return 1. + */ export function networkIsNpPending(): boolean; /** - * ==== PS4 specific info ==== - * Returns some sort of unavailable reason: - * -1 = REASON_INVALID - * 0 = REASON_OTHER - * 1 = REASON_SYSTEM_UPDATE - * 2 = REASON_GAME_UPDATE - * 3 = REASON_SIGNED_OUT - * 4 = REASON_AGE - * 5 = REASON_CONNECTION - * ================================= - * @returns Hardcoded to return zero. - */ + * Hardcoded to return zero. + * ==== PS4 specific info ==== + * Returns some sort of unavailable reason: + * -1 = REASON_INVALID + * 0 = REASON_OTHER + * 1 = REASON_SYSTEM_UPDATE + * 2 = REASON_GAME_UPDATE + * 3 = REASON_SIGNED_OUT + * 4 = REASON_AGE + * 5 = REASON_CONNECTION + * ================================= + */ export function networkGetNpUnavailableReason(): number; + /** + * This function is hard-coded to always return 1. + */ export function networkIsConnetedToNpPresence(): boolean; + /** + * This function is hard-coded to always return 0. + */ export function networkIsLoggedInToPsn(): boolean; /** - * Returns whether the signed-in user has valid Rockstar Online Services (ROS) credentials. - */ + * Returns whether the signed-in user has valid Rockstar Online Services (ROS) credentials. + */ export function networkHasValidRosCredentials(): boolean; export function networkIsRefreshingRosCredentials(): boolean; @@ -10053,9 +10911,12 @@ declare module "natives" { export function networkAreSocialClubPoliciesCurrent(): boolean; + /** + * If you are host, returns true else returns false. + */ export function networkIsHost(): boolean; - export function networkGetHostPlayerIndex(): number; + export function networkGetHostPlayerIndex(): Player | number; export function networkWasGameSuspended(): boolean; @@ -10067,6 +10928,11 @@ declare module "natives" { export function networkHaveCommunicationPrivileges(p0: number, player: Player | number): boolean; + /** + * Appears to be PlayStation-specific. Always returns true on other platforms if signed in with the primary user profile + */ + export function networkHavePlatformCommunicationPrivileges(): boolean; + export function networkCheckOnlinePrivileges(p0: any, p1: boolean): boolean; export function networkCheckUserContentPrivileges(p0: number, p1: number, p2: boolean): boolean; @@ -10085,10 +10951,16 @@ declare module "natives" { export function networkCheckPrivileges(p0: any, p1: any, p2: any): boolean; + /** + * Hardcoded to return false. + */ export function networkIsPrivilegeCheckInProgress(): boolean; export function networkSetPrivilegeCheckResultNotNeeded(): void; + /** + * Hardcoded to return true. + */ export function networkResolvePrivilegeUserContent(): boolean; export function networkHavePlatformSubscription(): boolean; @@ -10114,37 +10986,37 @@ declare module "natives" { export function networkTransitionFinish(p0: any, p1: any, p2: any): boolean; /** - * 11 - Need to download tunables. - * 12 - Need to download background script. - * Returns 1 if the multiplayer is loaded, otherwhise 0. - */ - export function networkCanAccessMultiplayer(loadingState: number): [boolean, number]; + * 11 - Need to download tunables. + * 12 - Need to download background script. + * Returns 1 if the multiplayer is loaded, otherwhise 0. + */ + export function networkCanAccessMultiplayer(loadingState?: number): [boolean, number]; export function networkIsMultiplayerDisabled(): boolean; export function networkCanEnterMultiplayer(): boolean; - export function networkSessionDoFreeroamQuickmatch(p0: any, p1: any, p2: any, maxPlayers: number): boolean; + export function networkSessionDoFreeroamQuickmatch(p0: any, p1: any, p2: any): boolean; - export function networkSessionDoFriendMatchmaking(p0: number, p1: number, maxPlayers: number): boolean; + export function networkSessionDoFriendMatchmaking(p0: number, p1: number, p2: number): boolean; /** - * p4 seems to be unused in 1.60/build 2628 - */ + * p4 seems to be unused in 1.60/build 2628 + */ export function networkSessionDoCrewMatchmaking(crewId: number, p1: number, p2: number, maxPlayers: number): boolean; export function networkSessionDoActivityQuickmatch(p0: any, p1: any, p2: any, p3: any, p4: any): boolean; /** - * Does nothing in online but in offline it will cause the screen to fade to black. Nothing happens past then, the screen will sit at black until you restart GTA. Other stuff must be needed to actually host a session. - */ + * Does nothing in online but in offline it will cause the screen to fade to black. Nothing happens past then, the screen will sit at black until you restart GTA. Other stuff must be needed to actually host a session. + */ export function networkSessionHost(p0: number, maxPlayers: number, p2: boolean): boolean; export function networkSessionHostClosed(p0: number, maxPlayers: number): boolean; /** - * Does nothing in online but in offline it will cause the screen to fade to black. Nothing happens past then, the screen will sit at black until you restart GTA. Other stuff must be needed to actually host a session. - */ + * Does nothing in online but in offline it will cause the screen to fade to black. Nothing happens past then, the screen will sit at black until you restart GTA. Other stuff must be needed to actually host a session. + */ export function networkSessionHostFriendsOnly(p0: number, maxPlayers: number): boolean; export function networkSessionIsClosedFriends(): boolean; @@ -10155,19 +11027,21 @@ declare module "natives" { export function networkSessionIsPrivate(): boolean; + export function networkSessionLeaveIncludingReason(leaveFlags: number, leaveReason: number): boolean; + /** - * NETWORK_SESSION_END(0, 1) - * NETWORK_SESSION_END(0, 0) - * @param p0 is always false and p1 varies. - * @returns Results in: "Connection to session lost due to an unknown network error. Please return to Grand Theft Auto V and try again later." - */ + * p0 is always false and p1 varies. + * NETWORK_SESSION_END(0, 1) + * NETWORK_SESSION_END(0, 0) + * Results in: "Connection to session lost due to an unknown network error. Please return to Grand Theft Auto V and try again later." + */ export function networkSessionEnd(p0: boolean, p1: boolean): boolean; export function networkSessionLeave(p0: any): boolean; /** - * Only works as host. - */ + * Only works as host. + */ export function networkSessionKickPlayer(player: Player | number): void; export function networkSessionGetKickVote(player: Player | number): boolean; @@ -10181,21 +11055,23 @@ declare module "natives" { export function networkSessionSetMatchmakingGroup(matchmakingGroup: number): void; /** - * 0 = regular joiner - * 4 = spectator - * @param playerType is an unsigned int from 0 to 4 - */ + * playerType is an unsigned int from 0 to 4 + * 0 = regular joiner + * 4 = spectator + */ export function networkSessionSetMatchmakingGroupMax(playerType: number, playerCount: number): void; export function networkSessionGetMatchmakingGroupFree(p0: number): number; /** - * @param groupId range: [0, 4] - */ + * groupId range: [0, 4] + */ export function networkSessionAddActiveMatchmakingGroup(groupId: number): void; export function networkSessionSetUniqueCrewLimit(p0: any): void; + export function networkSessionGetUniqueCrewLimit(): number; + export function networkSessionSetUniqueCrewLimitTransition(p0: any): void; export function networkSessionSetUniqueCrewOnlyCrewsTransition(p0: boolean): void; @@ -10205,8 +11081,8 @@ declare module "natives" { export function networkSessionSetMatchmakingPropertyId(p0: boolean): void; /** - * @param p0 in the decompiled scripts is always the stat mesh_texblend * 0.07 to int - */ + * p0 in the decompiled scripts is always the stat mesh_texblend * 0.07 to int + */ export function networkSessionSetMatchmakingMentalState(p0: number): void; export function networkSessionSetNumBosses(num: number): void; @@ -10216,9 +11092,9 @@ declare module "natives" { export function networkSessionValidateJoin(p0: boolean): void; /** - * .. - */ - export function networkAddFollowers(p0: number | null, p1: number): [void, number]; + * .. + */ + export function networkAddFollowers(p0: number, p1: number): [void, number]; export function networkClearFollowers(): void; @@ -10231,17 +11107,19 @@ declare module "natives" { export function networkFindGamersInCrew(crewId: number): boolean; /** - * Uses attributes to find players with similar stats. Upper/Lower limit must be above zero or the fallback limit +/-0.1 is used. - * There can be up to 15 attributes, they are as follows: - * 0 = Races - * 1 = Parachuting - * 2 = Horde - * 3 = Darts - * 4 = Arm Wrestling - * 5 = Tennis - * 6 = Golf - * See NativeDB for reference: http://natives.altv.mp/#/0xF7B2CFDE5C9F700D - */ + * Uses attributes to find players with similar stats. Upper/Lower limit must be above zero or the fallback limit +/-0.1 is used. + * There can be up to 15 attributes, they are as follows: + * 0 = Races + * 1 = Parachuting + * 2 = Horde + * 3 = Darts + * 4 = Arm Wrestling + * 5 = Tennis + * 6 = Golf + * 7 = Shooting Range + * 8 = Deathmatch + * 9 = MPPLY_MCMWIN/MPPLY_CRMISSION + */ export function networkFindMatchedGamers(attribute: number, fallbackLimit: number, lowerLimit: number, upperLimit: number): boolean; export function networkIsFindingGamers(): boolean; @@ -10250,11 +11128,11 @@ declare module "natives" { export function networkGetNumFoundGamers(): number; - export function networkGetFoundGamer(p0: any | null, p1: any): [boolean, any]; + export function networkGetFoundGamer(p0: any, p1: any): [boolean, any]; export function networkClearFoundGamers(): void; - export function networkQueueGamerForStatus(p0: any): [boolean, any]; + export function networkQueueGamerForStatus(p0?: any): [boolean, any]; export function networkGetGamerStatusFromQueue(): boolean; @@ -10262,7 +11140,7 @@ declare module "natives" { export function networkDidGetGamerStatusSucceed(): boolean; - export function networkGetGamerStatusResult(p0: any | null, p1: any): [boolean, any]; + export function networkGetGamerStatusResult(p0: any, p1: any): [boolean, any]; export function networkClearGetGamerStatus(): void; @@ -10277,17 +11155,17 @@ declare module "natives" { export function networkHasConfirmedInvite(): boolean; /** - * Triggers a CEventNetworkInviteConfirmed event - */ + * Triggers a CEventNetworkInviteConfirmed event + */ export function networkRequestInviteConfirmedEvent(): boolean; export function networkSessionWasInvited(): boolean; - export function networkSessionGetInviter(gamerHandle: any): [void, any]; + export function networkSessionGetInviter(gamerHandle?: any): [void, any]; /** - * Seems to be true while "Getting GTA Online session details" shows up. - */ + * Seems to be true while "Getting GTA Online session details" shows up. + */ export function networkSessionIsAwaitingInviteResponse(): boolean; export function networkSessionIsDisplayingInviteConfirmation(): boolean; @@ -10311,11 +11189,11 @@ declare module "natives" { export function networkClearOfflineInvitePending(): void; /** - * Loads up the map that is loaded when beeing in mission creator - * Player gets placed in a mix between online/offline mode - * Appears to be patched in gtav b757 (game gets terminated) alonside with most other network natives to prevent online modding ~ghost30812 - * @param p0 is always 2 in R* scripts. - */ + * Loads up the map that is loaded when beeing in mission creator + * Player gets placed in a mix between online/offline mode + * p0 is always 2 in R* scripts. + * Appears to be patched in gtav b757 (game gets terminated) alonside with most other network natives to prevent online modding ~ghost30812 + */ export function networkSessionHostSinglePlayer(p0: number): void; export function networkSessionLeaveSinglePlayer(): void; @@ -10327,9 +11205,14 @@ declare module "natives" { export function networkIsInSession(): boolean; /** - * This checks if player is playing on gta online or not. - * Please add an if and block your mod if this is "true". - */ + * Hardcoded to return 0. + */ + export function networkIsAmericasVersion(): boolean; + + /** + * This checks if player is playing on gta online or not. + * Please add an if and block your mod if this is "true". + */ export function networkIsSessionStarted(): boolean; export function networkIsSessionBusy(): boolean; @@ -10345,8 +11228,8 @@ declare module "natives" { export function networkSessionBlockJoinRequests(toggle: boolean): void; /** - * num player slots allowed in session, seems to work? 32 max - */ + * num player slots allowed in session, seems to work? 32 max + */ export function networkSessionChangeSlots(slots: number, p1: boolean): void; export function networkSessionGetPrivateSlots(): number; @@ -10355,7 +11238,7 @@ declare module "natives" { export function networkSessionVoiceLeave(): boolean; - export function networkSessionVoiceConnectToPlayer(gamerHandle: any): [void, any]; + export function networkSessionVoiceConnectToPlayer(gamerHandle?: any): [void, any]; export function networkSessionVoiceRespondToRequest(p0: boolean, p1: number): void; @@ -10368,9 +11251,9 @@ declare module "natives" { export function networkSessionIsVoiceSessionBusy(): boolean; /** - * @param message is limited to 64 characters. - */ - export function networkSendTextMessage(message: string | null, gamerHandle?: any): [boolean, any]; + * Message is limited to 64 characters. + */ + export function networkSendTextMessage(message: string, gamerHandle?: any): [boolean, any]; export function networkSetActivitySpectator(toggle: boolean): void; @@ -10382,30 +11265,30 @@ declare module "natives" { export function networkGetActivityPlayerNum(p0: boolean): number; - export function networkIsActivitySpectatorFromHandle(gamerHandle: any): [boolean, any]; - - /** - * From what I can tell it looks like it does the following: - * Creates/hosts a new transition to another online session, using this in FiveM will result in other players being disconencted from the server/preventing them from joining. This is most likely because I entered the wrong session parameters since they're pretty much all unknown right now. - * You also need to use `NetworkJoinTransition(Player player)` and `NetworkLaunchTransition()`. - * @param p0 Unknown int - * @param p1 Unknown int - * @param p2 Unknown int - * @param p3 Unknown int - * @param p4 Unknown always 0 in decompiled scripts - * @param p5 BOOL purpose unknown, both 0 and 1 are used in decompiled scripts. - * @param p6 BOOL purpose unknown, both 0 and 1 are used in decompiled scripts. - * @param p7 Unknown int, it's an int according to decompiled scripts, however the value is always 0 or 1. - * @param p8 Unknown int, it's an int according to decompiled scripts, however the value is always 0 or 1. - * @param p9 Unknown int, sometimes 0, but also 32768 or 16384 appear in decompiled scripst, maybe a flag of some sort? - */ + export function networkIsActivitySpectatorFromHandle(gamerHandle?: any): [boolean, any]; + + /** + * p0: Unknown int + * p1: Unknown int + * p2: Unknown int + * p3: Unknown int + * p4: Unknown always 0 in decompiled scripts + * p5: BOOL purpose unknown, both 0 and 1 are used in decompiled scripts. + * p6: BOOL purpose unknown, both 0 and 1 are used in decompiled scripts. + * p7: Unknown int, it's an int according to decompiled scripts, however the value is always 0 or 1. + * p8: Unknown int, it's an int according to decompiled scripts, however the value is always 0 or 1. + * p9: Unknown int, sometimes 0, but also 32768 or 16384 appear in decompiled scripst, maybe a flag of some sort? + * From what I can tell it looks like it does the following: + * Creates/hosts a new transition to another online session, using this in FiveM will result in other players being disconencted from the server/preventing them from joining. This is most likely because I entered the wrong session parameters since they're pretty much all unknown right now. + * You also need to use `NetworkJoinTransition(Player player)` and `NetworkLaunchTransition()`. + */ export function networkHostTransition(p0: number, p1: number, p2: number, p3: number, p4: any, p5: boolean, p6: boolean, p7: number, p8: any, p9: number): boolean; export function networkDoTransitionQuickmatch(p0: any, p1: any, p2: any, p3: any, p4: any, p5: any): boolean; export function networkDoTransitionQuickmatchAsync(p0: any, p1: any, p2: any, p3: any, p4: any, p5: any): boolean; - export function networkDoTransitionQuickmatchWithGroup(p0: any, p1: any, p2: any, p3: any, p4: any | null, p5: any, p6: any, p7: any): [boolean, any]; + export function networkDoTransitionQuickmatchWithGroup(p0: any, p1: any, p2: any, p3: any, p4: any, p5: any, p6: any, p7: any): [boolean, any]; export function networkJoinGroupActivity(): boolean; @@ -10429,21 +11312,21 @@ declare module "natives" { export function networkSetInProgressFinishTime(p0: any): void; - export function networkSetTransitionCreatorHandle(p0: any): [void, any]; + export function networkSetTransitionCreatorHandle(p0?: any): [void, any]; export function networkClearTransitionCreatorHandle(): void; - export function networkInviteGamersToTransition(p0: any | null, p1: any): [boolean, any]; + export function networkInviteGamersToTransition(p0: any, p1: any): [boolean, any]; - export function networkSetGamerInvitedToTransition(gamerHandle: any): [void, any]; + export function networkSetGamerInvitedToTransition(gamerHandle?: any): [void, any]; export function networkLeaveTransition(): boolean; export function networkLaunchTransition(): boolean; /** - * Appears to set whether a transition should be started when the session is migrating. - */ + * Appears to set whether a transition should be started when the session is migrating. + */ export function networkSetDoNotLaunchFromJoinAsMigratedHost(toggle: boolean): void; export function networkCancelTransitionMatchmaking(): void; @@ -10455,33 +11338,33 @@ declare module "natives" { export function networkDoTransitionToNewGame(p0: boolean, maxPlayers: number, p2: boolean): boolean; /** - * 'players' is the number of players for a session. On PS3/360 it's always 18. On PC it's 32. - * @param p2 is true 3/4 of the occurrences I found. - */ - export function networkDoTransitionToFreemode(p0: any | null, p1: any, p2: boolean, players: number, p4: boolean): [boolean, any]; + * p2 is true 3/4 of the occurrences I found. + * 'players' is the number of players for a session. On PS3/360 it's always 18. On PC it's 32. + */ + export function networkDoTransitionToFreemode(p0: any, p1: any, p2: boolean, players: number, p4: boolean): [boolean, any]; - export function networkDoTransitionToNewFreemode(p0: any | null, p1: any, players: number, p3: boolean, p4: boolean, p5: boolean): [boolean, any]; + export function networkDoTransitionToNewFreemode(p0: any, p1: any, players: number, p3: boolean, p4: boolean, p5: boolean): [boolean, any]; export function networkIsTransitionToGame(): boolean; /** - * Returns count. - */ - export function networkGetTransitionMembers(data: any | null, dataCount: number): [number, any]; + * Returns count. + */ + export function networkGetTransitionMembers(data: any, dataCount: number): [number, any]; export function networkApplyTransitionParameter(p0: number, p1: number): void; - export function networkApplyTransitionParameterString(p0: number, string: string | null, p2: boolean): void; + export function networkApplyTransitionParameterString(p0: number, string: string, p2: boolean): void; - export function networkSendTransitionGamerInstruction(gamerHandle: any | null, p1: string | null, p2: number, p3: number, p4: boolean): [boolean, any]; + export function networkSendTransitionGamerInstruction(gamerHandle: any, p1: string, p2: number, p3: number, p4: boolean): [boolean, any]; - export function networkMarkTransitionGamerAsFullyJoined(p0: any): [boolean, any]; + export function networkMarkTransitionGamerAsFullyJoined(p0?: any): [boolean, any]; export function networkIsTransitionHost(): boolean; - export function networkIsTransitionHostFromHandle(gamerHandle: any): [boolean, any]; + export function networkIsTransitionHostFromHandle(gamerHandle?: any): [boolean, any]; - export function networkGetTransitionHost(gamerHandle: any): [boolean, any]; + export function networkGetTransitionHost(gamerHandle?: any): [boolean, any]; export function networkIsInTransition(): boolean; @@ -10520,35 +11403,35 @@ declare module "natives" { export function networkAreTransitionDetailsValid(p0: any): boolean; /** - * int handle[76]; - * NETWORK_HANDLE_FROM_FRIEND(iSelectedPlayer, &handle[0], 13); - * Player uVar2 = NETWORK_GET_PLAYER_FROM_GAMER_HANDLE(&handle[0]); - * NETWORK_JOIN_TRANSITION(uVar2); - * nothing doin. - */ + * int handle[76]; + * NETWORK_HANDLE_FROM_FRIEND(iSelectedPlayer, &handle[0], 13); + * Player uVar2 = NETWORK_GET_PLAYER_FROM_GAMER_HANDLE(&handle[0]); + * NETWORK_JOIN_TRANSITION(uVar2); + * nothing doin. + */ export function networkJoinTransition(player: Player | number): boolean; - export function networkHasInvitedGamerToTransition(p0: any): [boolean, any]; + export function networkHasInvitedGamerToTransition(p0?: any): [boolean, any]; - export function networkHasTransitionInviteBeenAcked(p0: any): [boolean, any]; + export function networkHasTransitionInviteBeenAcked(p0?: any): [boolean, any]; export function networkIsActivitySession(): boolean; export function networkDisableRealtimeMultiplayer(): void; /** - * Does nothing. It's just a nullsub. - */ + * Does nothing. It's just a nullsub. + */ export function networkSetPresenceSessionInvitesBlocked(toggle: boolean): void; - export function networkSendInviteViaPresence(gamerHandle: any | null, p1: string | null, dataCount: number, p3: number): [boolean, any]; + export function networkSendInviteViaPresence(gamerHandle: any, p1: string, dataCount: number, p3: number): [boolean, any]; - export function networkSendTransitionInviteViaPresence(gamerHandle: any | null, p1: string | null, dataCount: number, p3: number): [boolean, any]; + export function networkSendTransitionInviteViaPresence(gamerHandle: any, p1: string, dataCount: number, p3: number): [boolean, any]; /** - * Contains the string "NETWORK_SEND_PRESENCE_TRANSITION_INVITE" but so does 0xC116FF9B4D488291; seems to fit alphabetically here, tho. - */ - export function networkSendImportantTransitionInviteViaPresence(gamerHandle: any | null, p1: string | null, dataCount: number, p3: number): [boolean, any]; + * Contains the string "NETWORK_SEND_PRESENCE_TRANSITION_INVITE" but so does 0xC116FF9B4D488291; seems to fit alphabetically here, tho. + */ + export function networkSendImportantTransitionInviteViaPresence(gamerHandle: any, p1: string, dataCount: number, p3: number): [boolean, any]; export function networkGetPresenceInviteIndexById(p0: number): number; @@ -10584,25 +11467,25 @@ declare module "natives" { export function networkRemoveAndCancelAllInvites(): void; - export function networkRemoveTransitionInvite(p0: any): [void, any]; + export function networkRemoveTransitionInvite(p0?: any): [void, any]; export function networkRemoveAllTransitionInvite(): void; export function networkRemoveAndCancelAllTransitionInvites(): void; - export function networkInviteGamers(p0: any | null, p1: any, p2: any | null, p3: any): [boolean, any, any]; + export function networkInviteGamers(p0: any, p1: any, p2: any, p3: any): [boolean, any, any]; - export function networkHasInvitedGamer(p0: any): [boolean, any]; + export function networkHasInvitedGamer(p0?: any): [boolean, any]; - export function networkHasMadeInviteDecision(gamerHandle: any): [boolean, any]; + export function networkHasMadeInviteDecision(gamerHandle?: any): [boolean, any]; export function networkGetInviteReplyStatus(p0: any): number; - export function networkGetCurrentlySelectedGamerHandleFromInviteMenu(p0: any): [boolean, any]; + export function networkGetCurrentlySelectedGamerHandleFromInviteMenu(p0?: any): [boolean, any]; - export function networkSetCurrentlySelectedGamerHandleFromInviteMenu(p0: any): [boolean, any]; + export function networkSetCurrentlySelectedGamerHandleFromInviteMenu(p0?: any): [boolean, any]; - export function networkSetInviteOnCallForInviteMenu(p0: any): [void, any]; + export function networkSetInviteOnCallForInviteMenu(p0?: any): [void, any]; export function networkCheckDataManagerSucceededForHandle(p0: number, gamerHandle?: any): [boolean, any]; @@ -10610,28 +11493,34 @@ declare module "natives" { export function networkSetInviteFailedMessageForInviteMenu(p0?: any, p1?: any): [void, any, any]; - export function filloutPmPlayerList(gamerHandle: any | null, p1: any, p2: any): [boolean, any]; + export function filloutPmPlayerList(gamerHandle: any, p1: any, p2: any): [boolean, any]; - export function filloutPmPlayerListWithNames(p0: any | null, p1: any | null, p2: any, p3: any): [boolean, any, any]; + export function filloutPmPlayerListWithNames(p0: any, p1: any, p2: any, p3: any): [boolean, any, any]; export function refreshPlayerListStats(p0: number): boolean; - export function networkSetCurrentDataManagerHandle(p0: any): [boolean, any]; + export function networkSetCurrentDataManagerHandle(p0?: any): [boolean, any]; + /** + * Hardcoded to return false. + */ export function networkIsInPlatformParty(): boolean; export function networkGetPlatformPartyMemberCount(): number; - export function networkGetPlatformPartyMembers(data: any | null, dataSize: number): [number, any]; + export function networkGetPlatformPartyMembers(data: any, dataSize: number): [number, any]; + /** + * Hardcoded to return false. + */ export function networkIsInPlatformPartyChat(): boolean; /** - * This would be nice to see if someone is in party chat, but 2 sad notes. - * 1) It only becomes true if said person is speaking in that party at the time. - * 2) It will never, become true unless you are in that party with said person. - */ - export function networkIsChattingInPlatformParty(gamerHandle: any): [boolean, any]; + * This would be nice to see if someone is in party chat, but 2 sad notes. + * 1) It only becomes true if said person is speaking in that party at the time. + * 2) It will never, become true unless you are in that party with said person. + */ + export function networkIsChattingInPlatformParty(gamerHandle?: any): [boolean, any]; export function networkCanQueueForPreviousSessionJoin(): boolean; @@ -10648,8 +11537,8 @@ declare module "natives" { export function networkGetRandomInt(): number; /** - * Same as GET_RANDOM_INT_IN_RANGE - */ + * Same as GET_RANDOM_INT_IN_RANGE + */ export function networkGetRandomIntRanged(rangeStart: number, rangeEnd: number): number; export function networkGetRandomFloatRanged(rangeStart: number, rangeEnd: number): number; @@ -10660,18 +11549,9 @@ declare module "natives" { export function networkPlayerIsBadsport(): boolean; - /** - * @param p1 = 6 - */ - export function triggerPlayerCrcHackerCheck(player: Player | number, p1: number, scriptHash: number): boolean; - - export function triggerTuningCrcHackerCheck(player: Player | number, p1: string | null, p2: string | null): boolean; - - export function triggerFileCrcHackerCheck(player: Player | number, p1: string | null): boolean; - export function remoteCheaterPlayerDetected(player: Player | number, a: number, b: number): boolean; - export function badSportPlayerLeftDetected(gamerHandle: any | null, event: number, amountReceived: number): [boolean, any]; + export function badSportPlayerLeftDetected(gamerHandle: any, event: number, amountReceived: number): [boolean, any]; export function networkAddInvalidObjectModel(modelHash: number): void; @@ -10679,7 +11559,7 @@ declare module "natives" { export function networkClearInvalidObjectModels(): void; - export function networkApplyPedScarData(ped: Player | number, p1: number): void; + export function networkApplyPedScarData(ped: Ped | Player | number, p1: number): void; export function networkSetThisScriptIsNetworkScript(maxNumMissionParticipants: number, p1: boolean, instanceId: number): void; @@ -10693,9 +11573,9 @@ declare module "natives" { export function networkGetScriptStatus(): number; - export function networkRegisterHostBroadcastVariables(unkVars: number | null, numVars: number, debugName: string | null): [void, number]; + export function networkRegisterHostBroadcastVariables(vars: number, numVars: number, debugName: string): [void, number]; - export function networkRegisterPlayerBroadcastVariables(unkVars: number | null, numVars: number, debugName: string | null): [void, number]; + export function networkRegisterPlayerBroadcastVariables(vars: number, numVars: number, debugName: string): [void, number]; export function networkRegisterHighFrequencyHostBroadcastVariables(p0: any, p1: any, p2: any): void; @@ -10705,18 +11585,18 @@ declare module "natives" { export function networkHasReceivedHostBroadcastData(): boolean; - export function networkGetPlayerIndex(player: Player | number): number; + export function networkGetPlayerIndex(player: Player | number): Player | number; export function networkGetParticipantIndex(index: number): number; /** - * Returns the Player associated to a given Ped when in an online session. - */ - export function networkGetPlayerIndexFromPed(ped: Player | number): number; + * Returns the Player associated to a given Ped when in an online session. + */ + export function networkGetPlayerIndexFromPed(ped: Ped | Player | number): Player | number; /** - * Returns the amount of players connected in the current session. Only works when connected to a session/server. - */ + * Returns the amount of players connected in the current session. Only works when connected to a session/server. + */ export function networkGetNumConnectedPlayers(): number; export function networkIsPlayerConnected(player: Player | number): boolean; @@ -10731,86 +11611,106 @@ declare module "natives" { export function networkIsHostOfThisScript(): boolean; - export function networkGetHostOfThisScript(): number; + export function networkGetHostOfThisScript(): Player | number; /** - * "freemode", "AM_CR_SecurityVan", ... - * Most of the time, these values are used: - * @param scriptName examples: - * @param instance_id = -1 - * @param position_hash = 0 - */ - export function networkGetHostOfScript(scriptName: string | null, instance_id: number, position_hash: number): number; + * scriptName examples: + * "freemode", "AM_CR_SecurityVan", ... + * Most of the time, these values are used: + * instance_id = -1 + * position_hash = 0 + */ + export function networkGetHostOfScript(scriptName: string, instance_id: number, position_hash: number): Player | number; export function networkSetMissionFinished(): void; - export function networkIsScriptActive(scriptName: string | null, instance_id: number, p2: boolean, position_hash: number): boolean; + export function networkIsScriptActive(scriptName: string, instance_id: number, p2: boolean, position_hash: number): boolean; export function networkIsScriptActiveByHash(scriptHash: number, p1: number, p2: boolean, p3: number): boolean; export function networkIsThreadANetworkScript(threadId: number): boolean; - export function networkGetNumScriptParticipants(scriptName: string | null, instance_id: number, position_hash: number): number; + export function networkGetNumScriptParticipants(scriptName: string, instance_id: number, position_hash: number): number; export function networkGetInstanceIdOfThisScript(): number; export function networkGetPositionHashOfThisScript(): number; - export function networkIsPlayerAParticipantOnScript(player: Player | number, script: string | null, instance_id: number): boolean; + export function networkIsPlayerAParticipantOnScript(player: Player | number, script: string, instance_id: number): boolean; export function networkPreventScriptHostMigration(): void; export function networkRequestToBeHostOfThisScript(): void; /** - * Return the local Participant ID - */ - export function participantId(): number; + * Return the local Participant ID + */ + export function participantId(): Player | number; /** - * Return the local Participant ID. - * This native is exactly the same as 'PARTICIPANT_ID' native. - */ + * Return the local Participant ID. + * This native is exactly the same as 'PARTICIPANT_ID' native. + */ export function participantIdToInt(): number; - export function networkGetKillerOfPlayer(player: Player | number, weaponHash?: number): [number, number]; + export function networkGetKillerOfPlayer(player: Player | number, weaponHash?: number): [Player | number, number]; - export function networkGetDestroyerOfNetworkId(netId: number, weaponHash?: number): [number, number]; + export function networkGetDestroyerOfNetworkId(netId: number, weaponHash?: number): [Player | number, number]; - export function networkGetDestroyerOfEntity(entity: Entity | number, weaponHash?: number): [number, number]; + export function networkGetDestroyerOfEntity(entity: Entity | number, weaponHash?: number): [Player | number, number]; /** - * NETWORK_GET_ASSISTED_DAMAGE_OF_ENTITY that ensures the entity is dead (IS_ENTITY_DEAD) - */ + * NETWORK_GET_ASSISTED_DAMAGE_OF_ENTITY that ensures the entity is dead (IS_ENTITY_DEAD) + */ export function networkGetAssistedKillOfEntity(player: Player | number, entity: Entity | number, p2?: number): [boolean, number]; export function networkGetAssistedDamageOfEntity(player: Player | number, entity: Entity | number, p2?: number): [boolean, number]; - export function networkGetEntityKillerOfPlayer(player: Player | number, weaponHash?: number): [number, number]; + export function networkGetEntityKillerOfPlayer(player: Player | number, weaponHash?: number): [Entity | number, number]; - export function networkSetCurrentPublicContentId(missionId: string | null): void; + export function networkSetCurrentPublicContentId(missionId: string): void; export function networkSetCurrentChatOption(newChatOption: number): void; /** - * enum eMpSettingSpawn - * { - * MP_SETTING_SPAWN_NULL, - * MP_SETTING_SPAWN_PROPERTY, - * MP_SETTING_SPAWN_LAST_POSITION, - * MP_SETTING_SPAWN_GARAGE, - * MP_SETTING_SPAWN_RANDOM, - * MP_SETTING_SPAWN_PRIVATE_YACHT, - * MP_SETTING_SPAWN_OFFICE, - * See NativeDB for reference: http://natives.altv.mp/#/0xAA6D5451DC3448B6 - */ + * mpSettingSpawn: + * enum eMpSettingSpawn + * { + * MP_SETTING_SPAWN_NULL, + * MP_SETTING_SPAWN_PROPERTY, + * MP_SETTING_SPAWN_LAST_POSITION, + * MP_SETTING_SPAWN_GARAGE, + * MP_SETTING_SPAWN_RANDOM, + * MP_SETTING_SPAWN_PRIVATE_YACHT, + * MP_SETTING_SPAWN_OFFICE, + * MP_SETTING_SPAWN_CLUBHOUSE, + * MP_SETTING_SPAWN_IE_WAREHOUSE, + * MP_SETTING_SPAWN_BUNKER, + * MP_SETTING_SPAWN_HANGAR, + * MP_SETTING_SPAWN_DEFUNCT_BASE, + * MP_SETTING_SPAWN_NIGHTCLUB, + * MP_SETTING_SPAWN_ARENA_GARAGE, + * MP_SETTING_SPAWN_CASINO_APARTMENT, + * MP_SETTING_SPAWN_ARCADE, + * MP_SETTING_SPAWN_SUBMARINE, + * MP_SETTING_SPAWN_CAR_MEET, + * MP_SETTING_SPAWN_AUTO_SHOP, + * MP_SETTING_SPAWN_FIXER_HQ, + * MP_SETTING_SPAWN_MAX, + * }; + */ export function networkSetCurrentSpawnLocationOption(mpSettingSpawn: number): void; /** - * Used by MetricVEHICLE_DIST_DRIVEN - */ + * Used by MetricVEHICLE_DIST_DRIVEN + */ export function networkSetVehicleDrivenInTestDrive(toggle: boolean): void; + /** + * Sets 'loc' variable used in MetricVEHICLE_DIST_DRIVEN + */ + export function networkSetVehicleDrivenLocation(location: number): void; + export function networkResurrectLocalPlayer(x: number, y: number, z: number, heading: number, p4: boolean, changetime: boolean, p6: boolean, p7: number, p8: number): void; export function networkSetLocalPlayerInvincibleTime(time: number): void; @@ -10819,7 +11719,7 @@ declare module "natives" { export function networkDisableInvincibleFlashing(player: Player | number, toggle: boolean): void; - export function networkPatchPostCutsceneHs4fTunEnt(ped: Player | number): void; + export function networkPatchPostCutsceneHs4fTunEnt(ped: Ped | Player | number): void; export function networkSetLocalPlayerSyncLookAt(toggle: boolean): void; @@ -10827,7 +11727,7 @@ declare module "natives" { export function networkGetNetworkIdFromEntity(entity: Entity | number): number; - export function networkGetEntityFromNetworkId(netId: number): number; + export function networkGetEntityFromNetworkId(netId: number): Entity | number; export function networkGetEntityIsNetworked(entity: Entity | number): boolean; @@ -10846,8 +11746,8 @@ declare module "natives" { export function networkHasControlOfNetworkId(netId: number): boolean; /** - * Returns true if the specified network id is controlled by someone else. - */ + * Returns true if the specified network id is controlled by someone else. + */ export function networkIsNetworkIdRemotelyControlled(netId: number): boolean; export function networkRequestControlOfEntity(entity: Entity | number): boolean; @@ -10863,100 +11763,100 @@ declare module "natives" { export function networkIsDoorNetworked(doorHash: number): boolean; /** - * calls from vehicle to net. - */ + * calls from vehicle to net. + */ export function vehToNet(vehicle: Vehicle | number): number; /** - * gets the network id of a ped - */ - export function pedToNet(ped: Player | number): number; + * gets the network id of a ped + */ + export function pedToNet(ped: Ped | Player | number): number; /** - * Lets objects spawn online simply do it like this: - * int createdObject = OBJ_TO_NET(CREATE_OBJECT_NO_OFFSET(oball, pCoords.x, pCoords.y, pCoords.z, 1, 0, 0)); - */ - export function objToNet(object: number): number; + * Lets objects spawn online simply do it like this: + * int createdObject = OBJ_TO_NET(CREATE_OBJECT_NO_OFFSET(oball, pCoords.x, pCoords.y, pCoords.z, 1, 0, 0)); + */ + export function objToNet(object: Object): number; - export function netToVeh(netHandle: number): number; + export function netToVeh(netHandle: number): Vehicle | number; /** - * gets the ped id of a network id - */ - export function netToPed(netHandle: number): number; + * gets the ped id of a network id + */ + export function netToPed(netHandle: number): Ped | Player | number; /** - * gets the object id of a network id - */ - export function netToObj(netHandle: number): number; + * gets the object id of a network id + */ + export function netToObj(netHandle: number): Object; /** - * gets the entity id of a network id - */ - export function netToEnt(netHandle: number): number; + * gets the entity id of a network id + */ + export function netToEnt(netHandle: number): Entity | number; - export function networkGetLocalHandle(gamerHandle: any | null, gamerHandleSize: number): [void, any]; + export function networkGetLocalHandle(gamerHandle: any, gamerHandleSize: number): [void, any]; - export function networkHandleFromUserId(userId: string | null, gamerHandle: any | null, gamerHandleSize: number): [void, any]; + export function networkHandleFromUserId(userId: string, gamerHandle: any, gamerHandleSize: number): [void, any]; - export function networkHandleFromMemberId(memberId: string | null, gamerHandle: any | null, gamerHandleSize: number): [void, any]; + export function networkHandleFromMemberId(memberId: string, gamerHandle: any, gamerHandleSize: number): [void, any]; - export function networkHandleFromPlayer(player: Player | number, gamerHandle: any | null, gamerHandleSize: number): [void, any]; + export function networkHandleFromPlayer(player: Player | number, gamerHandle: any, gamerHandleSize: number): [void, any]; export function networkHashFromPlayerHandle(player: Player | number): number; - export function networkHashFromGamerHandle(gamerHandle: any): [number, any]; + export function networkHashFromGamerHandle(gamerHandle?: any): [number, any]; - export function networkHandleFromFriend(friendIndex: number, gamerHandle: any | null, gamerHandleSize: number): [void, any]; + export function networkHandleFromFriend(friendIndex: number, gamerHandle: any, gamerHandleSize: number): [void, any]; - export function networkGamertagFromHandleStart(gamerHandle: any): [boolean, any]; + export function networkGamertagFromHandleStart(gamerHandle?: any): [boolean, any]; export function networkGamertagFromHandlePending(): boolean; export function networkGamertagFromHandleSucceeded(): boolean; - export function networkGetGamertagFromHandle(gamerHandle: any): [string, any]; + export function networkGetGamertagFromHandle(gamerHandle?: any): [string, any]; /** - * @returns Hardcoded to return -1. - */ - export function networkDisplaynamesFromHandlesStart(p0: any | null, p1: any): [number, any]; + * Hardcoded to return -1. + */ + export function networkDisplaynamesFromHandlesStart(p0: any, p1: any): [number, any]; /** - * @returns This function is hard-coded to always return 0. - */ + * This function is hard-coded to always return 0. + */ export function networkGetDisplaynamesFromHandles(p0: any, p1: any, p2: any): number; export function networkAreHandlesTheSame(gamerHandle1?: any, gamerHandle2?: any): [boolean, any, any]; - export function networkIsHandleValid(gamerHandle: any | null, gamerHandleSize: number): [boolean, any]; + export function networkIsHandleValid(gamerHandle: any, gamerHandleSize: number): [boolean, any]; - export function networkGetPlayerFromGamerHandle(gamerHandle: any): [number, any]; + export function networkGetPlayerFromGamerHandle(gamerHandle?: any): [Player | number, any]; - export function networkMemberIdFromGamerHandle(gamerHandle: any): [string, any]; + export function networkMemberIdFromGamerHandle(gamerHandle?: any): [string, any]; - export function networkIsGamerInMySession(gamerHandle: any): [boolean, any]; + export function networkIsGamerInMySession(gamerHandle?: any): [boolean, any]; - export function networkShowProfileUi(gamerHandle: any): [void, any]; + export function networkShowProfileUi(gamerHandle?: any): [void, any]; /** - * @returns Returns the name of a given player. Returns "**Invalid**" if rlGamerInfo of the given player cannot be retrieved or the player doesn't exist. - */ + * Returns the name of a given player. Returns "**Invalid**" if rlGamerInfo of the given player cannot be retrieved or the player doesn't exist. + */ export function networkPlayerGetName(player: Player | number): string; /** - * Returns a string of the player's Rockstar Id. - * @returns Takes a 24 char buffer. Returns the buffer or "**Invalid**" if rlGamerInfo of the given player cannot be retrieved or the player doesn't exist. - */ + * Returns a string of the player's Rockstar Id. + * Takes a 24 char buffer. Returns the buffer or "**Invalid**" if rlGamerInfo of the given player cannot be retrieved or the player doesn't exist. + */ export function networkPlayerGetUserid(player: Player | number, userID?: number): [string, number]; /** - * Checks if a specific value (BYTE) in CNetGamePlayer is nonzero. - * Returns always false in Singleplayer. - * No longer used for dev checks since first mods were released on PS3 & 360. - * R* now checks with the IS_DLC_PRESENT native for the dlc hash 2532323046, - * if that is present it will unlock dev stuff. - */ + * Checks if a specific value (BYTE) in CNetGamePlayer is nonzero. + * Returns always false in Singleplayer. + * No longer used for dev checks since first mods were released on PS3 & 360. + * R* now checks with the IS_DLC_PRESENT native for the dlc hash 2532323046, + * if that is present it will unlock dev stuff. + */ export function networkPlayerIsRockstarDev(player: Player | number): boolean; export function networkPlayerIndexIsCheater(player: Player | number): boolean; @@ -10964,15 +11864,15 @@ declare module "natives" { export function networkEntityGetObjectId(entity: Entity | number): number; /** - * Whatever p0 is, it's at least not synced to other players. - * At least not all the time, some p0 values actually output the same entity, (different handle of course, but same entity). - * But another p0 value may return an entity for player x, but not for player y (it'll just return -1 even if the entity exists on both clients). - * Returns an entity handle or -1, value changes based on p0's value. - * @returns I've had this return the player's ped handle sometimes, but also other random entities. - */ - export function networkGetEntityFromObjectId(p0: any): number; + * I've had this return the player's ped handle sometimes, but also other random entities. + * Whatever p0 is, it's at least not synced to other players. + * At least not all the time, some p0 values actually output the same entity, (different handle of course, but same entity). + * But another p0 value may return an entity for player x, but not for player y (it'll just return -1 even if the entity exists on both clients). + * Returns an entity handle or -1, value changes based on p0's value. + */ + export function networkGetEntityFromObjectId(p0: any): Entity | number; - export function networkIsInactiveProfile(p0: any): [boolean, any]; + export function networkIsInactiveProfile(p0?: any): [boolean, any]; export function networkGetMaxFriends(): number; @@ -10982,27 +11882,27 @@ declare module "natives" { export function networkGetFriendDisplayName(friendIndex: number): string; - export function networkIsFriendOnline(name: string | null): boolean; + export function networkIsFriendOnline(name: string): boolean; - export function networkIsFriendHandleOnline(gamerHandle: any): [boolean, any]; + export function networkIsFriendHandleOnline(gamerHandle?: any): [boolean, any]; /** - * In scripts R* calls 'NETWORK_GET_FRIEND_NAME' in this param. - */ - export function networkIsFriendInSameTitle(friendName: string | null): boolean; + * In scripts R* calls 'NETWORK_GET_FRIEND_NAME' in this param. + */ + export function networkIsFriendInSameTitle(friendName: string): boolean; - export function networkIsFriendInMultiplayer(friendName: string | null): boolean; + export function networkIsFriendInMultiplayer(friendName: string): boolean; - export function networkIsFriend(gamerHandle: any): [boolean, any]; + export function networkIsFriend(gamerHandle?: any): [boolean, any]; /** - * @returns This function is hard-coded to always return 0. - */ + * This function is hard-coded to always return 0. + */ export function networkIsPendingFriend(p0: any): boolean; export function networkIsAddingFriend(): boolean; - export function networkAddFriend(gamerHandle: any | null, message: string | null): [boolean, any]; + export function networkAddFriend(gamerHandle: any, message: string): [boolean, any]; export function networkIsFriendIndexOnline(friendIndex: number): boolean; @@ -11014,7 +11914,35 @@ declare module "natives" { export function networkIgnoreRemoteWaypoints(): void; - export function networkIsPlayerOnBlocklist(gamerHandle: any): [boolean, any]; + /** + * communicationType: 0 = VOICE; 1 = TEXT_CHAT; 2 = TEXT_MESSAGE; 3 = EMAIL; 4 = USER_CONTENT; 5 = USER_TEXT + */ + export function networkDoesCommunicationGroupExist(communicationType: number): boolean; + + /** + * Returns communicationGroupFlag + * communicationType: see 0xDBDF80673BBA3D65 + * enum eCommunicationGroupFlag + * { + * COMMUNICATION_GROUP_LOCAL_PLAYER = 1 << 0, + * COMMUNICATION_GROUP_FRIENDS = 1 << 1, + * COMMUNICATION_GROUP_SMALL_CREW = 1 << 2, + * COMMUNICATION_GROUP_LARGE_CREW = 1 << 3, + * COMMUNICATION_GROUP_RECENT_PLAYER = 1 << 4, + * COMMUNICATION_GROUP_SAME_SESSION = 1 << 5, + * COMMUNICATION_GROUP_SAME_TEAM = 1 << 6, + * COMMUNICATION_GROUP_INVALID = 1 << 7, + * }; + */ + export function networkGetCommunicationGroupFlags(communicationType: number): number; + + /** + * communicationType: see 0xDBDF80673BBA3D65 + * communicationGroupFlag: see 0x40DF02F371F40883 + */ + export function networkSetCommunicationGroupFlags(communicationType: number, communicationGroupFlag: number): void; + + export function networkIsPlayerOnBlocklist(gamerHandle?: any): [boolean, any]; export function networkSetScriptAutomuted(p0: any): boolean; @@ -11026,39 +11954,39 @@ declare module "natives" { export function networkIsPushToTalkActive(): boolean; - export function networkGamerHasHeadset(gamerHandle: any): [boolean, any]; + export function networkGamerHasHeadset(gamerHandle?: any): [boolean, any]; - export function networkIsGamerTalking(gamerHandle: any): [boolean, any]; + export function networkIsGamerTalking(gamerHandle?: any): [boolean, any]; - export function networkPermissionsHasGamerRecord(gamerHandle: any): [boolean, any]; + export function networkPermissionsHasGamerRecord(gamerHandle?: any): [boolean, any]; - export function networkCanCommunicateWithGamer(gamerHandle: any): [boolean, any]; + export function networkCanCommunicateWithGamer(gamerHandle?: any): [boolean, any]; - export function networkCanTextChatWithGamer(gamerHandle: any): [boolean, any]; + export function networkCanTextChatWithGamer(gamerHandle?: any): [boolean, any]; - export function networkIsGamerMutedByMe(gamerHandle: any): [boolean, any]; + export function networkIsGamerMutedByMe(gamerHandle?: any): [boolean, any]; - export function networkAmIMutedByGamer(gamerHandle: any): [boolean, any]; + export function networkAmIMutedByGamer(gamerHandle?: any): [boolean, any]; - export function networkIsGamerBlockedByMe(gamerHandle: any): [boolean, any]; + export function networkIsGamerBlockedByMe(gamerHandle?: any): [boolean, any]; - export function networkAmIBlockedByGamer(gamerHandle: any): [boolean, any]; + export function networkAmIBlockedByGamer(gamerHandle?: any): [boolean, any]; - export function networkCanViewGamerUserContent(gamerHandle: any): [boolean, any]; + export function networkCanViewGamerUserContent(gamerHandle?: any): [boolean, any]; - export function networkHasViewGamerUserContentResult(gamerHandle: any): [boolean, any]; + export function networkHasViewGamerUserContentResult(gamerHandle?: any): [boolean, any]; - export function networkCanPlayMultiplayerWithGamer(gamerHandle: any): [boolean, any]; + export function networkCanPlayMultiplayerWithGamer(gamerHandle?: any): [boolean, any]; - export function networkCanGamerPlayMultiplayerWithMe(gamerHandle: any): [boolean, any]; + export function networkCanGamerPlayMultiplayerWithMe(gamerHandle?: any): [boolean, any]; - export function networkCanSendLocalInvite(gamerHandle: any): [boolean, any]; + export function networkCanSendLocalInvite(gamerHandle?: any): [boolean, any]; - export function networkCanReceiveLocalInvite(gamerHandle: any): [boolean, any]; + export function networkCanReceiveLocalInvite(gamerHandle?: any): [boolean, any]; /** - * returns true if someone is screaming or talking in a microphone - */ + * returns true if someone is screaming or talking in a microphone + */ export function networkIsPlayerTalking(player: Player | number): boolean; export function networkPlayerHasHeadset(player: Player | number): boolean; @@ -11102,27 +12030,27 @@ declare module "natives" { export function networkSetIgnoreSpectatorChatLimitsSameTeam(toggle: boolean): void; /** - * Could possibly bypass being muted or automatically muted - */ + * Could possibly bypass being muted or automatically muted + */ export function networkOverrideChatRestrictions(player: Player | number, toggle: boolean): void; /** - * This is used alongside the native, - * 'NETWORK_OVERRIDE_RECEIVE_RESTRICTIONS'. Read its description for more info. - */ + * This is used alongside the native, + * 'NETWORK_OVERRIDE_RECEIVE_RESTRICTIONS'. Read its description for more info. + */ export function networkOverrideSendRestrictions(player: Player | number, toggle: boolean): void; export function networkOverrideSendRestrictionsAll(toggle: boolean): void; /** - * R* uses this to hear all player when spectating. - * It allows you to hear other online players when their chat is on none, crew and or friends - */ + * R* uses this to hear all player when spectating. + * It allows you to hear other online players when their chat is on none, crew and or friends + */ export function networkOverrideReceiveRestrictions(player: Player | number, toggle: boolean): void; /** - * @param toggle is always false in scripts. - */ + * p0 is always false in scripts. + */ export function networkOverrideReceiveRestrictionsAll(toggle: boolean): void; export function networkSetVoiceChannel(channel: number): void; @@ -11138,55 +12066,55 @@ declare module "natives" { export function networkDisableVoiceBandwidthRestriction(player: Player | number): void; /** - * NETWORK_GET_M[A-U] - */ + * NETWORK_GET_M[A-U] + */ export function networkGetMuteCountForPlayer(p0: Player | number, p1?: number, p2?: number): [void, number, number]; export function networkSetSpectatorToNonSpectatorTextChat(toggle: boolean): void; /** - * Same as _IS_TEXT_CHAT_ACTIVE, except it does not check if the text chat HUD component is initialized, and therefore may crash. - */ + * Same as _IS_TEXT_CHAT_ACTIVE, except it does not check if the text chat HUD component is initialized, and therefore may crash. + */ export function networkTextChatIsTyping(): boolean; /** - * Starts a new singleplayer game (at the prologue). - */ + * Starts a new singleplayer game (at the prologue). + */ export function shutdownAndLaunchSinglePlayerGame(): void; /** - * In singleplayer this will re-load your game. - * In FiveM / GTA:Online this disconnects you from the session, and starts loading single player, however you still remain connected to the server (only if you're the host, if you're not then you also (most likely) get disconnected from the server) and other players will not be able to join until you exit the game. - * You might need to DoScreenFadeIn and ShutdownLoadingScreen otherwise you probably won't end up loading into SP at all. - * Somewhat related note: opening the pause menu after loading into this 'singleplayer' mode crashes the game. - */ + * In singleplayer this will re-load your game. + * In FiveM / GTA:Online this disconnects you from the session, and starts loading single player, however you still remain connected to the server (only if you're the host, if you're not then you also (most likely) get disconnected from the server) and other players will not be able to join until you exit the game. + * You might need to DoScreenFadeIn and ShutdownLoadingScreen otherwise you probably won't end up loading into SP at all. + * Somewhat related note: opening the pause menu after loading into this 'singleplayer' mode crashes the game. + */ export function shutdownAndLoadMostRecentSave(): boolean; export function networkSetFriendlyFireOption(toggle: boolean): void; /** - * This native does absolutely nothing, just a nullsub - */ + * This native does absolutely nothing, just a nullsub + */ export function networkSetRichPresence(p0: number, p1: number, p2: any, p3: any): void; /** - * This native does absolutely nothing, just a nullsub - */ - export function networkSetRichPresenceString(p0: number, textLabel: string | null): void; + * This native does absolutely nothing, just a nullsub + */ + export function networkSetRichPresenceString(p0: number, textLabel: string): void; export function networkGetTimeoutTime(): number; /** - * @param p4 and p5 are always 0 in scripts - */ + * p4 and p5 are always 0 in scripts + */ export function networkLeavePedBehindBeforeWarp(player: Player | number, x: number, y: number, z: number, p4: boolean, p5: boolean): void; export function networkLeavePedBehindBeforeCutscene(player: Player | number, p1: boolean): void; /** - * @param entity must be a valid entity; ped can be NULL - */ - export function removeAllStickyBombsFromEntity(entity: Entity | number, ped: Player | number): void; + * entity must be a valid entity; ped can be NULL + */ + export function removeAllStickyBombsFromEntity(entity: Entity | number, ped: Ped | Player | number): void; export function networkKeepEntityCollisionDisabledAfterAnimScene(p0: any, p1: any): void; @@ -11194,57 +12122,57 @@ declare module "natives" { export function networkClanServiceIsValid(): boolean; - export function networkClanPlayerIsActive(gamerHandle: any): [boolean, any]; + export function networkClanPlayerIsActive(gamerHandle?: any): [boolean, any]; /** - * bufferSize is the elementCount of p0(desc), sizeof(p0) == 280 == p1*8 == 35 * 8, p2(netHandle) is obtained from NETWORK::NETWORK_HANDLE_FROM_PLAYER. And no, I can't explain why 35 * sizeof(int) == 280 and not 140, but I'll get back to you on that. - * the answer is: because p0 an int64_t* / int64_t[35]. and FYI p2 is an int64_t[13] - * https://pastebin.com/cSZniHak - * @param bufferSize is 35 in the scripts. - */ - export function networkClanPlayerGetDesc(clanDesc: any | null, bufferSize: number, gamerHandle?: any): [boolean, any, any]; + * bufferSize is 35 in the scripts. + * bufferSize is the elementCount of p0(desc), sizeof(p0) == 280 == p1*8 == 35 * 8, p2(netHandle) is obtained from NETWORK::NETWORK_HANDLE_FROM_PLAYER. And no, I can't explain why 35 * sizeof(int) == 280 and not 140, but I'll get back to you on that. + * the answer is: because p0 an int64_t* / int64_t[35]. and FYI p2 is an int64_t[13] + * https://pastebin.com/cSZniHak + */ + export function networkClanPlayerGetDesc(clanDesc: any, bufferSize: number, gamerHandle?: any): [boolean, any, any]; /** - * @param bufferSize is 35 in the scripts. - */ - export function networkClanIsRockstarClan(clanDesc: any | null, bufferSize: number): [boolean, any]; + * bufferSize is 35 in the scripts. + */ + export function networkClanIsRockstarClan(clanDesc: any, bufferSize: number): [boolean, any]; /** - * @param bufferSize is 35 in the scripts. - */ - export function networkClanGetUiFormattedTag(clanDesc: any | null, bufferSize: number, formattedTag?: string | null): [void, any, string]; + * bufferSize is 35 in the scripts. + */ + export function networkClanGetUiFormattedTag(clanDesc: any, bufferSize: number, formattedTag: string): [void, any]; export function networkClanGetLocalMembershipsCount(): number; - export function networkClanGetMembershipDesc(memberDesc: any | null, p1: number): [boolean, any]; + export function networkClanGetMembershipDesc(memberDesc: any, p1: number): [boolean, any]; - export function networkClanDownloadMembership(gamerHandle: any): [boolean, any]; + export function networkClanDownloadMembership(gamerHandle?: any): [boolean, any]; - export function networkClanDownloadMembershipPending(p0: any): [boolean, any]; + export function networkClanDownloadMembershipPending(p0?: any): [boolean, any]; export function networkClanAnyDownloadMembershipPending(): boolean; - export function networkClanRemoteMembershipsAreInCache(p0: number): [boolean, number]; + export function networkClanRemoteMembershipsAreInCache(p0?: number): [boolean, number]; - export function networkClanGetMembershipCount(p0: number): [number, number]; + export function networkClanGetMembershipCount(p0?: number): [number, number]; - export function networkClanGetMembershipValid(p0: number | null, p1: any): [boolean, number]; + export function networkClanGetMembershipValid(p0: number, p1: any): [boolean, number]; - export function networkClanGetMembership(p0: number | null, clanMembership: any | null, p2: number): [boolean, number, any]; + export function networkClanGetMembership(p0: number, clanMembership: any, p2: number): [boolean, number, any]; export function networkClanJoin(clanDesc: number): boolean; /** - * Only documented... - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - */ - export function networkClanCrewinfoGetStringValue(animDict: string | null, animName: string | null): boolean; + * Only documented... + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function networkClanCrewinfoGetStringValue(animDict: string, animName: string): boolean; - export function networkClanCrewinfoGetCrewranktitle(p0: number, p1: string | null): boolean; + export function networkClanCrewinfoGetCrewranktitle(p0: number, p1: string): boolean; export function networkClanHasCrewinfoMetadataBeenReceived(): boolean; - export function networkClanGetEmblemTxdName(netHandle?: any, txdName?: string | null): [boolean, any, string]; + export function networkClanGetEmblemTxdName(netHandle: any, txdName: string): [boolean, any]; export function networkClanRequestEmblem(p0: any): boolean; @@ -11256,7 +12184,7 @@ declare module "natives" { export function networkGetPrimaryClanDataCancel(): void; - export function networkGetPrimaryClanDataStart(p0: any | null, p1: any): [boolean, any]; + export function networkGetPrimaryClanDataStart(p0: any, p1: any): [boolean, any]; export function networkGetPrimaryClanDataPending(): boolean; @@ -11265,8 +12193,8 @@ declare module "natives" { export function networkGetPrimaryClanDataNew(p0?: any, p1?: any): [boolean, any, any]; /** - * Whether or not another player is allowed to take control of the entity - */ + * Whether or not another player is allowed to take control of the entity + */ export function setNetworkIdCanMigrate(netId: number, toggle: boolean): void; export function setNetworkIdExistsOnAllMachines(netId: number, toggle: boolean): void; @@ -11274,35 +12202,35 @@ declare module "natives" { export function setNetworkIdAlwaysExistsForPlayer(netId: number, player: Player | number, toggle: boolean): void; /** - * "No Reassign" in CPhysicalScriptGameStateDataNode - */ + * "No Reassign" in CPhysicalScriptGameStateDataNode + */ export function setNetworkIdCanBeReassigned(netId: number, toggle: boolean): void; export function networkSetEntityCanBlend(entity: Entity | number, toggle: boolean): void; - export function networkSetObjectCanBlendWhenFixed(object: number, toggle: boolean): void; + export function networkSetObjectCanBlendWhenFixed(object: Object, toggle: boolean): void; /** - * if set to true other network players can't see it - * if set to false other network player can see it - * ========================================= - * ^^ I attempted this by grabbing an object with GET_ENTITY_PLAYER_IS_FREE_AIMING_AT and setting this naive no matter the toggle he could still see it. - * pc or last gen? - * ^^ last-gen - */ + * if set to true other network players can't see it + * if set to false other network player can see it + * ========================================= + * ^^ I attempted this by grabbing an object with GET_ENTITY_PLAYER_IS_FREE_AIMING_AT and setting this naive no matter the toggle he could still see it. + * pc or last gen? + * ^^ last-gen + */ export function networkSetEntityOnlyExistsForParticipants(entity: Entity | number, toggle: boolean): void; export function setNetworkIdVisibleInCutscene(netId: number, p1: boolean, p2: boolean): void; export function setNetworkIdVisibleInCutsceneHack(netId: number, p1: boolean, p2: boolean): void; - export function setNetworkIdVisibleInCutsceneRemainHack(p0: any, p1: any): void; + export function setNetworkIdVisibleInCutsceneRemainHack(p0: any, p1: any, p2: any): void; export function setNetworkCutsceneEntities(toggle: boolean): void; /** - * Getter for SET_NETWORK_CUTSCENE_ENTITIES. - */ + * Getter for SET_NETWORK_CUTSCENE_ENTITIES. + */ export function areCutsceneEntitiesNetworked(): boolean; export function setNetworkIdPassControlInTutorial(netId: number, state: boolean): void; @@ -11322,21 +12250,21 @@ declare module "natives" { export function setPlayerVisibleLocally(player: Player | number, bIncludePlayersVehicle: boolean): void; /** - * Hardcoded to not work in SP. - */ + * Hardcoded to not work in SP. + */ export function fadeOutLocalPlayer(p0: boolean): void; /** - * @param normal - transition like when your coming out of LSC - * @param slow - transition like when you walk into a mission - */ + * normal - transition like when your coming out of LSC + * slow - transition like when you walk into a mission + */ export function networkFadeOutEntity(entity: Entity | number, normal: boolean, slow: boolean): void; /** - * state - 1 does 6 fades - * p3: setting to 1 made vehicle fade in slower, probably "slow" as per NETWORK_FADE_OUT_ENTITY - * @param state - 0 does 5 fades - */ + * state - 0 does 5 fades + * state - 1 does 6 fades + * p3: setting to 1 made vehicle fade in slower, probably "slow" as per NETWORK_FADE_OUT_ENTITY + */ export function networkFadeInEntity(entity: Entity | number, state: boolean, p2: any): void; export function networkIsPlayerFading(player: Player | number): boolean; @@ -11348,8 +12276,8 @@ declare module "natives" { export function setEntityVisibleInCutscene(p0: any, p1: boolean, p2: boolean): void; /** - * Makes the provided entity visible for yourself for the current frame. - */ + * Makes the provided entity visible for yourself for the current frame. + */ export function setEntityLocallyInvisible(entity: Entity | number): void; export function setEntityLocallyVisible(entity: Entity | number): void; @@ -11391,18 +12319,18 @@ declare module "natives" { export function canRegisterMissionEntities(ped_amt: number, vehicle_amt: number, object_amt: number, pickup_amt: number): boolean; /** - * @param p0 appears to be for MP - */ + * p0 appears to be for MP + */ export function getNumReservedMissionObjects(p0: boolean, p1: any): number; /** - * @param p0 appears to be for MP - */ + * p0 appears to be for MP + */ export function getNumReservedMissionPeds(p0: boolean, p1: any): number; /** - * @param p0 appears to be for MP - */ + * p0 appears to be for MP + */ export function getNumReservedMissionVehicles(p0: boolean, p1: any): number; export function getNumCreatedMissionObjects(p0: boolean): number; @@ -11421,77 +12349,86 @@ declare module "natives" { export function getMaxNumNetworkPickups(): number; - export function networkSetObjectScopeDistance(object: number, range: number): void; + export function networkSetObjectScopeDistance(object: Object, range: number): void; export function networkAllowCloningWhileInTutorial(p0: any, p1: any): void; /** - * A value between 1.0 and 5.0 - * _NETWORK_SET_TASK_CUTSCENE_PROXIMITY_SCALE? - */ + * A value between 1.0 and 5.0 + * _NETWORK_SET_TASK_CUTSCENE_PROXIMITY_SCALE? + */ export function networkSetTaskCutsceneInscopeMultipler(p0: any): void; export function getNetworkTime(): number; /** - * Returns the same value as GET_NETWORK_TIME in freemode, but as opposed to `GET_NETWORK_TIME` it always gets the most recent time, instead of once per tick. - * @returns Could be used for benchmarking since it can return times in ticks. - */ + * Returns the same value as GET_NETWORK_TIME in freemode, but as opposed to `GET_NETWORK_TIME` it always gets the most recent time, instead of once per tick. + * Could be used for benchmarking since it can return times in ticks. + */ export function getNetworkTimeAccurate(): number; export function hasNetworkTimeStarted(): boolean; /** - * Adds the first argument to the second. - */ + * Adds the first argument to the second. + */ export function getTimeOffset(timeA: number, timeB: number): number; /** - * @returns Subtracts the second argument from the first, then returns whether the result is negative. - */ + * Subtracts the second argument from the first, then returns whether the result is negative. + */ export function isTimeLessThan(timeA: number, timeB: number): boolean; /** - * @returns Subtracts the first argument from the second, then returns whether the result is negative. - */ + * Subtracts the first argument from the second, then returns whether the result is negative. + */ export function isTimeMoreThan(timeA: number, timeB: number): boolean; /** - * @returns Returns true if the two times are equal; otherwise returns false. - */ + * Returns true if the two times are equal; otherwise returns false. + */ export function isTimeEqualTo(timeA: number, timeB: number): boolean; /** - * Subtracts the second argument from the first. - */ + * Subtracts the second argument from the first. + */ export function getTimeDifference(timeA: number, timeB: number): number; export function getTimeAsString(time: number): string; + /** + * Same as GET_CLOUD_TIME_AS_INT but returns the value as a hex string (%I64X). + */ export function getCloudTimeAsString(): string; /** - * Returns POSIX timestamp, an int representing the cloud time. - */ + * Returns POSIX timestamp, an int representing the cloud time. + */ export function getCloudTimeAsInt(): number; /** - * Takes the specified time and writes it to the structure specified in the second argument. - * struct date_time - * { - * int year; - * int PADDING1; - * int month; - * int PADDING2; - * int day; - * int PADDING3; - * See NativeDB for reference: http://natives.altv.mp/#/0xAC97AF97FA68E5D5 - */ + * Takes the specified time and writes it to the structure specified in the second argument. + * struct date_time + * { + * int year; + * int PADDING1; + * int month; + * int PADDING2; + * int day; + * int PADDING3; + * int hour; + * int PADDING4; + * int minute; + * int PADDING5; + * int second; + * int PADDING6; + * }; + */ export function convertPosixTime(posixTime: number, timeStructure?: any): [void, any]; - export function networkSetInSpectatorMode(toggle: boolean, playerPed: Player | number): void; + export function networkSetInSpectatorMode(toggle: boolean, playerPed: Ped | Player | number): void; - export function networkSetInSpectatorModeExtended(toggle: boolean, playerPed: Player | number, p2: boolean): void; + export function networkSetInSpectatorModeExtended(toggle: boolean, playerPed: Ped | Player | number, p2: boolean): void; export function networkSetInFreeCamMode(toggle: boolean): void; @@ -11514,13 +12451,13 @@ declare module "natives" { export function setNetworkVehicleAsGhost(vehicle: Vehicle | number, toggle: boolean): void; /** - * rage::netBlenderLinInterp::GetPositionMaxForUpdateLevel - */ + * rage::netBlenderLinInterp::GetPositionMaxForUpdateLevel + */ export function setNetworkVehicleMaxPositionDeltaMultiplier(vehicle: Vehicle | number, multiplier: number): void; /** - * Enables a periodic ShapeTest within the NetBlender and invokes rage::netBlenderLinInterp::GoStraightToTarget (or some functional wrapper). - */ + * Enables a periodic ShapeTest within the NetBlender and invokes rage::netBlenderLinInterp::GoStraightToTarget (or some functional wrapper). + */ export function setNetworkEnableHighSpeedEdgeFallDetection(vehicle: Vehicle | number, toggle: boolean): void; export function setLocalPlayerAsGhost(toggle: boolean, p1: boolean): void; @@ -11530,18 +12467,18 @@ declare module "natives" { export function setNonParticipantsOfThisScriptAsGhosts(p0: boolean): void; /** - * Enables ghosting between specific players - */ + * Enables ghosting between specific players + */ export function setRemotePlayerAsGhost(player: Player | number, p1: boolean): void; /** - * Must be a value between 1 and 254 - */ + * Must be a value between 1 and 254 + */ export function setGhostAlpha(alpha: number): void; /** - * Resets the entity ghost alpha to the default value (128) - */ + * Resets the entity ghost alpha to the default value (128) + */ export function resetGhostAlpha(): void; export function setEntityGhostedForGhostPlayers(entity: Entity | number, toggle: boolean): void; @@ -11554,19 +12491,19 @@ declare module "natives" { export function networkCreateSynchronisedScene(x: number, y: number, z: number, xRot: number, yRot: number, zRot: number, rotationOrder: number, useOcclusionPortal: boolean, looped: boolean, p9: number, animTime: number, p11: number): number; - export function networkAddPedToSynchronisedScene(ped: Player | number, netScene: number, animDict: string | null, animnName: string | null, speed: number, speedMultiplier: number, duration: number, flag: number, playbackRate: number, p9: any): void; + export function networkAddPedToSynchronisedScene(ped: Ped | Player | number, netScene: number, animDict: string, animnName: string, speed: number, speedMultiplier: number, duration: number, flag: number, playbackRate: number, p9: any): void; export function networkAddPedToSynchronisedSceneWithIk(p0: any, p1: any, p2: any, p3: any, p4: any, p5: any, p6: any, p7: any, p8: any, p9: any): void; - export function networkAddEntityToSynchronisedScene(entity: Entity | number, netScene: number, animDict: string | null, animName: string | null, speed: number, speedMulitiplier: number, flag: number): void; + export function networkAddEntityToSynchronisedScene(entity: Entity | number, netScene: number, animDict: string, animName: string, speed: number, speedMulitiplier: number, flag: number): void; /** - * Similar structure as NETWORK_ADD_ENTITY_TO_SYNCHRONISED_SCENE but it includes this time a hash. - * In casino_slots it is used one time in a synced scene involving a ped and the slot machine? - */ - export function networkAddMapEntityToSynchronisedScene(netScene: number, modelHash: number, x: number, y: number, z: number, p5: number, p6: string | null, p7: number, p8: number, flags: number): void; + * Similar structure as NETWORK_ADD_ENTITY_TO_SYNCHRONISED_SCENE but it includes this time a hash. + * In casino_slots it is used one time in a synced scene involving a ped and the slot machine? + */ + export function networkAddMapEntityToSynchronisedScene(netScene: number, modelHash: number, x: number, y: number, z: number, p5: number, p6: string, p7: number, p8: number, flags: number): void; - export function networkAddSynchronisedSceneCamera(netScene: number, animDict: string | null, animName: string | null): void; + export function networkAddSynchronisedSceneCamera(netScene: number, animDict: string, animName: string): void; export function networkAttachSynchronisedSceneToEntity(netScene: number, entity: Entity | number, bone: number): void; @@ -11581,29 +12518,29 @@ declare module "natives" { export function networkAllowRemoteSyncedSceneLocalPlayerRequests(p0: any): void; /** - * @param p0 is always 0. p1 is pointing to a global. - */ + * p0 is always 0. p1 is pointing to a global. + */ export function networkFindLargestBunchOfPlayers(p0: number, p1: any): boolean; /** - * One of the first things it does is get the players ped. - * Then it calls a function that is used in some tasks and ped based functions. - * p5, p6, p7 is another coordinate (or zero), often related to `GET_BLIP_COORDS, in the decompiled scripts. - */ + * One of the first things it does is get the players ped. + * Then it calls a function that is used in some tasks and ped based functions. + * p5, p6, p7 is another coordinate (or zero), often related to `GET_BLIP_COORDS, in the decompiled scripts. + */ export function networkStartRespawnSearchForPlayer(player: Player | number, x: number, y: number, z: number, radius: number, p5: number, p6: number, p7: number, flags: number): boolean; /** - * p8, p9, p10 is another coordinate, or zero, often related to `GET_BLIP_COORDS in the decompiled scripts. - */ + * p8, p9, p10 is another coordinate, or zero, often related to `GET_BLIP_COORDS in the decompiled scripts. + */ export function networkStartRespawnSearchInAngledAreaForPlayer(player: Player | number, x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, width: number, p8: number, p9: number, p10: number, flags: number): boolean; - export function networkQueryRespawnResults(p0: any): [number, any]; + export function networkQueryRespawnResults(p0?: any): [number, any]; export function networkCancelRespawnSearch(): void; /** - * Based on scripts such as in freemode.c how they call their vars vVar and fVar the 2nd and 3rd param it a Vector3 and Float, but the first is based on get_random_int_in_range.. - */ + * Based on scripts such as in freemode.c how they call their vars vVar and fVar the 2nd and 3rd param it a Vector3 and Float, but the first is based on get_random_int_in_range.. + */ export function networkGetRespawnResult(randomInt: number, coordinates?: Vector3, heading?: number): [void, Vector3, number]; export function networkGetRespawnResultFlags(p0: number): number; @@ -11611,8 +12548,8 @@ declare module "natives" { export function networkStartSoloTutorialSession(): void; /** - * @param teamId must be < 3, instanceId must be < 64 - */ + * teamId must be < 3, instanceId must be < 64 + */ export function networkAllowGangToJoinTutorialSession(teamId: number, instanceId: number): void; export function networkEndTutorialSession(): void; @@ -11636,14 +12573,14 @@ declare module "natives" { export function networkConcealEntity(entity: Entity | number, toggle: boolean): void; /** - * Note: This only works for vehicles, which appears to be a bug (since the setter _does_ work for every entity type and the name is 99% correct). - */ + * Note: This only works for vehicles, which appears to be a bug (since the setter _does_ work for every entity type and the name is 99% correct). + */ export function networkIsEntityConcealed(entity: Entity | number): boolean; /** - * Works in Singleplayer too. - * Passing wrong data (e.g. hours above 23) will cause the game to crash. - */ + * Works in Singleplayer too. + * Passing wrong data (e.g. hours above 23) will cause the game to crash. + */ export function networkOverrideClockTime(hours: number, minutes: number, seconds: number): void; export function networkOverrideClockRate(ms: number): void; @@ -11655,9 +12592,9 @@ declare module "natives" { export function networkAddEntityArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): number; /** - * To remove, see: NETWORK_REMOVE_ENTITY_AREA - * See IS_POINT_IN_ANGLED_AREA for the definition of an angled area. - */ + * To remove, see: NETWORK_REMOVE_ENTITY_AREA + * See IS_POINT_IN_ANGLED_AREA for the definition of an angled area. + */ export function networkAddEntityAngledArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, width: number): number; export function networkAddClientEntityArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): number; @@ -11686,15 +12623,18 @@ declare module "natives" { export function networkIsTunableCloudRequestPending(): boolean; + /** + * Actually returns the version (TUNABLE_VERSION) + */ export function networkGetTunableCloudCrc(): number; - export function networkDoesTunableExist(tunableContext: string | null, tunableName: string | null): boolean; + export function networkDoesTunableExist(tunableContext: string, tunableName: string): boolean; - export function networkAccessTunableInt(tunableContext: string | null, tunableName: string | null, value?: number): [boolean, number]; + export function networkAccessTunableInt(tunableContext: string, tunableName: string, value?: number): [boolean, number]; - export function networkAccessTunableFloat(tunableContext: string | null, tunableName: string | null, value?: number): [boolean, number]; + export function networkAccessTunableFloat(tunableContext: string, tunableName: string, value?: number): [boolean, number]; - export function networkAccessTunableBool(tunableContext: string | null, tunableName: string | null): boolean; + export function networkAccessTunableBool(tunableContext: string, tunableName: string): boolean; export function networkDoesTunableExistHash(tunableContext: number, tunableName: number): boolean; @@ -11713,16 +12653,16 @@ declare module "natives" { export function networkAccessTunableBoolModificationDetectionRegistrationHash(contextHash: number, nameHash: number, value?: boolean): [boolean, boolean]; /** - * Returns defaultValue if the tunable doesn't exist. - */ + * Returns defaultValue if the tunable doesn't exist. + */ export function networkTryAccessTunableBoolHash(tunableContext: number, tunableName: number, defaultValue: boolean): boolean; /** - * Return the content modifier id (the tunables context if you want) of a specific content. - * The mission id can be found on the Social club, for example, 'socialclub.rockstargames.com/games/gtav/jobs/job/A8M6Bz8MLEC5xngvDCzGwA' - * 'A8M6Bz8MLEC5xngvDCzGwA' is the mission id, so the game hash this and use it as the parameter for this native. - * @returns It takes the content hash (which is the mission id hash), and return the content modifier id, used as the tunables context. - */ + * Return the content modifier id (the tunables context if you want) of a specific content. + * It takes the content hash (which is the mission id hash), and return the content modifier id, used as the tunables context. + * The mission id can be found on the Social club, for example, 'socialclub.rockstargames.com/games/gtav/jobs/job/A8M6Bz8MLEC5xngvDCzGwA' + * 'A8M6Bz8MLEC5xngvDCzGwA' is the mission id, so the game hash this and use it as the parameter for this native. + */ export function networkGetContentModifierListId(contentHash: number): number; export function networkGetBoneIdOfFatalHit(): number; @@ -11733,11 +12673,11 @@ declare module "natives" { export function networkHasBoneBeenHitByKiller(boneIndex: number): boolean; - export function networkSetAttributeDamageToPlayer(ped: Player | number, player: Player | number): boolean; + export function networkSetAttributeDamageToPlayer(ped: Ped | Player | number, player: Player | number): boolean; /** - * Allows vehicle wheels to be destructible even when the vehicle entity is invincible. - */ + * Allows vehicle wheels to be destructible even when the vehicle entity is invincible. + */ export function networkTriggerDamageEventForZeroDamage(entity: Entity | number, toggle: boolean): void; export function networkTriggerDamageEventForZeroWeaponHash(entity: Entity | number, toggle: boolean): void; @@ -11745,17 +12685,20 @@ declare module "natives" { export function networkSetNoLongerNeeded(entity: Entity | number, toggle: boolean): void; /** - * In the console script dumps, this is only referenced once. - * ^^^^^ That must be PC script dumps? In X360 Script Dumps it is reference a few times with 2 differences in the parameters. - * Which as you see below is 1, 0, 0 + 1, 1, 0 + 1, 0, and a *param? - * am_plane_takedown.c - * network_explode_vehicle(net_to_veh(Local_40.imm_2), 1, 1, 0); - * armenian2.c - * network_explode_vehicle(Local_80[6 <2>], 1, 0, 0); - * fm_horde_controler.c - * network_explode_vehicle(net_to_veh(*uParam0), 1, 0, *uParam0); - * See NativeDB for reference: http://natives.altv.mp/#/0x301A42153C9AD707 - */ + * In the console script dumps, this is only referenced once. + * NETWORK::NETWORK_EXPLODE_VEHICLE(vehicle, 1, 0, 0); + * ^^^^^ That must be PC script dumps? In X360 Script Dumps it is reference a few times with 2 differences in the parameters. + * Which as you see below is 1, 0, 0 + 1, 1, 0 + 1, 0, and a *param? + * am_plane_takedown.c + * network_explode_vehicle(net_to_veh(Local_40.imm_2), 1, 1, 0); + * armenian2.c + * network_explode_vehicle(Local_80[6 <2>], 1, 0, 0); + * fm_horde_controler.c + * network_explode_vehicle(net_to_veh(*uParam0), 1, 0, *uParam0); + * fm_mission_controller.c, has 6 hits so not going to list them. + * Side note, setting the first parameter to 0 seems to mute sound or so? + * Seems it's like ADD_EXPLOSION, etc. the first 2 params. The 3rd atm no need to worry since it always seems to be 0. + */ export function networkExplodeVehicle(vehicle: Vehicle | number, isAudible: boolean, isInvisible: boolean, netId: number): boolean; export function networkExplodeHeli(vehicle: Vehicle | number, isAudible: boolean, isInvisible: boolean, netId: number): void; @@ -11769,15 +12712,15 @@ declare module "natives" { export function networkDisableProximityMigration(netID: number): void; /** - * value must be < 255 - */ + * value must be < 255 + */ export function networkSetPropertyId(id: number): void; export function networkClearPropertyId(): void; /** - * @param p0 in the decompiled scripts is always the stat mesh_texblend * 0.07 to int - */ + * p0 in the decompiled scripts is always the stat mesh_texblend * 0.07 to int + */ export function networkSetPlayerMentalState(p0: number): void; export function networkSetMinimumRankForMission(p0: boolean): void; @@ -11786,15 +12729,15 @@ declare module "natives" { export function networkHasCachedPlayerHeadBlendData(player: Player | number): boolean; - export function networkApplyCachedPlayerHeadBlendData(ped: Player | number, player: Player | number): boolean; + export function networkApplyCachedPlayerHeadBlendData(ped: Ped | Player | number, player: Player | number): boolean; export function getNumCommerceItems(): number; export function isCommerceDataValid(): boolean; /** - * Does nothing (it's a nullsub). - */ + * Does nothing (it's a nullsub). + */ export function triggerCommerceDataFetch(p0: any): void; export function isCommerceDataFetchInProgress(): boolean; @@ -11808,17 +12751,17 @@ declare module "natives" { export function getCommerceItemNumCats(index: number): number; /** - * @param index2 is unused - */ + * index2 is unused + */ export function getCommerceItemCat(index: number, index2: number): string; - export function openCommerceStore(p0: string | null, p1: string | null, p2: number): void; + export function openCommerceStore(p0: string, p1: string, p2: number): void; export function isCommerceStoreOpen(): boolean; /** - * Access to the store for shark cards etc... - */ + * Access to the store for shark cards etc... + */ export function setStoreEnabled(toggle: boolean): void; export function requestCommerceItemImage(index: number): boolean; @@ -11838,39 +12781,48 @@ declare module "natives" { export function setLastViewedShopItem(p0: number, p1: number, p2: number): void; /** - * Checks some commerce stuff - */ + * Checks some commerce stuff + */ export function getUserPremiumAccess(): number; /** - * Checks some commerce stuff - */ + * Checks some commerce stuff + */ export function getUserStarterAccess(): number; - export function cloudDeleteMemberFile(p0: string | null): number; + export function cloudDeleteMemberFile(p0: string): number; export function cloudHasRequestCompleted(requestId: number): boolean; export function cloudDidRequestSucceed(requestId: number): boolean; /** - * Downloads prod.cloud.rockstargames.com/titles/gta5/[platform]/check.json - */ + * Downloads prod.cloud.rockstargames.com/titles/gta5/[platform]/check.json + */ export function cloudCheckAvailability(): void; export function cloudIsCheckingAvailability(): boolean; export function cloudGetAvailabilityCheckResult(): boolean; + /** + * This function is hard-coded to always return 0. + */ export function getContentToLoadType(): number; + /** + * This function is hard-coded to always return 0. + */ export function getIsLaunchFromLiveArea(): boolean; + /** + * This function is hard-coded to always return 0. + */ export function getIsLiveAreaLaunchWithContent(): boolean; /** - * This native does absolutely nothing, just a nullsub - */ + * This native does absolutely nothing, just a nullsub + */ export function clearServiceEventArguments(): void; export function ugcCopyContent(p0?: any, p1?: any): [boolean, any, any]; @@ -11887,29 +12839,29 @@ declare module "natives" { export function ugcClearCreateResult(): void; - export function ugcQueryMyContent(p0: any, p1: any, p2: any | null, p3: any, p4: any, p5: any): [boolean, any]; + export function ugcQueryMyContent(p0: any, p1: any, p2: any, p3: any, p4: any, p5: any): [boolean, any]; - export function ugcQueryByCategory(p0: any, p1: any, p2: any, p3: string | null, p4: any, p5: boolean): boolean; + export function ugcQueryByCategory(p0: any, p1: any, p2: any, p3: string, p4: any, p5: boolean): boolean; - export function ugcQueryByContentId(contentId: string | null, latestVersion: boolean, contentTypeName: string | null): boolean; + export function ugcQueryByContentId(contentId: string, latestVersion: boolean, contentTypeName: string): boolean; - export function ugcQueryByContentIds(data: any | null, count: number, latestVersion: boolean, contentTypeName: string | null): [boolean, any]; + export function ugcQueryByContentIds(data: any, count: number, latestVersion: boolean, contentTypeName: string): [boolean, any]; - export function ugcQueryMostRecentlyCreatedContent(offset: number, count: number, contentTypeName: string | null, p3: number): boolean; + export function ugcQueryMostRecentlyCreatedContent(offset: number, count: number, contentTypeName: string, p3: number): boolean; - export function ugcGetBookmarkedContent(p0: any, p1: any, p2: string | null, p3?: any): [boolean, any]; + export function ugcGetBookmarkedContent(p0: any, p1: any, p2: string, p3?: any): [boolean, any]; - export function ugcGetMyContent(p0: any, p1: any, p2: string | null, p3?: any): [boolean, any]; + export function ugcGetMyContent(p0: any, p1: any, p2: string, p3?: any): [boolean, any]; - export function ugcGetFriendContent(p0: any, p1: any, p2: string | null, p3?: any): [boolean, any]; + export function ugcGetFriendContent(p0: any, p1: any, p2: string, p3?: any): [boolean, any]; - export function ugcGetCrewContent(p0: any, p1: any, p2: any, p3: string | null, p4?: any): [boolean, any]; + export function ugcGetCrewContent(p0: any, p1: any, p2: any, p3: string, p4?: any): [boolean, any]; - export function ugcGetGetByCategory(p0: any, p1: any, p2: any, p3: string | null, p4?: any): [boolean, any]; + export function ugcGetGetByCategory(p0: any, p1: any, p2: any, p3: string, p4?: any): [boolean, any]; - export function ugcGetGetByContentId(contentId: string | null, contentTypeName: string | null): boolean; + export function ugcGetGetByContentId(contentId: string, contentTypeName: string): boolean; - export function ugcGetGetByContentIds(data: any | null, dataCount: number, contentTypeName: string | null): [boolean, any]; + export function ugcGetGetByContentIds(data: any, dataCount: number, contentTypeName: string): [boolean, any]; export function ugcGetMostRecentlyCreatedContent(p0: any, p1: any, p2?: any, p3?: any): [boolean, any, any]; @@ -11950,13 +12902,13 @@ declare module "natives" { export function ugcGetContentCategory(p0: number): number; /** - * Return the mission id of a job. - */ + * Return the mission id of a job. + */ export function ugcGetContentId(p0: number): string; /** - * Return the root content id of a job. - */ + * Return the root content id of a job. + */ export function ugcGetRootContentId(p0: number): string; export function ugcGetContentName(p0: any): string; @@ -11993,7 +12945,7 @@ declare module "natives" { export function ugcRequestContentDataFromIndex(p0: number, p1: number): number; - export function ugcRequestContentDataFromParams(contentTypeName: string | null, contentId: string | null, p2: number, p3: number, p4: number): number; + export function ugcRequestContentDataFromParams(contentTypeName: string, contentId: string, p2: number, p3: number, p4: number): number; export function ugcRequestCachedDescription(p0: number): number; @@ -12009,11 +12961,13 @@ declare module "natives" { export function ugcReleaseAllCachedDescriptions(): void; - export function ugcPublish(contentId: string | null, baseContentId: string | null, contentTypeName: string | null): boolean; + export function ugcHasPermissionToWrite(): boolean; + + export function ugcPublish(contentId: string, baseContentId: string, contentTypeName: string): boolean; - export function ugcSetBookmarked(contentId: string | null, bookmarked: boolean, contentTypeName: string | null): boolean; + export function ugcSetBookmarked(contentId: string, bookmarked: boolean, contentTypeName: string): boolean; - export function ugcSetDeleted(p0: any | null, p1: boolean, p2: string | null): [boolean, any]; + export function ugcSetDeleted(p0: any, p1: boolean, p2: string): [boolean, any]; export function ugcIsModifying(): boolean; @@ -12043,7 +12997,7 @@ declare module "natives" { export function ugcIsLanguageSupported(p0: any): boolean; - export function facebookPostCompletedHeist(heistName: string | null, cashEarned: number, xpEarned: number): boolean; + export function facebookPostCompletedHeist(heistName: string, cashEarned: number, xpEarned: number): boolean; export function facebookPostCreateCharacter(): boolean; @@ -12055,11 +13009,11 @@ declare module "natives" { export function facebookCanPostToFacebook(): boolean; - export function textureDownloadRequest(gamerHandle: any | null, filePath: string | null, name: string | null, p3: boolean): [number, any]; + export function textureDownloadRequest(gamerHandle: any, filePath: string, name: string, p3: boolean): [number, any]; - export function titleTextureDownloadRequest(filePath: string | null, name: string | null, p2: boolean): number; + export function titleTextureDownloadRequest(filePath: string, name: string, p2: boolean): number; - export function ugcTextureDownloadRequest(p0: string | null, p1: number, p2: number, p3: number, p4: string | null, p5: boolean): number; + export function ugcTextureDownloadRequest(p0: string, p1: number, p2: number, p3: number, p4: string, p5: boolean): number; export function textureDownloadRelease(p0: number): void; @@ -12068,20 +13022,20 @@ declare module "natives" { export function textureDownloadGetName(p0: number): string; /** - * 0 = succeeded - * 1 = pending - * 2 = failed - */ + * 0 = succeeded + * 1 = pending + * 2 = failed + */ export function getStatusOfTextureDownload(p0: number): number; /** - * Returns true if profile setting 901 is set to true and sets it to false. - */ + * Returns true if profile setting 901 is set to true and sets it to false. + */ export function networkCheckRosLinkWentdownNotNet(): boolean; /** - * Returns true if the NAT type is Strict (3) and a certain number of connections have failed. - */ + * Returns true if the NAT type is Strict (3) and a certain number of connections have failed. + */ export function networkShouldShowStrictNatWarning(): boolean; export function networkIsCableConnected(): boolean; @@ -12099,8 +13053,8 @@ declare module "natives" { export function networkHaveRosLeaderboardWritePriv(): boolean; /** - * @param index is always 18 in scripts - */ + * index is always 18 in scripts + */ export function networkHasRosPrivilege(index: number): boolean; export function networkHasRosPrivilegeEndDate(privilege: number, banType?: number, timeData?: any): [boolean, number, any]; @@ -12109,26 +13063,36 @@ declare module "natives" { export function networkHasRosPrivilegeSpecialEditionContent(): boolean; + /** + * Checks for privilege 29 + */ + export function networkHasRosPrivilegeMpTextCommunication(): boolean; + + /** + * Checks for privilege 30 + */ + export function networkHasRosPrivilegeMpVoiceCommunication(): boolean; + export function networkStartCommunicationPermissionsCheck(p0: any): number; /** - * @returns Always returns -1. Seems to be XB1 specific. - */ - export function networkStartUserContentPermissionsCheck(netHandle: any): [number, any]; + * Always returns -1. Seems to be XB1 specific. + */ + export function networkStartUserContentPermissionsCheck(netHandle?: any): [number, any]; export function networkSkipRadioResetNextClose(): void; export function networkSkipRadioResetNextOpen(): void; /** - * Returns true if dinput8.dll is present in the game directory. - * You will get following error message if that is true: "You are attempting to access GTA Online servers with an altered version of the game." - */ + * Returns true if dinput8.dll is present in the game directory. + * You will get following error message if that is true: "You are attempting to access GTA Online servers with an altered version of the game." + */ export function networkSkipRadioWarning(): boolean; /** - * NETWORK_F[I-O] - */ + * NETWORK_F[I-O] + */ export function networkForceLocalPlayerScarSync(): void; export function networkDisableLeaveRemotePedBehind(toggle: boolean): void; @@ -12136,15 +13100,18 @@ declare module "natives" { export function networkAllowRemoteAttachmentModification(entity: Entity | number, toggle: boolean): void; /** - * Does nothing (it's a nullsub). - */ + * Does nothing (it's a nullsub). + */ export function networkShowChatRestrictionMsc(player: Player | number): void; /** - * This native does absolutely nothing, just a nullsub - */ + * This native does absolutely nothing, just a nullsub + */ export function networkShowPsnUgcRestriction(): void; + /** + * This function is hard-coded to always return 0. + */ export function networkIsTitleUpdateRequired(): boolean; export function networkQuitMpToDesktop(): void; @@ -12154,8 +13121,8 @@ declare module "natives" { export function networkGetAverageLatency(player: Player | number): number; /** - * Same as NETWORK_GET_AVERAGE_LATENCY - */ + * Same as NETWORK_GET_AVERAGE_LATENCY + */ export function networkGetAveragePing(player: Player | number): number; export function networkGetAveragePacketLoss(player: Player | number): number; @@ -12171,81 +13138,80 @@ declare module "natives" { export function networkGetLastEntityPosReceivedOverNetwork(entity: Entity | number): Vector3; /** - * Returns the coordinates of another player. - * @returns Does not work if you enter your own player id as p0 (will return `(0.0, 0.0, 0.0)` in that case). - */ + * Returns the coordinates of another player. + * Does not work if you enter your own player id as p0 (will return `(0.0, 0.0, 0.0)` in that case). + */ export function networkGetLastPlayerPosReceivedOverNetwork(player: Player | number): Vector3; /** - * Used by NetBlender - */ + * Used by NetBlender + */ export function networkGetLastVelReceivedOverNetwork(entity: Entity | number): Vector3; - export function networkGetPredictedVelocity(entity: Entity | number): Vector3; + export function networkGetPredictedVelocity(entity: Entity | number, maxSpeedToPredict: number): Vector3; /** - * Does nothing (it's a nullsub). - */ + * Does nothing (it's a nullsub). + */ export function networkDumpNetIfConfig(): void; /** - * Does nothing (it's a nullsub). - */ - export function networkGetSignallingInfo(p0: any): [void, any]; + * Does nothing (it's a nullsub). + */ + export function networkGetSignallingInfo(p0?: any): [void, any]; /** - * Does nothing (it's a nullsub). - */ - export function networkGetNetStatisticsInfo(p0: any): [void, any]; + * Does nothing (it's a nullsub). + */ + export function networkGetNetStatisticsInfo(p0?: any): [void, any]; export function networkGetPlayerAccountId(player: Player | number): number; export function networkUgcNav(p0: any, p1: any): void; /** - * List of object models that can be created without any additional effort like making sure ytyp is loaded etc: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ObjectList.ini - */ - export function createObject(modelHash: number, x: number, y: number, z: number, isNetwork: boolean, bScriptHostObj: boolean, dynamic: boolean): number; + * List of object models that can be created without any additional effort like making sure ytyp is loaded etc: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ObjectList.ini + */ + export function createObject(modelHash: number, x: number, y: number, z: number, isNetwork: boolean, bScriptHostObj: boolean, dynamic: boolean): Object; /** - * List of object models that can be created without any additional effort like making sure ytyp is loaded etc: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ObjectList.ini - */ - export function createObjectNoOffset(modelHash: number, x: number, y: number, z: number, isNetwork: boolean, bScriptHostObj: boolean, dynamic: boolean): number; + * List of object models that can be created without any additional effort like making sure ytyp is loaded etc: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ObjectList.ini + */ + export function createObjectNoOffset(modelHash: number, x: number, y: number, z: number, isNetwork: boolean, bScriptHostObj: boolean, dynamic: boolean): Object; /** - * Deletes the specified object, then sets the handle pointed to by the pointer to NULL. - */ - export function deleteObject(object: number): [void, number]; + * Deletes the specified object, then sets the handle pointed to by the pointer to NULL. + */ + export function deleteObject(object?: Object): [void, Object]; - export function placeObjectOnGroundProperly(object: number): boolean; + export function placeObjectOnGroundProperly(object: Object): boolean; - export function placeObjectOnGroundOrObjectProperly(object: number): boolean; + export function placeObjectOnGroundOrObjectProperly(object: Object): boolean; - export function rotateObject(object: number, p1: number, p2: number, p3: boolean): boolean; + export function rotateObject(object: Object, p1: number, p2: number, p3: boolean): boolean; /** - * Returns true if the object has finished moving. - * If false, moves the object towards the specified X, Y and Z coordinates with the specified X, Y and Z speed. - * See also: https://gtagmodding.com/opcode-database/opcode/034E/ - * @returns Has to be looped until it returns true. - */ - export function slideObject(object: number, toX: number, toY: number, toZ: number, speedX: number, speedY: number, speedZ: number, collision: boolean): boolean; + * Returns true if the object has finished moving. + * If false, moves the object towards the specified X, Y and Z coordinates with the specified X, Y and Z speed. + * See also: https://gtagmodding.com/opcode-database/opcode/034E/ + * Has to be looped until it returns true. + */ + export function slideObject(object: Object, toX: number, toY: number, toZ: number, speedX: number, speedY: number, speedZ: number, collision: boolean): boolean; - export function setObjectTargettable(object: number, targettable: boolean): void; + export function setObjectTargettable(object: Object, targettable: boolean, p2: any): void; /** - * Overrides a flag on the object which determines if the object should be avoided by a vehicle in task CTaskVehicleGoToPointWithAvoidanceAutomobile. - */ - export function setObjectForceVehiclesToAvoid(object: number, toggle: boolean): void; + * Overrides a flag on the object which determines if the object should be avoided by a vehicle in task CTaskVehicleGoToPointWithAvoidanceAutomobile. + */ + export function setObjectForceVehiclesToAvoid(object: Object, toggle: boolean): void; /** - * Has 8 params in the latest patches. - * @param isMission - if true doesn't return mission objects - * @returns isMission - if true doesn't return mission objects - */ - export function getClosestObjectOfType(x: number, y: number, z: number, radius: number, modelHash: number, isMission: boolean, p6: boolean, p7: boolean): number; + * Has 8 params in the latest patches. + * isMission - if true doesn't return mission objects + */ + export function getClosestObjectOfType(x: number, y: number, z: number, radius: number, modelHash: number, isMission: boolean, p6: boolean, p7: boolean): Object; - export function hasObjectBeenBroken(object: number, p1: any): boolean; + export function hasObjectBeenBroken(object: Object, p1: any): boolean; export function hasClosestObjectOfTypeBeenBroken(p0: number, p1: number, p2: number, p3: number, modelHash: number, p5: any): boolean; @@ -12255,70 +13221,70 @@ declare module "natives" { export function getOffsetFromCoordAndHeadingInWorldCoords(xPos: number, yPos: number, zPos: number, heading: number, xOffset: number, yOffset: number, zOffset: number): Vector3; - export function getCoordsAndRotationOfClosestObjectOfType(x: number, y: number, z: number, radius: number, modelHash: number, outPosition: Vector3 | null, outRotation: Vector3 | null, rotationOrder: number): [boolean, Vector3, Vector3]; + export function getCoordsAndRotationOfClosestObjectOfType(x: number, y: number, z: number, radius: number, modelHash: number, outPosition: Vector3, outRotation: Vector3, rotationOrder: number): [boolean, Vector3, Vector3]; /** - * Hardcoded to not work in multiplayer. - * Used to lock/unlock doors to interior areas of the game. - * (Possible) Door Types: - * https://pastebin.com/9S2m3qA4 - * 225 door types, model names and coords found in stripclub.c4: - * https://pastebin.com/gywnbzsH - * get door info: https://pastebin.com/i14rbekD - * @param locked means that the heading is locked. - * @param heading is either 1, 0 or -1 in the scripts. Means default closed(0) or opened either into(1) or out(-1) of the interior. - * @param p6 is always 0. - */ + * Hardcoded to not work in multiplayer. + * Used to lock/unlock doors to interior areas of the game. + * (Possible) Door Types: + * https://pastebin.com/9S2m3qA4 + * Heading is either 1, 0 or -1 in the scripts. Means default closed(0) or opened either into(1) or out(-1) of the interior. + * Locked means that the heading is locked. + * p6 is always 0. + * 225 door types, model names and coords found in stripclub.c4: + * https://pastebin.com/gywnbzsH + * get door info: https://pastebin.com/i14rbekD + */ export function setStateOfClosestDoorOfType(type: number, x: number, y: number, z: number, locked: boolean, heading: number, p6: boolean): void; /** - * locked is 0 if door is unlocked - * locked is 1 if door is found and unlocked. - * ------------- - * the locked bool is either 0(unlocked)(false) or 1(locked)(true) - * @param locked is 0 if no door is found - */ + * locked is 0 if no door is found + * locked is 0 if door is unlocked + * locked is 1 if door is found and unlocked. + * ------------- + * the locked bool is either 0(unlocked)(false) or 1(locked)(true) + */ export function getStateOfClosestDoorOfType(type: number, x: number, y: number, z: number, locked?: boolean, heading?: number): [void, boolean, number]; /** - * Hardcoded not to work in multiplayer environments. - * When you set locked to 0 the door open and to 1 the door close - * OBJECT::SET_LOCKED_UNSTREAMED_IN_DOOR_OF_TYPE(${prop_gate_prison_01}, 1845.0, 2605.0, 45.0, 0, 0.0, 50.0, 0); //door open - * OBJECT::SET_LOCKED_UNSTREAMED_IN_DOOR_OF_TYPE(${prop_gate_prison_01}, 1845.0, 2605.0, 45.0, 1, 0.0, 50.0, 0); //door close - */ + * Hardcoded not to work in multiplayer environments. + * When you set locked to 0 the door open and to 1 the door close + * OBJECT::SET_LOCKED_UNSTREAMED_IN_DOOR_OF_TYPE(${prop_gate_prison_01}, 1845.0, 2605.0, 45.0, 0, 0.0, 50.0, 0); //door open + * OBJECT::SET_LOCKED_UNSTREAMED_IN_DOOR_OF_TYPE(${prop_gate_prison_01}, 1845.0, 2605.0, 45.0, 1, 0.0, 50.0, 0); //door close + */ export function setLockedUnstreamedInDoorOfType(modelHash: number, x: number, y: number, z: number, locked: boolean, xRotMult: number, yRotMult: number, zRotMult: number): void; export function playObjectAutoStartAnim(p0: any): void; /** - * If scriptDoor is true, register the door on the script handler host (note: there's a hardcap on the number of script IDs that can be added to the system at a given time). If scriptDoor and isLocal are both false, the door is considered to be in a "Persists w/o netobj" state. - * door hashes normally look like PROP_[int]_DOOR_[int] for interior doors and PROP_BUILDING_[int]_DOOR_[int] exterior doors but you can just make up your own hash if you want - * All doors need to be registered with ADD_DOOR_TO_SYSTEM before they can be manipulated with the door natives and the easiest way to get door models is just find the door in codewalker. - * Example: AddDoorToSystem("PROP_43_DOOR_0", "hei_v_ilev_fh_heistdoor2", -1456.818, -520.5037, 69.67043, 0, 0, 0) - * @param doorHash has to be unique. scriptDoor false; relies upon getNetworkGameScriptHandler. isLocal On true disables the creation CRequestDoorEvent's in DOOR_SYSTEM_SET_DOOR_STATE. - * @param p5 only set to true in single player native scripts. - */ + * doorHash has to be unique. scriptDoor false; relies upon getNetworkGameScriptHandler. isLocal On true disables the creation CRequestDoorEvent's in DOOR_SYSTEM_SET_DOOR_STATE. + * p5 only set to true in single player native scripts. + * If scriptDoor is true, register the door on the script handler host (note: there's a hardcap on the number of script IDs that can be added to the system at a given time). If scriptDoor and isLocal are both false, the door is considered to be in a "Persists w/o netobj" state. + * door hashes normally look like PROP_[int]_DOOR_[int] for interior doors and PROP_BUILDING_[int]_DOOR_[int] exterior doors but you can just make up your own hash if you want + * All doors need to be registered with ADD_DOOR_TO_SYSTEM before they can be manipulated with the door natives and the easiest way to get door models is just find the door in codewalker. + * Example: AddDoorToSystem("PROP_43_DOOR_0", "hei_v_ilev_fh_heistdoor2", -1456.818, -520.5037, 69.67043, 0, 0, 0) + */ export function addDoorToSystem(doorHash: number, modelHash: number, x: number, y: number, z: number, p5: boolean, scriptDoor: boolean, isLocal: boolean): void; /** - * CDoor and CDoorSystemData still internally allocated (and their associations between doorHash, modelHash, and coordinates). - * Only its NetObj removed and flag ``*(v2 + 192) |= 8u`` (1604 retail) toggled. - */ + * CDoor and CDoorSystemData still internally allocated (and their associations between doorHash, modelHash, and coordinates). + * Only its NetObj removed and flag ``*(v2 + 192) |= 8u`` (1604 retail) toggled. + */ export function removeDoorFromSystem(doorHash: number, p1: any): void; /** - * `requestDoor` on true, and when door system is configured to, i.e., "persists w/o netobj", generate a CRequestDoorEvent. - * `forceUpdate` on true, forces an update on the door system (same path as netObjDoor_applyDoorStuff) - * Door lock states: - * 0: UNLOCKED - * 1: LOCKED - * 2: DOORSTATE_FORCE_LOCKED_UNTIL_OUT_OF_AREA - * 3: DOORSTATE_FORCE_UNLOCKED_THIS_FRAME - * 4: DOORSTATE_FORCE_LOCKED_THIS_FRAME - * 5: DOORSTATE_FORCE_OPEN_THIS_FRAME - * 6: DOORSTATE_FORCE_CLOSED_THIS_FRAME - * @returns Lockstates not applied and CNetObjDoor's not created until DOOR_SYSTEM_GET_IS_PHYSICS_LOADED returns true. - */ + * Lockstates not applied and CNetObjDoor's not created until DOOR_SYSTEM_GET_IS_PHYSICS_LOADED returns true. + * `requestDoor` on true, and when door system is configured to, i.e., "persists w/o netobj", generate a CRequestDoorEvent. + * `forceUpdate` on true, forces an update on the door system (same path as netObjDoor_applyDoorStuff) + * Door lock states: + * 0: UNLOCKED + * 1: LOCKED + * 2: DOORSTATE_FORCE_LOCKED_UNTIL_OUT_OF_AREA + * 3: DOORSTATE_FORCE_UNLOCKED_THIS_FRAME + * 4: DOORSTATE_FORCE_LOCKED_THIS_FRAME + * 5: DOORSTATE_FORCE_OPEN_THIS_FRAME + * 6: DOORSTATE_FORCE_CLOSED_THIS_FRAME + */ export function doorSystemSetDoorState(doorHash: number, state: number, requestDoor: boolean, forceUpdate: boolean): void; export function doorSystemGetDoorState(doorHash: number): number; @@ -12326,21 +13292,21 @@ declare module "natives" { export function doorSystemGetDoorPendingState(doorHash: number): number; /** - * Includes networking check: ownership vs. or the door itself **isn't** networked. - * `forceUpdate` on true invokes DOOR_SYSTEM_SET_DOOR_STATE otherwise requestDoor is unused. - */ + * Includes networking check: ownership vs. or the door itself **isn't** networked. + * `forceUpdate` on true invokes DOOR_SYSTEM_SET_DOOR_STATE otherwise requestDoor is unused. + */ export function doorSystemSetAutomaticRate(doorHash: number, rate: number, requestDoor: boolean, forceUpdate: boolean): void; /** - * `forceUpdate` on true invokes DOOR_SYSTEM_SET_DOOR_STATE otherwise requestDoor is unused. - */ + * `forceUpdate` on true invokes DOOR_SYSTEM_SET_DOOR_STATE otherwise requestDoor is unused. + */ export function doorSystemSetAutomaticDistance(doorHash: number, distance: number, requestDoor: boolean, forceUpdate: boolean): void; /** - * Sets the ajar angle of a door. - * Ranges from -1.0 to 1.0, and 0.0 is closed / default. - * `forceUpdate` on true invokes DOOR_SYSTEM_SET_DOOR_STATE otherwise requestDoor is unused. - */ + * Sets the ajar angle of a door. + * Ranges from -1.0 to 1.0, and 0.0 is closed / default. + * `forceUpdate` on true invokes DOOR_SYSTEM_SET_DOOR_STATE otherwise requestDoor is unused. + */ export function doorSystemSetOpenRatio(doorHash: number, ajar: number, requestDoor: boolean, forceUpdate: boolean): void; export function doorSystemGetAutomaticDistance(doorHash: number): number; @@ -12348,27 +13314,27 @@ declare module "natives" { export function doorSystemGetOpenRatio(doorHash: number): number; /** - * Includes networking check: ownership vs. or the door itself **isn't** networked. - * `forceUpdate` on true invokes DOOR_SYSTEM_SET_DOOR_STATE otherwise requestDoor is unused. - */ + * Includes networking check: ownership vs. or the door itself **isn't** networked. + * `forceUpdate` on true invokes DOOR_SYSTEM_SET_DOOR_STATE otherwise requestDoor is unused. + */ export function doorSystemSetSpringRemoved(doorHash: number, removed: boolean, requestDoor: boolean, forceUpdate: boolean): void; /** - * Includes networking check: ownership vs. or the door itself **isn't** networked. - */ + * Includes networking check: ownership vs. or the door itself **isn't** networked. + */ export function doorSystemSetHoldOpen(doorHash: number, toggle: boolean): void; /** - * Some property related to gates. Native name between ``DOOR_SYSTEM_SET_AUTOMATIC_RATE`` and ``DOOR_SYSTEM_SET_DOOR_STATE``. - */ + * Some property related to gates. Native name between ``DOOR_SYSTEM_SET_AUTOMATIC_RATE`` and ``DOOR_SYSTEM_SET_DOOR_STATE``. + */ export function doorSystemSetDoorOpenForRaces(doorHash: number, p1: boolean): void; /** - * if (OBJECT::IS_DOOR_REGISTERED_WITH_SYSTEM(doorHash)) - * { - * OBJECT::REMOVE_DOOR_FROM_SYSTEM(doorHash); - * } - */ + * if (OBJECT::IS_DOOR_REGISTERED_WITH_SYSTEM(doorHash)) + * { + * OBJECT::REMOVE_DOOR_FROM_SYSTEM(doorHash); + * } + */ export function isDoorRegisteredWithSystem(doorHash: number): boolean; export function isDoorClosed(doorHash: number): boolean; @@ -12376,16 +13342,16 @@ declare module "natives" { export function openAllBarriersForRace(p0: boolean): void; /** - * Clears the fields sets by 0xC7F29CA00F46350E (1604 retail: 0x1424A7A10, 0x1424A7A11) and iterates over the global CDoor's bucket-list. - * Related to its "Pre-networked state"? - */ + * Clears the fields sets by 0xC7F29CA00F46350E (1604 retail: 0x1424A7A10, 0x1424A7A11) and iterates over the global CDoor's bucket-list. + * Related to its "Pre-networked state"? + */ export function closeAllBarriersForRace(): void; export function doorSystemGetIsPhysicsLoaded(p0: any): boolean; /** - * Search radius: 0.5 - */ + * Search radius: 0.5 + */ export function doorSystemFindExistingDoor(x: number, y: number, z: number, modelHash: number, outDoorHash?: number): [boolean, number]; export function isGarageEmpty(garageHash: number, p1: boolean, p2: number): boolean; @@ -12399,13 +13365,13 @@ declare module "natives" { export function isAnyEntityEntirelyInsideGarage(garageHash: number, p1: boolean, p2: boolean, p3: boolean, p4: any): boolean; /** - * Despite the name, it does work for any entity type. - */ + * Despite the name, it does work for any entity type. + */ export function isObjectEntirelyInsideGarage(garageHash: number, entity: Entity | number, p2: number, p3: number): boolean; /** - * Despite the name, it does work for any entity type. - */ + * Despite the name, it does work for any entity type. + */ export function isObjectPartiallyInsideGarage(garageHash: number, entity: Entity | number, p2: number): boolean; export function clearGarage(garageHash: number, isNetwork: boolean): void; @@ -12413,8 +13379,8 @@ declare module "natives" { export function clearObjectsInsideGarage(garageHash: number, vehicles: boolean, peds: boolean, objects: boolean, isNetwork: boolean): void; /** - * Sets a flag. A valid id is 0x157DC10D - */ + * Sets a flag. A valid id is 0x157DC10D + */ export function disableTidyingUpInGarage(id: number, toggle: boolean): void; export function enableSavingInGarage(garageHash: number, toggle: boolean): void; @@ -12422,113 +13388,113 @@ declare module "natives" { export function closeSafehouseGarages(): void; /** - * @param p5 is usually 0. - */ + * p5 is usually 0. + */ export function doesObjectOfTypeExistAtCoords(x: number, y: number, z: number, radius: number, hash: number, p5: boolean): boolean; /** - * An angled area is an X-Z oriented rectangle with three parameters: - * 1. origin: the mid-point along a base edge of the rectangle; - * 2. extent: the mid-point of opposite base edge on the other Z; - * 3. width: the length of the base edge; (named derived from logging strings ``CNetworkRoadNodeWorldStateData``). - * 1. golf_mp https://i.imgur.com/JhsQAK9.png - * 2. am_taxi https://i.imgur.com/TJWCZaT.jpg - * @param width extent)``), its orthonormal, and the width, e.g: - */ + * An angled area is an X-Z oriented rectangle with three parameters: + * 1. origin: the mid-point along a base edge of the rectangle; + * 2. extent: the mid-point of opposite base edge on the other Z; + * 3. width: the length of the base edge; (named derived from logging strings ``CNetworkRoadNodeWorldStateData``). + * The oriented rectangle can then be derived from the direction of the two points (``norm(origin - extent)``), its orthonormal, and the width, e.g: + * 1. golf_mp https://i.imgur.com/JhsQAK9.png + * 2. am_taxi https://i.imgur.com/TJWCZaT.jpg + */ export function isPointInAngledArea(xPos: number, yPos: number, zPos: number, x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, width: number, debug: boolean, includeZ: boolean): boolean; /** - * Overrides the climbing/blocking flags of the object, used in the native scripts mostly for "prop_dock_bouy_*" - */ - export function setObjectAllowLowLodBuoyancy(object: number, toggle: boolean): void; + * Overrides the climbing/blocking flags of the object, used in the native scripts mostly for "prop_dock_bouy_*" + */ + export function setObjectAllowLowLodBuoyancy(object: Object, toggle: boolean): void; /** - * Adjust the physics parameters of a prop, or otherwise known as "object". This is useful for simulated gravity. - * Other parameters seem to be unknown. - * @param p2 seems to be weight and gravity related. Higher value makes the obj fall faster. Very sensitive? - * @param p3 seems similar to p2 - * @param p4 makes obj fall slower the higher the value - * @param p5 similar to p4 - */ - export function setObjectPhysicsParams(object: number, weight: number, p2: number, p3: number, p4: number, p5: number, gravity: number, p7: number, p8: number, p9: number, p10: number, buoyancy: number): void; + * Adjust the physics parameters of a prop, or otherwise known as "object". This is useful for simulated gravity. + * Other parameters seem to be unknown. + * p2: seems to be weight and gravity related. Higher value makes the obj fall faster. Very sensitive? + * p3: seems similar to p2 + * p4: makes obj fall slower the higher the value + * p5: similar to p4 + */ + export function setObjectPhysicsParams(object: Object, weight: number, p2: number, p3: number, p4: number, p5: number, gravity: number, p7: number, p8: number, p9: number, p10: number, buoyancy: number): void; export function getObjectFragmentDamageHealth(p0: any, p1: boolean): number; - export function setActivateObjectPhysicsAsSoonAsItIsUnfrozen(object: number, toggle: boolean): void; + export function setActivateObjectPhysicsAsSoonAsItIsUnfrozen(object: Object, toggle: boolean): void; export function isAnyObjectNearPoint(x: number, y: number, z: number, range: number, p4: boolean): boolean; export function isObjectNearPoint(objectHash: number, x: number, y: number, z: number, range: number): boolean; - export function removeObjectHighDetailModel(object: number): void; + export function removeObjectHighDetailModel(object: Object): void; - export function breakObjectFragmentChild(p0: number, p1: any, p2: boolean): void; + export function breakObjectFragmentChild(p0: Object, p1: any, p2: boolean): void; export function damageObjectFragmentChild(p0: any, p1: any, p2: any): void; - export function fixObjectFragment(object: number): void; + export function fixObjectFragment(object: Object): void; - export function trackObjectVisibility(object: number): void; + export function trackObjectVisibility(object: Object): void; - export function isObjectVisible(object: number): boolean; + export function isObjectVisible(object: Object): boolean; - export function setObjectIsSpecialGolfball(object: number, toggle: boolean): void; + export function setObjectIsSpecialGolfball(object: Object, toggle: boolean): void; export function setObjectTakesDamageFromCollidingWithBuildings(p0: any, p1: boolean): void; export function allowDamageEventsForNonNetworkedObjects(value: boolean): void; /** - * Requires a component_at_*_flsh to be attached to the weapon object - */ - export function setCutscenesWeaponFlashlightOnThisFrame(object: number, toggle: boolean): void; + * Requires a component_at_*_flsh to be attached to the weapon object + */ + export function setCutscenesWeaponFlashlightOnThisFrame(object: Object, toggle: boolean): void; /** - * Example: - * OBJECT::GET_RAYFIRE_MAP_OBJECT(-809.9619750976562, 170.919, 75.7406997680664, 3.0, "des_tvsmash"); - */ - export function getRayfireMapObject(x: number, y: number, z: number, radius: number, name: string | null): number; + * Example: + * OBJECT::GET_RAYFIRE_MAP_OBJECT(-809.9619750976562, 170.919, 75.7406997680664, 3.0, "des_tvsmash"); + */ + export function getRayfireMapObject(x: number, y: number, z: number, radius: number, name: string): Object; /** - * Defines the state of a destructible object. - * Use the GET_RAYFIRE_MAP_OBJECT native to find an object's handle with its name / coords. - * State 4 == Beginning of the animation - * State 6 == Start animation - * State 9 == End of the animation - * @param state 2 == object just spawned - */ - export function setStateOfRayfireMapObject(object: number, state: number): void; + * Defines the state of a destructible object. + * Use the GET_RAYFIRE_MAP_OBJECT native to find an object's handle with its name / coords. + * State 2 == object just spawned + * State 4 == Beginning of the animation + * State 6 == Start animation + * State 9 == End of the animation + */ + export function setStateOfRayfireMapObject(object: Object, state: number): void; /** - * Get a destructible object's state. - * Substract 1 to get the real state. - * See SET_STATE_OF_RAYFIRE_MAP_OBJECT to see the different states - * @returns For example, if the object just spawned (state 2), the native will return 3. - */ - export function getStateOfRayfireMapObject(object: number): number; + * Get a destructible object's state. + * Substract 1 to get the real state. + * See SET_STATE_OF_RAYFIRE_MAP_OBJECT to see the different states + * For example, if the object just spawned (state 2), the native will return 3. + */ + export function getStateOfRayfireMapObject(object: Object): number; /** - * Returns true if a destructible object with this handle exists, false otherwise. - */ - export function doesRayfireMapObjectExist(object: number): boolean; + * Returns true if a destructible object with this handle exists, false otherwise. + */ + export function doesRayfireMapObjectExist(object: Object): boolean; /** - * `object`: The des-object handle to get the animation progress from. - * Return value is a float between 0.0 and 1.0, 0.0 is the beginning of the animation, 1.0 is the end. Value resets to 0.0 instantly after reaching 1.0. - */ - export function getRayfireMapObjectAnimPhase(object: number): number; + * `object`: The des-object handle to get the animation progress from. + * Return value is a float between 0.0 and 1.0, 0.0 is the beginning of the animation, 1.0 is the end. Value resets to 0.0 instantly after reaching 1.0. + */ + export function getRayfireMapObjectAnimPhase(object: Object): number; /** - * Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json - */ + * Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json + */ export function createPickup(pickupHash: number, posX: number, posY: number, posZ: number, p4: number, value: number, p6: boolean, modelHash: number): number; /** - * flags: - * 8 (1 << 3): place on ground - * 512 (1 << 9): spin around - * Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json - */ + * flags: + * 8 (1 << 3): place on ground + * 512 (1 << 9): spin around + * Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json + */ export function createPickupRotate(pickupHash: number, posX: number, posY: number, posZ: number, rotX: number, rotY: number, rotZ: number, flag: number, amount: number, p9: any, p10: boolean, modelHash: number): number; export function forcePickupRotateFaceUp(): void; @@ -12536,31 +13502,31 @@ declare module "natives" { export function setCustomPickupWeaponHash(pickupHash: number, pickup: number): void; /** - * Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json - */ - export function createAmbientPickup(pickupHash: number, posX: number, posY: number, posZ: number, flags: number, value: number, modelHash: number, p7: boolean, p8: boolean): number; + * Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json + */ + export function createAmbientPickup(pickupHash: number, posX: number, posY: number, posZ: number, flags: number, value: number, modelHash: number, p7: boolean, p8: boolean): Object; - export function createNonNetworkedAmbientPickup(pickupHash: number, posX: number, posY: number, posZ: number, flags: number, value: number, modelHash: number, p7: boolean, p8: boolean): number; + export function createNonNetworkedAmbientPickup(pickupHash: number, posX: number, posY: number, posZ: number, flags: number, value: number, modelHash: number, p7: boolean, p8: boolean): Object; export function blockPlayersForAmbientPickup(p0: any, p1: any): void; /** - * Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json - */ - export function createPortablePickup(pickupHash: number, x: number, y: number, z: number, placeOnGround: boolean, modelHash: number): number; + * Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json + */ + export function createPortablePickup(pickupHash: number, x: number, y: number, z: number, placeOnGround: boolean, modelHash: number): Object; /** - * Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json - */ - export function createNonNetworkedPortablePickup(pickupHash: number, x: number, y: number, z: number, placeOnGround: boolean, modelHash: number): number; + * Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json + */ + export function createNonNetworkedPortablePickup(pickupHash: number, x: number, y: number, z: number, placeOnGround: boolean, modelHash: number): Object; - export function attachPortablePickupToPed(pickupObject: number, ped: Player | number): void; + export function attachPortablePickupToPed(pickupObject: Object, ped: Ped | Player | number): void; - export function detachPortablePickupFromPed(pickupObject: number): void; + export function detachPortablePickupFromPed(pickupObject: Object): void; - export function forcePortablePickupLastAccessiblePositionSetting(object: number): void; + export function forcePortablePickupLastAccessiblePositionSetting(object: Object): void; - export function hidePortablePickupWhenDetached(pickupObject: number, toggle: boolean): void; + export function hidePortablePickupWhenDetached(pickupObject: Object, toggle: boolean): void; export function setMaxNumPortablePickupsCarriedByPlayer(modelHash: number, number: number): void; @@ -12569,14 +13535,14 @@ declare module "natives" { export function getSafePickupCoords(x: number, y: number, z: number, p3: number, p4: number): Vector3; /** - * Adds an area that seems to be related to pickup physics behavior. - * Max amount of areas is 10. Only works in multiplayer. - */ + * Adds an area that seems to be related to pickup physics behavior. + * Max amount of areas is 10. Only works in multiplayer. + */ export function addExtendedPickupProbeArea(x: number, y: number, z: number, radius: number): void; /** - * Clears all areas created by ADD_EXTENDED_PICKUP_PROBE_AREA - */ + * Clears all areas created by ADD_EXTENDED_PICKUP_PROBE_AREA + */ export function clearExtendedPickupProbeAreas(): void; export function getPickupCoords(pickup: number): Vector3; @@ -12584,8 +13550,8 @@ declare module "natives" { export function suppressPickupSoundForPickup(p0: any, p1: any): void; /** - * Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json - */ + * Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json + */ export function removeAllPickupsOfType(pickupHash: number): void; export function hasPickupBeenCollected(pickup: number): boolean; @@ -12593,34 +13559,34 @@ declare module "natives" { export function removePickup(pickup: number): void; /** - * Spawns one or more money pickups. - * Example: - * CREATE_MONEY_PICKUPS(x, y, z, 1000, 3, 0x684a97ae); - * Spawns 3 spray cans that'll collectively give $1000 when picked up. (Three spray cans, each giving $334, $334, $332 = $1000). - * ============================================== - * Max is 2000 in MP. So if you put the amount to 20, but the value to $400,000 eg. They will only be able to pickup 20 - $2,000 bags. So, $40,000 - * @param x The X-component of the world position to spawn the money pickups at. - * @param y The Y-component of the world position to spawn the money pickups at. - * @param z The Z-component of the world position to spawn the money pickups at. - * @param value The combined value of the pickups (in dollars). - * @param amount The number of pickups to spawn. - * @param model The model to use, or 0 for default money model. - */ + * Spawns one or more money pickups. + * x: The X-component of the world position to spawn the money pickups at. + * y: The Y-component of the world position to spawn the money pickups at. + * z: The Z-component of the world position to spawn the money pickups at. + * value: The combined value of the pickups (in dollars). + * amount: The number of pickups to spawn. + * model: The model to use, or 0 for default money model. + * Example: + * CREATE_MONEY_PICKUPS(x, y, z, 1000, 3, 0x684a97ae); + * Spawns 3 spray cans that'll collectively give $1000 when picked up. (Three spray cans, each giving $334, $334, $332 = $1000). + * ============================================== + * Max is 2000 in MP. So if you put the amount to 20, but the value to $400,000 eg. They will only be able to pickup 20 - $2,000 bags. So, $40,000 + */ export function createMoneyPickups(x: number, y: number, z: number, value: number, amount: number, model: number): void; export function doesPickupExist(pickup: number): boolean; - export function doesPickupObjectExist(pickupObject: number): boolean; + export function doesPickupObjectExist(pickupObject: Object): boolean; - export function getPickupObject(pickup: number): number; + export function getPickupObject(pickup: number): Object; - export function isObjectAPickup(object: number): boolean; + export function isObjectAPickup(object: Object): boolean; - export function isObjectAPortablePickup(object: number): boolean; + export function isObjectAPortablePickup(object: Object): boolean; /** - * Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json - */ + * Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json + */ export function doesPickupOfTypeExistInArea(pickupHash: number, x: number, y: number, z: number, radius: number): boolean; export function setPickupRegenerationTime(pickup: number, duration: number): void; @@ -12628,41 +13594,41 @@ declare module "natives" { export function forcePickupRegenerate(p0: any): void; /** - * Disabling/enabling a player from getting pickups. From the scripts: - * OBJECT::SET_PLAYER_PERMITTED_TO_COLLECT_PICKUPS_OF_TYPE(PLAYER::PLAYER_ID(), ${pickup_portable_package}, 0); - * OBJECT::SET_PLAYER_PERMITTED_TO_COLLECT_PICKUPS_OF_TYPE(PLAYER::PLAYER_ID(), ${pickup_portable_package}, 0); - * OBJECT::SET_PLAYER_PERMITTED_TO_COLLECT_PICKUPS_OF_TYPE(PLAYER::PLAYER_ID(), ${pickup_portable_package}, 1); - * OBJECT::SET_PLAYER_PERMITTED_TO_COLLECT_PICKUPS_OF_TYPE(PLAYER::PLAYER_ID(), ${pickup_portable_package}, 0); - * OBJECT::SET_PLAYER_PERMITTED_TO_COLLECT_PICKUPS_OF_TYPE(PLAYER::PLAYER_ID(), ${pickup_armour_standard}, 0); - * OBJECT::SET_PLAYER_PERMITTED_TO_COLLECT_PICKUPS_OF_TYPE(PLAYER::PLAYER_ID(), ${pickup_armour_standard}, 1); - * Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json - */ + * Disabling/enabling a player from getting pickups. From the scripts: + * OBJECT::SET_PLAYER_PERMITTED_TO_COLLECT_PICKUPS_OF_TYPE(PLAYER::PLAYER_ID(), ${pickup_portable_package}, 0); + * OBJECT::SET_PLAYER_PERMITTED_TO_COLLECT_PICKUPS_OF_TYPE(PLAYER::PLAYER_ID(), ${pickup_portable_package}, 0); + * OBJECT::SET_PLAYER_PERMITTED_TO_COLLECT_PICKUPS_OF_TYPE(PLAYER::PLAYER_ID(), ${pickup_portable_package}, 1); + * OBJECT::SET_PLAYER_PERMITTED_TO_COLLECT_PICKUPS_OF_TYPE(PLAYER::PLAYER_ID(), ${pickup_portable_package}, 0); + * OBJECT::SET_PLAYER_PERMITTED_TO_COLLECT_PICKUPS_OF_TYPE(PLAYER::PLAYER_ID(), ${pickup_armour_standard}, 0); + * OBJECT::SET_PLAYER_PERMITTED_TO_COLLECT_PICKUPS_OF_TYPE(PLAYER::PLAYER_ID(), ${pickup_armour_standard}, 1); + * Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json + */ export function setPlayerPermittedToCollectPickupsOfType(player: Player | number, pickupHash: number, toggle: boolean): void; /** - * Maximum amount of pickup models that can be disallowed is 30. - */ + * Maximum amount of pickup models that can be disallowed is 30. + */ export function setLocalPlayerPermittedToCollectPickupsWithModel(modelHash: number, toggle: boolean): void; /** - * Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json - */ + * Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json + */ export function allowAllPlayersToCollectPickupsOfType(pickupHash: number): void; - export function setTeamPickupObject(object: number, p1: any, p2: boolean): void; + export function setTeamPickupObject(object: Object, p1: any, p2: boolean): void; - export function preventCollectionOfPortablePickup(object: number, p1: boolean, p2: boolean): void; + export function preventCollectionOfPortablePickup(object: Object, p1: boolean, p2: boolean): void; export function setPickupObjectGlowWhenUncollectable(pickup: number, toggle: boolean): void; /** - * @param p1 is always 0.51. This native is called before SET_PICKUP_REGENERATION_TIME in all occurances. - */ + * p1 is always 0.51. This native is called before SET_PICKUP_REGENERATION_TIME in all occurances. + */ export function setPickupGlowOffset(pickup: number, p1: number): void; /** - * @param p1 is always -0.2 in scripts and p2 is always true in scripts. - */ + * p1 is always -0.2 in scripts and p2 is always true in scripts. + */ export function setPickupObjectGlowOffset(pickup: number, p1: number, p2: boolean): void; export function setObjectGlowInSameTeam(pickup: number): void; @@ -12688,8 +13654,8 @@ declare module "natives" { export function setPickupObjectTransparentWhenUncollectable(pickup: number, toggle: boolean): void; /** - * @param p0 is either 0 or 50 in scripts. - */ + * p0 is either 0 or 50 in scripts. + */ export function setPickupObjectAlphaWhenTransparent(p0: number): void; export function setPortablePickupPersist(pickup: number, toggle: boolean): void; @@ -12701,17 +13667,24 @@ declare module "natives" { export function allowPickupByNoneParticipant(pickup: number, toggle: boolean): void; /** - * enum ePickupRewardType - * { - * PICKUP_REWARD_TYPE_AMMO = (1 << 0), - * PICKUP_REWARD_TYPE_BULLET_MP = (1 << 1), - * PICKUP_REWARD_TYPE_MISSILE_MP = (1 << 2), - * PICKUP_REWARD_TYPE_GRENADE_LAUNCHER_MP = (1 << 3), - * PICKUP_REWARD_TYPE_ARMOUR = (1 << 4), - * PICKUP_REWARD_TYPE_HEALTH = (1 << 5), - * PICKUP_REWARD_TYPE_HEALTH_VARIABLE = PICKUP_REWARD_TYPE_HEALTH, - * See NativeDB for reference: http://natives.altv.mp/#/0xF92099527DB8E2A7 - */ + * enum ePickupRewardType + * { + * PICKUP_REWARD_TYPE_AMMO = (1 << 0), + * PICKUP_REWARD_TYPE_BULLET_MP = (1 << 1), + * PICKUP_REWARD_TYPE_MISSILE_MP = (1 << 2), + * PICKUP_REWARD_TYPE_GRENADE_LAUNCHER_MP = (1 << 3), + * PICKUP_REWARD_TYPE_ARMOUR = (1 << 4), + * PICKUP_REWARD_TYPE_HEALTH = (1 << 5), + * PICKUP_REWARD_TYPE_HEALTH_VARIABLE = PICKUP_REWARD_TYPE_HEALTH, + * PICKUP_REWARD_TYPE_MONEY_FIXED = (1 << 6), + * PICKUP_REWARD_TYPE_MONEY_VARIABLE = PICKUP_REWARD_TYPE_MONEY_FIXED, + * PICKUP_REWARD_TYPE_WEAPON = (1 << 7), + * PICKUP_REWARD_TYPE_STAT = (1 << 8), + * PICKUP_REWARD_TYPE_STAT_VARIABLE = PICKUP_REWARD_TYPE_STAT, + * PICKUP_REWARD_TYPE_VEHICLE_FIX = (1 << 9), + * PICKUP_REWARD_TYPE_FIREWORK_MP = (1 << 10), + * }; + */ export function suppressPickupRewardType(rewardType: number, suppress: boolean): void; export function clearAllPickupRewardTypeSuppression(): void; @@ -12719,15 +13692,15 @@ declare module "natives" { export function clearPickupRewardTypeSuppression(rewardType: number): void; /** - * draws circular marker at pos - * -1 = none - * 0 = red - * 1 = green - * 2 = blue - * 3 = green larger - * 4 = nothing - * 5 = green small - */ + * draws circular marker at pos + * -1 = none + * 0 = red + * 1 = green + * 2 = blue + * 3 = green larger + * 4 = nothing + * 5 = green small + */ export function renderFakePickupGlow(x: number, y: number, z: number, colorIndex: number): void; export function setPickupObjectCollectableInVehicle(pickup: number): void; @@ -12735,476 +13708,493 @@ declare module "natives" { export function setPickupTrackDamageEvents(pickup: number, toggle: boolean): void; /** - * Sets entity+38 to C (when false) or 0xFF3f (when true) - */ + * Sets entity+38 to C (when false) or 0xFF3f (when true) + */ export function setEntityFlagSuppressShadow(entity: Entity | number, toggle: boolean): void; - export function setEntityFlagRenderSmallShadow(object: number, toggle: boolean): void; + export function setEntityFlagRenderSmallShadow(object: Object, toggle: boolean): void; /** - * Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json - */ + * Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json + */ export function getWeaponTypeFromPickupType(pickupHash: number): number; /** - * Returns the pickup hash for the given weapon hash - */ + * Returns the pickup hash for the given weapon hash + */ export function getPickupTypeFromWeaponHash(weaponHash: number): number; - export function isPickupWeaponObjectValid(object: number): boolean; - - export function getObjectTintIndex(object: number): number; - - /** - * enum ObjectPaintVariants - * { - * Pacific = 0, - * Azure = 1, - * Nautical = 2, - * Continental = 3, - * Battleship = 4, - * Intrepid = 5, - * Uniform = 6, - * See NativeDB for reference: http://natives.altv.mp/#/0x971DA0055324D033 - */ - export function setObjectTintIndex(object: number, textureVariation: number): void; + export function isPickupWeaponObjectValid(object: Object): boolean; + + export function getObjectTintIndex(object: Object): number; + + /** + * enum ObjectPaintVariants + * { + * Pacific = 0, + * Azure = 1, + * Nautical = 2, + * Continental = 3, + * Battleship = 4, + * Intrepid = 5, + * Uniform = 6, + * Classico = 7, + * Mediterranean = 8, + * Command = 9, + * Mariner = 10, + * Ruby = 11, + * Vintage = 12, + * Pristine = 13, + * Merchant = 14, + * Voyager = 15 + * }; + */ + export function setObjectTintIndex(object: Object, textureVariation: number): void; export function setTintIndexClosestBuildingOfType(x: number, y: number, z: number, radius: number, modelHash: number, textureVariation: number): boolean; export function setPropTintIndex(p0: any, p1: any): void; - export function setPropLightColor(object: number, p1: boolean, r: number, g: number, b: number): boolean; + export function setPropLightColor(object: Object, p1: boolean, r: number, g: number, b: number): boolean; - export function isPropLightOverriden(object: number): boolean; + export function isPropLightOverriden(object: Object): boolean; - export function setObjectIsVisibleInMirrors(object: number, toggle: boolean): void; + export function setObjectIsVisibleInMirrors(object: Object, toggle: boolean): void; - export function setObjectSpeedBoostAmount(object: number, p1: any): void; + export function setObjectSpeedBoostAmount(object: Object, p1: any): void; - export function setObjectSpeedBoostDuration(object: number, duration: number): void; + export function setObjectSpeedBoostDuration(object: Object, duration: number): void; /** - * returns pickup hash. - * Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json - */ + * returns pickup hash. + * Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json + */ export function convertOldPickupTypeToNew(pickupHash: number): number; export function setForceObjectThisFrame(x: number, y: number, z: number, p3: number): void; /** - * is this like setting is as no longer needed? - */ - export function onlyCleanUpObjectWhenOutOfRange(object: number): void; + * is this like setting is as no longer needed? + */ + export function onlyCleanUpObjectWhenOutOfRange(object: Object): void; export function setDisableCollisionsBetweenCarsAndCarParachute(p0: any): void; export function setProjectilesShouldExplodeOnContact(entity: Entity | number, p1: any): void; /** - * Activate the physics to: "xs_prop_arena_{flipper,wall,bollard,turntable,pit}" - */ - export function setDriveArticulatedJoint(object: number, toggle: boolean, p2: number): void; + * Activate the physics to: "xs_prop_arena_{flipper,wall,bollard,turntable,pit}" + */ + export function setDriveArticulatedJoint(object: Object, toggle: boolean, p2: number): void; - export function setDriveArticulatedJointWithInflictor(object: number, toggle: boolean, p2: number, ped: Player | number): void; + export function setDriveArticulatedJointWithInflictor(object: Object, toggle: boolean, p2: number, ped: Ped | Player | number): void; - export function setObjectIsAPressurePlate(object: number, toggle: boolean): void; + export function setObjectIsAPressurePlate(object: Object, toggle: boolean): void; - export function setWeaponImpactsApplyGreaterForce(object: number, p1: boolean): void; + export function setWeaponImpactsApplyGreaterForce(object: Object, p1: boolean): void; - export function getIsArticulatedJointAtMinAngle(object: number, p1: any): boolean; + export function getIsArticulatedJointAtMinAngle(object: Object, p1: any): boolean; export function getIsArticulatedJointAtMaxAngle(p0: any, p1: any): boolean; - export function setIsObjectArticulated(object: number, toggle: boolean): void; + export function setIsObjectArticulated(object: Object, toggle: boolean): void; - export function setIsObjectBall(object: number, toggle: boolean): void; + export function setIsObjectBall(object: Object, toggle: boolean): void; /** - * For more info, see https://docs.fivem.net/docs/game-references/controls/ - * @param control 0: PLAYER_CONTROL, 1: CAMERA_CONTROL, 2: FRONTEND_CONTROL - */ + * control: 0: PLAYER_CONTROL, 1: CAMERA_CONTROL, 2: FRONTEND_CONTROL + * For more info, see https://docs.fivem.net/docs/game-references/controls/ + */ export function isControlEnabled(control: number, action: number): boolean; /** - * Returns whether a control is currently pressed. - * @param control see IS_CONTROL_ENABLED - */ + * Returns whether a control is currently pressed. + * control: see IS_CONTROL_ENABLED + */ export function isControlPressed(control: number, action: number): boolean; /** - * Returns whether a control is currently _not_ pressed. - * @param control see IS_CONTROL_ENABLED - */ + * Returns whether a control is currently _not_ pressed. + * control: see IS_CONTROL_ENABLED + */ export function isControlReleased(control: number, action: number): boolean; /** - * Returns whether a control was newly pressed since the last check. - * @param control see IS_CONTROL_ENABLED - */ + * Returns whether a control was newly pressed since the last check. + * control: see IS_CONTROL_ENABLED + */ export function isControlJustPressed(control: number, action: number): boolean; /** - * Returns whether a control was newly released since the last check. - * @param control see IS_CONTROL_ENABLED - */ + * Returns whether a control was newly released since the last check. + * control: see IS_CONTROL_ENABLED + */ export function isControlJustReleased(control: number, action: number): boolean; /** - * @param control see IS_CONTROL_ENABLED - */ + * control: see IS_CONTROL_ENABLED + */ export function getControlValue(control: number, action: number): number; /** - * Returns the value of GET_CONTROL_VALUE normalized (i.e. a real number value between -1 and 1) - * @param control see IS_CONTROL_ENABLED - */ + * Returns the value of GET_CONTROL_VALUE normalized (i.e. a real number value between -1 and 1) + * control: see IS_CONTROL_ENABLED + */ export function getControlNormal(control: number, action: number): number; export function setUseAdjustedMouseCoords(toggle: boolean): void; /** - * @param control see IS_CONTROL_ENABLED - * @returns Seems to return values between -1 and 1 for controls like gas and steering. - */ + * Seems to return values between -1 and 1 for controls like gas and steering. + * control: see IS_CONTROL_ENABLED + */ export function getControlUnboundNormal(control: number, action: number): number; /** - * This is for simulating player input. - * @param control see IS_CONTROL_ENABLED - * @param value is a float value from 0 - 1 - */ + * This is for simulating player input. + * value is a float value from 0 - 1 + * control: see IS_CONTROL_ENABLED + */ export function setControlValueNextFrame(control: number, action: number, value: number): boolean; /** - * @param control see IS_CONTROL_ENABLED - */ + * control: see IS_CONTROL_ENABLED + */ export function isDisabledControlPressed(control: number, action: number): boolean; /** - * @param control see IS_CONTROL_ENABLED - */ + * control: see IS_CONTROL_ENABLED + */ export function isDisabledControlReleased(control: number, action: number): boolean; /** - * @param control see IS_CONTROL_ENABLED - */ + * control: see IS_CONTROL_ENABLED + */ export function isDisabledControlJustPressed(control: number, action: number): boolean; /** - * @param control see IS_CONTROL_ENABLED - */ + * control: see IS_CONTROL_ENABLED + */ export function isDisabledControlJustReleased(control: number, action: number): boolean; /** - * @param control see IS_CONTROL_ENABLED - */ + * control: see IS_CONTROL_ENABLED + */ export function getDisabledControlNormal(control: number, action: number): number; /** - * The "disabled" variant of GET_CONTROL_UNBOUND_NORMAL. - * @param control see IS_CONTROL_ENABLED - */ + * The "disabled" variant of GET_CONTROL_UNBOUND_NORMAL. + * control: see IS_CONTROL_ENABLED + */ export function getDisabledControlUnboundNormal(control: number, action: number): number; /** - * Returns time in ms since last input. - * @param control see IS_CONTROL_ENABLED - */ + * Returns time in ms since last input. + * control: see IS_CONTROL_ENABLED + */ export function getControlHowLongAgo(control: number): number; /** - * @param control unused parameter - */ + * control: unused parameter + */ export function isUsingKeyboardAndMouse(control: number): boolean; /** - * @param control see IS_CONTROL_ENABLED - */ + * control: see IS_CONTROL_ENABLED + */ export function isUsingCursor(control: number): boolean; export function setCursorPosition(x: number, y: number): boolean; /** - * @param control see IS_CONTROL_ENABLED - * @returns Hardcoded to return false. - */ + * control: see IS_CONTROL_ENABLED + * Hardcoded to return false. + */ export function isUsingRemotePlay(control: number): boolean; /** - * @param control unused parameter - */ + * control: unused parameter + */ export function haveControlsChanged(control: number): boolean; /** - * EG: - * GET_CONTROL_INSTRUCTIONAL_BUTTON (2, 201, 1) INPUT_FRONTEND_ACCEPT (e.g. Enter button) - * GET_CONTROL_INSTRUCTIONAL_BUTTON (2, 202, 1) INPUT_FRONTEND_CANCEL (e.g. ESC button) - * GET_CONTROL_INSTRUCTIONAL_BUTTON (2, 51, 1) INPUT_CONTEXT (e.g. E button) - * gtaforums.com/topic/819070-c-draw-instructional-buttons-scaleform-movie/#entry1068197378 - * @param control unused parameter - * @param allowXOSwap appears to always be true. - */ + * allowXOSwap appears to always be true. + * EG: + * GET_CONTROL_INSTRUCTIONAL_BUTTON (2, 201, 1) /*INPUT_FRONTEND_ACCEPT (e.g. Enter button)*\/ + * GET_CONTROL_INSTRUCTIONAL_BUTTON (2, 202, 1) /*INPUT_FRONTEND_CANCEL (e.g. ESC button)*\/ + * GET_CONTROL_INSTRUCTIONAL_BUTTON (2, 51, 1) /*INPUT_CONTEXT (e.g. E button)*\/ + * gtaforums.com/topic/819070-c-draw-instructional-buttons-scaleform-movie/#entry1068197378 + * control: unused parameter + */ export function getControlInstructionalButtonsString(control: number, action: number, allowXOSwap: boolean): string; /** - * @param control unused parameter - */ + * control: unused parameter + */ export function getControlGroupInstructionalButtonsString(control: number, controlGroup: number, allowXOSwap: boolean): string; /** - * @param control see IS_CONTROL_ENABLED - */ + * control: see IS_CONTROL_ENABLED + */ export function setControlLightEffectColor(control: number, red: number, green: number, blue: number): void; /** - * @param control see IS_CONTROL_ENABLED - */ + * control: see IS_CONTROL_ENABLED + */ export function clearControlLightEffect(control: number): void; /** - * example: - * SET_CONTROL_SHAKE(PLAYER_CONTROL, 100, 200); - * @param control see IS_CONTROL_ENABLED - * @param duration in milliseconds - * @param frequency should range from about 10 (slow vibration) to 255 (very fast) - */ + * control: see IS_CONTROL_ENABLED + * duration in milliseconds + * frequency should range from about 10 (slow vibration) to 255 (very fast) + * example: + * SET_CONTROL_SHAKE(PLAYER_CONTROL, 100, 200); + */ export function setControlShake(control: number, duration: number, frequency: number): void; /** - * Does nothing (it's a nullsub). - */ + * Does nothing (it's a nullsub). + */ export function setControlTriggerShake(control: number, leftDuration: number, leftFrequency: number, rightDuration: number, rightFrequency: number): void; /** - * @param control see IS_CONTROL_ENABLED - */ + * control: see IS_CONTROL_ENABLED + */ export function stopControlShake(control: number): void; /** - * @param control see IS_CONTROL_ENABLED - */ + * control: see IS_CONTROL_ENABLED + */ export function setControlShakeSuppressedId(control: number, uniqueId: number): void; /** - * @param control see IS_CONTROL_ENABLED - */ + * control: see IS_CONTROL_ENABLED + */ export function clearControlShakeSuppressedId(control: number): void; export function isLookInverted(): boolean; /** - * Used with IS_LOOK_INVERTED() and negates its affect. - * -- - * Not sure how the person above got that description, but here's an actual example: - * if (PAD::IS_USING_KEYBOARD_AND_MOUSE(2)) { - * if (a_5) { - * if (PAD::IS_LOOK_INVERTED()) { - * a_3 *= -1; - * } - * if (PAD::IS_MOUSE_LOOK_INVERTED()) { - * See NativeDB for reference: http://natives.altv.mp/#/0xE1615EC03B3BB4FD - */ + * Used with IS_LOOK_INVERTED() and negates its affect. + * -- + * Not sure how the person above got that description, but here's an actual example: + * if (PAD::IS_USING_KEYBOARD_AND_MOUSE(2)) { + * if (a_5) { + * if (PAD::IS_LOOK_INVERTED()) { + * a_3 *= -1; + * } + * if (PAD::IS_MOUSE_LOOK_INVERTED()) { + * a_3 *= -1; + * } + * } + * } + */ export function isMouseLookInverted(): boolean; + /** + * Hard-coded to return 3 if using KBM, otherwise same behavior as GET_LOCAL_PLAYER_GAMEPAD_AIM_STATE. + */ export function getLocalPlayerAimState(): number; /** - * Returns the local player's targeting mode. See PLAYER::SET_PLAYER_TARGETING_MODE. - */ + * Returns the local player's targeting mode. See PLAYER::SET_PLAYER_TARGETING_MODE. + */ export function getLocalPlayerGamepadAimState(): number; export function getIsUsingAlternateHandbrake(): boolean; /** - * Returns profile setting 225. - */ + * Returns profile setting 225. + */ export function getIsUsingAlternateDriveby(): boolean; /** - * Returns profile setting 17. - */ + * Returns profile setting 17. + */ export function getAllowMovementWhileZoomed(): boolean; export function setPlayerpadShakesWhenControllerDisabled(toggle: boolean): void; /** - * @param control see IS_CONTROL_ENABLED - */ + * control: see IS_CONTROL_ENABLED + */ export function setInputExclusive(control: number, action: number): void; /** - * @param control see IS_CONTROL_ENABLED - */ + * control: see IS_CONTROL_ENABLED + */ export function disableControlAction(control: number, action: number, disableRelatedActions: boolean): void; /** - * @param control see IS_CONTROL_ENABLED - */ + * control: see IS_CONTROL_ENABLED + */ export function enableControlAction(control: number, action: number, enableRelatedActions: boolean): void; /** - * @param control see IS_CONTROL_ENABLED - */ + * control: see IS_CONTROL_ENABLED + */ export function disableAllControlActions(control: number): void; /** - * @param control see IS_CONTROL_ENABLED - */ + * control: see IS_CONTROL_ENABLED + */ export function enableAllControlActions(control: number): void; /** - * Used in carsteal3 script with schemeName = "Carsteal4_spycar". - */ - export function initPcScriptedControls(schemeName: string | null): boolean; + * Used in carsteal3 script with schemeName = "Carsteal4_spycar". + */ + export function initPcScriptedControls(schemeName: string): boolean; /** - * Same as INIT_PC_SCRIPTED_CONTROLS - */ - export function switchPcScriptedControls(schemeName: string | null): boolean; + * Same as INIT_PC_SCRIPTED_CONTROLS + */ + export function switchPcScriptedControls(schemeName: string): boolean; export function shutdownPcScriptedControls(): void; /** - * @param control see IS_CONTROL_ENABLED - */ + * control: see IS_CONTROL_ENABLED + */ export function allowAlternativeScriptControlsLayout(control: number): void; /** - * When nodeEnabled is set to false, all nodes in the area get disabled. - * If it's true, `GET_VEHICLE_NODE_IS_SWITCHED_OFF` returns false. - * @returns `GET_VEHICLE_NODE_IS_SWITCHED_OFF` returns true afterwards. - */ + * When nodeEnabled is set to false, all nodes in the area get disabled. + * `GET_VEHICLE_NODE_IS_SWITCHED_OFF` returns true afterwards. + * If it's true, `GET_VEHICLE_NODE_IS_SWITCHED_OFF` returns false. + */ export function setRoadsInArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, nodeEnabled: boolean, unknown2: boolean): void; /** - * See IS_POINT_IN_ANGLED_AREA for the definition of an angled area. - * @param unknown3 is related to `SEND_SCRIPT_WORLD_STATE_EVENT > CNetworkRoadNodeWorldStateData` in networked environments. - */ + * unknown3 is related to `SEND_SCRIPT_WORLD_STATE_EVENT > CNetworkRoadNodeWorldStateData` in networked environments. + * See IS_POINT_IN_ANGLED_AREA for the definition of an angled area. + */ export function setRoadsInAngledArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, width: number, unknown1: boolean, unknown2: boolean, unknown3: boolean): void; export function setPedPathsInArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, p6: boolean, p7: any): void; /** - * 1 = 1 = B02_IsFootpath - * 2 = 4 = !B15_InteractionUnk - * 4 = 0x20 = !B14_IsInterior - * 8 = 0x40 = !B07_IsWater - * 16 = 0x200 = B17_IsFlatGround - * When onGround == true outPosition is a position located on the nearest pavement. - * When a safe coord could not be found the result of a function is false and outPosition == Vector3.Zero. - * In the scripts these flags are used: 0, 14, 12, 16, 20, 21, 28. 0 is most commonly used, then 16. - * 16 works for me, 0 crashed the script. - * @param flags are: - */ - export function getSafeCoordForPed(x: number, y: number, z: number, onGround: boolean, outPosition: Vector3 | null, flags: number): [boolean, Vector3]; - - /** - * https://gtaforums.com/topic/843561-pathfind-node-types - */ - export function getClosestVehicleNode(x: number, y: number, z: number, outPosition: Vector3 | null, nodeFlags: number, p5: number, p6: number): [boolean, Vector3]; - - /** - * Get the closest vehicle node to a given position. - */ - export function getClosestMajorVehicleNode(x: number, y: number, z: number, outPosition: Vector3 | null, unknown1: number, unknown2: number): [boolean, Vector3]; - - /** - * p5, p6 and p7 seems to be about the same as p4, p5 and p6 for GET_CLOSEST_VEHICLE_NODE. p6 and/or p7 has something to do with finding a node on the same path/road and same direction(at least for this native, something to do with the heading maybe). Edit this when you find out more. - * gtaforums.com/topic/843561-pathfind-node-types - * Example of usage, moving vehicle to closest path/road: - * Vector3 coords = ENTITY::GET_ENTITY_COORDS(playerVeh, true); - * Vector3 closestVehicleNodeCoords; - * float roadHeading; - * ENTITY::SET_ENTITY_HEADING(playerVeh, roadHeading); - * ENTITY::SET_ENTITY_COORDS(playerVeh, closestVehicleNodeCoords.x, closestVehicleNodeCoords.y, closestVehicleNodeCoords.z, 1, 0, 0, 1); - * VEHICLE::SET_VEHICLE_ON_GROUND_PROPERLY(playerVeh); - * See NativeDB for reference: http://natives.altv.mp/#/0xFF071FB798B803B0 - * @param nodeType 0 = main roads, 1 = any dry path, 3 = water - * @param p6 is always 3.0 - * @param p7 is always 0 - */ - export function getClosestVehicleNodeWithHeading(x: number, y: number, z: number, outPosition: Vector3 | null, outHeading: number | null, nodeType: number, p6: number, p7: number): [boolean, Vector3, number]; - - export function getNthClosestVehicleNode(x: number, y: number, z: number, nthClosest: number, outPosition: Vector3 | null, nodeFlags: number, unknown1: number, unknown2: number): [boolean, Vector3]; - - /** - * Returns the id. - */ + * Flags are: + * 1 = 1 = B02_IsFootpath + * 2 = 4 = !B15_InteractionUnk + * 4 = 0x20 = !B14_IsInterior + * 8 = 0x40 = !B07_IsWater + * 16 = 0x200 = B17_IsFlatGround + * When onGround == true outPosition is a position located on the nearest pavement. + * When a safe coord could not be found the result of a function is false and outPosition == Vector3.Zero. + * In the scripts these flags are used: 0, 14, 12, 16, 20, 21, 28. 0 is most commonly used, then 16. + * 16 works for me, 0 crashed the script. + */ + export function getSafeCoordForPed(x: number, y: number, z: number, onGround: boolean, outPosition: Vector3, flags: number): [boolean, Vector3]; + + /** + * https://gtaforums.com/topic/843561-pathfind-node-types + */ + export function getClosestVehicleNode(x: number, y: number, z: number, outPosition: Vector3, nodeFlags: number, p5: number, p6: number): [boolean, Vector3]; + + /** + * Get the closest vehicle node to a given position. + */ + export function getClosestMajorVehicleNode(x: number, y: number, z: number, outPosition: Vector3, unknown1: number, unknown2: number): [boolean, Vector3]; + + /** + * p5, p6 and p7 seems to be about the same as p4, p5 and p6 for GET_CLOSEST_VEHICLE_NODE. p6 and/or p7 has something to do with finding a node on the same path/road and same direction(at least for this native, something to do with the heading maybe). Edit this when you find out more. + * nodeType: 0 = main roads, 1 = any dry path, 3 = water + * p6 is always 3.0 + * p7 is always 0 + * gtaforums.com/topic/843561-pathfind-node-types + * Example of usage, moving vehicle to closest path/road: + * Vector3 coords = ENTITY::GET_ENTITY_COORDS(playerVeh, true); + * Vector3 closestVehicleNodeCoords; + * float roadHeading; + * PATHFIND::GET_CLOSEST_VEHICLE_NODE_WITH_HEADING(coords.x, coords.y, coords.z, &closestVehicleNodeCoords, &roadHeading, 1, 3, 0); + * ENTITY::SET_ENTITY_HEADING(playerVeh, roadHeading); + * ENTITY::SET_ENTITY_COORDS(playerVeh, closestVehicleNodeCoords.x, closestVehicleNodeCoords.y, closestVehicleNodeCoords.z, 1, 0, 0, 1); + * VEHICLE::SET_VEHICLE_ON_GROUND_PROPERLY(playerVeh); + * ------------------------------------------------------------------ + * C# Example (ins1de) : https://pastebin.com/fxtMWAHD + */ + export function getClosestVehicleNodeWithHeading(x: number, y: number, z: number, outPosition: Vector3, outHeading: number, nodeType: number, p6: number, p7: number): [boolean, Vector3, number]; + + export function getNthClosestVehicleNode(x: number, y: number, z: number, nthClosest: number, outPosition: Vector3, nodeFlags: number, unknown1: number, unknown2: number): [boolean, Vector3]; + + /** + * Returns the id. + */ export function getNthClosestVehicleNodeId(x: number, y: number, z: number, nth: number, nodeFlags: number, p5: number, p6: number): number; /** - * Get the nth closest vehicle node and its heading. - */ - export function getNthClosestVehicleNodeWithHeading(x: number, y: number, z: number, nthClosest: number, outPosition: Vector3 | null, outHeading: number | null, outNumLanes: number | null, nodeFlags: number, unknown3: number, unknown4: number): [boolean, Vector3, number, number]; + * Get the nth closest vehicle node and its heading. + */ + export function getNthClosestVehicleNodeWithHeading(x: number, y: number, z: number, nthClosest: number, outPosition: Vector3, outHeading: number, outNumLanes: number, nodeFlags: number, unknown3: number, unknown4: number): [boolean, Vector3, number, number]; - export function getNthClosestVehicleNodeIdWithHeading(x: number, y: number, z: number, nthClosest: number, outPosition: Vector3 | null, outHeading: number | null, nodeFlags: number, p7: number, p8: number): [number, Vector3, number]; + export function getNthClosestVehicleNodeIdWithHeading(x: number, y: number, z: number, nthClosest: number, outPosition: Vector3, outHeading: number, nodeFlags: number, p7: number, p8: number): [number, Vector3, number]; /** - * @param y pathfind - * @param p10 always equals 3.0 - * @param p11 always equals 0 - */ - export function getNthClosestVehicleNodeFavourDirection(x: number, y: number, z: number, desiredX: number, desiredY: number, desiredZ: number, nthClosest: number, outPosition: Vector3 | null, outHeading: number | null, nodeFlags: number, p10: number, p11: number): [boolean, Vector3, number]; + * See gtaforums.com/topic/843561-pathfind-node-types for node type info. 0 = paved road only, 1 = any road, 3 = water + * p10 always equals 3.0 + * p11 always equals 0 + */ + export function getNthClosestVehicleNodeFavourDirection(x: number, y: number, z: number, desiredX: number, desiredY: number, desiredZ: number, nthClosest: number, outPosition: Vector3, outHeading: number, nodeFlags: number, p10: number, p11: number): [boolean, Vector3, number]; /** - * Gets the density and flags of the closest node to the specified position. - * @param density is a value between 0 and 15, indicating how busy the road is. - * @param flags is a bit field. - */ + * Gets the density and flags of the closest node to the specified position. + * Density is a value between 0 and 15, indicating how busy the road is. + * Flags is a bit field. + */ export function getVehicleNodeProperties(x: number, y: number, z: number, density?: number, flags?: number): [boolean, number, number]; /** - * Returns true if the id is non zero. - */ + * Returns true if the id is non zero. + */ export function isVehicleNodeIdValid(vehicleNodeId: number): boolean; /** - * Calling this with an invalid node id, will crash the game. - * Note that IS_VEHICLE_NODE_ID_VALID simply checks if nodeId is not zero. It does not actually ensure that the id is valid. - * @returns Eg. IS_VEHICLE_NODE_ID_VALID(1) will return true, but will crash when calling GET_VEHICLE_NODE_POSITION(). - */ + * Calling this with an invalid node id, will crash the game. + * Note that IS_VEHICLE_NODE_ID_VALID simply checks if nodeId is not zero. It does not actually ensure that the id is valid. + * Eg. IS_VEHICLE_NODE_ID_VALID(1) will return true, but will crash when calling GET_VEHICLE_NODE_POSITION(). + */ export function getVehicleNodePosition(nodeId: number, outPosition?: Vector3): [void, Vector3]; /** - * Returns false for nodes that aren't used for GPS routes. - * Example: - * Nodes in Fort Zancudo and LSIA are false - */ + * Returns false for nodes that aren't used for GPS routes. + * Example: + * Nodes in Fort Zancudo and LSIA are false + */ export function getVehicleNodeIsGpsAllowed(nodeID: number): boolean; /** - * Normal roads where plenty of Peds spawn will return false - * @returns Returns true when the node is Offroad. Alleys, some dirt roads, and carparks return true. - */ + * Returns true when the node is Offroad. Alleys, some dirt roads, and carparks return true. + * Normal roads where plenty of Peds spawn will return false + */ export function getVehicleNodeIsSwitchedOff(nodeID: number): boolean; /** - * @param y seems to be always 1.0f in the scripts - */ - export function getClosestRoad(x: number, y: number, z: number, p3: number, p4: number, p5: Vector3 | null, p6: Vector3 | null, p7: any | null, p8: any | null, p9: number | null, p10: boolean): [boolean, Vector3, Vector3, any, any, number]; + * p1 seems to be always 1.0f in the scripts + */ + export function getClosestRoad(x: number, y: number, z: number, p3: number, p4: number, p5: Vector3, p6: Vector3, p7: any, p8: any, p9: number, p10: boolean): [boolean, Vector3, Vector3, any, any, number]; export function loadAllPathNodes(set: boolean): boolean; export function setAllowStreamPrologueNodes(toggle: boolean): void; /** - * Activates Cayo Perico path nodes if passed `1`. GPS navigation will start working, maybe more stuff will change, not sure. It seems if you try to unload (pass `0`) when close to the island, your game might crash. - */ + * Activates Cayo Perico path nodes if passed `1`. GPS navigation will start working, maybe more stuff will change, not sure. It seems if you try to unload (pass `0`) when close to the island, your game might crash. + */ export function setAllowStreamHeistIslandNodes(type: number): void; export function areNodesLoadedForArea(x1: number, y1: number, x2: number, y2: number): boolean; /** - * Used internally for long range tasks - */ + * Used internally for long range tasks + */ export function requestPathNodesInAreaThisFrame(x1: number, y1: number, x2: number, y2: number): boolean; export function setRoadsBackToOriginal(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: any): void; /** - * See IS_POINT_IN_ANGLED_AREA for the definition of an angled area. - * bool p7 - always 1 - */ + * See IS_POINT_IN_ANGLED_AREA for the definition of an angled area. + * bool p7 - always 1 + */ export function setRoadsBackToOriginalInAngledArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, width: number, p7: any): void; export function setAmbientPedRangeMultiplierThisFrame(multiplier: number): void; @@ -13212,44 +14202,45 @@ declare module "natives" { export function adjustAmbientPedSpawnDensitiesThisFrame(p0: any, p1: any, p2: any, p3: any, p4: any, p5: any, p6: any): void; /** - * @param p6 is always 0 - */ + * p6 is always 0 + */ export function setPedPathsBackToOriginal(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, p6: any): void; export function getRandomVehicleNode(x: number, y: number, z: number, radius: number, p4: boolean, p5: boolean, p6: boolean, outPosition?: Vector3, nodeId?: number): [boolean, Vector3, number]; + export function getSpawnCoordsForVehicleNode(nodeAddress: number, towardsCoorsX: number, towardsCoorsY: number, towardsCoorsZ: number, centrePoint?: Vector3, heading?: number): [Vector3, Vector3, number]; + /** - * Determines the name of the street which is the closest to the given coordinates. - * Note: the names are returned as hashes, the strings can be returned using the function HUD::GET_STREET_NAME_FROM_HASH_KEY. - * @param x the coordinates of the street - * @param y the coordinates of the street - * @param streetName - returns a hash to the name of the street the coords are on - * @param crossingRoad - if the coordinates are on an intersection, a hash to the name of the crossing road - * @returns streetName - returns a hash to the name of the street the coords are on - */ + * Determines the name of the street which is the closest to the given coordinates. + * x,y,z - the coordinates of the street + * streetName - returns a hash to the name of the street the coords are on + * crossingRoad - if the coordinates are on an intersection, a hash to the name of the crossing road + * Note: the names are returned as hashes, the strings can be returned using the function HUD::GET_STREET_NAME_FROM_HASH_KEY. + */ export function getStreetNameAtCoord(x: number, y: number, z: number, streetName?: number, crossingRoad?: number): [void, number, number]; /** - * 0 = This happens randomly during the drive for seemingly no reason but if you consider that this native is only used in trevor3, it seems to mean "Next frame, stop whatever's being said and tell the player the direction." - * 1 = Route is being calculated or the player is going in the wrong direction - * 2 = Please Proceed the Highlighted Route - * 3 = In (distToNxJunction) Turn Left - * 4 = In (distToNxJunction) Turn Right - * 5 = In (distToNxJunction) Keep Straight - * 6 = In (distToNxJunction) Turn Sharply To The Left - * 7 = In (distToNxJunction) Turn Sharply To The Right - * return value set to 0 always - * @param y Route is being recalculated or the navmesh is confusing. This happens randomly during the drive but consistently at {2044.0358, 2996.6116, 44.9717} if you face towards the bar and the route needs you to turn right. In that particular case, it could be a bug with how the turn appears to be 270 deg. CCW instead of "right." Either way, this seems to be the engine saying "I don't know the route right now." - * @param p3 is 0 in the only game script occurrence (trevor3) but 1 doesn't seem to make a difference - * @param distToNxJunction seems to be the distance in metres * 10.0f - */ + * p3 is 0 in the only game script occurrence (trevor3) but 1 doesn't seem to make a difference + * distToNxJunction seems to be the distance in metres * 10.0f + * direction: + * 0 = This happens randomly during the drive for seemingly no reason but if you consider that this native is only used in trevor3, it seems to mean "Next frame, stop whatever's being said and tell the player the direction." + * 1 = Route is being calculated or the player is going in the wrong direction + * 2 = Please Proceed the Highlighted Route + * 3 = In (distToNxJunction) Turn Left + * 4 = In (distToNxJunction) Turn Right + * 5 = In (distToNxJunction) Keep Straight + * 6 = In (distToNxJunction) Turn Sharply To The Left + * 7 = In (distToNxJunction) Turn Sharply To The Right + * 8 = Route is being recalculated or the navmesh is confusing. This happens randomly during the drive but consistently at {2044.0358, 2996.6116, 44.9717} if you face towards the bar and the route needs you to turn right. In that particular case, it could be a bug with how the turn appears to be 270 deg. CCW instead of "right." Either way, this seems to be the engine saying "I don't know the route right now." + * return value set to 0 always + */ export function generateDirectionsToCoord(x: number, y: number, z: number, p3: boolean, direction?: number, p5?: number, distToNxJunction?: number): [number, number, number, number]; export function setIgnoreNoGpsFlag(toggle: boolean): void; /** - * See: SET_BLIP_ROUTE - */ + * See: SET_BLIP_ROUTE + */ export function setIgnoreNoGpsFlagUntilFirstNormalNode(toggle: boolean): void; export function setGpsDisabledZone(x1: number, y1: number, z1: number, x2: number, y2: number, z3: number): void; @@ -13257,9 +14248,9 @@ declare module "natives" { export function getGpsBlipRouteLength(): number; /** - * @param p3 can be 0, 1 or 2. - */ - export function getPosAlongGpsTypeRoute(result: Vector3 | null, p1: boolean, p2: number, p3: number): [boolean, Vector3]; + * p3 can be 0, 1 or 2. + */ + export function getPosAlongGpsTypeRoute(result: Vector3, p1: boolean, p2: number, p3: number): [boolean, Vector3]; export function getGpsBlipRouteFound(): boolean; @@ -13268,28 +14259,28 @@ declare module "natives" { export function getPositionBySideOfRoad(x: number, y: number, z: number, p3: number, outPosition?: Vector3): [boolean, Vector3]; /** - * Gets a value indicating whether the specified position is on a road. - * The vehicle parameter is not implemented (ignored). - */ + * Gets a value indicating whether the specified position is on a road. + * The vehicle parameter is not implemented (ignored). + */ export function isPointOnRoad(x: number, y: number, z: number, vehicle: Vehicle | number): boolean; /** - * Gets the next zone that has been disabled using SET_GPS_DISABLED_ZONE_AT_INDEX. - */ + * Gets the next zone that has been disabled using SET_GPS_DISABLED_ZONE_AT_INDEX. + */ export function getNextGpsDisabledZoneIndex(): number; /** - * Disables the GPS route displayed on the minimap while within a certain zone (area). When in a disabled zone and creating a waypoint, the GPS route is not shown on the minimap until you are outside of the zone. When disabled, the direct distance is shown on minimap opposed to distance to travel. Seems to only work before setting a waypoint. - * You can clear the disabled zone with CLEAR_GPS_DISABLED_ZONE_AT_INDEX. - * **Setting a waypoint at the same coordinate:** - * Disabled Zone: https://i.imgur.com/P9VUuxM.png - * Enabled Zone (normal): https://i.imgur.com/BPi24aw.png - */ + * Disables the GPS route displayed on the minimap while within a certain zone (area). When in a disabled zone and creating a waypoint, the GPS route is not shown on the minimap until you are outside of the zone. When disabled, the direct distance is shown on minimap opposed to distance to travel. Seems to only work before setting a waypoint. + * You can clear the disabled zone with CLEAR_GPS_DISABLED_ZONE_AT_INDEX. + * **Setting a waypoint at the same coordinate:** + * Disabled Zone: https://i.imgur.com/P9VUuxM.png + * Enabled Zone (normal): https://i.imgur.com/BPi24aw.png + */ export function setGpsDisabledZoneAtIndex(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, index: number): void; /** - * Clears a disabled GPS route area from a certain index previously set using `SET_GPS_DISABLED_ZONE_AT_INDEX`. - */ + * Clears a disabled GPS route area from a certain index previously set using `SET_GPS_DISABLED_ZONE_AT_INDEX`. + */ export function clearGpsDisabledZoneAtIndex(index: number): void; export function addNavmeshRequiredRegion(x: number, y: number, radius: number): void; @@ -13299,17 +14290,17 @@ declare module "natives" { export function isNavmeshRequiredRegionInUse(): boolean; /** - * Set toggle true to disable navmesh. - * Set toggle false to enable navmesh. - */ + * Set toggle true to disable navmesh. + * Set toggle false to enable navmesh. + */ export function disableNavmeshInArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, toggle: boolean): void; export function areAllNavmeshRegionsLoaded(): boolean; /** - * Returns whether navmesh for the region is loaded. The region is a rectangular prism defined by it's top left deepest corner to it's bottom right shallowest corner. - * If you can re-word this so it makes more sense, please do. I'm horrible with words sometimes... - */ + * Returns whether navmesh for the region is loaded. The region is a rectangular prism defined by it's top left deepest corner to it's bottom right shallowest corner. + * If you can re-word this so it makes more sense, please do. I'm horrible with words sometimes... + */ export function isNavmeshLoadedInArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): boolean; export function getNumNavmeshesExistingInArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): number; @@ -13323,248 +14314,248 @@ declare module "natives" { export function doesNavmeshBlockingObjectExist(p0: any): boolean; /** - * Returns CGameWorldHeightMap's maximum Z value at specified point (grid node). - */ + * Returns CGameWorldHeightMap's maximum Z value at specified point (grid node). + */ export function getApproxHeightForPoint(x: number, y: number): number; /** - * Returns CGameWorldHeightMap's maximum Z among all grid nodes that intersect with the specified rectangle. - */ + * Returns CGameWorldHeightMap's maximum Z among all grid nodes that intersect with the specified rectangle. + */ export function getApproxHeightForArea(x1: number, y1: number, x2: number, y2: number): number; /** - * Returns CGameWorldHeightMap's minimum Z value at specified point (grid node). - */ + * Returns CGameWorldHeightMap's minimum Z value at specified point (grid node). + */ export function getApproxFloorForPoint(x: number, y: number): number; /** - * Returns CGameWorldHeightMap's minimum Z among all grid nodes that intersect with the specified rectangle. - */ + * Returns CGameWorldHeightMap's minimum Z among all grid nodes that intersect with the specified rectangle. + */ export function getApproxFloorForArea(x1: number, y1: number, x2: number, y2: number): number; /** - * Calculates the travel distance between a set of points. - * Doesn't seem to correlate with distance on gps sometimes. - * @returns This function returns the value 100000.0 over long distances, seems to be a failure mode result, potentially occurring when not all path nodes are loaded into pathfind. - */ + * Calculates the travel distance between a set of points. + * Doesn't seem to correlate with distance on gps sometimes. + * This function returns the value 100000.0 over long distances, seems to be a failure mode result, potentially occurring when not all path nodes are loaded into pathfind. + */ export function calculateTravelDistanceBetweenPoints(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): number; /** - * https://alloc8or.re/gta5/doc/enums/ePedType.txt - * Full list of peds by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/peds.json - */ - export function createPed(pedType: number, modelHash: number, x: number, y: number, z: number, heading: number, isNetwork: boolean, bScriptHostPed: boolean): number; + * https://alloc8or.re/gta5/doc/enums/ePedType.txt + * Full list of peds by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/peds.json + */ + export function createPed(pedType: number, modelHash: number, x: number, y: number, z: number, heading: number, isNetwork: boolean, bScriptHostPed: boolean): Ped | Player | number; /** - * Deletes the specified ped, then sets the handle pointed to by the pointer to NULL. - */ - export function deletePed(ped: Player | number): [void, number]; + * Deletes the specified ped, then sets the handle pointed to by the pointer to NULL. + */ + export function deletePed(ped?: Ped | Player | number): [void, Ped | Player | number]; - export function clonePed(ped: Player | number, isNetwork: boolean, bScriptHostPed: boolean, copyHeadBlendFlag: boolean): number; + export function clonePed(ped: Ped | Player | number, isNetwork: boolean, bScriptHostPed: boolean, copyHeadBlendFlag: boolean): Ped | Player | number; - export function clonePedAlt(ped: Player | number, isNetwork: boolean, bScriptHostPed: boolean, copyHeadBlendFlag: boolean, p4: boolean): number; + export function clonePedAlt(ped: Ped | Player | number, isNetwork: boolean, bScriptHostPed: boolean, copyHeadBlendFlag: boolean, p4: boolean): Ped | Player | number; /** - * Copies ped's components and props to targetPed. - */ - export function clonePedToTarget(ped: Player | number, targetPed: Player | number): void; + * Copies ped's components and props to targetPed. + */ + export function clonePedToTarget(ped: Ped | Player | number, targetPed: Ped | Player | number): void; - export function clonePedToTargetAlt(ped: Player | number, targetPed: Player | number, p2: boolean): void; + export function clonePedToTargetAlt(ped: Ped | Player | number, targetPed: Ped | Player | number, p2: boolean): void; /** - * Gets a value indicating whether the specified ped is in the specified vehicle. - * @returns If 'atGetIn' is false, the function will not return true until the ped is sitting in the vehicle and is about to close the door. If it's true, the function returns true the moment the ped starts to get onto the seat (after opening the door). Eg. if false, and the ped is getting into a submersible, the function will not return true until the ped has descended down into the submersible and gotten into the seat, while if it's true, it'll return true the moment the hatch has been opened and the ped is about to descend into the submersible. - */ - export function isPedInVehicle(ped: Player | number, vehicle: Vehicle | number, atGetIn: boolean): boolean; + * Gets a value indicating whether the specified ped is in the specified vehicle. + * If 'atGetIn' is false, the function will not return true until the ped is sitting in the vehicle and is about to close the door. If it's true, the function returns true the moment the ped starts to get onto the seat (after opening the door). Eg. if false, and the ped is getting into a submersible, the function will not return true until the ped has descended down into the submersible and gotten into the seat, while if it's true, it'll return true the moment the hatch has been opened and the ped is about to descend into the submersible. + */ + export function isPedInVehicle(ped: Ped | Player | number, vehicle: Vehicle | number, atGetIn: boolean): boolean; - export function isPedInModel(ped: Player | number, modelHash: number): boolean; + export function isPedInModel(ped: Ped | Player | number, modelHash: number): boolean; /** - * Gets a value indicating whether the specified ped is in any vehicle. - * @returns If 'atGetIn' is false, the function will not return true until the ped is sitting in the vehicle and is about to close the door. If it's true, the function returns true the moment the ped starts to get onto the seat (after opening the door). Eg. if false, and the ped is getting into a submersible, the function will not return true until the ped has descended down into the submersible and gotten into the seat, while if it's true, it'll return true the moment the hatch has been opened and the ped is about to descend into the submersible. - */ - export function isPedInAnyVehicle(ped: Player | number, atGetIn: boolean): boolean; + * Gets a value indicating whether the specified ped is in any vehicle. + * If 'atGetIn' is false, the function will not return true until the ped is sitting in the vehicle and is about to close the door. If it's true, the function returns true the moment the ped starts to get onto the seat (after opening the door). Eg. if false, and the ped is getting into a submersible, the function will not return true until the ped has descended down into the submersible and gotten into the seat, while if it's true, it'll return true the moment the hatch has been opened and the ped is about to descend into the submersible. + */ + export function isPedInAnyVehicle(ped: Ped | Player | number, atGetIn: boolean): boolean; /** - * xyz - relative to the world origin. - */ + * xyz - relative to the world origin. + */ export function isCopPedInArea3d(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): boolean; /** - * Gets a value indicating whether this ped's health is below its injured threshold. - * The default threshold is 100. - */ - export function isPedInjured(ped: Player | number): boolean; + * Gets a value indicating whether this ped's health is below its injured threshold. + * The default threshold is 100. + */ + export function isPedInjured(ped: Ped | Player | number): boolean; /** - * Returns whether the specified ped is hurt. - */ - export function isPedHurt(ped: Player | number): boolean; + * Returns whether the specified ped is hurt. + */ + export function isPedHurt(ped: Ped | Player | number): boolean; /** - * Gets a value indicating whether this ped's health is below its fatally injured threshold. The default threshold is 100. - * @returns If the handle is invalid, the function returns true. - */ - export function isPedFatallyInjured(ped: Player | number): boolean; + * Gets a value indicating whether this ped's health is below its fatally injured threshold. The default threshold is 100. + * If the handle is invalid, the function returns true. + */ + export function isPedFatallyInjured(ped: Ped | Player | number): boolean; /** - * I suggest to remove "OR_DYING" part, because it does not detect dying phase. - * That's what the devs call it, cry about it. - * lol - * @param p1 is always passed 1 in the scripts. - * @returns Seems to consistently return true if the ped is dead. - */ - export function isPedDeadOrDying(ped: Player | number, p1: boolean): boolean; + * Seems to consistently return true if the ped is dead. + * p1 is always passed 1 in the scripts. + * I suggest to remove "OR_DYING" part, because it does not detect dying phase. + * That's what the devs call it, cry about it. + * lol + */ + export function isPedDeadOrDying(ped: Ped | Player | number, p1: boolean): boolean; - export function isConversationPedDead(ped: Player | number): boolean; + export function isConversationPedDead(ped: Ped | Player | number): boolean; - export function isPedAimingFromCover(ped: Player | number): boolean; + export function isPedAimingFromCover(ped: Ped | Player | number): boolean; /** - * Returns whether the specified ped is reloading. - */ - export function isPedReloading(ped: Player | number): boolean; + * Returns whether the specified ped is reloading. + */ + export function isPedReloading(ped: Ped | Player | number): boolean; /** - * Returns true if the given ped has a valid pointer to CPlayerInfo in its CPed class. That's all. - */ - export function isPedAPlayer(ped: Player | number): boolean; + * Returns true if the given ped has a valid pointer to CPlayerInfo in its CPed class. That's all. + */ + export function isPedAPlayer(ped: Ped | Player | number): boolean; /** - * Full list of peds by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/peds.json - * @param pedType see CREATE_PED - */ - export function createPedInsideVehicle(vehicle: Vehicle | number, pedType: number, modelHash: number, seat: number, isNetwork: boolean, bScriptHostPed: boolean): number; + * pedType: see CREATE_PED + * Full list of peds by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/peds.json + */ + export function createPedInsideVehicle(vehicle: Vehicle | number, pedType: number, modelHash: number, seat: number, isNetwork: boolean, bScriptHostPed: boolean): Ped | Player | number; - export function setPedDesiredHeading(ped: Player | number, heading: number): void; + export function setPedDesiredHeading(ped: Ped | Player | number, heading: number): void; - export function forceAllHeadingValuesToAlign(ped: Player | number): void; + export function forceAllHeadingValuesToAlign(ped: Ped | Player | number): void; /** - * @param angle is ped's view cone - */ - export function isPedFacingPed(ped: Player | number, otherPed: Player | number, angle: number): boolean; + * angle is ped's view cone + */ + export function isPedFacingPed(ped: Ped | Player | number, otherPed: Ped | Player | number, angle: number): boolean; /** - * A.) Swinging a random melee attack (including pistol-whipping) - * B.) Reacting to being hit by a melee attack (including pistol-whipping) - * C.) Is locked-on to an enemy (arms up, strafing/skipping in the default fighting-stance, ready to dodge+counter). - * You don't have to be holding the melee-targetting button to be in this stance; you stay in it by default for a few seconds after swinging at someone. If you do a sprinting punch, it returns true for the duration of the punch animation and then returns false again, even if you've punched and made-angry many peds - * @returns Notes: The function only returns true while the ped is: - */ - export function isPedInMeleeCombat(ped: Player | number): boolean; + * Notes: The function only returns true while the ped is: + * A.) Swinging a random melee attack (including pistol-whipping) + * B.) Reacting to being hit by a melee attack (including pistol-whipping) + * C.) Is locked-on to an enemy (arms up, strafing/skipping in the default fighting-stance, ready to dodge+counter). + * You don't have to be holding the melee-targetting button to be in this stance; you stay in it by default for a few seconds after swinging at someone. If you do a sprinting punch, it returns true for the duration of the punch animation and then returns false again, even if you've punched and made-angry many peds + */ + export function isPedInMeleeCombat(ped: Ped | Player | number): boolean; /** - * @returns Returns true if the ped doesn't do any movement. If the ped is being pushed forwards by using APPLY_FORCE_TO_ENTITY for example, the function returns false. - */ - export function isPedStopped(ped: Player | number): boolean; + * Returns true if the ped doesn't do any movement. If the ped is being pushed forwards by using APPLY_FORCE_TO_ENTITY for example, the function returns false. + */ + export function isPedStopped(ped: Ped | Player | number): boolean; - export function isPedShootingInArea(ped: Player | number, x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, p7: boolean, p8: boolean): boolean; + export function isPedShootingInArea(ped: Ped | Player | number, x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, p7: boolean, p8: boolean): boolean; export function isAnyPedShootingInArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, p6: boolean, p7: boolean): boolean; /** - * Returns whether the specified ped is shooting. - */ - export function isPedShooting(ped: Player | number): boolean; + * Returns whether the specified ped is shooting. + */ + export function isPedShooting(ped: Ped | Player | number): boolean; /** - * @param accuracy = 0-100, 100 being perfectly accurate - */ - export function setPedAccuracy(ped: Player | number, accuracy: number): void; + * accuracy = 0-100, 100 being perfectly accurate + */ + export function setPedAccuracy(ped: Ped | Player | number, accuracy: number): void; - export function getPedAccuracy(ped: Player | number): number; + export function getPedAccuracy(ped: Ped | Player | number): number; export function setAmbientLawPedAccuracyModifier(multiplier: number): void; - export function isPedModel(ped: Player | number, modelHash: number): boolean; + export function isPedModel(ped: Ped | Player | number, modelHash: number): boolean; /** - * Forces the ped to fall back and kills it. - * It doesn't really explode the ped's head but it kills the ped - */ - export function explodePedHead(ped: Player | number, weaponHash: number): void; + * Forces the ped to fall back and kills it. + * It doesn't really explode the ped's head but it kills the ped + */ + export function explodePedHead(ped: Ped | Player | number, weaponHash: number): void; /** - * Judging purely from a quick disassembly, if the ped is in a vehicle, the ped will be deleted immediately. If not, it'll be marked as no longer needed. - very elegant.. - */ - export function removePedElegantly(ped: Player | number): [void, number]; + * Judging purely from a quick disassembly, if the ped is in a vehicle, the ped will be deleted immediately. If not, it'll be marked as no longer needed. - very elegant.. + */ + export function removePedElegantly(ped?: Ped | Player | number): [void, Ped | Player | number]; /** - * Same as SET_PED_ARMOUR, but ADDS 'amount' to the armor the Ped already has. - */ - export function addArmourToPed(ped: Player | number, amount: number): void; + * Same as SET_PED_ARMOUR, but ADDS 'amount' to the armor the Ped already has. + */ + export function addArmourToPed(ped: Ped | Player | number, amount: number): void; /** - * Sets the armor of the specified ped. - * @param ped The Ped to set the armor of. - * @param amount A value between 0 and 100 indicating the value to set the Ped's armor to. - */ - export function setPedArmour(ped: Player | number, amount: number): void; + * Sets the armor of the specified ped. + * ped: The Ped to set the armor of. + * amount: A value between 0 and 100 indicating the value to set the Ped's armor to. + */ + export function setPedArmour(ped: Ped | Player | number, amount: number): void; /** - * Seat_Index: [-1 is driver seat, -2 first free passenger seat] - * Moreinfo of Seat Index - * DriverSeat = -1 - * Passenger = 0 - * Left Rear = 1 - * RightRear = 2 - * @param ped The ped to warp. - * @param vehicle The vehicle to warp the ped into. - */ - export function setPedIntoVehicle(ped: Player | number, vehicle: Vehicle | number, seatIndex: number): void; + * Ped: The ped to warp. + * vehicle: The vehicle to warp the ped into. + * Seat_Index: [-1 is driver seat, -2 first free passenger seat] + * Moreinfo of Seat Index + * DriverSeat = -1 + * Passenger = 0 + * Left Rear = 1 + * RightRear = 2 + */ + export function setPedIntoVehicle(ped: Ped | Player | number, vehicle: Vehicle | number, seatIndex: number): void; - export function setPedAllowVehiclesOverride(ped: Player | number, toggle: boolean): void; + export function setPedAllowVehiclesOverride(ped: Ped | Player | number, toggle: boolean): void; export function canCreateRandomPed(p0: boolean): boolean; /** - * vb.net - * Dim ped_handle As Integer - * With Game.Player.Character - * Dim pos As Vector3 = .Position + .ForwardVector * 3 - * ped_handle = Native.Function.Call(Of Integer)(Hash.CREATE_RANDOM_PED, pos.X, pos.Y, pos.Z) - * End With - * Ped will not act until SET_PED_AS_NO_LONGER_NEEDED is called. - * @returns Creates a Ped at the specified location, returns the Ped Handle. - */ - export function createRandomPed(posX: number, posY: number, posZ: number): number; + * vb.net + * Dim ped_handle As Integer + * With Game.Player.Character + * Dim pos As Vector3 = .Position + .ForwardVector * 3 + * ped_handle = Native.Function.Call(Of Integer)(Hash.CREATE_RANDOM_PED, pos.X, pos.Y, pos.Z) + * End With + * Creates a Ped at the specified location, returns the Ped Handle. + * Ped will not act until SET_PED_AS_NO_LONGER_NEEDED is called. + */ + export function createRandomPed(posX: number, posY: number, posZ: number): Ped | Player | number; - export function createRandomPedAsDriver(vehicle: Vehicle | number, returnHandle: boolean): number; + export function createRandomPedAsDriver(vehicle: Vehicle | number, returnHandle: boolean): Ped | Player | number; export function canCreateRandomDriver(): boolean; export function canCreateRandomBikeRider(): boolean; - export function setPedMoveAnimsBlendOut(ped: Player | number): void; + export function setPedMoveAnimsBlendOut(ped: Ped | Player | number): void; - export function setPedCanBeDraggedOut(ped: Player | number, toggle: boolean): void; + export function setPedCanBeDraggedOut(ped: Ped | Player | number, toggle: boolean): void; /** - * ntoggle was always false except in one instance (b678). - * The one time this is set to true seems to do with when you fail the mission. - */ + * ntoggle was always false except in one instance (b678). + * The one time this is set to true seems to do with when you fail the mission. + */ export function setPedAllowHurtCombatForAllMissionPeds(toggle: boolean): void; /** - * Returns true/false if the ped is/isn't male. - */ - export function isPedMale(ped: Player | number): boolean; + * Returns true/false if the ped is/isn't male. + */ + export function isPedMale(ped: Ped | Player | number): boolean; /** - * Returns true/false if the ped is/isn't humanoid. - */ - export function isPedHuman(ped: Player | number): boolean; + * Returns true/false if the ped is/isn't humanoid. + */ + export function isPedHuman(ped: Ped | Player | number): boolean; /** - * @returns Gets the vehicle the specified Ped is in. Returns 0 if the ped is/was not in a vehicle. - */ - export function getVehiclePedIsIn(ped: Player | number, includeEntering: boolean): number; + * Gets the vehicle the specified Ped is in. Returns 0 if the ped is/was not in a vehicle. + */ + export function getVehiclePedIsIn(ped: Ped | Player | number, includeEntering: boolean): Vehicle | number; /** - * Resets the value for the last vehicle driven by the Ped. - */ - export function resetPedLastVehicle(ped: Player | number): void; + * Resets the value for the last vehicle driven by the Ped. + */ + export function resetPedLastVehicle(ped: Ped | Player | number): void; export function setPedDensityMultiplierThisFrame(multiplier: number): void; @@ -13575,8 +14566,8 @@ declare module "natives" { export function setScriptedConversionCoordThisFrame(x: number, y: number, z: number): void; /** - * The distance between these points, is the diagonal of a box (remember it's 3D). - */ + * The distance between these points, is the diagonal of a box (remember it's 3D). + */ export function setPedNonCreationArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): void; export function clearPedNonCreationArea(): void; @@ -13584,43 +14575,43 @@ declare module "natives" { export function instantlyFillPedPopulation(): void; /** - * @returns Same function call as PED::GET_MOUNT, aka just returns 0 - */ - export function isPedOnMount(ped: Player | number): boolean; + * Same function call as PED::GET_MOUNT, aka just returns 0 + */ + export function isPedOnMount(ped: Ped | Player | number): boolean; /** - * void __fastcall ped__get_mount(NativeContext *a1) - * { - * NativeContext *v1; // rbx@1 - * v1 = a1; - * GetAddressOfPedFromScriptHandle(a1->Args->Arg1); - * v1->Returns->Item1= 0; - * } - * @returns Function just returns 0 - */ - export function getMount(ped: Player | number): number; + * Function just returns 0 + * void __fastcall ped__get_mount(NativeContext *a1) + * { + * NativeContext *v1; // rbx@1 + * v1 = a1; + * GetAddressOfPedFromScriptHandle(a1->Args->Arg1); + * v1->Returns->Item1= 0; + * } + */ + export function getMount(ped: Ped | Player | number): Ped | Player | number; /** - * Gets a value indicating whether the specified ped is on top of any vehicle. - * Return 1 when ped is on vehicle. - * Return 0 when ped is not on a vehicle. - */ - export function isPedOnVehicle(ped: Player | number): boolean; + * Gets a value indicating whether the specified ped is on top of any vehicle. + * Return 1 when ped is on vehicle. + * Return 0 when ped is not on a vehicle. + */ + export function isPedOnVehicle(ped: Ped | Player | number): boolean; - export function isPedOnSpecificVehicle(ped: Player | number, vehicle: Vehicle | number): boolean; + export function isPedOnSpecificVehicle(ped: Ped | Player | number, vehicle: Vehicle | number): boolean; /** - * Maximum possible amount of money on MP is 2000. ~JX - * ----------------------------------------------------------------------------- - * Maximum amount that a ped can theoretically have is 65535 (0xFFFF) since the amount is stored as an unsigned short (uint16_t) value. - */ - export function setPedMoney(ped: Player | number, amount: number): void; + * Maximum possible amount of money on MP is 2000. ~JX + * ----------------------------------------------------------------------------- + * Maximum amount that a ped can theoretically have is 65535 (0xFFFF) since the amount is stored as an unsigned short (uint16_t) value. + */ + export function setPedMoney(ped: Ped | Player | number, amount: number): void; - export function getPedMoney(ped: Player | number): number; + export function getPedMoney(ped: Ped | Player | number): number; /** - * Related to Peds dropping pickup_health_snack; p0 is a value between [0.0, 1.0] that corresponds to drop rate - */ + * Related to Peds dropping pickup_health_snack; p0 is a value between [0.0, 1.0] that corresponds to drop rate + */ export function setHealthSnacksCarriedByAllNewPeds(p0: number, p1: any): void; export function setAmbientPedsDropMoney(p0: boolean): void; @@ -13628,58 +14619,58 @@ declare module "natives" { export function setBlockingOfNonTemporaryEventsForAmbientPedsThisFrame(p0: boolean): void; /** - * Example: Headshotting a player no longer one shots them. Instead they will take the same damage as a torso shot. - * @param ped no longer takes critical damage modifiers if set to FALSE. - */ - export function setPedSuffersCriticalHits(ped: Player | number, toggle: boolean): void; + * Ped no longer takes critical damage modifiers if set to FALSE. + * Example: Headshotting a player no longer one shots them. Instead they will take the same damage as a torso shot. + */ + export function setPedSuffersCriticalHits(ped: Ped | Player | number, toggle: boolean): void; - export function setPedUpperBodyDamageOnly(ped: Player | number, toggle: boolean): void; + export function setPedUpperBodyDamageOnly(ped: Ped | Player | number, toggle: boolean): void; /** - * Detect if ped is sitting in the specified vehicle - * [True/False] - */ - export function isPedSittingInVehicle(ped: Player | number, vehicle: Vehicle | number): boolean; + * Detect if ped is sitting in the specified vehicle + * [True/False] + */ + export function isPedSittingInVehicle(ped: Ped | Player | number, vehicle: Vehicle | number): boolean; /** - * Detect if ped is in any vehicle - * [True/False] - */ - export function isPedSittingInAnyVehicle(ped: Player | number): boolean; + * Detect if ped is in any vehicle + * [True/False] + */ + export function isPedSittingInAnyVehicle(ped: Ped | Player | number): boolean; - export function isPedOnFoot(ped: Player | number): boolean; + export function isPedOnFoot(ped: Ped | Player | number): boolean; - export function isPedOnAnyBike(ped: Player | number): boolean; + export function isPedOnAnyBike(ped: Ped | Player | number): boolean; - export function isPedPlantingBomb(ped: Player | number): boolean; + export function isPedPlantingBomb(ped: Ped | Player | number): boolean; - export function getDeadPedPickupCoords(ped: Player | number, p1: number, p2: number): Vector3; + export function getDeadPedPickupCoords(ped: Ped | Player | number, p1: number, p2: number): Vector3; - export function isPedInAnyBoat(ped: Player | number): boolean; + export function isPedInAnyBoat(ped: Ped | Player | number): boolean; - export function isPedInAnySub(ped: Player | number): boolean; + export function isPedInAnySub(ped: Ped | Player | number): boolean; - export function isPedInAnyHeli(ped: Player | number): boolean; + export function isPedInAnyHeli(ped: Ped | Player | number): boolean; - export function isPedInAnyPlane(ped: Player | number): boolean; + export function isPedInAnyPlane(ped: Ped | Player | number): boolean; - export function isPedInFlyingVehicle(ped: Player | number): boolean; + export function isPedInFlyingVehicle(ped: Ped | Player | number): boolean; - export function setPedDiesInWater(ped: Player | number, toggle: boolean): void; + export function setPedDiesInWater(ped: Ped | Player | number, toggle: boolean): void; - export function getPedDiesInWater(ped: Player | number): boolean; + export function getPedDiesInWater(ped: Ped | Player | number): boolean; - export function setPedDiesInSinkingVehicle(ped: Player | number, toggle: boolean): void; + export function setPedDiesInSinkingVehicle(ped: Ped | Player | number, toggle: boolean): void; - export function getPedArmour(ped: Player | number): number; + export function getPedArmour(ped: Ped | Player | number): number; - export function setPedStayInVehicleWhenJacked(ped: Player | number, toggle: boolean): void; + export function setPedStayInVehicleWhenJacked(ped: Ped | Player | number, toggle: boolean): void; - export function setPedCanBeShotInVehicle(ped: Player | number, toggle: boolean): void; + export function setPedCanBeShotInVehicle(ped: Ped | Player | number, toggle: boolean): void; - export function getPedLastDamageBone(ped: Player | number, outBone?: number): [boolean, number]; + export function getPedLastDamageBone(ped: Ped | Player | number, outBone?: number): [boolean, number]; - export function clearPedLastDamageBone(ped: Player | number): void; + export function clearPedLastDamageBone(ped: Ped | Player | number): void; export function setAiWeaponDamageModifier(value: number): void; @@ -13689,378 +14680,410 @@ declare module "natives" { export function resetAiMeleeWeaponDamageModifier(): void; - export function setTreatAsAmbientPedForDriverLockon(ped: Player | number, p1: boolean): void; + export function setTreatAsAmbientPedForDriverLockon(ped: Ped | Player | number, p1: boolean): void; - export function setPedCanBeTargetted(ped: Player | number, toggle: boolean): void; + export function setPedCanBeTargetted(ped: Ped | Player | number, toggle: boolean): void; - export function setPedCanBeTargettedByTeam(ped: Player | number, team: number, toggle: boolean): void; + export function setPedCanBeTargettedByTeam(ped: Ped | Player | number, team: number, toggle: boolean): void; - export function setPedCanBeTargettedByPlayer(ped: Player | number, player: Player | number, toggle: boolean): void; + export function setPedCanBeTargettedByPlayer(ped: Ped | Player | number, player: Player | number, toggle: boolean): void; - export function setAllowLockonToPedIfFriendly(ped: Player | number, toggle: boolean): void; + export function setAllowLockonToPedIfFriendly(ped: Ped | Player | number, toggle: boolean): void; - export function setUseCameraHeadingForDesiredDirectionLockOnTest(ped: Player | number, toggle: boolean): void; + export function setUseCameraHeadingForDesiredDirectionLockOnTest(ped: Ped | Player | number, toggle: boolean): void; - export function isPedInAnyPoliceVehicle(ped: Player | number): boolean; + export function isPedInAnyPoliceVehicle(ped: Ped | Player | number): boolean; - export function forcePedToOpenParachute(ped: Player | number): void; + export function forcePedToOpenParachute(ped: Ped | Player | number): void; - export function isPedInParachuteFreeFall(ped: Player | number): boolean; + export function isPedInParachuteFreeFall(ped: Ped | Player | number): boolean; - export function isPedFalling(ped: Player | number): boolean; + export function isPedFalling(ped: Ped | Player | number): boolean; - export function isPedJumping(ped: Player | number): boolean; + export function isPedJumping(ped: Ped | Player | number): boolean; export function isPedLanding(p0: any): boolean; export function isPedDoingABeastJump(p0: any): boolean; - export function isPedClimbing(ped: Player | number): boolean; + export function isPedClimbing(ped: Ped | Player | number): boolean; - export function isPedVaulting(ped: Player | number): boolean; + export function isPedVaulting(ped: Ped | Player | number): boolean; - export function isPedDiving(ped: Player | number): boolean; + export function isPedDiving(ped: Ped | Player | number): boolean; - export function isPedJumpingOutOfVehicle(ped: Player | number): boolean; + export function isPedJumpingOutOfVehicle(ped: Ped | Player | number): boolean; /** - * Returns true if the ped is currently opening a door (CTaskOpenDoor). - */ - export function isPedOpeningDoor(ped: Player | number): boolean; + * Returns true if the ped is currently opening a door (CTaskOpenDoor). + */ + export function isPedOpeningDoor(ped: Ped | Player | number): boolean; /** - * Returns: - * -1: Normal - * 0: Wearing parachute on back - * 1: Parachute opening - * 2: Parachute open - * 3: Falling to doom (e.g. after exiting parachute) - * Normal means no parachute? - */ - export function getPedParachuteState(ped: Player | number): number; + * Returns: + * -1: Normal + * 0: Wearing parachute on back + * 1: Parachute opening + * 2: Parachute open + * 3: Falling to doom (e.g. after exiting parachute) + * Normal means no parachute? + */ + export function getPedParachuteState(ped: Ped | Player | number): number; /** - * -1: no landing - * 0: landing on both feet - * 1: stumbling - * 2: rolling - * 3: ragdoll - */ - export function getPedParachuteLandingType(ped: Player | number): number; + * -1: no landing + * 0: landing on both feet + * 1: stumbling + * 2: rolling + * 3: ragdoll + */ + export function getPedParachuteLandingType(ped: Ped | Player | number): number; - export function setPedParachuteTintIndex(ped: Player | number, tintIndex: number): void; + export function setPedParachuteTintIndex(ped: Ped | Player | number, tintIndex: number): void; - export function getPedParachuteTintIndex(ped: Player | number, outTintIndex?: number): [void, number]; + export function getPedParachuteTintIndex(ped: Ped | Player | number, outTintIndex?: number): [void, number]; - export function setPedReserveParachuteTintIndex(ped: Player | number, p1: any): void; + export function setPedReserveParachuteTintIndex(ped: Ped | Player | number, p1: any): void; - export function createParachuteBagObject(ped: Player | number, p1: boolean, p2: boolean): number; + export function createParachuteBagObject(ped: Ped | Player | number, p1: boolean, p2: boolean): Object; /** - * @returns This is the SET_CHAR_DUCKING from GTA IV, that makes Peds duck. This function does nothing in GTA V. It cannot set the ped as ducking in vehicles, and IS_PED_DUCKING will always return false. - */ - export function setPedDucking(ped: Player | number, toggle: boolean): void; + * This is the SET_CHAR_DUCKING from GTA IV, that makes Peds duck. This function does nothing in GTA V. It cannot set the ped as ducking in vehicles, and IS_PED_DUCKING will always return false. + */ + export function setPedDucking(ped: Ped | Player | number, toggle: boolean): void; - export function isPedDucking(ped: Player | number): boolean; + export function isPedDucking(ped: Ped | Player | number): boolean; - export function isPedInAnyTaxi(ped: Player | number): boolean; + export function isPedInAnyTaxi(ped: Ped | Player | number): boolean; - export function setPedIdRange(ped: Player | number, value: number): void; + export function setPedIdRange(ped: Ped | Player | number, value: number): void; - export function setPedHighlyPerceptive(ped: Player | number, toggle: boolean): void; + export function setPedHighlyPerceptive(ped: Ped | Player | number, toggle: boolean): void; export function setCopPerceptionOverrides(seeingRange: number, seeingRangePeripheral: number, hearingRange: number, visualFieldMinAzimuthAngle: number, visualFieldMaxAzimuthAngle: number, fieldOfGazeMaxAngle: number, p6: number): void; - export function setPedInjuredOnGroundBehaviour(ped: Player | number, p1: number): void; + export function setPedInjuredOnGroundBehaviour(ped: Ped | Player | number, p1: number): void; - export function disablePedInjuredOnGroundBehaviour(ped: Player | number): void; + export function disablePedInjuredOnGroundBehaviour(ped: Ped | Player | number): void; - export function setPedSeeingRange(ped: Player | number, value: number): void; + export function setPedSeeingRange(ped: Ped | Player | number, value: number): void; - export function setPedHearingRange(ped: Player | number, value: number): void; + export function setPedHearingRange(ped: Ped | Player | number, value: number): void; - export function setPedVisualFieldMinAngle(ped: Player | number, value: number): void; + export function setPedVisualFieldMinAngle(ped: Ped | Player | number, value: number): void; - export function setPedVisualFieldMaxAngle(ped: Player | number, value: number): void; + export function setPedVisualFieldMaxAngle(ped: Ped | Player | number, value: number): void; /** - * This native refers to the field of vision the ped has below them, starting at 0 degrees. The angle value should be negative. - * -90f should let the ped see 90 degrees below them, for example. - */ - export function setPedVisualFieldMinElevationAngle(ped: Player | number, angle: number): void; + * This native refers to the field of vision the ped has below them, starting at 0 degrees. The angle value should be negative. + * -90f should let the ped see 90 degrees below them, for example. + */ + export function setPedVisualFieldMinElevationAngle(ped: Ped | Player | number, angle: number): void; /** - * This native refers to the field of vision the ped has above them, starting at 0 degrees. 90f would let the ped see enemies directly above of them. - */ - export function setPedVisualFieldMaxElevationAngle(ped: Player | number, angle: number): void; + * This native refers to the field of vision the ped has above them, starting at 0 degrees. 90f would let the ped see enemies directly above of them. + */ + export function setPedVisualFieldMaxElevationAngle(ped: Ped | Player | number, angle: number): void; - export function setPedVisualFieldPeripheralRange(ped: Player | number, range: number): void; + export function setPedVisualFieldPeripheralRange(ped: Ped | Player | number, range: number): void; - export function setPedVisualFieldCenterAngle(ped: Player | number, angle: number): void; + export function setPedVisualFieldCenterAngle(ped: Ped | Player | number, angle: number): void; - export function getPedVisualFieldCenterAngle(ped: Player | number): number; + export function getPedVisualFieldCenterAngle(ped: Ped | Player | number): number; /** - * @param p1 is usually 0 in the scripts. action is either 0 or a pointer to "DEFAULT_ACTION". - */ - export function setPedStealthMovement(ped: Player | number, p1: boolean, action: string | null): void; + * p1 is usually 0 in the scripts. action is either 0 or a pointer to "DEFAULT_ACTION". + */ + export function setPedStealthMovement(ped: Ped | Player | number, p1: boolean, action: string): void; /** - * Returns whether the entity is in stealth mode - */ - export function getPedStealthMovement(ped: Player | number): boolean; + * Returns whether the entity is in stealth mode + */ + export function getPedStealthMovement(ped: Ped | Player | number): boolean; /** - * Creates a new ped group. - * Groups can contain up to 8 peds. - * The parameter is unused. - * Returns a handle to the created group, or 0 if a group couldn't be created. - */ + * Creates a new ped group. + * Groups can contain up to 8 peds. + * The parameter is unused. + * Returns a handle to the created group, or 0 if a group couldn't be created. + */ export function createGroup(unused: number): number; - export function setPedAsGroupLeader(ped: Player | number, groupId: number): void; + export function setPedAsGroupLeader(ped: Ped | Player | number, groupId: number): void; - export function setPedAsGroupMember(ped: Player | number, groupId: number): void; + export function setPedAsGroupMember(ped: Ped | Player | number, groupId: number): void; /** - * This only will teleport the ped to the group leader if the group leader teleports (sets coords). - * Only works in singleplayer - */ - export function setPedCanTeleportToGroupLeader(pedHandle: Player | number, groupHandle: number, toggle: boolean): void; + * This only will teleport the ped to the group leader if the group leader teleports (sets coords). + * Only works in singleplayer + */ + export function setPedCanTeleportToGroupLeader(pedHandle: Ped | Player | number, groupHandle: number, toggle: boolean): void; export function removeGroup(groupId: number): void; - export function removePedFromGroup(ped: Player | number): void; + export function removePedFromGroup(ped: Ped | Player | number): void; - export function isPedGroupMember(ped: Player | number, groupId: number): boolean; + export function isPedGroupMember(ped: Ped | Player | number, groupId: number): boolean; - export function isPedHangingOnToVehicle(ped: Player | number): boolean; + export function isPedHangingOnToVehicle(ped: Ped | Player | number): boolean; /** - * Sets the range at which members will automatically leave the group. - */ + * Sets the range at which members will automatically leave the group. + */ export function setGroupSeparationRange(groupHandle: number, separationRange: number): void; /** - * @param ped will stay on the ground after being stunned for at lest ms time. (in milliseconds) - */ - export function setPedMinGroundTimeForStungun(ped: Player | number, ms: number): void; + * Ped will stay on the ground after being stunned for at lest ms time. (in milliseconds) + */ + export function setPedMinGroundTimeForStungun(ped: Ped | Player | number, ms: number): void; - export function isPedProne(ped: Player | number): boolean; + export function isPedProne(ped: Ped | Player | number): boolean; /** - * @param target is usually 0 in the scripts because it gets the ped id during the task sequence. For instance: PED::IS_PED_IN_COMBAT(l_42E[414], PLAYER::PLAYER_PED_ID()) // armenian2.ct4: 43794 - * @returns Checks to see if ped and target are in combat with eachother. Only goes one-way: if target is engaged in combat with ped but ped has not yet reacted, the function will return false until ped starts fighting back. - */ - export function isPedInCombat(ped: Player | number, target: Player | number): boolean; + * Checks to see if ped and target are in combat with eachother. Only goes one-way: if target is engaged in combat with ped but ped has not yet reacted, the function will return false until ped starts fighting back. + * p1 is usually 0 in the scripts because it gets the ped id during the task sequence. For instance: PED::IS_PED_IN_COMBAT(l_42E[4/*14*\/], PLAYER::PLAYER_PED_ID()) // armenian2.ct4: 43794 + */ + export function isPedInCombat(ped: Ped | Player | number, target: Ped | Player | number): boolean; - export function getPedTargetFromCombatPed(ped: Player | number, p1: any): number; + export function getPedTargetFromCombatPed(ped: Ped | Player | number, p1: any): Entity | number; - export function canPedInCombatSeeTarget(ped: Player | number, target: Player | number): boolean; + export function canPedInCombatSeeTarget(ped: Ped | Player | number, target: Ped | Player | number): boolean; - export function isPedDoingDriveby(ped: Player | number): boolean; + export function isPedDoingDriveby(ped: Ped | Player | number): boolean; - export function isPedJacking(ped: Player | number): boolean; + export function isPedJacking(ped: Ped | Player | number): boolean; - export function isPedBeingJacked(ped: Player | number): boolean; + export function isPedBeingJacked(ped: Ped | Player | number): boolean; /** - * @param p1 is always 0 - */ - export function isPedBeingStunned(ped: Player | number, p1: number): boolean; + * p1 is always 0 + */ + export function isPedBeingStunned(ped: Ped | Player | number, p1: number): boolean; - export function getPedsJacker(ped: Player | number): number; + export function getPedsJacker(ped: Ped | Player | number): Ped | Player | number; - export function getJackTarget(ped: Player | number): number; + export function getJackTarget(ped: Ped | Player | number): Ped | Player | number; - export function isPedFleeing(ped: Player | number): boolean; + export function isPedFleeing(ped: Ped | Player | number): boolean; /** - * @param exceptUseWeapon is nearly always 0 in the scripts. - */ - export function isPedInCover(ped: Player | number, exceptUseWeapon: boolean): boolean; + * p1 is nearly always 0 in the scripts. + */ + export function isPedInCover(ped: Ped | Player | number, exceptUseWeapon: boolean): boolean; - export function isPedInCoverFacingLeft(ped: Player | number): boolean; + export function isPedInCoverFacingLeft(ped: Ped | Player | number): boolean; - export function isPedInHighCover(ped: Player | number): boolean; + export function isPedInHighCover(ped: Ped | Player | number): boolean; - export function isPedGoingIntoCover(ped: Player | number): boolean; + export function isPedGoingIntoCover(ped: Ped | Player | number): boolean; /** - * @param i could be time. Only example in the decompiled scripts uses it as -1. - */ - export function setPedPinnedDown(ped: Player | number, pinned: boolean, i: number): boolean; + * i could be time. Only example in the decompiled scripts uses it as -1. + */ + export function setPedPinnedDown(ped: Ped | Player | number, pinned: boolean, i: number): boolean; + + export function hasPedClearLosToEntity(ped: Ped | Player | number, entity: Entity | number, x: number, y: number, z: number, p5: number, p6: boolean, p7: boolean): boolean; - export function getSeatPedIsTryingToEnter(ped: Player | number): number; + export function getSeatPedIsTryingToEnter(ped: Ped | Player | number): number; - export function getVehiclePedIsTryingToEnter(ped: Player | number): number; + export function getVehiclePedIsTryingToEnter(ped: Ped | Player | number): Vehicle | number; /** - * Returns the Entity (Ped, Vehicle, or ?Object?) that killed the 'ped' - * Is best to check if the Ped is dead before asking for its killer. - */ - export function getPedSourceOfDeath(ped: Player | number): number; + * Returns the Entity (Ped, Vehicle, or ?Object?) that killed the 'ped' + * Is best to check if the Ped is dead before asking for its killer. + */ + export function getPedSourceOfDeath(ped: Ped | Player | number): Entity | number; /** - * Returns the hash of the weapon/model/object that killed the ped. - */ - export function getPedCauseOfDeath(ped: Player | number): number; + * Returns the hash of the weapon/model/object that killed the ped. + */ + export function getPedCauseOfDeath(ped: Ped | Player | number): number; - export function getPedTimeOfDeath(ped: Player | number): number; + export function getPedTimeOfDeath(ped: Ped | Player | number): number; - export function countPedsInCombatWithTarget(ped: Player | number): number; + export function countPedsInCombatWithTarget(ped: Ped | Player | number): number; - export function countPedsInCombatWithTargetWithinRadius(ped: Player | number, x: number, y: number, z: number, radius: number): number; + export function countPedsInCombatWithTargetWithinRadius(ped: Ped | Player | number, x: number, y: number, z: number, radius: number): number; - export function setPedRelationshipGroupDefaultHash(ped: Player | number, hash: number): void; + export function setPedRelationshipGroupDefaultHash(ped: Ped | Player | number, hash: number): void; - export function setPedRelationshipGroupHash(ped: Player | number, hash: number): void; + export function setPedRelationshipGroupHash(ped: Ped | Player | number, hash: number): void; /** - * Sets the relationship between two groups. This should be called twice (once for each group). - * 0 = Companion - * 1 = Respect - * 2 = Like - * 3 = Neutral - * 4 = Dislike - * 5 = Hate - * 255 = Pedestrians - * Example: - * See NativeDB for reference: http://natives.altv.mp/#/0xBF25EB89375A37AD - * @param relationship types: - */ + * Sets the relationship between two groups. This should be called twice (once for each group). + * Relationship types: + * 0 = Companion + * 1 = Respect + * 2 = Like + * 3 = Neutral + * 4 = Dislike + * 5 = Hate + * 255 = Pedestrians + * Example: + * PED::SET_RELATIONSHIP_BETWEEN_GROUPS(2, l_1017, 0xA49E591C); + * PED::SET_RELATIONSHIP_BETWEEN_GROUPS(2, 0xA49E591C, l_1017); + */ export function setRelationshipBetweenGroups(relationship: number, group1: number, group2: number): void; /** - * Clears the relationship between two groups. This should be called twice (once for each group). - * 0 = Companion - * 1 = Respect - * 2 = Like - * 3 = Neutral - * 4 = Dislike - * 5 = Hate - * 255 = Pedestrians - * (Credits: Inco) - * See NativeDB for reference: http://natives.altv.mp/#/0x5E29243FB56FC6D4 - * @param relationship types: - */ + * Clears the relationship between two groups. This should be called twice (once for each group). + * Relationship types: + * 0 = Companion + * 1 = Respect + * 2 = Like + * 3 = Neutral + * 4 = Dislike + * 5 = Hate + * 255 = Pedestrians + * (Credits: Inco) + * Example: + * PED::CLEAR_RELATIONSHIP_BETWEEN_GROUPS(2, l_1017, 0xA49E591C); + * PED::CLEAR_RELATIONSHIP_BETWEEN_GROUPS(2, 0xA49E591C, l_1017); + */ export function clearRelationshipBetweenGroups(relationship: number, group1: number, group2: number): void; /** - * @returns Can't select void. This function returns nothing. The hash of the created relationship group is output in the second parameter. - */ - export function addRelationshipGroup(name: string | null, groupHash?: number): [boolean, number]; + * Can't select void. This function returns nothing. The hash of the created relationship group is output in the second parameter. + */ + export function addRelationshipGroup(name: string, groupHash?: number): [boolean, number]; export function removeRelationshipGroup(groupHash: number): void; export function doesRelationshipGroupExist(groupHash: number): boolean; /** - * Gets the relationship between two peds. This should be called twice (once for each ped). - * Relationship types: - * 0 = Companion - * 1 = Respect - * 2 = Like - * 3 = Neutral - * 4 = Dislike - * 5 = Hate - * 255 = Pedestrians - * See NativeDB for reference: http://natives.altv.mp/#/0xEBA5AD3A0EAF7121 - */ - export function getRelationshipBetweenPeds(ped1: Player | number, ped2: Player | number): number; - - export function getPedRelationshipGroupDefaultHash(ped: Player | number): number; - - export function getPedRelationshipGroupHash(ped: Player | number): number; - - /** - * Gets the relationship between two groups. This should be called twice (once for each group). - * Relationship types: - * 0 = Companion - * 1 = Respect - * 2 = Like - * 3 = Neutral - * 4 = Dislike - * 5 = Hate - * 255 = Pedestrians - * See NativeDB for reference: http://natives.altv.mp/#/0x9E6B70061662AE5C - */ + * Gets the relationship between two peds. This should be called twice (once for each ped). + * Relationship types: + * 0 = Companion + * 1 = Respect + * 2 = Like + * 3 = Neutral + * 4 = Dislike + * 5 = Hate + * 255 = Pedestrians + * (Credits: Inco) + * Example: + * PED::GET_RELATIONSHIP_BETWEEN_PEDS(2, l_1017, 0xA49E591C); + * PED::GET_RELATIONSHIP_BETWEEN_PEDS(2, 0xA49E591C, l_1017); + */ + export function getRelationshipBetweenPeds(ped1: Ped | Player | number, ped2: Ped | Player | number): number; + + export function getPedRelationshipGroupDefaultHash(ped: Ped | Player | number): number; + + export function getPedRelationshipGroupHash(ped: Ped | Player | number): number; + + /** + * Gets the relationship between two groups. This should be called twice (once for each group). + * Relationship types: + * 0 = Companion + * 1 = Respect + * 2 = Like + * 3 = Neutral + * 4 = Dislike + * 5 = Hate + * 255 = Pedestrians + * Example: + * PED::GET_RELATIONSHIP_BETWEEN_GROUPS(l_1017, 0xA49E591C); + * PED::GET_RELATIONSHIP_BETWEEN_GROUPS(0xA49E591C, l_1017); + */ export function getRelationshipBetweenGroups(group1: number, group2: number): number; export function setRelationshipGroupAffectsWantedLevel(group: number, p1: boolean): void; - export function tellGroupPedsInAreaToAttack(ped: Player | number, p1: any, p2: number, hash: number, p4: any, p5: any): void; - - export function setPedCanBeTargetedWithoutLos(ped: Player | number, toggle: boolean): void; - - export function setPedToInformRespectedFriends(ped: Player | number, radius: number, maxFriends: number): void; - - export function isPedRespondingToEvent(ped: Player | number, event: any): boolean; - - export function getPosFromFiredEvent(ped: Player | number, eventType: number, outData?: any): [boolean, any]; - - /** - * FIRING_PATTERN_BURST_FIRE = 0xD6FF6D61 ( 1073727030 ) - * FIRING_PATTERN_BURST_FIRE_IN_COVER = 0x026321F1 ( 40051185 ) - * FIRING_PATTERN_BURST_FIRE_DRIVEBY = 0xD31265F2 ( -753768974 ) - * FIRING_PATTERN_FROM_GROUND = 0x2264E5D6 ( 577037782 ) - * FIRING_PATTERN_DELAY_FIRE_BY_ONE_SEC = 0x7A845691 ( 2055493265 ) - * FIRING_PATTERN_FULL_AUTO = 0xC6EE6B4C ( -957453492 ) - * FIRING_PATTERN_SINGLE_SHOT = 0x5D60E4E0 ( 1566631136 ) - * FIRING_PATTERN_BURST_FIRE_PISTOL = 0xA018DB8A ( -1608983670 ) - * FIRING_PATTERN_BURST_FIRE_SMG = 0xD10DADEE ( 1863348768 ) - * See NativeDB for reference: http://natives.altv.mp/#/0x9AC577F5A12AD8A9 - */ - export function setPedFiringPattern(ped: Player | number, patternHash: number): void; - - /** - * @param shootRate 0-1000 - */ - export function setPedShootRate(ped: Player | number, shootRate: number): void; - - /** - * @param combatType can be between 0-14. See GET_COMBAT_FLOAT below for a list of possible parameters. - */ - export function setCombatFloat(ped: Player | number, combatType: number, p2: number): void; - - /** - * p1 probably refers to the attributes configured in combatbehavior.meta. There are 13. Example: - * - * - * - * - * - * - * - * - * See NativeDB for reference: http://natives.altv.mp/#/0x52DFF8A10508090A - * @param ped Ped Handle - * @param p1 int i | 0 <= i <= 27 - */ - export function getCombatFloat(ped: Player | number, p1: number): number; - - /** - * @param p1 may be a BOOL representing whether or not the group even exists - */ + export function tellGroupPedsInAreaToAttack(ped: Ped | Player | number, p1: any, p2: number, hash: number, p4: any, p5: any): void; + + export function setPedCanBeTargetedWithoutLos(ped: Ped | Player | number, toggle: boolean): void; + + export function setPedToInformRespectedFriends(ped: Ped | Player | number, radius: number, maxFriends: number): void; + + export function isPedRespondingToEvent(ped: Ped | Player | number, event: any): boolean; + + export function getPosFromFiredEvent(ped: Ped | Player | number, eventType: number, outData?: any): [boolean, any]; + + /** + * FIRING_PATTERN_BURST_FIRE = 0xD6FF6D61 ( 1073727030 ) + * FIRING_PATTERN_BURST_FIRE_IN_COVER = 0x026321F1 ( 40051185 ) + * FIRING_PATTERN_BURST_FIRE_DRIVEBY = 0xD31265F2 ( -753768974 ) + * FIRING_PATTERN_FROM_GROUND = 0x2264E5D6 ( 577037782 ) + * FIRING_PATTERN_DELAY_FIRE_BY_ONE_SEC = 0x7A845691 ( 2055493265 ) + * FIRING_PATTERN_FULL_AUTO = 0xC6EE6B4C ( -957453492 ) + * FIRING_PATTERN_SINGLE_SHOT = 0x5D60E4E0 ( 1566631136 ) + * FIRING_PATTERN_BURST_FIRE_PISTOL = 0xA018DB8A ( -1608983670 ) + * FIRING_PATTERN_BURST_FIRE_SMG = 0xD10DADEE ( 1863348768 ) + * FIRING_PATTERN_BURST_FIRE_RIFLE = 0x9C74B406 ( -1670073338 ) + * FIRING_PATTERN_BURST_FIRE_MG = 0xB573C5B4 ( -1250703948 ) + * FIRING_PATTERN_BURST_FIRE_PUMPSHOTGUN = 0x00BAC39B ( 12239771 ) + * FIRING_PATTERN_BURST_FIRE_HELI = 0x914E786F ( -1857128337 ) + * FIRING_PATTERN_BURST_FIRE_MICRO = 0x42EF03FD ( 1122960381 ) + * FIRING_PATTERN_SHORT_BURSTS = 0x1A92D7DF ( 445831135 ) + * FIRING_PATTERN_SLOW_FIRE_TANK = 0xE2CA3A71 ( -490063247 ) + * Firing pattern info: https://pastebin.com/Px036isB + */ + export function setPedFiringPattern(ped: Ped | Player | number, patternHash: number): void; + + /** + * shootRate 0-1000 + */ + export function setPedShootRate(ped: Ped | Player | number, shootRate: number): void; + + /** + * combatType can be between 0-14. See GET_COMBAT_FLOAT below for a list of possible parameters. + */ + export function setCombatFloat(ped: Ped | Player | number, combatType: number, p2: number): void; + + /** + * p0: Ped Handle + * p1: int i | 0 <= i <= 27 + * p1 probably refers to the attributes configured in combatbehavior.meta. There are 13. Example: + * + * + * + * + * + * + * + * + * + * + * + * + * + * -------------Confirmed by editing combatbehavior.meta: + * p1: + * 0=BlindFireChance + * 1=BurstDurationInCover + * 3=TimeBetweenBurstsInCover + * 4=TimeBetweenPeeks + * 5=StrafeWhenMovingChance + * 8=WalkWhenStrafingChance + * 11=AttackWindowDistanceForCover + * 12=TimeToInvalidateInjuredTarget + * 16=OptimalCoverDistance + */ + export function getCombatFloat(ped: Ped | Player | number, p1: number): number; + + /** + * p1 may be a BOOL representing whether or not the group even exists + */ export function getGroupSize(groupID: number, p1?: any, sizeInMembers?: number): [void, any, number]; export function doesGroupExist(groupId: number): boolean; /** - * Returns the group id of which the specified ped is a member of. - */ - export function getPedGroupIndex(ped: Player | number): number; + * Returns the group id of which the specified ped is a member of. + */ + export function getPedGroupIndex(ped: Ped | Player | number): number; - export function isPedInGroup(ped: Player | number): boolean; + export function isPedInGroup(ped: Ped | Player | number): boolean; - export function getPlayerPedIsFollowing(ped: Player | number): number; + export function getPlayerPedIsFollowing(ped: Ped | Player | number): Player | number; /** - * 0: Default - * 1: Circle Around Leader - * 2: Alternative Circle Around Leader - * 3: Line, with Leader at center - */ + * 0: Default + * 1: Circle Around Leader + * 2: Alternative Circle Around Leader + * 3: Line, with Leader at center + */ export function setGroupFormation(groupId: number, formationType: number): void; export function setGroupFormationSpacing(groupId: number, x: number, y: number, z: number): void; @@ -14068,106 +15091,106 @@ declare module "natives" { export function resetGroupFormationDefaultSpacing(groupHandle: number): void; /** - * Gets ID of vehicle player using. It means it can get ID at any interaction with vehicle. Enter\exit for example. And that means it is faster than GET_VEHICLE_PED_IS_IN but less safe. - */ - export function getVehiclePedIsUsing(ped: Player | number): number; + * Gets ID of vehicle player using. It means it can get ID at any interaction with vehicle. Enter\exit for example. And that means it is faster than GET_VEHICLE_PED_IS_IN but less safe. + */ + export function getVehiclePedIsUsing(ped: Ped | Player | number): Vehicle | number; - export function getVehiclePedIsEntering(ped: Player | number): number; + export function getVehiclePedIsEntering(ped: Ped | Player | number): Vehicle | number; /** - * enable or disable the gravity of a ped - * Examples: - * PED::SET_PED_GRAVITY(Local_289[iVar0 20], 0x00000001); - * @param ped :SET_PED_GRAVITY(PLAYER::PLAYER_PED_ID(), 0x00000001); - */ - export function setPedGravity(ped: Player | number, toggle: boolean): void; + * enable or disable the gravity of a ped + * Examples: + * PED::SET_PED_GRAVITY(PLAYER::PLAYER_PED_ID(), 0x00000001); + * PED::SET_PED_GRAVITY(Local_289[iVar0 /*20*\/], 0x00000001); + */ + export function setPedGravity(ped: Ped | Player | number, toggle: boolean): void; /** - * damages a ped with the given amount - */ - export function applyDamageToPed(ped: Player | number, damageAmount: number, p2: boolean, p3: any): void; + * damages a ped with the given amount + */ + export function applyDamageToPed(ped: Ped | Player | number, damageAmount: number, p2: boolean, p3: any, weaponType: number): void; - export function getTimePedDamagedByWeapon(ped: Player | number, weaponHash: number): number; + export function getTimePedDamagedByWeapon(ped: Ped | Player | number, weaponHash: number): number; - export function setPedAllowedToDuck(ped: Player | number, toggle: boolean): void; + export function setPedAllowedToDuck(ped: Ped | Player | number, toggle: boolean): void; - export function setPedNeverLeavesGroup(ped: Player | number, toggle: boolean): void; + export function setPedNeverLeavesGroup(ped: Ped | Player | number, toggle: boolean): void; /** - * https://alloc8or.re/gta5/doc/enums/ePedType.txt - */ - export function getPedType(ped: Player | number): number; + * https://alloc8or.re/gta5/doc/enums/ePedType.txt + */ + export function getPedType(ped: Ped | Player | number): number; /** - * @param ped vision - */ - export function setPedAsCop(ped: Player | number, toggle: boolean): void; + * Turns the desired ped into a cop. If you use this on the player ped, you will become almost invisible to cops dispatched for you. You will also report your own crimes, get a generic cop voice, get a cop-vision-cone on the radar, and you will be unable to shoot at other cops. SWAT and Army will still shoot at you. Toggling ped as "false" has no effect; you must change p0's ped model to disable the effect. + */ + export function setPedAsCop(ped: Ped | Player | number, toggle: boolean): void; export function setPedHealthPendingLastDamageEventOverrideFlag(toggle: boolean): void; /** - * Sets the maximum health of a ped. - */ - export function setPedMaxHealth(ped: Player | number, value: number): void; + * Sets the maximum health of a ped. + */ + export function setPedMaxHealth(ped: Ped | Player | number, value: number): void; - export function getPedMaxHealth(ped: Player | number): number; + export function getPedMaxHealth(ped: Ped | Player | number): number; - export function setPedMaxTimeInWater(ped: Player | number, value: number): void; + export function setPedMaxTimeInWater(ped: Ped | Player | number, value: number): void; - export function setPedMaxTimeUnderwater(ped: Player | number, value: number): void; + export function setPedMaxTimeUnderwater(ped: Ped | Player | number, value: number): void; - export function setCorpseRagdollFriction(ped: Player | number, p1: number): void; + export function setCorpseRagdollFriction(ped: Ped | Player | number, p1: number): void; /** - * @param seatIndex must be <= 2 - */ - export function setPedVehicleForcedSeatUsage(ped: Player | number, vehicle: Vehicle | number, seatIndex: number, flags: number, p4: any): void; + * seatIndex must be <= 2 + */ + export function setPedVehicleForcedSeatUsage(ped: Ped | Player | number, vehicle: Vehicle | number, seatIndex: number, flags: number, p4: any): void; - export function clearAllPedVehicleForcedSeatUsage(ped: Player | number): void; + export function clearAllPedVehicleForcedSeatUsage(ped: Ped | Player | number): void; /** - * This native does absolutely nothing, just a nullsub - */ + * This native does absolutely nothing, just a nullsub + */ export function setPedCanBeKnockedOffBike(p0: any, p1: any): void; /** - * @param state https://alloc8or.re/gta5/doc/enums/eKnockOffVehicle.txt - */ - export function setPedCanBeKnockedOffVehicle(ped: Player | number, state: number): void; + * state: https://alloc8or.re/gta5/doc/enums/eKnockOffVehicle.txt + */ + export function setPedCanBeKnockedOffVehicle(ped: Ped | Player | number, state: number): void; - export function canKnockPedOffVehicle(ped: Player | number): boolean; + export function canKnockPedOffVehicle(ped: Ped | Player | number): boolean; - export function knockPedOffVehicle(ped: Player | number): void; + export function knockPedOffVehicle(ped: Ped | Player | number): void; - export function setPedCoordsNoGang(ped: Player | number, posX: number, posY: number, posZ: number): void; + export function setPedCoordsNoGang(ped: Ped | Player | number, posX: number, posY: number, posZ: number): void; /** - * from fm_mission_controller.c4 (variable names changed for clarity): - * int groupID = PLAYER::GET_PLAYER_GROUP(PLAYER::PLAYER_ID()); - * PED::GET_GROUP_SIZE(group, &unused, &groupSize); - * if (groupSize >= 1) { - * . . . . for (int memberNumber = 0; memberNumber < groupSize; memberNumber++) { - * . . . . . . . . //and so on - * @param groupID PED::GET_PED_AS_GROUP_MEMBER(groupID, memberNumber); - */ - export function getPedAsGroupMember(groupID: number, memberNumber: number): number; + * from fm_mission_controller.c4 (variable names changed for clarity): + * int groupID = PLAYER::GET_PLAYER_GROUP(PLAYER::PLAYER_ID()); + * PED::GET_GROUP_SIZE(group, &unused, &groupSize); + * if (groupSize >= 1) { + * . . . . for (int memberNumber = 0; memberNumber < groupSize; memberNumber++) { + * . . . . . . . . Ped ped1 = PED::GET_PED_AS_GROUP_MEMBER(groupID, memberNumber); + * . . . . . . . . //and so on + */ + export function getPedAsGroupMember(groupID: number, memberNumber: number): Ped | Player | number; - export function getPedAsGroupLeader(groupID: number): number; + export function getPedAsGroupLeader(groupID: number): Ped | Player | number; - export function setPedKeepTask(ped: Player | number, toggle: boolean): void; + export function setPedKeepTask(ped: Ped | Player | number, toggle: boolean): void; - export function setPedAllowMinorReactionsAsMissionPed(ped: Player | number, toggle: boolean): void; + export function setPedAllowMinorReactionsAsMissionPed(ped: Ped | Player | number, toggle: boolean): void; - export function isPedSwimming(ped: Player | number): boolean; + export function isPedSwimming(ped: Ped | Player | number): boolean; - export function isPedSwimmingUnderWater(ped: Player | number): boolean; + export function isPedSwimmingUnderWater(ped: Ped | Player | number): boolean; /** - * teleports ped to coords along with the vehicle ped is in - */ - export function setPedCoordsKeepVehicle(ped: Player | number, posX: number, posY: number, posZ: number): void; + * teleports ped to coords along with the vehicle ped is in + */ + export function setPedCoordsKeepVehicle(ped: Ped | Player | number, posX: number, posY: number, posZ: number): void; - export function setPedDiesInVehicle(ped: Player | number, toggle: boolean): void; + export function setPedDiesInVehicle(ped: Ped | Player | number, toggle: boolean): void; export function setCreateRandomCops(toggle: boolean): void; @@ -14177,217 +15200,260 @@ declare module "natives" { export function canCreateRandomCops(): boolean; - export function setPedAsEnemy(ped: Player | number, toggle: boolean): void; - - export function setPedCanSmashGlass(ped: Player | number, p1: boolean, p2: boolean): void; - - export function isPedInAnyTrain(ped: Player | number): boolean; + export function setPedAsEnemy(ped: Ped | Player | number, toggle: boolean): void; + + export function setPedCanSmashGlass(ped: Ped | Player | number, p1: boolean, p2: boolean): void; + + export function isPedInAnyTrain(ped: Ped | Player | number): boolean; + + export function isPedGettingIntoAVehicle(ped: Ped | Player | number): boolean; + + export function isPedTryingToEnterALockedVehicle(ped: Ped | Player | number): boolean; + + /** + * ped can not pull out a weapon when true + */ + export function setEnableHandcuffs(ped: Ped | Player | number, toggle: boolean): void; + + /** + * Used with SET_ENABLE_HANDCUFFS in decompiled scripts. From my observations, I have noticed that while being ragdolled you are not able to get up but you can still run. Your legs can also bend. + */ + export function setEnableBoundAnkles(ped: Ped | Player | number, toggle: boolean): void; + + /** + * Enables diving motion when underwater. + */ + export function setEnableScuba(ped: Ped | Player | number, toggle: boolean): void; + + /** + * Setting ped to true allows the ped to shoot "friendlies". + * p2 set to true when toggle is also true seams to make peds permanently unable to aim at, even if you set p2 back to false. + * p1 = false & p2 = false for unable to aim at. + * p1 = true & p2 = false for able to aim at. + */ + export function setCanAttackFriendly(ped: Ped | Player | number, toggle: boolean, p2: boolean): void; + + /** + * Returns the ped's alertness (0-3). + * Values : + * 0 : Neutral + * 1 : Heard something (gun shot, hit, etc) + * 2 : Knows (the origin of the event) + * 3 : Fully alerted (is facing the event?) + * If the Ped does not exist, returns -1. + */ + export function getPedAlertness(ped: Ped | Player | number): number; + + /** + * value ranges from 0 to 3. + */ + export function setPedAlertness(ped: Ped | Player | number, value: number): void; + + export function setPedGetOutUpsideDownVehicle(ped: Ped | Player | number, toggle: boolean): void; + + /** + * transitionSpeed is the time in seconds it takes to transition from one movement clipset to another. ransitionSpeed is usually 1.0f + * List of movement clipsets: + * Thanks to elsewhat for list. + * "ANIM_GROUP_MOVE_BALLISTIC" + * "ANIM_GROUP_MOVE_LEMAR_ALLEY" + * "clipset@move@trash_fast_turn" + * "FEMALE_FAST_RUNNER" + * "missfbi4prepp1_garbageman" + * "move_characters@franklin@fire" + * "move_characters@Jimmy@slow@" + * "move_characters@michael@fire" + * "move_f@flee@a" + * "move_f@scared" + * "move_f@sexy@a" + * "move_heist_lester" + * "move_injured_generic" + * "move_lester_CaneUp" + * "move_m@bag" + * "MOVE_M@BAIL_BOND_NOT_TAZERED" + * "MOVE_M@BAIL_BOND_TAZERED" + * "move_m@brave" + * "move_m@casual@d" + * "move_m@drunk@moderatedrunk" + * "MOVE_M@DRUNK@MODERATEDRUNK" + * "MOVE_M@DRUNK@MODERATEDRUNK_HEAD_UP" + * "MOVE_M@DRUNK@SLIGHTLYDRUNK" + * "MOVE_M@DRUNK@VERYDRUNK" + * "move_m@fire" + * "move_m@gangster@var_e" + * "move_m@gangster@var_f" + * "move_m@gangster@var_i" + * "move_m@JOG@" + * "MOVE_M@PRISON_GAURD" + * "MOVE_P_M_ONE" + * "MOVE_P_M_ONE_BRIEFCASE" + * "move_p_m_zero_janitor" + * "move_p_m_zero_slow" + * "move_ped_bucket" + * "move_ped_crouched" + * "move_ped_mop" + * "MOVE_M@FEMME@" + * "MOVE_F@FEMME@" + * "MOVE_M@GANGSTER@NG" + * "MOVE_F@GANGSTER@NG" + * "MOVE_M@POSH@" + * "MOVE_F@POSH@" + * "MOVE_M@TOUGH_GUY@" + * "MOVE_F@TOUGH_GUY@" + * ~ NotCrunchyTaco + * Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json + */ + export function setPedMovementClipset(ped: Ped | Player | number, clipSet: string, transitionSpeed: number): void; + + /** + * If p1 is 0.0, I believe you are back to normal. + * If p1 is 1.0, it looks like you can only rotate the ped, not walk. + * Using the following code to reset back to normal + * PED::RESET_PED_MOVEMENT_CLIPSET(PLAYER::PLAYER_PED_ID(), 0.0); + */ + export function resetPedMovementClipset(ped: Ped | Player | number, p1: number): void; + + /** + * Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json + */ + export function setPedStrafeClipset(ped: Ped | Player | number, clipSet: string): void; + + export function resetPedStrafeClipset(ped: Ped | Player | number): void; + + export function setPedWeaponMovementClipset(ped: Ped | Player | number, clipSet: string): void; + + export function resetPedWeaponMovementClipset(ped: Ped | Player | number): void; + + export function setPedDriveByClipsetOverride(ped: Ped | Player | number, clipset: string): void; + + export function clearPedDriveByClipsetOverride(ped: Ped | Player | number): void; + + /** + * Found in the b617d scripts: + * PED::SET_PED_MOTION_IN_COVER_CLIPSET_OVERRIDE(v_7, "trevor_heist_cover_2h"); + */ + export function setPedMotionInCoverClipsetOverride(ped: Ped | Player | number, p1: string): void; + + export function clearPedMotionInCoverClipsetOverride(ped: Ped | Player | number): void; + + export function clearPedFallUpperBodyClipsetOverride(ped: Ped | Player | number): void; + + /** + * PED::SET_PED_IN_VEHICLE_CONTEXT(l_128, MISC::GET_HASH_KEY("MINI_PROSTITUTE_LOW_PASSENGER")); + * PED::SET_PED_IN_VEHICLE_CONTEXT(l_128, MISC::GET_HASH_KEY("MINI_PROSTITUTE_LOW_RESTRICTED_PASSENGER")); + * PED::SET_PED_IN_VEHICLE_CONTEXT(l_3212, MISC::GET_HASH_KEY("MISS_FAMILY1_JIMMY_SIT")); + * PED::SET_PED_IN_VEHICLE_CONTEXT(l_3212, MISC::GET_HASH_KEY("MISS_FAMILY1_JIMMY_SIT_REAR")); + * PED::SET_PED_IN_VEHICLE_CONTEXT(l_95, MISC::GET_HASH_KEY("MISS_FAMILY2_JIMMY_BICYCLE")); + * PED::SET_PED_IN_VEHICLE_CONTEXT(num3, MISC::GET_HASH_KEY("MISSFBI2_MICHAEL_DRIVEBY")); + * PED::SET_PED_IN_VEHICLE_CONTEXT(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("MISS_ARMENIAN3_FRANKLIN_TENSE")); + * PED::SET_PED_IN_VEHICLE_CONTEXT(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("MISSFBI5_TREVOR_DRIVING")); + */ + export function setPedInVehicleContext(ped: Ped | Player | number, context: number): void; + + export function resetPedInVehicleContext(ped: Ped | Player | number): void; + + /** + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function isScriptedScenarioPedUsingConditionalAnim(ped: Ped | Player | number, animDict: string, anim: string): boolean; + + /** + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + * Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json + */ + export function setPedAlternateWalkAnim(ped: Ped | Player | number, animDict: string, animName: string, p3: number, p4: boolean): void; + + export function clearPedAlternateWalkAnim(ped: Ped | Player | number, p1: number): void; + + /** + * stance: + * 0 = idle + * 1 = walk + * 2 = running + * p5 = usually set to true + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + * Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json + */ + export function setPedAlternateMovementAnim(ped: Ped | Player | number, stance: number, animDictionary: string, animationName: string, p4: number, p5: boolean): void; - export function isPedGettingIntoAVehicle(ped: Player | number): boolean; - - export function isPedTryingToEnterALockedVehicle(ped: Player | number): boolean; - - /** - * @param ped can not pull out a weapon when true - */ - export function setEnableHandcuffs(ped: Player | number, toggle: boolean): void; - - /** - * Used with SET_ENABLE_HANDCUFFS in decompiled scripts. From my observations, I have noticed that while being ragdolled you are not able to get up but you can still run. Your legs can also bend. - */ - export function setEnableBoundAnkles(ped: Player | number, toggle: boolean): void; - - /** - * Enables diving motion when underwater. - */ - export function setEnableScuba(ped: Player | number, toggle: boolean): void; - - /** - * Setting ped to true allows the ped to shoot "friendlies". - * p1 = true & p2 = false for able to aim at. - * @param toggle = false & p2 = false for unable to aim at. - * @param p2 set to true when toggle is also true seams to make peds permanently unable to aim at, even if you set p2 back to false. - */ - export function setCanAttackFriendly(ped: Player | number, toggle: boolean, p2: boolean): void; - - /** - * Returns the ped's alertness (0-3). - * Values : - * 0 : Neutral - * 1 : Heard something (gun shot, hit, etc) - * 2 : Knows (the origin of the event) - * 3 : Fully alerted (is facing the event?) - * @returns If the Ped does not exist, returns -1. - */ - export function getPedAlertness(ped: Player | number): number; - - /** - * @param value ranges from 0 to 3. - */ - export function setPedAlertness(ped: Player | number, value: number): void; - - export function setPedGetOutUpsideDownVehicle(ped: Player | number, toggle: boolean): void; - - /** - * List of movement clipsets: - * Thanks to elsewhat for list. - * "ANIM_GROUP_MOVE_BALLISTIC" - * "ANIM_GROUP_MOVE_LEMAR_ALLEY" - * "clipset@move@trash_fast_turn" - * "FEMALE_FAST_RUNNER" - * "missfbi4prepp1_garbageman" - * "move_characters@franklin@fire" - * "move_characters@Jimmy@slow@" - * See NativeDB for reference: http://natives.altv.mp/#/0xAF8A94EDE7712BEF - * @param transitionSpeed is the time in seconds it takes to transition from one movement clipset to another. ransitionSpeed is usually 1.0f - */ - export function setPedMovementClipset(ped: Player | number, clipSet: string | null, transitionSpeed: number): void; - - /** - * If p1 is 0.0, I believe you are back to normal. - * If p1 is 1.0, it looks like you can only rotate the ped, not walk. - * Using the following code to reset back to normal - * @param ped :RESET_PED_MOVEMENT_CLIPSET(PLAYER::PLAYER_PED_ID(), 0.0); - */ - export function resetPedMovementClipset(ped: Player | number, p1: number): void; - - /** - * Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json - */ - export function setPedStrafeClipset(ped: Player | number, clipSet: string | null): void; - - export function resetPedStrafeClipset(ped: Player | number): void; - - export function setPedWeaponMovementClipset(ped: Player | number, clipSet: string | null): void; - - export function resetPedWeaponMovementClipset(ped: Player | number): void; - - export function setPedDriveByClipsetOverride(ped: Player | number, clipset: string | null): void; - - export function clearPedDriveByClipsetOverride(ped: Player | number): void; - - /** - * Found in the b617d scripts: - * @param ped :SET_PED_MOTION_IN_COVER_CLIPSET_OVERRIDE(v_7, "trevor_heist_cover_2h"); - */ - export function setPedMotionInCoverClipsetOverride(ped: Player | number, p1: string | null): void; - - export function clearPedMotionInCoverClipsetOverride(ped: Player | number): void; - - export function clearPedFallUpperBodyClipsetOverride(ped: Player | number): void; - - /** - * PED::SET_PED_IN_VEHICLE_CONTEXT(l_128, MISC::GET_HASH_KEY("MINI_PROSTITUTE_LOW_RESTRICTED_PASSENGER")); - * PED::SET_PED_IN_VEHICLE_CONTEXT(l_3212, MISC::GET_HASH_KEY("MISS_FAMILY1_JIMMY_SIT")); - * PED::SET_PED_IN_VEHICLE_CONTEXT(l_3212, MISC::GET_HASH_KEY("MISS_FAMILY1_JIMMY_SIT_REAR")); - * PED::SET_PED_IN_VEHICLE_CONTEXT(l_95, MISC::GET_HASH_KEY("MISS_FAMILY2_JIMMY_BICYCLE")); - * PED::SET_PED_IN_VEHICLE_CONTEXT(num3, MISC::GET_HASH_KEY("MISSFBI2_MICHAEL_DRIVEBY")); - * PED::SET_PED_IN_VEHICLE_CONTEXT(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("MISS_ARMENIAN3_FRANKLIN_TENSE")); - * PED::SET_PED_IN_VEHICLE_CONTEXT(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("MISSFBI5_TREVOR_DRIVING")); - * @param ped :SET_PED_IN_VEHICLE_CONTEXT(l_128, MISC::GET_HASH_KEY("MINI_PROSTITUTE_LOW_PASSENGER")); - */ - export function setPedInVehicleContext(ped: Player | number, context: number): void; - - export function resetPedInVehicleContext(ped: Player | number): void; + export function clearPedAlternateMovementAnim(ped: Ped | Player | number, stance: number, p2: number): void; /** - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - */ - export function isScriptedScenarioPedUsingConditionalAnim(ped: Player | number, animDict: string | null, anim: string | null): boolean; + * From the scripts: + * PED::SET_PED_GESTURE_GROUP(PLAYER::PLAYER_PED_ID(), + * "ANIM_GROUP_GESTURE_MISS_FRA0"); + * PED::SET_PED_GESTURE_GROUP(PLAYER::PLAYER_PED_ID(), + * "ANIM_GROUP_GESTURE_MISS_DocksSetup1"); + */ + export function setPedGestureGroup(ped: Ped | Player | number, animGroupGesture: string): void; /** - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - * Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json - */ - export function setPedAlternateWalkAnim(ped: Player | number, animDict: string | null, animName: string | null, p3: number, p4: boolean): void; - - export function clearPedAlternateWalkAnim(ped: Player | number, p1: number): void; - - /** - * 0 = idle - * 1 = walk - * 2 = running - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - * Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json - * @param p5 = usually set to true - */ - export function setPedAlternateMovementAnim(ped: Player | number, stance: number, animDictionary: string | null, animationName: string | null, p4: number, p5: boolean): void; - - export function clearPedAlternateMovementAnim(ped: Player | number, stance: number, p2: number): void; - - /** - * From the scripts: - * "ANIM_GROUP_GESTURE_MISS_FRA0"); - * PED::SET_PED_GESTURE_GROUP(PLAYER::PLAYER_PED_ID(), - * "ANIM_GROUP_GESTURE_MISS_DocksSetup1"); - * @param ped :SET_PED_GESTURE_GROUP(PLAYER::PLAYER_PED_ID(), - */ - export function setPedGestureGroup(ped: Player | number, animGroupGesture: string | null): void; - - /** - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - */ - export function getAnimInitialOffsetPosition(animDict: string | null, animName: string | null, x: number, y: number, z: number, xRot: number, yRot: number, zRot: number, p8: number, p9: number): Vector3; + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function getAnimInitialOffsetPosition(animDict: string, animName: string, x: number, y: number, z: number, xRot: number, yRot: number, zRot: number, p8: number, p9: number): Vector3; /** - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - */ - export function getAnimInitialOffsetRotation(animDict: string | null, animName: string | null, x: number, y: number, z: number, xRot: number, yRot: number, zRot: number, p8: number, p9: number): Vector3; + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function getAnimInitialOffsetRotation(animDict: string, animName: string, x: number, y: number, z: number, xRot: number, yRot: number, zRot: number, p8: number, p9: number): Vector3; /** - * Ids - * 0 - Head - * 1 - Beard - * 2 - Hair - * 3 - Torso - * 4 - Legs - * 5 - Hands - * 6 - Foot - * 7 - ------ - * See NativeDB for reference: http://natives.altv.mp/#/0x67F3780DD425D4FC - */ - export function getPedDrawableVariation(ped: Player | number, componentId: number): number; + * Ids + * 0 - Head + * 1 - Beard + * 2 - Hair + * 3 - Torso + * 4 - Legs + * 5 - Hands + * 6 - Foot + * 7 - ------ + * 8 - Accessories 1 + * 9 - Accessories 2 + * 10- Decals + * 11 - Auxiliary parts for torso + */ + export function getPedDrawableVariation(ped: Ped | Player | number, componentId: number): number; /** - * List of component/props ID - * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html - */ - export function getNumberOfPedDrawableVariations(ped: Player | number, componentId: number): number; + * List of component/props ID + * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html + */ + export function getNumberOfPedDrawableVariations(ped: Ped | Player | number, componentId: number): number; /** - * List of component/props ID - * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html - */ - export function getPedTextureVariation(ped: Player | number, componentId: number): number; + * List of component/props ID + * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html + */ + export function getPedTextureVariation(ped: Ped | Player | number, componentId: number): number; /** - * List of component/props ID - * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html - */ - export function getNumberOfPedTextureVariations(ped: Player | number, componentId: number, drawableId: number): number; + * List of component/props ID + * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html + */ + export function getNumberOfPedTextureVariations(ped: Ped | Player | number, componentId: number, drawableId: number): number; /** - * List of component/props ID - * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html - */ - export function getNumberOfPedPropDrawableVariations(ped: Player | number, propId: number): number; + * List of component/props ID + * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html + */ + export function getNumberOfPedPropDrawableVariations(ped: Ped | Player | number, propId: number): number; /** - * Need to check behavior when drawableId = -1 - * - Doofy.Ass - * GET_NUMBER_OF_PED_PROP_TEXTURE_VARIATIONS(PLAYER.PLAYER_PED_ID(), 0, 5) - * tick: scripts/addins/menu_execute.lua:51: attempt to call field 'GET_NUMBER_OF_PED_PROP_TEXTURE_VARIATIONS' (a nil value) - * List of component/props ID - * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html - * @returns Why this function doesn't work and return nill value? - */ - export function getNumberOfPedPropTextureVariations(ped: Player | number, propId: number, drawableId: number): number; + * Need to check behavior when drawableId = -1 + * - Doofy.Ass + * Why this function doesn't work and return nill value? + * GET_NUMBER_OF_PED_PROP_TEXTURE_VARIATIONS(PLAYER.PLAYER_PED_ID(), 0, 5) + * tick: scripts/addins/menu_execute.lua:51: attempt to call field 'GET_NUMBER_OF_PED_PROP_TEXTURE_VARIATIONS' (a nil value) + * List of component/props ID + * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html + */ + export function getNumberOfPedPropTextureVariations(ped: Ped | Player | number, propId: number, drawableId: number): number; /** - * List of component/props ID - * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html - */ - export function getPedPaletteVariation(ped: Player | number, componentId: number): number; + * List of component/props ID + * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html + */ + export function getPedPaletteVariation(ped: Ped | Player | number, componentId: number): number; export function getMpOutfitDataFromMetadata(p0?: any, p1?: any): [boolean, any, any]; @@ -14396,149 +15462,200 @@ declare module "natives" { export function getFmFemaleShopPedApparelItemIndex(p0: number): number; /** - * Checks if the component variation is valid, this works great for randomizing components using loops. - * List of component/props ID - * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html - * Full list of ped components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pedComponentVariations.json - */ - export function isPedComponentVariationValid(ped: Player | number, componentId: number, drawableId: number, textureId: number): boolean; - - /** - * enum ePedVarComp - * { - * PV_COMP_INVALID = -1, - * PV_COMP_HEAD, - * PV_COMP_BERD, - * PV_COMP_HAIR, - * PV_COMP_UPPR, - * PV_COMP_LOWR, - * PV_COMP_HAND, - * See NativeDB for reference: http://natives.altv.mp/#/0x262B14F48D29DE80 - * @param paletteId 0 to 3. - */ - export function setPedComponentVariation(ped: Player | number, componentId: number, drawableId: number, textureId: number, paletteId: number): void; - - /** - * List of component/props ID - * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html - * @param p1 is always 0 in R* scripts. - */ - export function setPedRandomComponentVariation(ped: Player | number, p1: number): void; - - /** - * List of component/props ID - * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html - */ - export function setPedRandomProps(ped: Player | number): void; - - /** - * Sets Ped Default Clothes - */ - export function setPedDefaultComponentVariation(ped: Player | number): void; - - export function setPedBlendFromParents(ped: Player | number, p1: any, p2: any, p3: number, p4: number): void; - - /** - * The "shape" parameters control the shape of the ped's face. The "skin" parameters control the skin tone. ShapeMix and skinMix control how much the first and second IDs contribute,(typically mother and father.) ThirdMix overrides the others in favor of the third IDs. IsParent is set for "children" of the player character's grandparents during old-gen character creation. It has unknown effect otherwise. - * The IDs start at zero and go Male Non-DLC, Female Non-DLC, Male DLC, and Female DLC. - * !!!Can someone add working example for this??? - * try this: - * headBlendData headData; - * GET_PED_HEAD_BLEND_DATA(PLAYER_PED_ID(), &headData); - * SET_PED_HEAD_BLEND_DATA(PLAYER_PED_ID(), headData.shapeFirst, headData.shapeSecond, headData.shapeThird, headData.skinFirst, headData.skinSecond - * , headData.skinThird, headData.shapeMix, headData.skinMix, headData.skinThird, 0); - * For more info please refer to this topic. - * gtaforums.com/topic/858970-all-gtao-face-ids-pedset-ped-head-blend-data-explained - */ - export function setPedHeadBlendData(ped: Player | number, shapeFirstID: number, shapeSecondID: number, shapeThirdID: number, skinFirstID: number, skinSecondID: number, skinThirdID: number, shapeMix: number, skinMix: number, thirdMix: number, isParent: boolean): void; - - /** - * The pointer is to a padded struct that matches the arguments to SET_PED_HEAD_BLEND_DATA(...). There are 4 bytes of padding after each field. - * pass this struct in the second parameter - * struct headBlendData - * { - * int shapeFirst; - * int padding1; - * int shapeSecond; - * int padding2; - * int shapeThird; - * See NativeDB for reference: http://natives.altv.mp/#/0x2746BD9D88C5C5D0 - */ - export function getPedHeadBlendData(ped: Player | number, headBlendData?: any): [boolean, any]; - - /** - * See SET_PED_HEAD_BLEND_DATA(). - */ - export function updatePedHeadBlendData(ped: Player | number, shapeMix: number, skinMix: number, thirdMix: number): void; - - /** - * Used for freemode (online) characters. - * For some reason, the scripts use a rounded float for the index. - * Indexes: - * 1. black - * 2. very light blue/green - * 3. dark blue - * 4. brown - * 5. darker brown - * 6. light brown - * See NativeDB for reference: http://natives.altv.mp/#/0x50B56988B170AFDF - */ - export function setHeadBlendEyeColor(ped: Player | number, index: number): void; - - /** - * @returns A getter for _SET_PED_EYE_COLOR. Returns -1 if fails to get. - */ - export function getHeadBlendEyeColor(ped: Player | number): number; - - /** - * overlayID Part Index, to disable - * 0 Blemishes 0 - 23, 255 - * 1 Facial Hair 0 - 28, 255 - * 2 Eyebrows 0 - 33, 255 - * 3 Ageing 0 - 14, 255 - * 4 Makeup 0 - 74, 255 - * 5 Blush 0 - 6, 255 - * 6 Complexion 0 - 11, 255 - * 7 Sun Damage 0 - 10, 255 - * See NativeDB for reference: http://natives.altv.mp/#/0x48F44967FA05CC1E - * @param overlayID ranges from 0 to 12, index from 0 to _GET_NUM_OVERLAY_VALUES(overlayID)-1, and opacity from 0.0 to 1.0. - */ - export function setPedHeadOverlay(ped: Player | number, overlayID: number, index: number, opacity: number): void; - - /** - * This might be the once removed native GET_PED_HEAD_OVERLAY. - * @returns Likely a char, if that overlay is not set, e.i. "None" option, returns 255; - */ - export function getPedHeadOverlay(ped: Player | number, overlayID: number): number; + * Checks if the component variation is valid, this works great for randomizing components using loops. + * List of component/props ID + * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html + * Full list of ped components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pedComponentVariations.json + */ + export function isPedComponentVariationValid(ped: Ped | Player | number, componentId: number, drawableId: number, textureId: number): boolean; + + /** + * paletteId: 0 to 3. + * componentId: + * enum ePedVarComp + * { + * PV_COMP_INVALID = -1, + * PV_COMP_HEAD, + * PV_COMP_BERD, + * PV_COMP_HAIR, + * PV_COMP_UPPR, + * PV_COMP_LOWR, + * PV_COMP_HAND, + * PV_COMP_FEET, + * PV_COMP_TEEF, + * PV_COMP_ACCS, + * PV_COMP_TASK, + * PV_COMP_DECL, + * PV_COMP_JBIB, + * PV_COMP_MAX + * }; + * Examples: https://gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html + * Full list of ped components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pedComponentVariations.json + */ + export function setPedComponentVariation(ped: Ped | Player | number, componentId: number, drawableId: number, textureId: number, paletteId: number): void; + + /** + * p1 is always 0 in R* scripts. + * List of component/props ID + * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html + */ + export function setPedRandomComponentVariation(ped: Ped | Player | number, p1: number): void; + + /** + * List of component/props ID + * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html + */ + export function setPedRandomProps(ped: Ped | Player | number): void; + + /** + * Sets Ped Default Clothes + */ + export function setPedDefaultComponentVariation(ped: Ped | Player | number): void; + + export function setPedBlendFromParents(ped: Ped | Player | number, p1: any, p2: any, p3: number, p4: number): void; + + /** + * The "shape" parameters control the shape of the ped's face. The "skin" parameters control the skin tone. ShapeMix and skinMix control how much the first and second IDs contribute,(typically mother and father.) ThirdMix overrides the others in favor of the third IDs. IsParent is set for "children" of the player character's grandparents during old-gen character creation. It has unknown effect otherwise. + * The IDs start at zero and go Male Non-DLC, Female Non-DLC, Male DLC, and Female DLC. + * !!!Can someone add working example for this??? + * try this: + * headBlendData headData; + * GET_PED_HEAD_BLEND_DATA(PLAYER_PED_ID(), &headData); + * SET_PED_HEAD_BLEND_DATA(PLAYER_PED_ID(), headData.shapeFirst, headData.shapeSecond, headData.shapeThird, headData.skinFirst, headData.skinSecond + * , headData.skinThird, headData.shapeMix, headData.skinMix, headData.skinThird, 0); + * For more info please refer to this topic. + * gtaforums.com/topic/858970-all-gtao-face-ids-pedset-ped-head-blend-data-explained + */ + export function setPedHeadBlendData(ped: Ped | Player | number, shapeFirstID: number, shapeSecondID: number, shapeThirdID: number, skinFirstID: number, skinSecondID: number, skinThirdID: number, shapeMix: number, skinMix: number, thirdMix: number, isParent: boolean): void; + + /** + * The pointer is to a padded struct that matches the arguments to SET_PED_HEAD_BLEND_DATA(...). There are 4 bytes of padding after each field. + * pass this struct in the second parameter + * struct headBlendData + * { + * int shapeFirst; + * int padding1; + * int shapeSecond; + * int padding2; + * int shapeThird; + * int padding3; + * int skinFirst; + * int padding4; + * int skinSecond; + * int padding5; + * int skinThird; + * int padding6; + * float shapeMix; + * int padding7; + * float skinMix; + * int padding8; + * float thirdMix; + * int padding9; + * bool isParent; + * }; + */ + export function getPedHeadBlendData(ped: Ped | Player | number, headBlendData?: any): [boolean, any]; + + /** + * See SET_PED_HEAD_BLEND_DATA(). + */ + export function updatePedHeadBlendData(ped: Ped | Player | number, shapeMix: number, skinMix: number, thirdMix: number): void; + + /** + * Used for freemode (online) characters. + * For some reason, the scripts use a rounded float for the index. + * Indexes: + * 1. black + * 2. very light blue/green + * 3. dark blue + * 4. brown + * 5. darker brown + * 6. light brown + * 7. blue + * 8. light blue + * 9. pink + * 10. yellow + * 11. purple + * 12. black + * 13. dark green + * 14. light brown + * 15. yellow/black pattern + * 16. light colored spiral pattern + * 17. shiny red + * 18. shiny half blue/half red + * 19. half black/half light blue + * 20. white/red perimter + * 21. green snake + * 22. red snake + * 23. dark blue snake + * 24. dark yellow + * 25. bright yellow + * 26. all black + * 28. red small pupil + * 29. devil blue/black + * 30. white small pupil + * 31. glossed over + */ + export function setHeadBlendEyeColor(ped: Ped | Player | number, index: number): void; + + /** + * A getter for _SET_PED_EYE_COLOR. Returns -1 if fails to get. + */ + export function getHeadBlendEyeColor(ped: Ped | Player | number): number; + + /** + * OverlayID ranges from 0 to 12, index from 0 to _GET_NUM_OVERLAY_VALUES(overlayID)-1, and opacity from 0.0 to 1.0. + * overlayID Part Index, to disable + * 0 Blemishes 0 - 23, 255 + * 1 Facial Hair 0 - 28, 255 + * 2 Eyebrows 0 - 33, 255 + * 3 Ageing 0 - 14, 255 + * 4 Makeup 0 - 74, 255 + * 5 Blush 0 - 6, 255 + * 6 Complexion 0 - 11, 255 + * 7 Sun Damage 0 - 10, 255 + * 8 Lipstick 0 - 9, 255 + * 9 Moles/Freckles 0 - 17, 255 + * 10 Chest Hair 0 - 16, 255 + * 11 Body Blemishes 0 - 11, 255 + * 12 Add Body Blemishes 0 - 1, 255 + */ + export function setPedHeadOverlay(ped: Ped | Player | number, overlayID: number, index: number, opacity: number): void; + + /** + * Likely a char, if that overlay is not set, e.i. "None" option, returns 255; + * This might be the once removed native GET_PED_HEAD_OVERLAY. + */ + export function getPedHeadOverlay(ped: Ped | Player | number, overlayID: number): number; export function getPedHeadOverlayNum(overlayID: number): number; /** - * Called after SET_PED_HEAD_OVERLAY(). - * @param colorType is 1 for eyebrows, beards, and chest hair; 2 for blush and lipstick; and 0 otherwise, though not called in those cases. - */ - export function setPedHeadOverlayTint(ped: Player | number, overlayID: number, colorType: number, colorID: number, secondColorID: number): void; + * ColorType is 1 for eyebrows, beards, and chest hair; 2 for blush and lipstick; and 0 otherwise, though not called in those cases. + * Called after SET_PED_HEAD_OVERLAY(). + */ + export function setPedHeadOverlayTint(ped: Ped | Player | number, overlayID: number, colorType: number, colorID: number, secondColorID: number): void; - export function setPedHairTint(ped: Player | number, colorID: number, highlightColorID: number): void; + export function setPedHairTint(ped: Ped | Player | number, colorID: number, highlightColorID: number): void; export function getNumPedHairTints(): number; export function getNumPedMakeupTints(): number; /** - * Input: Haircolor index, value between 0 and 63 (inclusive). - * Output: RGB values for the haircolor specified in the input. - * This is used with the hair color swatches scaleform. - * Use `GET_PED_MAKEUP_TINT_COLOR` to get the makeup colors. - */ + * Input: Haircolor index, value between 0 and 63 (inclusive). + * Output: RGB values for the haircolor specified in the input. + * This is used with the hair color swatches scaleform. + * Use `GET_PED_MAKEUP_TINT_COLOR` to get the makeup colors. + */ export function getPedHairTintColor(hairColorIndex: number, outR?: number, outG?: number, outB?: number): [void, number, number, number]; /** - * Input: Makeup color index, value between 0 and 63 (inclusive). - * Output: RGB values for the makeup color specified in the input. - * This is used with the makeup color swatches scaleform. - * Use `GET_PED_HAIR_TINT_COLOR` to get the hair colors. - */ + * Input: Makeup color index, value between 0 and 63 (inclusive). + * Output: RGB values for the makeup color specified in the input. + * This is used with the makeup color swatches scaleform. + * Use `GET_PED_HAIR_TINT_COLOR` to get the hair colors. + */ export function getPedMakeupTintColor(makeupColorIndex: number, outR?: number, outG?: number, outB?: number): [void, number, number, number]; export function isPedHairTintForCreator(colorId: number): boolean; @@ -14562,992 +15679,1709 @@ declare module "natives" { export function getTintIndexForLastGenHairTexture(modelHash: number, drawableId: number, textureId: number): number; /** - * Sets the various freemode face features, e.g. nose length, chin shape. Scale ranges from -1.0 to 1.0. - * 0 - Nose Width (Thin/Wide) - * 1 - Nose Peak (Up/Down) - * 2 - Nose Length (Long/Short) - * 3 - Nose Bone Curveness (Crooked/Curved) - * 4 - Nose Tip (Up/Down) - * 5 - Nose Bone Twist (Left/Right) - * 6 - Eyebrow (Up/Down) - * 7 - Eyebrow (In/Out) - * See NativeDB for reference: http://natives.altv.mp/#/0x71A5C1DBA060049E - */ - export function setPedMicroMorph(ped: Player | number, index: number, scale: number): void; - - export function hasPedHeadBlendFinished(ped: Player | number): boolean; - - export function finalizeHeadBlend(ped: Player | number): void; - - /** - * Preview: https://gfycat.com/MaleRareAmazonparrot - * @param id seems to vary from 0 to 3. - */ - export function setHeadBlendPaletteColor(ped: Player | number, r: number, g: number, b: number, id: number): void; - - export function disableHeadBlendPaletteColor(ped: Player | number): void; - - /** - * Used when calling SET_PED_HEAD_BLEND_DATA. - * @param type equals 0 for male non-dlc, 1 for female non-dlc, 2 for male dlc, and 3 for female dlc. - */ + * Sets the various freemode face features, e.g. nose length, chin shape. Scale ranges from -1.0 to 1.0. + * 0 - Nose Width (Thin/Wide) + * 1 - Nose Peak (Up/Down) + * 2 - Nose Length (Long/Short) + * 3 - Nose Bone Curveness (Crooked/Curved) + * 4 - Nose Tip (Up/Down) + * 5 - Nose Bone Twist (Left/Right) + * 6 - Eyebrow (Up/Down) + * 7 - Eyebrow (In/Out) + * 8 - Cheek Bones (Up/Down) + * 9 - Cheek Sideways Bone Size (In/Out) + * 10 - Cheek Bones Width (Puffed/Gaunt) + * 11 - Eye Opening (Both) (Wide/Squinted) + * 12 - Lip Thickness (Both) (Fat/Thin) + * 13 - Jaw Bone Width (Narrow/Wide) + * 14 - Jaw Bone Shape (Round/Square) + * 15 - Chin Bone (Up/Down) + * 16 - Chin Bone Length (In/Out or Backward/Forward) + * 17 - Chin Bone Shape (Pointed/Square) + * 18 - Chin Hole (Chin Bum) + * 19 - Neck Thickness (Thin/Thick) + */ + export function setPedMicroMorph(ped: Ped | Player | number, index: number, scale: number): void; + + export function hasPedHeadBlendFinished(ped: Ped | Player | number): boolean; + + export function finalizeHeadBlend(ped: Ped | Player | number): void; + + /** + * p4 seems to vary from 0 to 3. + * Preview: https://gfycat.com/MaleRareAmazonparrot + */ + export function setHeadBlendPaletteColor(ped: Ped | Player | number, r: number, g: number, b: number, id: number): void; + + export function disableHeadBlendPaletteColor(ped: Ped | Player | number): void; + + /** + * Type equals 0 for male non-dlc, 1 for female non-dlc, 2 for male dlc, and 3 for female dlc. + * Used when calling SET_PED_HEAD_BLEND_DATA. + */ export function getPedHeadBlendFirstIndex(type: number): number; /** - * @param type equals 0 for male non-dlc, 1 for female non-dlc, 2 for male dlc, and 3 for female dlc. - */ + * Type equals 0 for male non-dlc, 1 for female non-dlc, 2 for male dlc, and 3 for female dlc. + */ export function getPedHeadBlendNumHeads(type: number): number; /** - * from extreme3.c4 - * @param ped :SET_PED_PRELOAD_VARIATION_DATA(PLAYER::PLAYER_PED_ID(), 8, PED::GET_PED_DRAWABLE_VARIATION(PLAYER::PLAYER_PED_ID(), 8), PED::GET_PED_TEXTURE_VARIATION(PLAYER::PLAYER_PED_ID(), 8)); - * @param slot is probably componentId - */ - export function setPedPreloadVariationData(ped: Player | number, slot: number, drawableId: number, textureId: number): number; + * from extreme3.c4 + * PED::SET_PED_PRELOAD_VARIATION_DATA(PLAYER::PLAYER_PED_ID(), 8, PED::GET_PED_DRAWABLE_VARIATION(PLAYER::PLAYER_PED_ID(), 8), PED::GET_PED_TEXTURE_VARIATION(PLAYER::PLAYER_PED_ID(), 8)); + * p1 is probably componentId + */ + export function setPedPreloadVariationData(ped: Ped | Player | number, slot: number, drawableId: number, textureId: number): number; - export function hasPedPreloadVariationDataFinished(ped: Player | number): boolean; + export function hasPedPreloadVariationDataFinished(ped: Ped | Player | number): boolean; - export function releasePedPreloadVariationData(ped: Player | number): void; + export function releasePedPreloadVariationData(ped: Ped | Player | number): void; /** - * List of component/props ID - * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html - */ - export function setPedPreloadPropData(ped: Player | number, componentId: number, drawableId: number, TextureId: number): number; + * List of component/props ID + * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html + */ + export function setPedPreloadPropData(ped: Ped | Player | number, componentId: number, drawableId: number, TextureId: number): number; - export function hasPedPreloadPropDataFinished(ped: Player | number): boolean; + export function hasPedPreloadPropDataFinished(ped: Ped | Player | number): boolean; - export function releasePedPreloadPropData(ped: Player | number): void; + export function releasePedPreloadPropData(ped: Ped | Player | number): void; /** - * List of component/props ID - * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html - */ - export function getPedPropIndex(ped: Player | number, componentId: number, p2: any): number; + * List of component/props ID + * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html + */ + export function getPedPropIndex(ped: Ped | Player | number, componentId: number, p2: any): number; /** - * enum PedPropsData - * { - * PED_PROP_HATS = 0, - * PED_PROP_GLASSES = 1, - * PED_PROP_EARS = 2, - * PED_PROP_WATCHES = 3, - * }; - * List of component/props ID - * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html - * @param ped SET_PED_PROP_INDEX(playerPed, PED_PROP_HATS, GET_NUMBER_OF_PED_PROP_DRAWABLE_VARIATIONS(playerPed, PED_PROP_HATS), GET_NUMBER_OF_PED_PROP_TEXTURE_VARIATIONS(playerPed, PED_PROP_HATS, 0), TRUE); - * @param componentId can be set to various things based on what category you're wanting to set - */ - export function setPedPropIndex(ped: Player | number, componentId: number, drawableId: number, TextureId: number, attach: boolean, p5: any): void; + * ComponentId can be set to various things based on what category you're wanting to set + * enum PedPropsData + * { + * PED_PROP_HATS = 0, + * PED_PROP_GLASSES = 1, + * PED_PROP_EARS = 2, + * PED_PROP_WATCHES = 3, + * }; + * Usage: SET_PED_PROP_INDEX(playerPed, PED_PROP_HATS, GET_NUMBER_OF_PED_PROP_DRAWABLE_VARIATIONS(playerPed, PED_PROP_HATS), GET_NUMBER_OF_PED_PROP_TEXTURE_VARIATIONS(playerPed, PED_PROP_HATS, 0), TRUE); + * List of component/props ID + * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html + */ + export function setPedPropIndex(ped: Ped | Player | number, componentId: number, drawableId: number, TextureId: number, attach: boolean, p5: any): void; /** - * List of component/props ID - * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html - */ - export function knockOffPedProp(ped: Player | number, p1: boolean, p2: boolean, p3: boolean, p4: boolean): void; + * List of component/props ID + * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html + */ + export function knockOffPedProp(ped: Ped | Player | number, p1: boolean, p2: boolean, p3: boolean, p4: boolean): void; /** - * List of component/props ID - * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html - */ - export function clearPedProp(ped: Player | number, propId: number, p2: any): void; + * List of component/props ID + * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html + */ + export function clearPedProp(ped: Ped | Player | number, propId: number, p2: any): void; /** - * List of component/props ID - * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html - */ - export function clearAllPedProps(ped: Player | number, p1: any): void; + * List of component/props ID + * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html + */ + export function clearAllPedProps(ped: Ped | Player | number, p1: any): void; - export function dropAmbientProp(ped: Player | number): void; + export function dropAmbientProp(ped: Ped | Player | number): void; /** - * List of component/props ID - * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html - */ - export function getPedPropTextureIndex(ped: Player | number, componentId: number): number; + * List of component/props ID + * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html + */ + export function getPedPropTextureIndex(ped: Ped | Player | number, componentId: number): number; - export function clearPedParachutePackVariation(ped: Player | number): void; + export function clearPedParachutePackVariation(ped: Ped | Player | number): void; /** - * This native sets a scuba mask for freemode models and an oxygen bottle for player_* models. It works on freemode and player_* models. - */ - export function setPedScubaGearVariation(ped: Player | number): void; + * This native sets a scuba mask for freemode models and an oxygen bottle for player_* models. It works on freemode and player_* models. + */ + export function setPedScubaGearVariation(ped: Ped | Player | number): void; /** - * Removes the scubagear (for mp male: component id: 8, drawableId: 123, textureId: any) from peds. Does not play the 'remove scuba gear' animation, but instantly removes it. - */ - export function clearPedScubaGearVariation(ped: Player | number): void; + * Removes the scubagear (for mp male: component id: 8, drawableId: 123, textureId: any) from peds. Does not play the 'remove scuba gear' animation, but instantly removes it. + */ + export function clearPedScubaGearVariation(ped: Ped | Player | number): void; export function isUsingPedScubaGearVariation(p0: any): boolean; /** - * works with TASK::TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS to make a ped completely oblivious to all events going on around him - */ - export function setBlockingOfNonTemporaryEvents(ped: Player | number, toggle: boolean): void; - - export function setPedBoundsOrientation(ped: Player | number, p1: number, p2: number, x: number, y: number, z: number): void; - - /** - * l_216 = RECSBRobber1 - * @param ped :REGISTER_TARGET(l_216, PLAYER::PLAYER_PED_ID()); from re_prisonbreak.txt. - */ - export function registerTarget(ped: Player | number, target: Player | number): void; - - /** - * Based on TASK_COMBAT_HATED_TARGETS_AROUND_PED, the parameters are likely similar (PedHandle, and area to attack in). - */ - export function registerHatedTargetsAroundPed(ped: Player | number, radius: number): void; - - /** - * Gets a random ped in the x/y/zRadius near the x/y/z coordinates passed. - * Ped Types: - * Any = -1 - * Player = 1 - * Male = 4 - * Female = 5 - * Cop = 6 - * Human = 26 - * SWAT = 27 - * See NativeDB for reference: http://natives.altv.mp/#/0x876046A8E3A4B71C - */ - export function getRandomPedAtCoord(x: number, y: number, z: number, xRadius: number, yRadius: number, zRadius: number, pedType: number): number; - - /** - * Gets the closest ped in a radius. - * Ped Types: - * Any ped = -1 - * Player = 1 - * Male = 4 - * Female = 5 - * Cop = 6 - * Human = 26 - * SWAT = 27 - * See NativeDB for reference: http://natives.altv.mp/#/0xC33AB876A77F8164 - * @param x 1 1 x = return Ped you are using - * @param p4 P5 P7 P8 - * @returns 1 0 x x = return nearest walking Ped - */ - export function getClosestPed(x: number, y: number, z: number, radius: number, p4: boolean, p5: boolean, outPed: Player | number | null, p7: boolean, p8: boolean, pedType: number): [boolean, number]; - - /** - * @returns Sets a value indicating whether scenario peds should be returned by the next call to a command that returns peds. Eg. GET_CLOSEST_PED. - */ + * works with TASK::TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS to make a ped completely oblivious to all events going on around him + */ + export function setBlockingOfNonTemporaryEvents(ped: Ped | Player | number, toggle: boolean): void; + + export function setPedBoundsOrientation(ped: Ped | Player | number, p1: number, p2: number, x: number, y: number, z: number): void; + + /** + * PED::REGISTER_TARGET(l_216, PLAYER::PLAYER_PED_ID()); from re_prisonbreak.txt. + * l_216 = RECSBRobber1 + */ + export function registerTarget(ped: Ped | Player | number, target: Ped | Player | number): void; + + /** + * Based on TASK_COMBAT_HATED_TARGETS_AROUND_PED, the parameters are likely similar (PedHandle, and area to attack in). + */ + export function registerHatedTargetsAroundPed(ped: Ped | Player | number, radius: number): void; + + /** + * Gets a random ped in the x/y/zRadius near the x/y/z coordinates passed. + * Ped Types: + * Any = -1 + * Player = 1 + * Male = 4 + * Female = 5 + * Cop = 6 + * Human = 26 + * SWAT = 27 + * Animal = 28 + * Army = 29 + */ + export function getRandomPedAtCoord(x: number, y: number, z: number, xRadius: number, yRadius: number, zRadius: number, pedType: number): Ped | Player | number; + + /** + * Gets the closest ped in a radius. + * Ped Types: + * Any ped = -1 + * Player = 1 + * Male = 4 + * Female = 5 + * Cop = 6 + * Human = 26 + * SWAT = 27 + * Animal = 28 + * Army = 29 + * ------------------ + * P4 P5 P7 P8 + * 1 0 x x = return nearest walking Ped + * 1 x 0 x = return nearest walking Ped + * x 1 1 x = return Ped you are using + * 0 0 x x = no effect + * 0 x 0 x = no effect + * x = can be 1 or 0. Does not have any obvious changes. + * This function does not return ped who is: + * 1. Standing still + * 2. Driving + * 3. Fleeing + * 4. Attacking + * This function only work if the ped is: + * 1. walking normally. + * 2. waiting to cross a road. + * Note: PED::GET_PED_NEARBY_PEDS works for more peds. + */ + export function getClosestPed(x: number, y: number, z: number, radius: number, p4: boolean, p5: boolean, outPed: Ped | Player | number, p7: boolean, p8: boolean, pedType: number): [boolean, Ped | Player | number]; + + /** + * Sets a value indicating whether scenario peds should be returned by the next call to a command that returns peds. Eg. GET_CLOSEST_PED. + */ export function setScenarioPedsToBeReturnedByNextCommand(value: boolean): void; - export function getCanPedBeGrabbedByScript(ped: Player | number, p1: boolean, p2: boolean, p3: boolean, p4: boolean, p5: boolean, p6: boolean, p7: boolean, p8: any): boolean; - - /** - * Scripts use 0.2, 0.5 and 1.0. Value must be >= 0.0 && <= 1.0 - */ - export function setDriverRacingModifier(driver: Player | number, modifier: number): void; - - /** - * The function specifically verifies the value is equal to, or less than 1.0f. If it is greater than 1.0f, the function does nothing at all. - */ - export function setDriverAbility(driver: Player | number, ability: number): void; - - /** - * range 0.0f - 1.0f - */ - export function setDriverAggressiveness(driver: Player | number, aggressiveness: number): void; - - /** - * Prevents the ped from going limp. - * [Example: Can prevent peds from falling when standing on moving vehicles.] - */ - export function canPedRagdoll(ped: Player | number): boolean; - - /** - * Ragdoll Types: - * **0**: CTaskNMRelax - * **1**: CTaskNMScriptControl: Hardcoded not to work in networked environments. - * **Else**: CTaskNMBalance - * time1- Time(ms) Ped is in ragdoll mode; only applies to ragdoll types 0 and not 1. - * time2- Unknown time, in milliseconds - * ragdollType- - * 0 : Normal ragdoll - * 1 : Falls with stiff legs/body - * See NativeDB for reference: http://natives.altv.mp/#/0xAE99FB955581844A - * @param p4 Unused in TU27 - * @param p5 No idea. In R*'s scripts they are usually either "true, true, false" or "false, false, false". - */ - export function setPedToRagdoll(ped: Player | number, time1: number, time2: number, ragdollType: number, p4: boolean, p5: boolean, p6: boolean): boolean; - - /** - * Return variable is never used in R*'s scripts. - * Not sure what p2 does. It seems like it would be a time judging by it's usage in R*'s scripts, but didn't seem to affect anything in my testings. - * enum eRagdollType - * { - * RD_MALE=0, - * RD_FEMALE = 1, - * RD_MALE_LARGE = 2, - * RD_CUSTOM = 3, - * } - * See NativeDB for reference: http://natives.altv.mp/#/0xD76632D99E4966C8 - * @param ped :set_ped_to_ragdoll_with_fall(ped, 1500, 2000, 1, -entity::get_entity_forward_vector(ped), 1f, 0f, 0f, 0f, 0f, 0f, 0f); - * @param p8 to p13 are always 0f in R*'s scripts. - */ - export function setPedToRagdollWithFall(ped: Player | number, time: number, p2: number, ragdollType: number, x: number, y: number, z: number, velocity: number, p8: number, p9: number, p10: number, p11: number, p12: number, p13: number): boolean; - - /** - * Causes Ped to ragdoll on collision with any object (e.g Running into trashcan). If applied to player you will sometimes trip on the sidewalk. - */ - export function setPedRagdollOnCollision(ped: Player | number, toggle: boolean): void; - - /** - * @returns If the ped handle passed through the parenthesis is in a ragdoll state this will return true. - */ - export function isPedRagdoll(ped: Player | number): boolean; - - export function isPedRunningRagdollTask(ped: Player | number): boolean; - - export function setPedRagdollForceFall(ped: Player | number): void; - - export function resetPedRagdollTimer(ped: Player | number): void; - - export function setPedCanRagdoll(ped: Player | number, toggle: boolean): void; - - export function isPedRunningMeleeTask(ped: Player | number): boolean; - - export function isPedRunningMobilePhoneTask(ped: Player | number): boolean; - - export function isMobilePhoneToPedEar(ped: Player | number): boolean; - - /** - * Works for both player and peds, - * enum eRagdollBlockingFlags - * { - * RBF_BULLET_IMPACT = 0, - * RBF_VEHICLE_IMPACT = 1, - * RBF_FIRE = 2, - * RBF_ELECTROCUTION = 3, - * RBF_PLAYER_IMPACT = 4, - * RBF_EXPLOSION = 5,0 - * See NativeDB for reference: http://natives.altv.mp/#/0x26695EC767728D84 - */ - export function setRagdollBlockingFlags(ped: Player | number, blockingFlag: number): void; - - /** - * See SET_RAGDOLL_BLOCKING_FLAGS for flags - */ - export function clearRagdollBlockingFlags(ped: Player | number, blockingFlag: number): void; - - export function setPedAngledDefensiveArea(ped: Player | number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number, p7: number, p8: boolean, p9: boolean): void; - - export function setPedSphereDefensiveArea(ped: Player | number, x: number, y: number, z: number, radius: number, p5: boolean, p6: boolean): void; - - export function setPedDefensiveSphereAttachedToPed(ped: Player | number, target: Player | number, xOffset: number, yOffset: number, zOffset: number, radius: number, p6: boolean): void; - - export function setPedDefensiveSphereAttachedToVehicle(ped: Player | number, target: Vehicle | number, xOffset: number, yOffset: number, zOffset: number, radius: number, p6: boolean): void; - - export function setPedDefensiveAreaAttachedToPed(ped: Player | number, attachPed: Player | number, p2: number, p3: number, p4: number, p5: number, p6: number, p7: number, p8: number, p9: boolean, p10: boolean): void; - - export function setPedDefensiveAreaDirection(ped: Player | number, p1: number, p2: number, p3: number, p4: boolean): void; - - /** - * @param ped will no longer get angry when you stay near him. - */ - export function removePedDefensiveArea(ped: Player | number, toggle: boolean): void; - - export function getPedDefensiveAreaPosition(ped: Player | number, p1: boolean): Vector3; - - export function isPedDefensiveAreaActive(ped: Player | number, p1: boolean): boolean; - - export function setPedPreferredCoverSet(ped: Player | number, itemSet: any): void; - - export function removePedPreferredCoverSet(ped: Player | number): void; - - /** - * It will revive/cure the injured ped. The condition is ped must not be dead. - * Upon setting and converting the health int, found, if health falls below 5, the ped will lay on the ground in pain(Maximum default health is 100). - * This function is well suited there. - */ - export function reviveInjuredPed(ped: Player | number): void; - - /** - * This function will simply bring the dead person back to life. - * Try not to use it alone, since using this function alone, will make peds fall through ground in hell(well for the most of the times). - * Instead, before calling this function, you may want to declare the position, where your Resurrected ped to be spawn at.(For instance, Around 2 floats of Player's current position.) - * Also, disabling any assigned task immediately helped in the number of scenarios, where If you want peds to perform certain decided tasks. - */ - export function resurrectPed(ped: Player | number): void; - - /** - * NOTE: Debugging functions are not present in the retail version of the game. - * *untested but char *name could also be a hash for a localized string - */ - export function setPedNameDebug(ped: Player | number, name: string | null): void; - - /** - * Gets the offset the specified ped has moved since the previous tick. - * If worldSpace is true, the returned offset is relative to the world. That is, if the ped has moved 1 meter on the X axis and 5 meters on the Y axis, it'll return 1,5,0. - * @returns If worldSpace is false, the returned offset is relative to the ped. That is, if the ped has moved 1 meter right and 5 meters forward, it'll return 1,5,0. - */ - export function getPedExtractedDisplacement(ped: Player | number, worldSpace: boolean): Vector3; - - export function setPedDiesWhenInjured(ped: Player | number, toggle: boolean): void; - - export function setPedEnableWeaponBlocking(ped: Player | number, toggle: boolean): void; - - /** - * @param ped focus on this ped (also disables its collision). If doing this for your player ped, you'll still be able to drive the vehicle. - * @param p1 was always 1 (true). - */ - export function specialFunctionDoNotUse(ped: Player | number, p1: boolean): void; - - export function resetPedVisibleDamage(ped: Player | number): void; - - export function applyPedBloodDamageByZone(ped: Player | number, p1: any, p2: number, p3: number, p4: any): void; - - /** - * woundTypes: - * - soak_splat - * - wound_sheet - * - BulletSmall - * - BulletLarge - * - ShotgunSmall - * - ShotgunSmallMonolithic - * - ShotgunLarge - * - ShotgunLargeMonolithic - * See NativeDB for reference: http://natives.altv.mp/#/0x83F7E01C7B769A26 - */ - export function applyPedBlood(ped: Player | number, boneIndex: number, xRot: number, yRot: number, zRot: number, woundType: string | null): void; - - export function applyPedBloodByZone(ped: Player | number, p1: number, p2: number, p3: number, p4: string | null): void; - - export function applyPedBloodSpecific(ped: Player | number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number, p7: number, p8: string | null): void; - - /** - * enum eDamageZone - * { - * DZ_Torso = 0, - * DZ_Head, - * DZ_LeftArm, - * DZ_RightArm, - * DZ_LeftLeg, - * DZ_RightLeg, - * }; - * See NativeDB for reference: http://natives.altv.mp/#/0x397C38AA7B4A5F83 - */ - export function applyPedDamageDecal(ped: Player | number, damageZone: number, xOffset: number, yOffset: number, heading: number, scale: number, alpha: number, unkVariation: number, fadeIn: boolean, decalName: string | null): void; - - /** - * "SCR_TrevorTreeBang" - * "HOSPITAL_0" - * "HOSPITAL_1" - * "HOSPITAL_2" - * "HOSPITAL_3" - * "HOSPITAL_4" - * "HOSPITAL_5" - * "HOSPITAL_6" - * "HOSPITAL_7" - * See NativeDB for reference: http://natives.altv.mp/#/0x46DF918788CB093F - * @param damage Packs: - */ - export function applyPedDamagePack(ped: Player | number, damagePack: string | null, damage: number, mult: number): void; - - export function clearPedBloodDamage(ped: Player | number): void; - - /** - * Somehow related to changing ped's clothes. - */ - export function clearPedBloodDamageByZone(ped: Player | number, p1: number): void; - - export function hidePedBloodDamageByZone(ped: Player | number, p1: any, p2: boolean): void; - - /** - * @param p1 from 0 to 5 in the b617d scripts. - * @param p2 "blushing" and "ALL" found in the b617d scripts. - */ - export function clearPedDamageDecalByZone(ped: Player | number, p1: number, p2: string | null): void; - - export function getPedDecorationsState(ped: Player | number): number; - - export function markPedDecorationsAsClonedFromLocalPlayer(ped: Player | number, p1: boolean): void; - - /** - * It clears the wetness of the selected Ped/Player. Clothes have to be wet to notice the difference. - */ - export function clearPedWetness(ped: Player | number): void; - - /** - * It adds the wetness level to the player clothing/outfit. As if player just got out from water surface. - */ - export function setPedWetnessHeight(ped: Player | number, height: number): void; - - /** - * combined with PED::SET_PED_WETNESS_HEIGHT(), this native makes the ped drenched in water up to the height specified in the other function - */ - export function setPedWetnessEnabledThisFrame(ped: Player | number): void; - - export function setPedWetness(ped: Player | number, wetLevel: number): void; - - export function clearPedEnvDirt(ped: Player | number): void; - - /** - * @param sweat is set to 100.0 or 0.0 in the decompiled scripts. - */ - export function setPedSweat(ped: Player | number, sweat: number): void; - - /** - * Applies an Item from a PedDecorationCollection to a ped. These include tattoos and shirt decals. - * Example: - * Entry inside "mpbeach_overlays.xml" - - * - * - * - * - * FM_Hair_Fuzz - * mp_hair_fuzz - * See NativeDB for reference: http://natives.altv.mp/#/0x5F5D1665E352A839 - * @param ped :ADD_PED_DECORATION_FROM_HASHES(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("mpbeach_overlays"), MISC::GET_HASH_KEY("fm_hair_fuzz")) - * @param collection - PedDecorationCollection filename hash - * @param overlay - Item name hash - */ - export function addPedDecorationFromHashes(ped: Player | number, collection: number, overlay: number): void; + export function getCanPedBeGrabbedByScript(ped: Ped | Player | number, p1: boolean, p2: boolean, p3: boolean, p4: boolean, p5: boolean, p6: boolean, p7: boolean, p8: any): boolean; /** - * Full list of ped overlays / decorations by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pedOverlayCollections.json - */ - export function addPedDecorationFromHashesInCorona(ped: Player | number, collection: number, overlay: number): void; + * Scripts use 0.2, 0.5 and 1.0. Value must be >= 0.0 && <= 1.0 + */ + export function setDriverRacingModifier(driver: Ped | Player | number, modifier: number): void; + + /** + * The function specifically verifies the value is equal to, or less than 1.0f. If it is greater than 1.0f, the function does nothing at all. + */ + export function setDriverAbility(driver: Ped | Player | number, ability: number): void; /** - * Returns the zoneID for the overlay if it is a member of collection. - * enum ePedDecorationZone - * { - * ZONE_TORSO = 0, - * ZONE_HEAD = 1, - * ZONE_LEFT_ARM = 2, - * ZONE_RIGHT_ARM = 3, - * ZONE_LEFT_LEG = 4, - * ZONE_RIGHT_LEG = 5, - * See NativeDB for reference: http://natives.altv.mp/#/0x9FD452BFBE7A7A8B - */ - export function getPedDecorationZoneFromHashes(collection: number, overlay: number): number; - - export function clearPedDecorations(ped: Player | number): void; - - export function clearPedDecorationsLeaveScars(ped: Player | number): void; + * range 0.0f - 1.0f + */ + export function setDriverAggressiveness(driver: Ped | Player | number, aggressiveness: number): void; /** - * @returns Despite this function's name, it simply returns whether the specified handle is a Ped. - */ - export function wasPedSkeletonUpdated(ped: Player | number): boolean; + * Prevents the ped from going limp. + * [Example: Can prevent peds from falling when standing on moving vehicles.] + */ + export function canPedRagdoll(ped: Ped | Player | number): boolean; /** - * Gets the position of the specified bone of the specified ped. - * @param ped The ped to get the position of a bone from. - * @param boneId The ID of the bone to get the position from. This is NOT the index. - * @param offsetX The X-component of the offset to add to the position relative to the bone's rotation. - * @param offsetY The Y-component of the offset to add to the position relative to the bone's rotation. - * @param offsetZ The Z-component of the offset to add to the position relative to the bone's rotation. - */ - export function getPedBoneCoords(ped: Player | number, boneId: number, offsetX: number, offsetY: number, offsetZ: number): Vector3; + * p4/p5: Unused in TU27 + * Ragdoll Types: + * **0**: CTaskNMRelax + * **1**: CTaskNMScriptControl: Hardcoded not to work in networked environments. + * **Else**: CTaskNMBalance + * time1- Time(ms) Ped is in ragdoll mode; only applies to ragdoll types 0 and not 1. + * time2- Unknown time, in milliseconds + * ragdollType- + * 0 : Normal ragdoll + * 1 : Falls with stiff legs/body + * 2 : Narrow leg stumble(may not fall) + * 3 : Wide leg stumble(may not fall) + * p4, p5, p6- No idea. In R*'s scripts they are usually either "true, true, false" or "false, false, false". + * EDIT 3/11/16: unclear what 'mircoseconds' mean-- a microsecond is 1000x a ms, so time2 must be 1000x time1? more testing needed. -sob + * Edit Mar 21, 2017: removed part about time2 being the microseconds version of time1. this just isn't correct. time2 is in milliseconds, and time1 and time2 don't seem to be connected in any way. + */ + export function setPedToRagdoll(ped: Ped | Player | number, time1: number, time2: number, ragdollType: number, p4: boolean, p5: boolean, p6: boolean): boolean; /** - * Creates a new NaturalMotion message. - * If a message already exists, this function does nothing. A message exists until the point it has been successfully dispatched by GIVE_PED_NM_MESSAGE. - * @param startImmediately If set to true, the character will perform the message the moment it receives it by GIVE_PED_NM_MESSAGE. If false, the Ped will get the message but won't perform it yet. While it's a boolean value, if negative, the message will not be initialized. - * @param messageId The ID of the NaturalMotion message. - */ - export function createNmMessage(startImmediately: boolean, messageId: number): void; + * Return variable is never used in R*'s scripts. + * Not sure what p2 does. It seems like it would be a time judging by it's usage in R*'s scripts, but didn't seem to affect anything in my testings. + * enum eRagdollType + * { + * RD_MALE=0, + * RD_FEMALE = 1, + * RD_MALE_LARGE = 2, + * RD_CUSTOM = 3, + * } + * x, y, and z are coordinates, most likely to where the ped will fall. + * p8 to p13 are always 0f in R*'s scripts. + * (Simplified) Example of the usage of the function from R*'s scripts: + * ped::set_ped_to_ragdoll_with_fall(ped, 1500, 2000, 1, -entity::get_entity_forward_vector(ped), 1f, 0f, 0f, 0f, 0f, 0f, 0f); + */ + export function setPedToRagdollWithFall(ped: Ped | Player | number, time: number, p2: number, ragdollType: number, x: number, y: number, z: number, velocity: number, p8: number, p9: number, p10: number, p11: number, p12: number, p13: number): boolean; /** - * Sends the message that was created by a call to CREATE_NM_MESSAGE to the specified Ped. - * If a message hasn't been created already, this function does nothing. - * If the Ped is not ragdolled with Euphoria enabled, this function does nothing. - * Call order: - * SET_PED_TO_RAGDOLL - * CREATE_NM_MESSAGE - * GIVE_PED_NM_MESSAGE - * Multiple messages can be chained. Eg. to make the ped stagger and swing his arms around, the following calls can be made: - * SET_PED_TO_RAGDOLL(ped, 4000, 5000, 1, 1, 1, 0); - * See NativeDB for reference: http://natives.altv.mp/#/0xB158DFCCC56E5C5B - * @param ped SET_PED_TO_RAGDOLL(ped, 4000, 5000, 1, 1, 1, 0); - */ - export function givePedNmMessage(ped: Player | number): void; - - export function addScenarioBlockingArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, p6: boolean, p7: boolean, p8: boolean, p9: boolean): number; - - export function removeScenarioBlockingAreas(): void; - - export function removeScenarioBlockingArea(p0: any, p1: boolean): void; - - export function setScenarioPedsSpawnInSphereArea(x: number, y: number, z: number, range: number, p4: number): void; - - export function doesScenarioBlockingAreaExists(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): boolean; + * Causes Ped to ragdoll on collision with any object (e.g Running into trashcan). If applied to player you will sometimes trip on the sidewalk. + */ + export function setPedRagdollOnCollision(ped: Ped | Player | number, toggle: boolean): void; /** - * Full list of ped scenarios by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenariosCompact.json - */ - export function isPedUsingScenario(ped: Player | number, scenario: string | null): boolean; - - export function isPedUsingAnyScenario(ped: Player | number): boolean; - - export function setPedPanicExitScenario(p0: any, p1: any, p2: any, p3: any): boolean; - - export function toggleScenarioPedCowerInPlace(ped: Player | number, toggle: boolean): void; - - export function triggerPedScenarioPanicexittoflee(p0: any, p1: any, p2: any, p3: any): boolean; - - export function setPedShouldPlayDirectedNormalScenarioExit(p0: any, p1: any, p2: any, p3: any): boolean; + * If the ped handle passed through the parenthesis is in a ragdoll state this will return true. + */ + export function isPedRagdoll(ped: Ped | Player | number): boolean; - export function setPedShouldPlayNormalScenarioExit(ped: Player | number): void; + export function isPedRunningRagdollTask(ped: Ped | Player | number): boolean; - export function setPedShouldPlayImmediateScenarioExit(ped: Player | number): void; + export function setPedRagdollForceFall(ped: Ped | Player | number): void; - export function setPedShouldPlayFleeScenarioExit(ped: Player | number, p1: any, p2: any, p3: any): boolean; + export function resetPedRagdollTimer(ped: Ped | Player | number): void; - export function setPedShouldIgnoreScenarioExitCollisionChecks(ped: Player | number, p1: boolean): void; + export function setPedCanRagdoll(ped: Ped | Player | number, toggle: boolean): void; - export function setPedShouldIgnoreScenarioNavChecks(p0: any, p1: boolean): void; - - export function setPedShouldProbeForScenarioExitsInOneFrame(p0: any, p1: boolean): void; - - export function isPedGesturing(p0: any): boolean; - - export function resetFacialIdleAnim(ped: Player | number): void; + export function isPedRunningMeleeTask(ped: Ped | Player | number): boolean; - /** - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - */ - export function playFacialAnim(ped: Player | number, animName: string | null, animDict: string | null): void; + export function isPedRunningMobilePhoneTask(ped: Ped | Player | number): boolean; - /** - * Clipsets: - * facials@gen_female@base - * facials@gen_male@base - * facials@p_m_zero@base - * Typically followed with SET_FACIAL_IDLE_ANIM_OVERRIDE: - * mood_drunk_1 - * mood_stressed_1 - * mood_happy_1 - * mood_talking_1 - */ - export function setFacialClipset(ped: Player | number, animDict: string | null): void; + export function isMobilePhoneToPedEar(ped: Ped | Player | number): boolean; /** - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - */ - export function setFacialIdleAnimOverride(ped: Player | number, animName: string | null, animDict: string | null): void; - - export function clearFacialIdleAnimOverride(ped: Player | number): void; - - export function setPedCanPlayGestureAnims(ped: Player | number, toggle: boolean): void; + * Works for both player and peds, + * enum eRagdollBlockingFlags + * { + * RBF_BULLET_IMPACT = 0, + * RBF_VEHICLE_IMPACT = 1, + * RBF_FIRE = 2, + * RBF_ELECTROCUTION = 3, + * RBF_PLAYER_IMPACT = 4, + * RBF_EXPLOSION = 5,0 + * RBF_IMPACT_OBJECT = 6, + * RBF_MELEE = 7, + * RBF_RUBBER_BULLET = 8, + * RBF_FALLING = 9, + * RBF_WATER_JET = 10, + * RBF_DROWNING = 11, + * _0x9F52E2C4 = 12, + * RBF_PLAYER_BUMP = 13, + * RBF_PLAYER_RAGDOLL_BUMP = 14, + * RBF_PED_RAGDOLL_BUMP = 15, + * RBF_VEHICLE_GRAB = 16, + * RBF_SMOKE_GRENADE = 17, + * }; + */ + export function setRagdollBlockingFlags(ped: Ped | Player | number, blockingFlag: number): void; /** - * @param p2 usually 0 - */ - export function setPedCanPlayVisemeAnims(ped: Player | number, toggle: boolean, p2: boolean): void; - - export function setPedIsIgnoredByAutoOpenDoors(ped: Player | number, p1: boolean): void; - - export function setPedCanPlayAmbientAnims(ped: Player | number, toggle: boolean): void; - - export function setPedCanPlayAmbientBaseAnims(ped: Player | number, toggle: boolean): void; - - export function triggerIdleAnimationOnPed(ped: Player | number): void; - - export function setPedCanArmIk(ped: Player | number, toggle: boolean): void; - - export function setPedCanHeadIk(ped: Player | number, toggle: boolean): void; + * See SET_RAGDOLL_BLOCKING_FLAGS for flags + */ + export function clearRagdollBlockingFlags(ped: Ped | Player | number, blockingFlag: number): void; - export function setPedCanLegIk(ped: Player | number, toggle: boolean): void; + export function setPedAngledDefensiveArea(ped: Ped | Player | number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number, p7: number, p8: boolean, p9: boolean): void; - export function setPedCanTorsoIk(ped: Player | number, toggle: boolean): void; + export function setPedSphereDefensiveArea(ped: Ped | Player | number, x: number, y: number, z: number, radius: number, p5: boolean, p6: boolean): void; - export function setPedCanTorsoReactIk(ped: Player | number, p1: boolean): void; + export function setPedDefensiveSphereAttachedToPed(ped: Ped | Player | number, target: Ped | Player | number, xOffset: number, yOffset: number, zOffset: number, radius: number, p6: boolean): void; - export function setPedCanTorsoVehicleIk(ped: Player | number, p1: boolean): void; + export function setPedDefensiveSphereAttachedToVehicle(ped: Ped | Player | number, target: Vehicle | number, xOffset: number, yOffset: number, zOffset: number, radius: number, p6: boolean): void; - export function setPedCanUseAutoConversationLookat(ped: Player | number, toggle: boolean): void; + export function setPedDefensiveAreaAttachedToPed(ped: Ped | Player | number, attachPed: Ped | Player | number, p2: number, p3: number, p4: number, p5: number, p6: number, p7: number, p8: number, p9: boolean, p10: boolean): void; - export function isPedHeadtrackingPed(ped1: Player | number, ped2: Player | number): boolean; + export function setPedDefensiveAreaDirection(ped: Ped | Player | number, p1: number, p2: number, p3: number, p4: boolean): void; + + /** + * Ped will no longer get angry when you stay near him. + */ + export function removePedDefensiveArea(ped: Ped | Player | number, toggle: boolean): void; - export function isPedHeadtrackingEntity(ped: Player | number, entity: Entity | number): boolean; + export function getPedDefensiveAreaPosition(ped: Ped | Player | number, p1: boolean): Vector3; - /** - * This is only called once in the scripts. - * sub_1CD9(&l_49, 0, getElem(3, &l_34, 4), "MICHAEL", 0, 1); - * sub_1CA8("WORLD_HUMAN_SMOKING", 2); - * PED::SET_PED_PRIMARY_LOOKAT(getElem(3, &l_34, 4), PLAYER::PLAYER_PED_ID()); - */ - export function setPedPrimaryLookat(ped: Player | number, lookAt: Player | number): void; - - export function setPedClothPinFrames(p0: any, p1: any): void; - - export function setPedClothPackageIndex(p0: any, p1: any): void; - - export function setPedClothProne(p0: any, p1: boolean): void; - - /** - * enum ePedConfigFlags - * { - * _CPED_CONFIG_FLAG_0xC63DE95E = 1, - * CPED_CONFIG_FLAG_NoCriticalHits = 2, - * CPED_CONFIG_FLAG_DrownsInWater = 3, - * CPED_CONFIG_FLAG_DisableReticuleFixedLockon = 4, - * _CPED_CONFIG_FLAG_0x37D196F4 = 5, - * _CPED_CONFIG_FLAG_0xE2462399 = 6, - * CPED_CONFIG_FLAG_UpperBodyDamageAnimsOnly = 7, - * See NativeDB for reference: http://natives.altv.mp/#/0x1913FE4CBF41C463 - */ - export function setPedConfigFlag(ped: Player | number, flagId: number, value: boolean): void; - - /** - * Known values: - * PRF_PreventGoingIntoStillInVehicleState = 236 *(fanatic2.c)* - * @param ped :SET_PED_RESET_FLAG(PLAYER::PLAYER_PED_ID(), 240, 1); - */ - export function setPedResetFlag(ped: Player | number, flagId: number, doReset: boolean): void; - - /** - * See SET_PED_CONFIG_FLAG - */ - export function getPedConfigFlag(ped: Player | number, flagId: number, p2: boolean): boolean; - - export function getPedResetFlag(ped: Player | number, flagId: number): boolean; + export function isPedDefensiveAreaActive(ped: Ped | Player | number, p1: boolean): boolean; - export function setPedGroupMemberPassengerIndex(ped: Player | number, index: number): void; + export function setPedPreferredCoverSet(ped: Ped | Player | number, itemSet: any): void; - export function setPedCanEvasiveDive(ped: Player | number, toggle: boolean): void; + export function removePedPreferredCoverSet(ped: Ped | Player | number): void; /** - * var num3; - * if (PED::IS_PED_EVASIVE_DIVING(A_0, &num3) != 0) - * if (ENTITY::IS_ENTITY_A_VEHICLE(num3) != 0) - * @returns Presumably returns the Entity that the Ped is currently diving out of the way of. - */ - export function isPedEvasiveDiving(ped: Player | number, evadingEntity?: Entity | number): [boolean, number]; - - export function setPedShootsAtCoord(ped: Player | number, x: number, y: number, z: number, toggle: boolean): void; + * It will revive/cure the injured ped. The condition is ped must not be dead. + * Upon setting and converting the health int, found, if health falls below 5, the ped will lay on the ground in pain(Maximum default health is 100). + * This function is well suited there. + */ + export function reviveInjuredPed(ped: Ped | Player | number): void; + + /** + * This function will simply bring the dead person back to life. + * Try not to use it alone, since using this function alone, will make peds fall through ground in hell(well for the most of the times). + * Instead, before calling this function, you may want to declare the position, where your Resurrected ped to be spawn at.(For instance, Around 2 floats of Player's current position.) + * Also, disabling any assigned task immediately helped in the number of scenarios, where If you want peds to perform certain decided tasks. + */ + export function resurrectPed(ped: Ped | Player | number): void; + + /** + * NOTE: Debugging functions are not present in the retail version of the game. + * *untested but char *name could also be a hash for a localized string + */ + export function setPedNameDebug(ped: Ped | Player | number, name: string): void; /** - * Full list of peds by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/peds.json - */ - export function setPedModelIsSuppressed(modelHash: number, toggle: boolean): void; + * Gets the offset the specified ped has moved since the previous tick. + * If worldSpace is false, the returned offset is relative to the ped. That is, if the ped has moved 1 meter right and 5 meters forward, it'll return 1,5,0. + * If worldSpace is true, the returned offset is relative to the world. That is, if the ped has moved 1 meter on the X axis and 5 meters on the Y axis, it'll return 1,5,0. + */ + export function getPedExtractedDisplacement(ped: Ped | Player | number, worldSpace: boolean): Vector3; - export function stopAnyPedModelBeingSuppressed(): void; + export function setPedDiesWhenInjured(ped: Ped | Player | number, toggle: boolean): void; - export function setPedCanBeTargetedWhenInjured(ped: Player | number, toggle: boolean): void; + export function setPedEnableWeaponBlocking(ped: Ped | Player | number, toggle: boolean): void; - export function setPedGeneratesDeadBodyEvents(ped: Player | number, toggle: boolean): void; + /** + * p1 was always 1 (true). + * Kicks the ped from the current vehicle and keeps the rendering-focus on this ped (also disables its collision). If doing this for your player ped, you'll still be able to drive the vehicle. + */ + export function specialFunctionDoNotUse(ped: Ped | Player | number, p1: boolean): void; - export function blockPedFromGeneratingDeadBodyEventsWhenDead(ped: Player | number, toggle: boolean): void; + export function resetPedVisibleDamage(ped: Ped | Player | number): void; - export function setPedWillOnlyAttackWantedPlayer(p0: any, p1: any): void; + export function applyPedBloodDamageByZone(ped: Ped | Player | number, p1: any, p2: number, p3: number, p4: any): void; + + /** + * woundTypes: + * - soak_splat + * - wound_sheet + * - BulletSmall + * - BulletLarge + * - ShotgunSmall + * - ShotgunSmallMonolithic + * - ShotgunLarge + * - ShotgunLargeMonolithic + * - NonFatalHeadshot + * - stab + * - BasicSlash + * - Scripted_Ped_Splash_Back + * - BackSplash + */ + export function applyPedBlood(ped: Ped | Player | number, boneIndex: number, xRot: number, yRot: number, zRot: number, woundType: string): void; - export function setPedCanRagdollFromPlayerImpact(ped: Player | number, toggle: boolean): void; + export function applyPedBloodByZone(ped: Ped | Player | number, p1: number, p2: number, p3: number, p4: string): void; + + export function applyPedBloodSpecific(ped: Ped | Player | number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number, p7: number, p8: string): void; /** - * PoliceMotorcycleHelmet 1024 - * RegularMotorcycleHelmet 4096 - * FiremanHelmet 16384 - * PilotHeadset 32768 - * PilotHelmet 65536 - * -- - * @param helmetFlag is generally 4096 or 16384 in the scripts. p1 varies between 1 and 0. - */ - export function givePedHelmet(ped: Player | number, cannotRemove: boolean, helmetFlag: number, textureIndex: number): void; + * enum eDamageZone + * { + * DZ_Torso = 0, + * DZ_Head, + * DZ_LeftArm, + * DZ_RightArm, + * DZ_LeftLeg, + * DZ_RightLeg, + * }; + * Decal Names: + * scar + * blushing + * cs_flush_anger + * cs_flush_anger_face + * bruise + * bruise_large + * herpes + * ArmorBullet + * basic_dirt_cloth + * basic_dirt_skin + * cs_trev1_dirt + * APPLY_PED_DAMAGE_DECAL(ped, 1, 0.5f, 0.513f, 0f, 1f, unk, 0, 0, "blushing"); + */ + export function applyPedDamageDecal(ped: Ped | Player | number, damageZone: number, xOffset: number, yOffset: number, heading: number, scale: number, alpha: number, variation: number, fadeIn: boolean, decalName: string): void; + + /** + * Damage Packs: + * "SCR_TrevorTreeBang" + * "HOSPITAL_0" + * "HOSPITAL_1" + * "HOSPITAL_2" + * "HOSPITAL_3" + * "HOSPITAL_4" + * "HOSPITAL_5" + * "HOSPITAL_6" + * "HOSPITAL_7" + * "HOSPITAL_8" + * "HOSPITAL_9" + * "SCR_Dumpster" + * "BigHitByVehicle" + * "SCR_Finale_Michael_Face" + * "SCR_Franklin_finb" + * "SCR_Finale_Michael" + * "SCR_Franklin_finb2" + * "Explosion_Med" + * "SCR_Torture" + * "SCR_TracySplash" + * "Skin_Melee_0" + * Additional damage packs: + * gist.github.com/alexguirre/f3f47f75ddcf617f416f3c8a55ae2227 + * Full list of ped damage packs by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pedDamagePacks.json + */ + export function applyPedDamagePack(ped: Ped | Player | number, damagePack: string, damage: number, mult: number): void; + + export function clearPedBloodDamage(ped: Ped | Player | number): void; + + /** + * Somehow related to changing ped's clothes. + */ + export function clearPedBloodDamageByZone(ped: Ped | Player | number, p1: number): void; + + export function hidePedBloodDamageByZone(ped: Ped | Player | number, p1: any, p2: boolean): void; + + /** + * p1: from 0 to 5 in the b617d scripts. + * p2: "blushing" and "ALL" found in the b617d scripts. + */ + export function clearPedDamageDecalByZone(ped: Ped | Player | number, p1: number, p2: string): void; + + export function getPedDecorationsState(ped: Ped | Player | number): number; + + export function markPedDecorationsAsClonedFromLocalPlayer(ped: Ped | Player | number, p1: boolean): void; + + /** + * It clears the wetness of the selected Ped/Player. Clothes have to be wet to notice the difference. + */ + export function clearPedWetness(ped: Ped | Player | number): void; + + /** + * It adds the wetness level to the player clothing/outfit. As if player just got out from water surface. + */ + export function setPedWetnessHeight(ped: Ped | Player | number, height: number): void; + + /** + * combined with PED::SET_PED_WETNESS_HEIGHT(), this native makes the ped drenched in water up to the height specified in the other function + */ + export function setPedWetnessEnabledThisFrame(ped: Ped | Player | number): void; + + export function setPedWetness(ped: Ped | Player | number, wetLevel: number): void; + + export function clearPedEnvDirt(ped: Ped | Player | number): void; + + /** + * Sweat is set to 100.0 or 0.0 in the decompiled scripts. + */ + export function setPedSweat(ped: Ped | Player | number, sweat: number): void; + + /** + * Applies an Item from a PedDecorationCollection to a ped. These include tattoos and shirt decals. + * collection - PedDecorationCollection filename hash + * overlay - Item name hash + * Example: + * Entry inside "mpbeach_overlays.xml" - + * + * + * + * + * FM_Hair_Fuzz + * mp_hair_fuzz + * mp_hair_fuzz + * ZONE_HEAD + * TYPE_TATTOO + * FM + * All + * GENDER_DONTCARE + * + * + * + * Code: + * PED::ADD_PED_DECORATION_FROM_HASHES(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("mpbeach_overlays"), MISC::GET_HASH_KEY("fm_hair_fuzz")) + * Full list of ped overlays / decorations by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pedOverlayCollections.json + */ + export function addPedDecorationFromHashes(ped: Ped | Player | number, collection: number, overlay: number): void; + + /** + * Full list of ped overlays / decorations by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pedOverlayCollections.json + */ + export function addPedDecorationFromHashesInCorona(ped: Ped | Player | number, collection: number, overlay: number): void; + + /** + * Returns the zoneID for the overlay if it is a member of collection. + * enum ePedDecorationZone + * { + * ZONE_TORSO = 0, + * ZONE_HEAD = 1, + * ZONE_LEFT_ARM = 2, + * ZONE_RIGHT_ARM = 3, + * ZONE_LEFT_LEG = 4, + * ZONE_RIGHT_LEG = 5, + * ZONE_MEDALS = 6, + * ZONE_INVALID = 7 + * }; + * Full list of ped overlays / decorations by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pedOverlayCollections.json + */ + export function getPedDecorationZoneFromHashes(collection: number, overlay: number): number; - export function removePedHelmet(ped: Player | number, instantly: boolean): void; + export function clearPedDecorations(ped: Ped | Player | number): void; - export function isPedTakingOffHelmet(ped: Player | number): boolean; + export function clearPedDecorationsLeaveScars(ped: Ped | Player | number): void; - export function setPedHelmet(ped: Player | number, canWearHelmet: boolean): void; + /** + * Despite this function's name, it simply returns whether the specified handle is a Ped. + */ + export function wasPedSkeletonUpdated(ped: Ped | Player | number): boolean; - export function setPedHelmetFlag(ped: Player | number, helmetFlag: number): void; + /** + * Gets the position of the specified bone of the specified ped. + * ped: The ped to get the position of a bone from. + * boneId: The ID of the bone to get the position from. This is NOT the index. + * offsetX: The X-component of the offset to add to the position relative to the bone's rotation. + * offsetY: The Y-component of the offset to add to the position relative to the bone's rotation. + * offsetZ: The Z-component of the offset to add to the position relative to the bone's rotation. + */ + export function getPedBoneCoords(ped: Ped | Player | number, boneId: number, offsetX: number, offsetY: number, offsetZ: number): Vector3; /** - * List of component/props ID - * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html - */ - export function setPedHelmetPropIndex(ped: Player | number, propIndex: number, p2: boolean): void; + * Creates a new NaturalMotion message. + * startImmediately: If set to true, the character will perform the message the moment it receives it by GIVE_PED_NM_MESSAGE. If false, the Ped will get the message but won't perform it yet. While it's a boolean value, if negative, the message will not be initialized. + * messageId: The ID of the NaturalMotion message. + * If a message already exists, this function does nothing. A message exists until the point it has been successfully dispatched by GIVE_PED_NM_MESSAGE. + */ + export function createNmMessage(startImmediately: boolean, messageId: number): void; - export function setPedHelmetVisorPropIndices(ped: Player | number, p1: boolean, p2: number, p3: number): void; + /** + * Sends the message that was created by a call to CREATE_NM_MESSAGE to the specified Ped. + * If a message hasn't been created already, this function does nothing. + * If the Ped is not ragdolled with Euphoria enabled, this function does nothing. + * The following call can be used to ragdoll the Ped with Euphoria enabled: SET_PED_TO_RAGDOLL(ped, 4000, 5000, 1, 1, 1, 0); + * Call order: + * SET_PED_TO_RAGDOLL + * CREATE_NM_MESSAGE + * GIVE_PED_NM_MESSAGE + * Multiple messages can be chained. Eg. to make the ped stagger and swing his arms around, the following calls can be made: + * SET_PED_TO_RAGDOLL(ped, 4000, 5000, 1, 1, 1, 0); + * CREATE_NM_MESSAGE(true, 0); // stopAllBehaviours - Stop all other behaviours, in case the Ped is already doing some Euphoria stuff. + * GIVE_PED_NM_MESSAGE(ped); // Dispatch message to Ped. + * CREATE_NM_MESSAGE(true, 1151); // staggerFall - Attempt to walk while falling. + * GIVE_PED_NM_MESSAGE(ped); // Dispatch message to Ped. + * CREATE_NM_MESSAGE(true, 372); // armsWindmill - Swing arms around. + * GIVE_PED_NM_MESSAGE(ped); // Dispatch message to Ped. + */ + export function givePedNmMessage(ped: Ped | Player | number): void; + + export function addScenarioBlockingArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, p6: boolean, p7: boolean, p8: boolean, p9: boolean, p10: any): number; - export function isPedHelmetVisorUp(ped: Player | number): boolean; + export function removeScenarioBlockingAreas(): void; - export function setPedHelmetTextureIndex(ped: Player | number, textureIndex: number): void; + export function removeScenarioBlockingArea(p0: any, p1: boolean): void; - /** - * Returns true if the ped passed through the parenthesis is wearing a helmet. - */ - export function isPedWearingHelmet(ped: Player | number): boolean; + export function setScenarioPedsSpawnInSphereArea(x: number, y: number, z: number, range: number, p4: number): void; - export function clearPedStoredHatProp(ped: Player | number): void; + export function doesScenarioBlockingAreaExists(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): boolean; - export function getPedHelmetStoredHatPropIndex(ped: Player | number): number; + /** + * Full list of ped scenarios by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenariosCompact.json + */ + export function isPedUsingScenario(ped: Ped | Player | number, scenario: string): boolean; - export function getPedHelmetStoredHatTexIndex(ped: Player | number): number; + export function isPedUsingAnyScenario(ped: Ped | Player | number): boolean; - export function isCurrentHeadPropAHelmet(p0: any): boolean; + export function setPedPanicExitScenario(p0: any, p1: any, p2: any, p3: any): boolean; - export function setPedToLoadCover(ped: Player | number, toggle: boolean): void; + export function toggleScenarioPedCowerInPlace(ped: Ped | Player | number, toggle: boolean): void; - /** - * It simply makes the said ped to cower behind cover object(wall, desk, car) - * Peds flee attributes must be set to not to flee, first. Else, most of the peds, will just flee from gunshot sounds or any other panic situations. - */ - export function setPedCanCowerInCover(ped: Player | number, toggle: boolean): void; + export function triggerPedScenarioPanicexittoflee(p0: any, p1: any, p2: any, p3: any): boolean; - export function setPedCanPeekInCover(ped: Player | number, toggle: boolean): void; + export function setPedShouldPlayDirectedNormalScenarioExit(p0: any, p1: any, p2: any, p3: any): boolean; - /** - * This native does absolutely nothing, just a nullsub - */ - export function setPedPlaysHeadOnHornAnimWhenDiesInVehicle(ped: Player | number, toggle: boolean): void; + export function setPedShouldPlayNormalScenarioExit(ped: Ped | Player | number): void; - /** - * "IK" stands for "Inverse kinematics." I assume this has something to do with how the ped uses his legs to balance. In the scripts, the second parameter is always an int with a value of 2, 0, or sometimes 1 - */ - export function setPedLegIkMode(ped: Player | number, mode: number): void; + export function setPedShouldPlayImmediateScenarioExit(ped: Ped | Player | number): void; - export function setPedMotionBlur(ped: Player | number, toggle: boolean): void; + export function setPedShouldPlayFleeScenarioExit(ped: Ped | Player | number, p1: any, p2: any, p3: any): boolean; - export function setPedCanSwitchWeapon(ped: Player | number, toggle: boolean): void; + export function setPedShouldIgnoreScenarioExitCollisionChecks(ped: Ped | Player | number, p1: boolean): void; - export function setPedDiesInstantlyInWater(ped: Player | number, toggle: boolean): void; + export function setPedShouldIgnoreScenarioNavChecks(p0: any, p1: boolean): void; - /** - * Only appears in lamar1 script. - */ - export function setLadderClimbInputState(ped: Player | number, p1: number): void; + export function setPedShouldProbeForScenarioExitsInOneFrame(p0: any, p1: boolean): void; - export function stopPedWeaponFiringWhenDropped(ped: Player | number): void; + export function isPedGesturing(p0: any): boolean; - export function setScriptedAnimSeatOffset(ped: Player | number, p1: number): void; + export function resetFacialIdleAnim(ped: Ped | Player | number): void; /** - * enum eCombatMovement // 0x4F456B61 - * { - * CM_Stationary, - * CM_Defensive, - * CM_WillAdvance, - * CM_WillRetreat - * }; - */ - export function setPedCombatMovement(ped: Player | number, combatMovement: number): void; + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function playFacialAnim(ped: Ped | Player | number, animName: string, animDict: string): void; /** - * See SET_PED_COMBAT_MOVEMENT - */ - export function getPedCombatMovement(ped: Player | number): number; + * Clipsets: + * facials@gen_female@base + * facials@gen_male@base + * facials@p_m_zero@base + * Typically followed with SET_FACIAL_IDLE_ANIM_OVERRIDE: + * mood_drunk_1 + * mood_stressed_1 + * mood_happy_1 + * mood_talking_1 + */ + export function setFacialClipset(ped: Ped | Player | number, animDict: string): void; /** - * enum eCombatAbility // 0xE793438C - * { - * CA_Poor, - * CA_Average, - * CA_Professional, - * CA_NumTypes - * }; - */ - export function setPedCombatAbility(ped: Player | number, abilityLevel: number): void; + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function setFacialIdleAnimOverride(ped: Ped | Player | number, animName: string, animDict: string): void; - /** - * enum eCombatRange // 0xB69160F5 - * { - * CR_Near, - * CR_Medium, - * CR_Far, - * CR_VeryFar, - * CR_NumRanges - * }; - */ - export function setPedCombatRange(ped: Player | number, combatRange: number): void; + export function clearFacialIdleAnimOverride(ped: Ped | Player | number): void; - /** - * See SET_PED_COMBAT_RANGE - */ - export function getPedCombatRange(ped: Player | number): number; + export function setPedCanPlayGestureAnims(ped: Ped | Player | number, toggle: boolean): void; /** - * enum eCombatAttributes // 0x0E8E7201 - * { - * BF_CanUseCover = 0, - * BF_CanUseVehicles = 1, - * BF_CanDoDrivebys = 2, - * BF_CanLeaveVehicle = 3, - * BF_CanUseDynamicStrafeDecisions = 4, - * BF_AlwaysFight = 5, - * BF_0x66BB9FCC = 6, - * See NativeDB for reference: http://natives.altv.mp/#/0x9F7794730795E019 - */ - export function setPedCombatAttributes(ped: Player | number, attributeId: number, enabled: boolean): void; + * p2 usually 0 + */ + export function setPedCanPlayVisemeAnims(ped: Ped | Player | number, toggle: boolean, p2: boolean): void; - /** - * enum eTargetLossResponseType - * { - * TLR_ExitTask, - * TLR_NeverLoseTarget, - * TLR_SearchForTarget - * }; - */ - export function setPedTargetLossResponse(ped: Player | number, responseType: number): void; + export function setPedIsIgnoredByAutoOpenDoors(ped: Ped | Player | number, p1: boolean): void; - export function isPedPerformingMeleeAction(ped: Player | number): boolean; + export function setPedCanPlayAmbientAnims(ped: Ped | Player | number, toggle: boolean): void; - export function isPedPerformingStealthKill(ped: Player | number): boolean; + export function setPedCanPlayAmbientBaseAnims(ped: Ped | Player | number, toggle: boolean): void; - export function isPedPerformingACounterAttack(ped: Player | number): boolean; + export function triggerIdleAnimationOnPed(ped: Ped | Player | number): void; - export function isPedBeingStealthKilled(ped: Player | number): boolean; + export function setPedCanArmIk(ped: Ped | Player | number, toggle: boolean): void; - export function getMeleeTargetForPed(ped: Player | number): number; + export function setPedCanHeadIk(ped: Ped | Player | number, toggle: boolean): void; - export function wasPedKilledByStealth(ped: Player | number): boolean; + export function setPedCanLegIk(ped: Ped | Player | number, toggle: boolean): void; - export function wasPedKilledByTakedown(ped: Player | number): boolean; + export function setPedCanTorsoIk(ped: Ped | Player | number, toggle: boolean): void; - export function wasPedKnockedOut(ped: Player | number): boolean; + export function setPedCanTorsoReactIk(ped: Ped | Player | number, p1: boolean): void; - /** - * bit 1 (0x2) = use vehicle - * bit 15 (0x8000) = force cower - */ - export function setPedFleeAttributes(ped: Player | number, attributeFlags: number, enable: boolean): void; + export function setPedCanTorsoVehicleIk(ped: Ped | Player | number, p1: boolean): void; - /** - * @param p1 Only "CODE_HUMAN_STAND_COWER" found in the b617d scripts. - */ - export function setPedCowerHash(ped: Player | number, p1: string | null): void; + export function setPedCanUseAutoConversationLookat(ped: Ped | Player | number, toggle: boolean): void; - export function setPedSteersAroundDeadBodies(ped: Player | number, toggle: boolean): void; + export function isPedHeadtrackingPed(ped1: Ped | Player | number, ped2: Ped | Player | number): boolean; - export function setPedSteersAroundPeds(ped: Player | number, toggle: boolean): void; + export function isPedHeadtrackingEntity(ped: Ped | Player | number, entity: Entity | number): boolean; - export function setPedSteersAroundObjects(ped: Player | number, toggle: boolean): void; + /** + * This is only called once in the scripts. + * sub_1CD9(&l_49, 0, getElem(3, &l_34, 4), "MICHAEL", 0, 1); + * sub_1CA8("WORLD_HUMAN_SMOKING", 2); + * PED::SET_PED_PRIMARY_LOOKAT(getElem(3, &l_34, 4), PLAYER::PLAYER_PED_ID()); + */ + export function setPedPrimaryLookat(ped: Ped | Player | number, lookAt: Ped | Player | number): void; - export function setPedSteersAroundVehicles(ped: Player | number, toggle: boolean): void; + export function setPedClothPinFrames(p0: any, p1: any): void; - export function setPedIsAvoidedByOthers(p0: any, p1: boolean): void; + export function setPedClothPackageIndex(p0: any, p1: any): void; - export function setPedIncreasedAvoidanceRadius(ped: Player | number): void; + export function setPedClothProne(p0: any, p1: boolean): void; - export function setPedBlocksPathingWhenDead(ped: Player | number, toggle: boolean): void; + /** + * enum ePedConfigFlags + * { + * _CPED_CONFIG_FLAG_0xC63DE95E = 1, + * CPED_CONFIG_FLAG_NoCriticalHits = 2, + * CPED_CONFIG_FLAG_DrownsInWater = 3, + * CPED_CONFIG_FLAG_DisableReticuleFixedLockon = 4, + * _CPED_CONFIG_FLAG_0x37D196F4 = 5, + * _CPED_CONFIG_FLAG_0xE2462399 = 6, + * CPED_CONFIG_FLAG_UpperBodyDamageAnimsOnly = 7, + * _CPED_CONFIG_FLAG_0xEDDEB838 = 8, + * _CPED_CONFIG_FLAG_0xB398B6FD = 9, + * _CPED_CONFIG_FLAG_0xF6664E68 = 10, + * _CPED_CONFIG_FLAG_0xA05E7CA3 = 11, + * _CPED_CONFIG_FLAG_0xCE394045 = 12, + * CPED_CONFIG_FLAG_NeverLeavesGroup = 13, + * _CPED_CONFIG_FLAG_0xCD8D1411 = 14, + * _CPED_CONFIG_FLAG_0xB031F1A9 = 15, + * _CPED_CONFIG_FLAG_0xFE65BEE3 = 16, + * CPED_CONFIG_FLAG_BlockNonTemporaryEvents = 17, + * _CPED_CONFIG_FLAG_0x380165BD = 18, + * _CPED_CONFIG_FLAG_0x07C045C7 = 19, + * _CPED_CONFIG_FLAG_0x583B5E2D = 20, + * _CPED_CONFIG_FLAG_0x475EDA58 = 21, + * _CPED_CONFIG_FLAG_0x8629D05B = 22, + * _CPED_CONFIG_FLAG_0x1522968B = 23, + * CPED_CONFIG_FLAG_IgnoreSeenMelee = 24, + * _CPED_CONFIG_FLAG_0x4CC09C4B = 25, + * _CPED_CONFIG_FLAG_0x034F3053 = 26, + * _CPED_CONFIG_FLAG_0xD91BA7CC = 27, + * _CPED_CONFIG_FLAG_0x5C8DC66E = 28, + * CPED_CONFIG_FLAG_GetOutUndriveableVehicle = 29, + * _CPED_CONFIG_FLAG_0x6580B9D2 = 30, + * _CPED_CONFIG_FLAG_0x0EF7A297 = 31, + * CPED_CONFIG_FLAG_WillFlyThruWindscreen = 32, + * CPED_CONFIG_FLAG_DieWhenRagdoll = 33, + * CPED_CONFIG_FLAG_HasHelmet = 34, + * CPED_CONFIG_FLAG_UseHelmet = 35, + * CPED_CONFIG_FLAG_DontTakeOffHelmet = 36, + * _CPED_CONFIG_FLAG_0xB130D17B = 37, + * _CPED_CONFIG_FLAG_0x5F071200 = 38, + * CPED_CONFIG_FLAG_DisableEvasiveDives = 39, + * _CPED_CONFIG_FLAG_0xC287AAFF = 40, + * _CPED_CONFIG_FLAG_0x203328CC = 41, + * CPED_CONFIG_FLAG_DontInfluenceWantedLevel = 42, + * CPED_CONFIG_FLAG_DisablePlayerLockon = 43, + * CPED_CONFIG_FLAG_DisableLockonToRandomPeds = 44, + * CPED_CONFIG_FLAG_AllowLockonToFriendlyPlayers = 45, + * _CPED_CONFIG_FLAG_0xDB115BFA = 46, + * CPED_CONFIG_FLAG_PedBeingDeleted = 47, + * CPED_CONFIG_FLAG_BlockWeaponSwitching = 48, + * _CPED_CONFIG_FLAG_0xF8E99565 = 49, + * _CPED_CONFIG_FLAG_0xDD17FEE6 = 50, + * _CPED_CONFIG_FLAG_0x7ED9B2C9 = 51, + * _CPED_CONFIG_FLAG_NoCollison = 52, + * _CPED_CONFIG_FLAG_0x5A6C1F6E = 53, + * _CPED_CONFIG_FLAG_0xD749FC41 = 54, + * _CPED_CONFIG_FLAG_0x357F63F3 = 55, + * _CPED_CONFIG_FLAG_0xC5E60961 = 56, + * _CPED_CONFIG_FLAG_0x29275C3E = 57, + * CPED_CONFIG_FLAG_IsFiring = 58, + * CPED_CONFIG_FLAG_WasFiring = 59, + * CPED_CONFIG_FLAG_IsStanding = 60, + * CPED_CONFIG_FLAG_WasStanding = 61, + * CPED_CONFIG_FLAG_InVehicle = 62, + * CPED_CONFIG_FLAG_OnMount = 63, + * CPED_CONFIG_FLAG_AttachedToVehicle = 64, + * CPED_CONFIG_FLAG_IsSwimming = 65, + * CPED_CONFIG_FLAG_WasSwimming = 66, + * CPED_CONFIG_FLAG_IsSkiing = 67, + * CPED_CONFIG_FLAG_IsSitting = 68, + * CPED_CONFIG_FLAG_KilledByStealth = 69, + * CPED_CONFIG_FLAG_KilledByTakedown = 70, + * CPED_CONFIG_FLAG_Knockedout = 71, + * _CPED_CONFIG_FLAG_0x3E3C4560 = 72, + * _CPED_CONFIG_FLAG_0x2994C7B7 = 73, + * _CPED_CONFIG_FLAG_0x6D59D275 = 74, + * CPED_CONFIG_FLAG_UsingCoverPoint = 75, + * CPED_CONFIG_FLAG_IsInTheAir = 76, + * _CPED_CONFIG_FLAG_0x2D493FB7 = 77, + * CPED_CONFIG_FLAG_IsAimingGun = 78, + * _CPED_CONFIG_FLAG_0x14D69875 = 79, + * _CPED_CONFIG_FLAG_0x40B05311 = 80, + * _CPED_CONFIG_FLAG_0x8B230BC5 = 81, + * _CPED_CONFIG_FLAG_0xC74E5842 = 82, + * _CPED_CONFIG_FLAG_0x9EA86147 = 83, + * _CPED_CONFIG_FLAG_0x674C746C = 84, + * _CPED_CONFIG_FLAG_0x3E56A8C2 = 85, + * _CPED_CONFIG_FLAG_0xC144A1EF = 86, + * _CPED_CONFIG_FLAG_0x0548512D = 87, + * _CPED_CONFIG_FLAG_0x31C93909 = 88, + * _CPED_CONFIG_FLAG_0xA0269315 = 89, + * _CPED_CONFIG_FLAG_0xD4D59D4D = 90, + * _CPED_CONFIG_FLAG_0x411D4420 = 91, + * _CPED_CONFIG_FLAG_0xDF4AEF0D = 92, + * CPED_CONFIG_FLAG_ForcePedLoadCover = 93, + * _CPED_CONFIG_FLAG_0x300E4CD3 = 94, + * _CPED_CONFIG_FLAG_0xF1C5BF04 = 95, + * _CPED_CONFIG_FLAG_0x89C2EF13 = 96, + * CPED_CONFIG_FLAG_VaultFromCover = 97, + * _CPED_CONFIG_FLAG_0x02A852C8 = 98, + * _CPED_CONFIG_FLAG_0x3D9407F1 = 99, + * _CPED_CONFIG_FLAG_IsDrunk = 100, // 0x319B4558 + * CPED_CONFIG_FLAG_ForcedAim = 101, + * _CPED_CONFIG_FLAG_0xB942D71A = 102, + * _CPED_CONFIG_FLAG_0xD26C55A8 = 103, + * CPED_CONFIG_FLAG_OpenDoorArmIK = 104, + * CPED_CONFIG_FLAG_ForceReload = 105, + * CPED_CONFIG_FLAG_DontActivateRagdollFromVehicleImpact = 106, + * CPED_CONFIG_FLAG_DontActivateRagdollFromBulletImpact = 107, + * CPED_CONFIG_FLAG_DontActivateRagdollFromExplosions = 108, + * CPED_CONFIG_FLAG_DontActivateRagdollFromFire = 109, + * CPED_CONFIG_FLAG_DontActivateRagdollFromElectrocution = 110, + * _CPED_CONFIG_FLAG_0x83C0A4BF = 111, + * _CPED_CONFIG_FLAG_0x0E0FAF8C = 112, + * CPED_CONFIG_FLAG_KeepWeaponHolsteredUnlessFired = 113, + * _CPED_CONFIG_FLAG_0x43B80B79 = 114, + * _CPED_CONFIG_FLAG_0x0D2A9309 = 115, + * CPED_CONFIG_FLAG_GetOutBurningVehicle = 116, + * CPED_CONFIG_FLAG_BumpedByPlayer = 117, + * CPED_CONFIG_FLAG_RunFromFiresAndExplosions = 118, + * CPED_CONFIG_FLAG_TreatAsPlayerDuringTargeting = 119, + * CPED_CONFIG_FLAG_IsHandCuffed = 120, + * CPED_CONFIG_FLAG_IsAnkleCuffed = 121, + * CPED_CONFIG_FLAG_DisableMelee = 122, + * CPED_CONFIG_FLAG_DisableUnarmedDrivebys = 123, + * CPED_CONFIG_FLAG_JustGetsPulledOutWhenElectrocuted = 124, + * _CPED_CONFIG_FLAG_0x5FED6BFD = 125, + * CPED_CONFIG_FLAG_WillNotHotwireLawEnforcementVehicle = 126, + * CPED_CONFIG_FLAG_WillCommandeerRatherThanJack = 127, + * CPED_CONFIG_FLAG_CanBeAgitated = 128, + * CPED_CONFIG_FLAG_ForcePedToFaceLeftInCover = 129, + * CPED_CONFIG_FLAG_ForcePedToFaceRightInCover = 130, + * CPED_CONFIG_FLAG_BlockPedFromTurningInCover = 131, + * CPED_CONFIG_FLAG_KeepRelationshipGroupAfterCleanUp = 132, + * CPED_CONFIG_FLAG_ForcePedToBeDragged = 133, + * CPED_CONFIG_FLAG_PreventPedFromReactingToBeingJacked = 134, + * CPED_CONFIG_FLAG_IsScuba = 135, + * CPED_CONFIG_FLAG_WillArrestRatherThanJack = 136, + * CPED_CONFIG_FLAG_RemoveDeadExtraFarAway = 137, + * CPED_CONFIG_FLAG_RidingTrain = 138, + * CPED_CONFIG_FLAG_ArrestResult = 139, + * CPED_CONFIG_FLAG_CanAttackFriendly = 140, + * CPED_CONFIG_FLAG_WillJackAnyPlayer = 141, + * _CPED_CONFIG_FLAG_0x6901E731 = 142, + * _CPED_CONFIG_FLAG_0x9EC9BF6C = 143, + * CPED_CONFIG_FLAG_WillJackWantedPlayersRatherThanStealCar = 144, + * CPED_CONFIG_FLAG_ShootingAnimFlag = 145, + * CPED_CONFIG_FLAG_DisableLadderClimbing = 146, + * CPED_CONFIG_FLAG_StairsDetected = 147, + * CPED_CONFIG_FLAG_SlopeDetected = 148, + * _CPED_CONFIG_FLAG_0x1A15670B = 149, + * CPED_CONFIG_FLAG_CowerInsteadOfFlee = 150, + * CPED_CONFIG_FLAG_CanActivateRagdollWhenVehicleUpsideDown = 151, + * CPED_CONFIG_FLAG_AlwaysRespondToCriesForHelp = 152, + * CPED_CONFIG_FLAG_DisableBloodPoolCreation = 153, + * CPED_CONFIG_FLAG_ShouldFixIfNoCollision = 154, + * CPED_CONFIG_FLAG_CanPerformArrest = 155, + * CPED_CONFIG_FLAG_CanPerformUncuff = 156, + * CPED_CONFIG_FLAG_CanBeArrested = 157, + * _CPED_CONFIG_FLAG_0xF7960FF5 = 158, + * CPED_CONFIG_FLAG_PlayerPreferFrontSeatMP = 159, + * _CPED_CONFIG_FLAG_0x0C6C3099 = 160, + * _CPED_CONFIG_FLAG_0x645F927A = 161, + * _CPED_CONFIG_FLAG_0xA86549B9 = 162, + * _CPED_CONFIG_FLAG_0x8AAF337A = 163, + * _CPED_CONFIG_FLAG_0x13BAA6E7 = 164, + * _CPED_CONFIG_FLAG_0x5FB9D1F5 = 165, + * CPED_CONFIG_FLAG_IsInjured = 166, + * CPED_CONFIG_FLAG_DontEnterVehiclesInPlayersGroup = 167, + * _CPED_CONFIG_FLAG_0xD8072639 = 168, + * CPED_CONFIG_FLAG_PreventAllMeleeTaunts = 169, + * CPED_CONFIG_FLAG_ForceDirectEntry = 170, + * CPED_CONFIG_FLAG_AlwaysSeeApproachingVehicles = 171, + * CPED_CONFIG_FLAG_CanDiveAwayFromApproachingVehicles = 172, + * CPED_CONFIG_FLAG_AllowPlayerToInterruptVehicleEntryExit = 173, + * CPED_CONFIG_FLAG_OnlyAttackLawIfPlayerIsWanted = 174, + * _CPED_CONFIG_FLAG_0x90008BFA = 175, + * _CPED_CONFIG_FLAG_0x07C7A910 = 176, + * CPED_CONFIG_FLAG_PedsJackingMeDontGetIn = 177, + * _CPED_CONFIG_FLAG_0xCE4E8BE2 = 178, + * CPED_CONFIG_FLAG_PedIgnoresAnimInterruptEvents = 179, + * CPED_CONFIG_FLAG_IsInCustody = 180, + * CPED_CONFIG_FLAG_ForceStandardBumpReactionThresholds = 181, + * CPED_CONFIG_FLAG_LawWillOnlyAttackIfPlayerIsWanted = 182, + * CPED_CONFIG_FLAG_IsAgitated = 183, + * CPED_CONFIG_FLAG_PreventAutoShuffleToDriversSeat = 184, + * CPED_CONFIG_FLAG_UseKinematicModeWhenStationary = 185, + * CPED_CONFIG_FLAG_EnableWeaponBlocking = 186, + * CPED_CONFIG_FLAG_HasHurtStarted = 187, + * CPED_CONFIG_FLAG_DisableHurt = 188, + * CPED_CONFIG_FLAG_PlayerIsWeird = 189, + * _CPED_CONFIG_FLAG_0x32FC208B = 190, + * _CPED_CONFIG_FLAG_0x0C296E5A = 191, + * _CPED_CONFIG_FLAG_0xE63B73EC = 192, + * CPED_CONFIG_FLAG_DoNothingWhenOnFootByDefault = 193, + * CPED_CONFIG_FLAG_UsingScenario = 194, + * CPED_CONFIG_FLAG_VisibleOnScreen = 195, + * _CPED_CONFIG_FLAG_0xD88C58A1 = 196, + * _CPED_CONFIG_FLAG_0x5A3DCF43 = 197, + * _CPED_CONFIG_FLAG_0xEA02B420 = 198, + * CPED_CONFIG_FLAG_DontActivateRagdollOnVehicleCollisionWhenDead = 199, + * CPED_CONFIG_FLAG_HasBeenInArmedCombat = 200, + * _CPED_CONFIG_FLAG_0x5E6466F6 = 201, + * CPED_CONFIG_FLAG_Avoidance_Ignore_All = 202, + * CPED_CONFIG_FLAG_Avoidance_Ignored_by_All = 203, + * CPED_CONFIG_FLAG_Avoidance_Ignore_Group1 = 204, + * CPED_CONFIG_FLAG_Avoidance_Member_of_Group1 = 205, + * CPED_CONFIG_FLAG_ForcedToUseSpecificGroupSeatIndex = 206, + * _CPED_CONFIG_FLAG_0x415B26B9 = 207, + * CPED_CONFIG_FLAG_DisableExplosionReactions = 208, + * CPED_CONFIG_FLAG_DodgedPlayer = 209, + * CPED_CONFIG_FLAG_WaitingForPlayerControlInterrupt = 210, + * CPED_CONFIG_FLAG_ForcedToStayInCover = 211, + * CPED_CONFIG_FLAG_GeneratesSoundEvents = 212, + * CPED_CONFIG_FLAG_ListensToSoundEvents = 213, + * CPED_CONFIG_FLAG_AllowToBeTargetedInAVehicle = 214, + * CPED_CONFIG_FLAG_WaitForDirectEntryPointToBeFreeWhenExiting = 215, + * CPED_CONFIG_FLAG_OnlyRequireOnePressToExitVehicle = 216, + * CPED_CONFIG_FLAG_ForceExitToSkyDive = 217, + * _CPED_CONFIG_FLAG_0x3C7DF9DF = 218, + * _CPED_CONFIG_FLAG_0x848FFEF2 = 219, + * CPED_CONFIG_FLAG_DontEnterLeadersVehicle = 220, + * CPED_CONFIG_FLAG_DisableExitToSkyDive = 221, + * _CPED_CONFIG_FLAG_0x84F722FA = 222, + * _CPED_CONFIG_FLAG_Shrink = 223, // 0xD1B87B1F + * _CPED_CONFIG_FLAG_0x728AA918 = 224, + * CPED_CONFIG_FLAG_DisablePotentialToBeWalkedIntoResponse = 225, + * CPED_CONFIG_FLAG_DisablePedAvoidance = 226, + * CPED_CONFIG_FLAG_ForceRagdollUponDeath = 227, + * _CPED_CONFIG_FLAG_0x1EA7225F = 228, + * CPED_CONFIG_FLAG_DisablePanicInVehicle = 229, + * CPED_CONFIG_FLAG_AllowedToDetachTrailer = 230, + * _CPED_CONFIG_FLAG_0xFC3E572D = 231, + * _CPED_CONFIG_FLAG_0x08E9F9CF = 232, + * _CPED_CONFIG_FLAG_0x2D3BA52D = 233, + * _CPED_CONFIG_FLAG_0xFD2F53EA = 234, + * _CPED_CONFIG_FLAG_0x31A1B03B = 235, + * CPED_CONFIG_FLAG_IsHoldingProp = 236, + * CPED_CONFIG_FLAG_BlocksPathingWhenDead = 237, + * _CPED_CONFIG_FLAG_0xCE57C9A3 = 238, + * _CPED_CONFIG_FLAG_0x26149198 = 239, + * CPED_CONFIG_FLAG_ForceSkinCharacterCloth = 240, + * CPED_CONFIG_FLAG_LeaveEngineOnWhenExitingVehicles = 241, + * CPED_CONFIG_FLAG_PhoneDisableTextingAnimations = 242, + * CPED_CONFIG_FLAG_PhoneDisableTalkingAnimations = 243, + * CPED_CONFIG_FLAG_PhoneDisableCameraAnimations = 244, + * CPED_CONFIG_FLAG_DisableBlindFiringInShotReactions = 245, + * CPED_CONFIG_FLAG_AllowNearbyCoverUsage = 246, + * _CPED_CONFIG_FLAG_0x0C754ACA = 247, + * CPED_CONFIG_FLAG_CanPlayInCarIdles = 248, + * CPED_CONFIG_FLAG_CanAttackNonWantedPlayerAsLaw = 249, + * CPED_CONFIG_FLAG_WillTakeDamageWhenVehicleCrashes = 250, + * CPED_CONFIG_FLAG_AICanDrivePlayerAsRearPassenger = 251, + * CPED_CONFIG_FLAG_PlayerCanJackFriendlyPlayers = 252, + * CPED_CONFIG_FLAG_OnStairs = 253, + * _CPED_CONFIG_FLAG_0xE1A2F73F = 254, + * CPED_CONFIG_FLAG_AIDriverAllowFriendlyPassengerSeatEntry = 255, + * _CPED_CONFIG_FLAG_0xF1EB20A9 = 256, + * CPED_CONFIG_FLAG_AllowMissionPedToUseInjuredMovement = 257, + * _CPED_CONFIG_FLAG_0x329DCF1A = 258, + * _CPED_CONFIG_FLAG_0x8D90DD1B = 259, + * _CPED_CONFIG_FLAG_0xB8A292B7 = 260, + * CPED_CONFIG_FLAG_PreventUsingLowerPrioritySeats = 261, + * _CPED_CONFIG_FLAG_0x2AF558F0 = 262, + * _CPED_CONFIG_FLAG_0x82251455 = 263, + * _CPED_CONFIG_FLAG_0x30CF498B = 264, + * _CPED_CONFIG_FLAG_0xE1CD50AF = 265, + * _CPED_CONFIG_FLAG_0x72E4AE48 = 266, + * _CPED_CONFIG_FLAG_0xC2657EA1 = 267, + * CPED_CONFIG_FLAG_TeleportToLeaderVehicle = 268, + * CPED_CONFIG_FLAG_Avoidance_Ignore_WeirdPedBuffer = 269, + * CPED_CONFIG_FLAG_OnStairSlope = 270, + * _CPED_CONFIG_FLAG_0xA0897933 = 271, + * CPED_CONFIG_FLAG_DontBlipCop = 272, + * CPED_CONFIG_FLAG_ClimbedShiftedFence = 273, + * _CPED_CONFIG_FLAG_0xF7823618 = 274, + * CPED_CONFIG_FLAG_KillWhenTrapped = 275, + * CPED_CONFIG_FLAG_EdgeDetected = 276, + * _CPED_CONFIG_FLAG_0x92B67896 = 277, + * _CPED_CONFIG_FLAG_0xCAD677C9 = 278, + * CPED_CONFIG_FLAG_AvoidTearGas = 279, + * _CPED_CONFIG_FLAG_0x5276AC7B = 280, + * CPED_CONFIG_FLAG_DisableGoToWritheWhenInjured = 281, + * CPED_CONFIG_FLAG_OnlyUseForcedSeatWhenEnteringHeliInGroup = 282, + * _CPED_CONFIG_FLAG_0x9139724D = 283, + * _CPED_CONFIG_FLAG_0xA1457461 = 284, + * CPED_CONFIG_FLAG_DisableWeirdPedEvents = 285, + * CPED_CONFIG_FLAG_ShouldChargeNow = 286, + * CPED_CONFIG_FLAG_RagdollingOnBoat = 287, + * CPED_CONFIG_FLAG_HasBrandishedWeapon = 288, + * _CPED_CONFIG_FLAG_0x1B9EE8A1 = 289, + * _CPED_CONFIG_FLAG_0xF3F5758C = 290, + * _CPED_CONFIG_FLAG_0x2A9307F1 = 291, + * _CPED_CONFIG_FLAG_FreezePosition = 292, // 0x7403D216 + * _CPED_CONFIG_FLAG_0xA06A3C6C = 293, + * CPED_CONFIG_FLAG_DisableShockingEvents = 294, + * _CPED_CONFIG_FLAG_0xF8DA25A5 = 295, + * CPED_CONFIG_FLAG_NeverReactToPedOnRoof = 296, + * _CPED_CONFIG_FLAG_0xB31F1187 = 297, + * _CPED_CONFIG_FLAG_0x84315402 = 298, + * CPED_CONFIG_FLAG_DisableShockingDrivingOnPavementEvents = 299, + * _CPED_CONFIG_FLAG_0xC7829B67 = 300, + * CPED_CONFIG_FLAG_DisablePedConstraints = 301, + * CPED_CONFIG_FLAG_ForceInitialPeekInCover = 302, + * _CPED_CONFIG_FLAG_0x2ADA871B = 303, + * _CPED_CONFIG_FLAG_0x47BC8A58 = 304, + * CPED_CONFIG_FLAG_DisableJumpingFromVehiclesAfterLeader = 305, + * _CPED_CONFIG_FLAG_0x4A133C50 = 306, + * _CPED_CONFIG_FLAG_0xC58099C3 = 307, + * _CPED_CONFIG_FLAG_0xF3D76D41 = 308, + * _CPED_CONFIG_FLAG_0xB0EEE9F2 = 309, + * CPED_CONFIG_FLAG_IsInCluster = 310, + * CPED_CONFIG_FLAG_ShoutToGroupOnPlayerMelee = 311, + * CPED_CONFIG_FLAG_IgnoredByAutoOpenDoors = 312, + * _CPED_CONFIG_FLAG_0xD4136C22 = 313, + * CPED_CONFIG_FLAG_ForceIgnoreMeleeActiveCombatant = 314, + * CPED_CONFIG_FLAG_CheckLoSForSoundEvents = 315, + * _CPED_CONFIG_FLAG_0xD5C98277 = 316, + * CPED_CONFIG_FLAG_CanSayFollowedByPlayerAudio = 317, + * CPED_CONFIG_FLAG_ActivateRagdollFromMinorPlayerContact = 318, + * _CPED_CONFIG_FLAG_0xD8BE1D54 = 319, + * CPED_CONFIG_FLAG_ForcePoseCharacterCloth = 320, + * CPED_CONFIG_FLAG_HasClothCollisionBounds = 321, + * CPED_CONFIG_FLAG_HasHighHeels = 322, + * _CPED_CONFIG_FLAG_0x86B01E54 = 323, + * CPED_CONFIG_FLAG_DontBehaveLikeLaw = 324, + * _CPED_CONFIG_FLAG_0xC03B736C = 325, // SpawnedAtScenario? + * CPED_CONFIG_FLAG_DisablePoliceInvestigatingBody = 326, + * CPED_CONFIG_FLAG_DisableWritheShootFromGround = 327, + * CPED_CONFIG_FLAG_LowerPriorityOfWarpSeats = 328, + * CPED_CONFIG_FLAG_DisableTalkTo = 329, + * CPED_CONFIG_FLAG_DontBlip = 330, + * CPED_CONFIG_FLAG_IsSwitchingWeapon = 331, + * CPED_CONFIG_FLAG_IgnoreLegIkRestrictions = 332, + * _CPED_CONFIG_FLAG_0x150468FD = 333, + * _CPED_CONFIG_FLAG_0x914EBD6B = 334, + * _CPED_CONFIG_FLAG_0x79AF3B6D = 335, + * _CPED_CONFIG_FLAG_0x75C7A632 = 336, + * _CPED_CONFIG_FLAG_0x52D530E2 = 337, + * _CPED_CONFIG_FLAG_0xDB2A90E0 = 338, + * CPED_CONFIG_FLAG_AllowTaskDoNothingTimeslicing = 339, + * _CPED_CONFIG_FLAG_0x12ADB567 = 340, + * _CPED_CONFIG_FLAG_0x105C8518 = 341, + * CPED_CONFIG_FLAG_NotAllowedToJackAnyPlayers = 342, + * _CPED_CONFIG_FLAG_0xED152C3E = 343, + * _CPED_CONFIG_FLAG_0xA0EFE6A8 = 344, + * CPED_CONFIG_FLAG_AlwaysLeaveTrainUponArrival = 345, + * _CPED_CONFIG_FLAG_0xCDDFE830 = 346, + * CPED_CONFIG_FLAG_OnlyWritheFromWeaponDamage = 347, + * CPED_CONFIG_FLAG_UseSloMoBloodVfx = 348, + * CPED_CONFIG_FLAG_EquipJetpack = 349, + * CPED_CONFIG_FLAG_PreventDraggedOutOfCarThreatResponse = 350, + * _CPED_CONFIG_FLAG_0xE13D1F7C = 351, + * _CPED_CONFIG_FLAG_0x40E25FB9 = 352, + * _CPED_CONFIG_FLAG_0x930629D9 = 353, + * _CPED_CONFIG_FLAG_0xECCF0C7F = 354, + * _CPED_CONFIG_FLAG_0xB6E9613B = 355, + * CPED_CONFIG_FLAG_ForceDeepSurfaceCheck = 356, + * CPED_CONFIG_FLAG_DisableDeepSurfaceAnims = 357, + * CPED_CONFIG_FLAG_DontBlipNotSynced = 358, + * CPED_CONFIG_FLAG_IsDuckingInVehicle = 359, + * CPED_CONFIG_FLAG_PreventAutoShuffleToTurretSeat = 360, + * CPED_CONFIG_FLAG_DisableEventInteriorStatusCheck = 361, + * CPED_CONFIG_FLAG_HasReserveParachute = 362, + * CPED_CONFIG_FLAG_UseReserveParachute = 363, + * CPED_CONFIG_FLAG_TreatDislikeAsHateWhenInCombat = 364, + * CPED_CONFIG_FLAG_OnlyUpdateTargetWantedIfSeen = 365, + * CPED_CONFIG_FLAG_AllowAutoShuffleToDriversSeat = 366, + * _CPED_CONFIG_FLAG_0xD7E07D37 = 367, + * _CPED_CONFIG_FLAG_0x03C4FD24 = 368, + * _CPED_CONFIG_FLAG_0x7675789A = 369, + * _CPED_CONFIG_FLAG_0xB7288A88 = 370, + * _CPED_CONFIG_FLAG_0xC06B6291 = 371, + * CPED_CONFIG_FLAG_PreventReactingToSilencedCloneBullets = 372, + * CPED_CONFIG_FLAG_DisableInjuredCryForHelpEvents = 373, + * CPED_CONFIG_FLAG_NeverLeaveTrain = 374, + * CPED_CONFIG_FLAG_DontDropJetpackOnDeath = 375, + * _CPED_CONFIG_FLAG_0x147F1FFB = 376, + * _CPED_CONFIG_FLAG_0x4376DD79 = 377, + * _CPED_CONFIG_FLAG_0xCD3DB518 = 378, + * _CPED_CONFIG_FLAG_0xFE4BA4B6 = 379, + * CPED_CONFIG_FLAG_DisableAutoEquipHelmetsInBikes = 380, + * _CPED_CONFIG_FLAG_0xBCD816CD = 381, + * _CPED_CONFIG_FLAG_0xCF02DD69 = 382, + * _CPED_CONFIG_FLAG_0xF73AFA2E = 383, + * _CPED_CONFIG_FLAG_0x80B9A9D0 = 384, + * _CPED_CONFIG_FLAG_0xF601F7EE = 385, + * _CPED_CONFIG_FLAG_0xA91350FC = 386, + * _CPED_CONFIG_FLAG_0x3AB23B96 = 387, + * CPED_CONFIG_FLAG_IsClimbingLadder = 388, + * CPED_CONFIG_FLAG_HasBareFeet = 389, + * CPED_CONFIG_FLAG_UNUSED_REPLACE_ME_2 = 390, + * CPED_CONFIG_FLAG_GoOnWithoutVehicleIfItIsUnableToGetBackToRoad = 391, + * CPED_CONFIG_FLAG_BlockDroppingHealthSnacksOnDeath = 392, + * _CPED_CONFIG_FLAG_0xC11D3E8F = 393, + * CPED_CONFIG_FLAG_ForceThreatResponseToNonFriendToFriendMeleeActions = 394, + * CPED_CONFIG_FLAG_DontRespondToRandomPedsDamage = 395, + * CPED_CONFIG_FLAG_AllowContinuousThreatResponseWantedLevelUpdates = 396, + * CPED_CONFIG_FLAG_KeepTargetLossResponseOnCleanup = 397, + * CPED_CONFIG_FLAG_PlayersDontDragMeOutOfCar = 398, + * CPED_CONFIG_FLAG_BroadcastRepondedToThreatWhenGoingToPointShooting = 399, + * CPED_CONFIG_FLAG_IgnorePedTypeForIsFriendlyWith = 400, + * CPED_CONFIG_FLAG_TreatNonFriendlyAsHateWhenInCombat = 401, + * CPED_CONFIG_FLAG_DontLeaveVehicleIfLeaderNotInVehicle = 402, + * _CPED_CONFIG_FLAG_0x5E5B9591 = 403, + * CPED_CONFIG_FLAG_AllowMeleeReactionIfMeleeProofIsOn = 404, + * _CPED_CONFIG_FLAG_0x77840177 = 405, + * _CPED_CONFIG_FLAG_0x1C7ACAC4 = 406, + * CPED_CONFIG_FLAG_UseNormalExplosionDamageWhenBlownUpInVehicle = 407, + * CPED_CONFIG_FLAG_DisableHomingMissileLockForVehiclePedInside = 408, + * CPED_CONFIG_FLAG_DisableTakeOffScubaGear = 409, + * CPED_CONFIG_FLAG_IgnoreMeleeFistWeaponDamageMult = 410, + * CPED_CONFIG_FLAG_LawPedsCanFleeFromNonWantedPlayer = 411, + * CPED_CONFIG_FLAG_ForceBlipSecurityPedsIfPlayerIsWanted = 412, + * CPED_CONFIG_FLAG_IsHolsteringWeapon = 413, + * CPED_CONFIG_FLAG_UseGoToPointForScenarioNavigation = 414, + * CPED_CONFIG_FLAG_DontClearLocalPassengersWantedLevel = 415, + * CPED_CONFIG_FLAG_BlockAutoSwapOnWeaponPickups = 416, + * CPED_CONFIG_FLAG_ThisPedIsATargetPriorityForAI = 417, + * CPED_CONFIG_FLAG_IsSwitchingHelmetVisor = 418, + * CPED_CONFIG_FLAG_ForceHelmetVisorSwitch = 419, + * _CPED_CONFIG_FLAG_0xCFF5F6DE = 420, + * CPED_CONFIG_FLAG_UseOverrideFootstepPtFx = 421, + * CPED_CONFIG_FLAG_DisableVehicleCombat = 422, + * _CPED_CONFIG_FLAG_0xFE401D26 = 423, + * CPED_CONFIG_FLAG_FallsLikeAircraft = 424, + * _CPED_CONFIG_FLAG_0x2B42AE82 = 425, + * CPED_CONFIG_FLAG_UseLockpickVehicleEntryAnimations = 426, + * CPED_CONFIG_FLAG_IgnoreInteriorCheckForSprinting = 427, + * CPED_CONFIG_FLAG_SwatHeliSpawnWithinLastSpottedLocation = 428, + * CPED_CONFIG_FLAG_DisableStartEngine = 429, + * CPED_CONFIG_FLAG_IgnoreBeingOnFire = 430, + * CPED_CONFIG_FLAG_DisableTurretOrRearSeatPreference = 431, + * CPED_CONFIG_FLAG_DisableWantedHelicopterSpawning = 432, + * CPED_CONFIG_FLAG_UseTargetPerceptionForCreatingAimedAtEvents = 433, + * CPED_CONFIG_FLAG_DisableHomingMissileLockon = 434, + * CPED_CONFIG_FLAG_ForceIgnoreMaxMeleeActiveSupportCombatants = 435, + * CPED_CONFIG_FLAG_StayInDefensiveAreaWhenInVehicle = 436, + * CPED_CONFIG_FLAG_DontShoutTargetPosition = 437, + * CPED_CONFIG_FLAG_DisableHelmetArmor = 438, + * _CPED_CONFIG_FLAG_0xCB7F3A1E = 439, + * _CPED_CONFIG_FLAG_0x50178878 = 440, + * CPED_CONFIG_FLAG_PreventVehExitDueToInvalidWeapon = 441, + * CPED_CONFIG_FLAG_IgnoreNetSessionFriendlyFireCheckForAllowDamage = 442, + * CPED_CONFIG_FLAG_DontLeaveCombatIfTargetPlayerIsAttackedByPolice = 443, + * CPED_CONFIG_FLAG_CheckLockedBeforeWarp = 444, + * CPED_CONFIG_FLAG_DontShuffleInVehicleToMakeRoom = 445, + * CPED_CONFIG_FLAG_GiveWeaponOnGetup = 446, + * CPED_CONFIG_FLAG_DontHitVehicleWithProjectiles = 447, + * CPED_CONFIG_FLAG_DisableForcedEntryForOpenVehiclesFromTryLockedDoor = 448, + * CPED_CONFIG_FLAG_FiresDummyRockets = 449, + * CPED_CONFIG_FLAG_PedIsArresting = 450, + * CPED_CONFIG_FLAG_IsDecoyPed = 451, + * CPED_CONFIG_FLAG_HasEstablishedDecoy = 452, + * CPED_CONFIG_FLAG_BlockDispatchedHelicoptersFromLanding = 453, + * CPED_CONFIG_FLAG_DontCryForHelpOnStun = 454, + * _CPED_CONFIG_FLAG_0xB68D3EAB = 455, + * CPED_CONFIG_FLAG_CanBeIncapacitated = 456, + * _CPED_CONFIG_FLAG_0x4BD5EBAD = 457, + * CPED_CONFIG_FLAG_DontChangeTargetFromMelee = 458, + * }; + */ + export function setPedConfigFlag(ped: Ped | Player | number, flagId: number, value: boolean): void; + + /** + * PED::SET_PED_RESET_FLAG(PLAYER::PLAYER_PED_ID(), 240, 1); + * Known values: + * PRF_PreventGoingIntoStillInVehicleState = 236 *(fanatic2.c)* + */ + export function setPedResetFlag(ped: Ped | Player | number, flagId: number, doReset: boolean): void; + + /** + * See SET_PED_CONFIG_FLAG + */ + export function getPedConfigFlag(ped: Ped | Player | number, flagId: number, p2: boolean): boolean; + + export function getPedResetFlag(ped: Ped | Player | number, flagId: number): boolean; + + export function setPedGroupMemberPassengerIndex(ped: Ped | Player | number, index: number): void; + + export function setPedCanEvasiveDive(ped: Ped | Player | number, toggle: boolean): void; + + /** + * Presumably returns the Entity that the Ped is currently diving out of the way of. + * var num3; + * if (PED::IS_PED_EVASIVE_DIVING(A_0, &num3) != 0) + * if (ENTITY::IS_ENTITY_A_VEHICLE(num3) != 0) + */ + export function isPedEvasiveDiving(ped: Ped | Player | number, evadingEntity?: Entity | number): [boolean, Entity | number]; + + export function setPedShootsAtCoord(ped: Ped | Player | number, x: number, y: number, z: number, toggle: boolean): void; + + /** + * Full list of peds by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/peds.json + */ + export function setPedModelIsSuppressed(modelHash: number, toggle: boolean): void; - export function setPedNoTimeDelayBeforeShot(p0: any): void; + export function stopAnyPedModelBeingSuppressed(): void; - export function isAnyPedNearPoint(x: number, y: number, z: number, radius: number): boolean; + export function setPedCanBeTargetedWhenInjured(ped: Ped | Player | number, toggle: boolean): void; - export function forcePedAiAndAnimationUpdate(ped: Player | number, p1: boolean, p2: boolean): void; + export function setPedGeneratesDeadBodyEvents(ped: Ped | Player | number, toggle: boolean): void; - export function isPedHeadingTowardsPosition(ped: Player | number, x: number, y: number, z: number, p4: number): boolean; + export function blockPedFromGeneratingDeadBodyEventsWhenDead(ped: Ped | Player | number, toggle: boolean): void; - export function requestPedVisibilityTracking(ped: Player | number): void; + export function setPedWillOnlyAttackWantedPlayer(p0: any, p1: any): void; - export function requestPedVehicleVisibilityTracking(ped: Player | number, p1: boolean): void; + export function setPedCanRagdollFromPlayerImpact(ped: Ped | Player | number, toggle: boolean): void; - export function requestPedRestrictedVehicleVisibilityTracking(ped: Player | number, p1: boolean): void; + /** + * PoliceMotorcycleHelmet 1024 + * RegularMotorcycleHelmet 4096 + * FiremanHelmet 16384 + * PilotHeadset 32768 + * PilotHelmet 65536 + * -- + * p2 is generally 4096 or 16384 in the scripts. p1 varies between 1 and 0. + */ + export function givePedHelmet(ped: Ped | Player | number, cannotRemove: boolean, helmetFlag: number, textureIndex: number): void; - export function requestPedUseSmallBboxVisibilityTracking(ped: Player | number, p1: boolean): void; + export function removePedHelmet(ped: Ped | Player | number, instantly: boolean): void; - /** - * returns whether or not a ped is visible within your FOV, not this check auto's to false after a certain distance. - * Target needs to be tracked.. won't work otherwise. - */ - export function isTrackedPedVisible(ped: Player | number): boolean; + export function isPedTakingOffHelmet(ped: Ped | Player | number): boolean; - export function getTrackedPedPixelcount(ped: Player | number): number; + export function setPedHelmet(ped: Ped | Player | number, canWearHelmet: boolean): void; - export function isPedTracked(ped: Player | number): boolean; + export function setPedHelmetFlag(ped: Ped | Player | number, helmetFlag: number): void; - export function hasPedReceivedEvent(ped: Player | number, eventId: number): boolean; + /** + * List of component/props ID + * gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html + */ + export function setPedHelmetPropIndex(ped: Ped | Player | number, propIndex: number, p2: boolean): void; - export function canPedSeeHatedPed(ped1: Player | number, ped2: Player | number): boolean; + export function setPedHelmetVisorPropIndices(ped: Ped | Player | number, p1: boolean, p2: number, p3: number): void; - export function canPedShuffleToOrFromTurretSeat(ped: Player | number, p1?: number): [boolean, number]; + export function isPedHelmetVisorUp(ped: Ped | Player | number): boolean; - export function canPedShuffleToOrFromExtraSeat(ped: Player | number, p1?: number): [boolean, number]; + export function setPedHelmetTextureIndex(ped: Ped | Player | number, textureIndex: number): void; /** - * no bone= -1 - * boneIds: - * SKEL_ROOT = 0x0, - * SKEL_Pelvis = 0x2e28, - * SKEL_L_Thigh = 0xe39f, - * SKEL_L_Calf = 0xf9bb, - * SKEL_L_Foot = 0x3779, - * SKEL_L_Toe0 = 0x83c, - * IK_L_Foot = 0xfedd, - * See NativeDB for reference: http://natives.altv.mp/#/0x3F428D08BE5AAE31 - */ - export function getPedBoneIndex(ped: Player | number, boneId: number): number; + * Returns true if the ped passed through the parenthesis is wearing a helmet. + */ + export function isPedWearingHelmet(ped: Ped | Player | number): boolean; - export function getPedRagdollBoneIndex(ped: Player | number, bone: number): number; + export function clearPedStoredHatProp(ped: Ped | Player | number): void; - /** - * Values look to be between 0.0 and 1.0 - * From decompiled scripts: 0.0, 0.6, 0.65, 0.8, 1.0 - * You are correct, just looked in IDA it breaks from the function if it's less than 0.0f or greater than 1.0f. - */ - export function setPedEnveffScale(ped: Player | number, value: number): void; + export function getPedHelmetStoredHatPropIndex(ped: Ped | Player | number): number; - export function getPedEnveffScale(ped: Player | number): number; + export function getPedHelmetStoredHatTexIndex(ped: Ped | Player | number): number; - export function setEnablePedEnveffScale(ped: Player | number, toggle: boolean): void; + export function isCurrentHeadPropAHelmet(p0: any): boolean; - /** - * In agency_heist3b.c4, its like this 90% of the time: - * PED::SET_PED_ENVEFF_SCALE(ped, 1.0); - * PED::SET_PED_ENVEFF_CPV_ADD(ped, 87, 81, 68); - * PED::SET_ENABLE_PED_ENVEFF_SCALE(ped, 1); - * and its like this 10% of the time: - * PED::SET_PED_ENVEFF_CPV_ADD(ped, 0.2); - * PED::SET_PED_ENVEFF_SCALE(ped, 0.65); - * PED::SET_PED_ENVEFF_COLOR_MODULATOR(ped, 74, 69, 60); - * PED::SET_ENABLE_PED_ENVEFF_SCALE(ped, 1); - * @param ped :SET_PED_ENVEFF_CPV_ADD(ped, 0.099); - */ - export function setPedEnveffCpvAdd(ped: Player | number, p1: number): void; + export function setPedToLoadCover(ped: Ped | Player | number, toggle: boolean): void; /** - * Something related to the environmental effects natives. - * In the "agency_heist3b" script, p1 - p3 are always under 100 - usually they are {87, 81, 68}. If SET_PED_ENVEFF_SCALE is set to 0.65 (instead of the usual 1.0), they use {74, 69, 60} - */ - export function setPedEnveffColorModulator(ped: Player | number, p1: number, p2: number, p3: number): void; + * It simply makes the said ped to cower behind cover object(wall, desk, car) + * Peds flee attributes must be set to not to flee, first. Else, most of the peds, will just flee from gunshot sounds or any other panic situations. + */ + export function setPedCanCowerInCover(ped: Ped | Player | number, toggle: boolean): void; - /** - * This native sets the emissive intensity for the given ped. It is used for different 'glow' levels on illuminated clothing. - * @param intensity 0.0f - 1.0f - */ - export function setPedEmissiveScale(ped: Player | number, intensity: number): void; + export function setPedCanPeekInCover(ped: Ped | Player | number, toggle: boolean): void; - /** - * Use 0x4E90D746056E273D to set the illuminated clothing glow intensity for a specific ped. - * Returns a float between 0.0 and 1.0 representing the current illuminated clothing glow intensity. - */ - export function getPedEmissiveScale(ped: Player | number): number; + /** + * This native does absolutely nothing, just a nullsub + */ + export function setPedPlaysHeadOnHornAnimWhenDiesInVehicle(ped: Ped | Player | number, toggle: boolean): void; + + /** + * "IK" stands for "Inverse kinematics." I assume this has something to do with how the ped uses his legs to balance. In the scripts, the second parameter is always an int with a value of 2, 0, or sometimes 1 + */ + export function setPedLegIkMode(ped: Ped | Player | number, mode: number): void; + + export function setPedMotionBlur(ped: Ped | Player | number, toggle: boolean): void; + + export function setPedCanSwitchWeapon(ped: Ped | Player | number, toggle: boolean): void; + + export function setPedDiesInstantlyInWater(ped: Ped | Player | number, toggle: boolean): void; + + /** + * Only appears in lamar1 script. + */ + export function setLadderClimbInputState(ped: Ped | Player | number, p1: number): void; + + export function stopPedWeaponFiringWhenDropped(ped: Ped | Player | number): void; + + export function setScriptedAnimSeatOffset(ped: Ped | Player | number, p1: number): void; + + /** + * enum eCombatMovement // 0x4F456B61 + * { + * CM_Stationary, + * CM_Defensive, + * CM_WillAdvance, + * CM_WillRetreat + * }; + */ + export function setPedCombatMovement(ped: Ped | Player | number, combatMovement: number): void; + + /** + * See SET_PED_COMBAT_MOVEMENT + */ + export function getPedCombatMovement(ped: Ped | Player | number): number; + + /** + * enum eCombatAbility // 0xE793438C + * { + * CA_Poor, + * CA_Average, + * CA_Professional, + * CA_NumTypes + * }; + */ + export function setPedCombatAbility(ped: Ped | Player | number, abilityLevel: number): void; + + /** + * enum eCombatRange // 0xB69160F5 + * { + * CR_Near, + * CR_Medium, + * CR_Far, + * CR_VeryFar, + * CR_NumRanges + * }; + */ + export function setPedCombatRange(ped: Ped | Player | number, combatRange: number): void; + + /** + * See SET_PED_COMBAT_RANGE + */ + export function getPedCombatRange(ped: Ped | Player | number): number; + + /** + * enum eCombatAttributes // 0x0E8E7201 + * { + * BF_CanUseCover = 0, + * BF_CanUseVehicles = 1, + * BF_CanDoDrivebys = 2, + * BF_CanLeaveVehicle = 3, + * BF_CanUseDynamicStrafeDecisions = 4, + * BF_AlwaysFight = 5, + * BF_0x66BB9FCC = 6, + * BF_0x6837DA41 = 7, + * BF_0xB4A13A5A = 8, + * BF_0xEE326AAD = 9, + * BF_0x7DF2CCFA = 10, + * BF_0x0036D422 = 11, + * BF_BlindFireWhenInCover = 12, + * BF_Aggressive = 13, + * BF_CanInvestigate = 14, + * BF_HasRadio = 15, + * BF_0x6BDE28D1 = 16, + * BF_AlwaysFlee = 17, + * BF_0x7852797D = 18, + * BF_0x33497B95 = 19, + * BF_CanTauntInVehicle = 20, + * BF_CanChaseTargetOnFoot = 21, + * BF_WillDragInjuredPedsToSafety = 22, + * BF_0xCD7168B8 = 23, + * BF_UseProximityFiringRate = 24, + * BF_0x48F914F8 = 25, + * BF_0x2EA543D0 = 26, + * BF_PerfectAccuracy = 27, + * BF_CanUseFrustratedAdvance = 28, + * BF_0x3D131AC1 = 29, + * BF_0x3AD95F27 = 30, + * BF_MaintainMinDistanceToTarget = 31, + * BF_0xEAD68AD2 = 32, + * BF_0xA206C2E0 = 33, + * BF_CanUsePeekingVariations = 34, + * BF_0xA5715184 = 35, + * BF_0xD5265533 = 36, + * BF_0x2B84C2BF = 37, + * BF_DisableBulletReactions = 38, + * BF_CanBust = 39, + * BF_0xAA525726 = 40, + * BF_CanCommandeerVehicles = 41, + * BF_CanFlank = 42, + * BF_SwitchToAdvanceIfCantFindCover = 43, + * BF_SwitchToDefensiveIfInCover = 44, + * BF_0xEB4786A0 = 45, + * BF_CanFightArmedPedsWhenNotArmed = 46, + * BF_0xA08E9402 = 47, + * BF_0x952EAD7D = 48, + * BF_UseEnemyAccuracyScaling = 49, + * BF_CanCharge = 50, + * BF_0xDA8C2BD3 = 51, + * BF_0x6562F017 = 52, + * BF_0xA2C3D53B = 53, + * BF_AlwaysEquipBestWeapon = 54, + * BF_CanSeeUnderwaterPeds = 55, + * BF_0xF619486B = 56, + * BF_0x61EB63A3 = 57, + * BF_DisableFleeFromCombat = 58, + * BF_0x8976D12B = 59, + * BF_CanThrowSmokeGrenade = 60, + * BF_NonMissionPedsFleeFromThisPedUnlessArmed = 61, + * BF_0x5452A10C = 62, + * BF_FleesFromInvincibleOpponents = 63, + * BF_DisableBlockFromPursueDuringVehicleChase = 64, + * BF_DisableSpinOutDuringVehicleChase = 65, + * BF_DisableCruiseInFrontDuringBlockDuringVehicleChase = 66, + * BF_0x0B404731 = 67, + * BF_DisableReactToBuddyShot = 68, + * BF_0x7FFD6AEB = 69, + * BF_0x51F4AEF8 = 70, + * BF_PermitChargeBeyondDefensiveArea = 71, + * BF_0x63E0A8E2 = 72, + * BF_0xDF974436 = 73, + * BF_0x556C080B = 74, + * BF_0xA4D50035 = 75, + * BF_SetDisableShoutTargetPositionOnCombatStart = 76, + * BF_DisableRespondedToThreatBroadcast = 77, + * BF_0xCBB01765 = 78, + * BF_0x4F862ED4 = 79, + * BF_0xEF9C7C40 = 80, + * BF_0xE51B494F = 81, + * BF_0x054D0199 = 82, + * BF_0xD36BCE94 = 83, + * BF_0xFB11F690 = 84, + * BF_0xD208A9AD = 85, + * BF_AllowDogFighting = 86, + * BF_0x07A6E531 = 87, + * BF_0x34F9317B = 88, + * BF_0x4240F5A9 = 89, + * BF_0xEE129DBD = 90, + * BF_0x053AEAD9 = 91 + * }; + */ + export function setPedCombatAttributes(ped: Ped | Player | number, attributeId: number, enabled: boolean): void; + + /** + * enum eTargetLossResponseType + * { + * TLR_ExitTask, + * TLR_NeverLoseTarget, + * TLR_SearchForTarget + * }; + */ + export function setPedTargetLossResponse(ped: Ped | Player | number, responseType: number): void; + + export function isPedPerformingMeleeAction(ped: Ped | Player | number): boolean; + + export function isPedPerformingStealthKill(ped: Ped | Player | number): boolean; + + export function isPedPerformingACounterAttack(ped: Ped | Player | number): boolean; + + export function isPedBeingStealthKilled(ped: Ped | Player | number): boolean; + + export function getMeleeTargetForPed(ped: Ped | Player | number): Ped | Player | number; + + export function wasPedKilledByStealth(ped: Ped | Player | number): boolean; + + export function wasPedKilledByTakedown(ped: Ped | Player | number): boolean; + + export function wasPedKnockedOut(ped: Ped | Player | number): boolean; + + /** + * bit 1 (0x2) = use vehicle + * bit 15 (0x8000) = force cower + */ + export function setPedFleeAttributes(ped: Ped | Player | number, attributeFlags: number, enable: boolean): void; + + /** + * p1: Only "CODE_HUMAN_STAND_COWER" found in the b617d scripts. + */ + export function setPedCowerHash(ped: Ped | Player | number, p1: string): void; + + export function setPedSteersAroundDeadBodies(ped: Ped | Player | number, toggle: boolean): void; + + export function setPedSteersAroundPeds(ped: Ped | Player | number, toggle: boolean): void; + + export function setPedSteersAroundObjects(ped: Ped | Player | number, toggle: boolean): void; + + export function setPedSteersAroundVehicles(ped: Ped | Player | number, toggle: boolean): void; + + export function setPedIsAvoidedByOthers(p0: any, p1: boolean): void; - export function isPedShaderReady(ped: Player | number): boolean; + export function setPedIncreasedAvoidanceRadius(ped: Ped | Player | number): void; - export function setPedEnableCrewEmblem(ped: Player | number, toggle: boolean): void; + export function setPedBlocksPathingWhenDead(ped: Ped | Player | number, toggle: boolean): void; - /** - * This native does absolutely nothing, just a nullsub - */ + export function setPedNoTimeDelayBeforeShot(p0: any): void; + + export function isAnyPedNearPoint(x: number, y: number, z: number, radius: number): boolean; + + export function forcePedAiAndAnimationUpdate(ped: Ped | Player | number, p1: boolean, p2: boolean): void; + + export function isPedHeadingTowardsPosition(ped: Ped | Player | number, x: number, y: number, z: number, p4: number): boolean; + + export function requestPedVisibilityTracking(ped: Ped | Player | number): void; + + export function requestPedVehicleVisibilityTracking(ped: Ped | Player | number, p1: boolean): void; + + export function requestPedRestrictedVehicleVisibilityTracking(ped: Ped | Player | number, p1: boolean): void; + + export function requestPedUseSmallBboxVisibilityTracking(ped: Ped | Player | number, p1: boolean): void; + + /** + * returns whether or not a ped is visible within your FOV, not this check auto's to false after a certain distance. + * Target needs to be tracked.. won't work otherwise. + */ + export function isTrackedPedVisible(ped: Ped | Player | number): boolean; + + export function getTrackedPedPixelcount(ped: Ped | Player | number): number; + + export function isPedTracked(ped: Ped | Player | number): boolean; + + export function hasPedReceivedEvent(ped: Ped | Player | number, eventId: number): boolean; + + export function canPedSeeHatedPed(ped1: Ped | Player | number, ped2: Ped | Player | number): boolean; + + export function canPedShuffleToOrFromTurretSeat(ped: Ped | Player | number, p1?: number): [boolean, number]; + + export function canPedShuffleToOrFromExtraSeat(ped: Ped | Player | number, p1?: number): [boolean, number]; + + /** + * no bone= -1 + * boneIds: + * SKEL_ROOT = 0x0, + * SKEL_Pelvis = 0x2e28, + * SKEL_L_Thigh = 0xe39f, + * SKEL_L_Calf = 0xf9bb, + * SKEL_L_Foot = 0x3779, + * SKEL_L_Toe0 = 0x83c, + * IK_L_Foot = 0xfedd, + * PH_L_Foot = 0xe175, + * MH_L_Knee = 0xb3fe, + * SKEL_R_Thigh = 0xca72, + * SKEL_R_Calf = 0x9000, + * SKEL_R_Foot = 0xcc4d, + * SKEL_R_Toe0 = 0x512d, + * IK_R_Foot = 0x8aae, + * PH_R_Foot = 0x60e6, + * MH_R_Knee = 0x3fcf, + * RB_L_ThighRoll = 0x5c57, + * RB_R_ThighRoll = 0x192a, + * SKEL_Spine_Root = 0xe0fd, + * SKEL_Spine0 = 0x5c01, + * SKEL_Spine1 = 0x60f0, + * SKEL_Spine2 = 0x60f1, + * SKEL_Spine3 = 0x60f2, + * SKEL_L_Clavicle = 0xfcd9, + * SKEL_L_UpperArm = 0xb1c5, + * SKEL_L_Forearm = 0xeeeb, + * SKEL_L_Hand = 0x49d9, + * SKEL_L_Finger00 = 0x67f2, + * SKEL_L_Finger01 = 0xff9, + * SKEL_L_Finger02 = 0xffa, + * SKEL_L_Finger10 = 0x67f3, + * SKEL_L_Finger11 = 0x1049, + * SKEL_L_Finger12 = 0x104a, + * SKEL_L_Finger20 = 0x67f4, + * SKEL_L_Finger21 = 0x1059, + * SKEL_L_Finger22 = 0x105a, + * SKEL_L_Finger30 = 0x67f5, + * SKEL_L_Finger31 = 0x1029, + * SKEL_L_Finger32 = 0x102a, + * SKEL_L_Finger40 = 0x67f6, + * SKEL_L_Finger41 = 0x1039, + * SKEL_L_Finger42 = 0x103a, + * PH_L_Hand = 0xeb95, + * IK_L_Hand = 0x8cbd, + * RB_L_ForeArmRoll = 0xee4f, + * RB_L_ArmRoll = 0x1470, + * MH_L_Elbow = 0x58b7, + * SKEL_R_Clavicle = 0x29d2, + * SKEL_R_UpperArm = 0x9d4d, + * SKEL_R_Forearm = 0x6e5c, + * SKEL_R_Hand = 0xdead, + * SKEL_R_Finger00 = 0xe5f2, + * SKEL_R_Finger01 = 0xfa10, + * SKEL_R_Finger02 = 0xfa11, + * SKEL_R_Finger10 = 0xe5f3, + * SKEL_R_Finger11 = 0xfa60, + * SKEL_R_Finger12 = 0xfa61, + * SKEL_R_Finger20 = 0xe5f4, + * SKEL_R_Finger21 = 0xfa70, + * SKEL_R_Finger22 = 0xfa71, + * SKEL_R_Finger30 = 0xe5f5, + * SKEL_R_Finger31 = 0xfa40, + * SKEL_R_Finger32 = 0xfa41, + * SKEL_R_Finger40 = 0xe5f6, + * SKEL_R_Finger41 = 0xfa50, + * SKEL_R_Finger42 = 0xfa51, + * PH_R_Hand = 0x6f06, + * IK_R_Hand = 0x188e, + * RB_R_ForeArmRoll = 0xab22, + * RB_R_ArmRoll = 0x90ff, + * MH_R_Elbow = 0xbb0, + * SKEL_Neck_1 = 0x9995, + * SKEL_Head = 0x796e, + * IK_Head = 0x322c, + * FACIAL_facialRoot = 0xfe2c, + * FB_L_Brow_Out_000 = 0xe3db, + * FB_L_Lid_Upper_000 = 0xb2b6, + * FB_L_Eye_000 = 0x62ac, + * FB_L_CheekBone_000 = 0x542e, + * FB_L_Lip_Corner_000 = 0x74ac, + * FB_R_Lid_Upper_000 = 0xaa10, + * FB_R_Eye_000 = 0x6b52, + * FB_R_CheekBone_000 = 0x4b88, + * FB_R_Brow_Out_000 = 0x54c, + * FB_R_Lip_Corner_000 = 0x2ba6, + * FB_Brow_Centre_000 = 0x9149, + * FB_UpperLipRoot_000 = 0x4ed2, + * FB_UpperLip_000 = 0xf18f, + * FB_L_Lip_Top_000 = 0x4f37, + * FB_R_Lip_Top_000 = 0x4537, + * FB_Jaw_000 = 0xb4a0, + * FB_LowerLipRoot_000 = 0x4324, + * FB_LowerLip_000 = 0x508f, + * FB_L_Lip_Bot_000 = 0xb93b, + * FB_R_Lip_Bot_000 = 0xc33b, + * FB_Tongue_000 = 0xb987, + * RB_Neck_1 = 0x8b93, + * IK_Root = 0xdd1c + */ + export function getPedBoneIndex(ped: Ped | Player | number, boneId: number): number; + + export function getPedRagdollBoneIndex(ped: Ped | Player | number, bone: number): number; + + /** + * Values look to be between 0.0 and 1.0 + * From decompiled scripts: 0.0, 0.6, 0.65, 0.8, 1.0 + * You are correct, just looked in IDA it breaks from the function if it's less than 0.0f or greater than 1.0f. + */ + export function setPedEnveffScale(ped: Ped | Player | number, value: number): void; + + export function getPedEnveffScale(ped: Ped | Player | number): number; + + export function setEnablePedEnveffScale(ped: Ped | Player | number, toggle: boolean): void; + + /** + * In agency_heist3b.c4, its like this 90% of the time: + * PED::SET_PED_ENVEFF_CPV_ADD(ped, 0.099); + * PED::SET_PED_ENVEFF_SCALE(ped, 1.0); + * PED::SET_PED_ENVEFF_CPV_ADD(ped, 87, 81, 68); + * PED::SET_ENABLE_PED_ENVEFF_SCALE(ped, 1); + * and its like this 10% of the time: + * PED::SET_PED_ENVEFF_CPV_ADD(ped, 0.2); + * PED::SET_PED_ENVEFF_SCALE(ped, 0.65); + * PED::SET_PED_ENVEFF_COLOR_MODULATOR(ped, 74, 69, 60); + * PED::SET_ENABLE_PED_ENVEFF_SCALE(ped, 1); + */ + export function setPedEnveffCpvAdd(ped: Ped | Player | number, p1: number): void; + + /** + * Something related to the environmental effects natives. + * In the "agency_heist3b" script, p1 - p3 are always under 100 - usually they are {87, 81, 68}. If SET_PED_ENVEFF_SCALE is set to 0.65 (instead of the usual 1.0), they use {74, 69, 60} + */ + export function setPedEnveffColorModulator(ped: Ped | Player | number, p1: number, p2: number, p3: number): void; + + /** + * intensity: 0.0f - 1.0f + * This native sets the emissive intensity for the given ped. It is used for different 'glow' levels on illuminated clothing. + */ + export function setPedEmissiveScale(ped: Ped | Player | number, intensity: number): void; + + /** + * Use 0x4E90D746056E273D to set the illuminated clothing glow intensity for a specific ped. + * Returns a float between 0.0 and 1.0 representing the current illuminated clothing glow intensity. + */ + export function getPedEmissiveScale(ped: Ped | Player | number): number; + + export function isPedShaderReady(ped: Ped | Player | number): boolean; + + export function setPedEnableCrewEmblem(ped: Ped | Player | number, toggle: boolean): void; + + /** + * This native does absolutely nothing, just a nullsub + */ export function requestRagdollBoundsUpdate(p0: any, p1: any): void; /** - * Enable/disable ped shadow (ambient occlusion). https://gfycat.com/thankfulesteemedgecko - */ - export function setPedAoBlobRendering(ped: Player | number, toggle: boolean): void; + * Enable/disable ped shadow (ambient occlusion). https://gfycat.com/thankfulesteemedgecko + */ + export function setPedAoBlobRendering(ped: Ped | Player | number, toggle: boolean): void; - export function isPedSheltered(ped: Player | number): boolean; + export function isPedSheltered(ped: Ped | Player | number): boolean; /** - * @param roll and pitch 0 - * @param yaw to Ped.rotation - * @param p6 always 2 (but it doesnt seem to matter...) - */ + * p6 always 2 (but it doesnt seem to matter...) + * roll and pitch 0 + * yaw to Ped.rotation + */ export function createSynchronizedScene(x: number, y: number, z: number, roll: number, pitch: number, yaw: number, p6: number): number; export function createSynchronizedSceneAtMapObject(x: number, y: number, z: number, radius: number, object: number): number; /** - * Returns true if a synchronized scene is running - */ + * Returns true if a synchronized scene is running + */ export function isSynchronizedSceneRunning(sceneId: number): boolean; export function setSynchronizedSceneOrigin(sceneID: number, x: number, y: number, z: number, roll: number, pitch: number, yaw: number, p7: boolean): void; @@ -15575,128 +17409,158 @@ declare module "natives" { export function takeOwnershipOfSynchronizedScene(scene: number): void; /** - * enum eMotionState // 0x92A659FE - * { - * MotionState_None = 0xEE717723, - * MotionState_Idle = 0x9072A713, - * MotionState_Walk = 0xD827C3DB, - * MotionState_Run = 0xFFF7E7A4, - * MotionState_Sprint = 0xBD8817DB, - * MotionState_Crouch_Idle = 0x43FB099E, - * MotionState_Crouch_Walk = 0x08C31A98, - * See NativeDB for reference: http://natives.altv.mp/#/0xF28965D04F570DCA - * @param p2 Most common is 0, 0, 0); followed by 0, 1, 0); and 1, 1, 0); in R* scripts. p4 is very rarely something other than 0. - */ - export function forcePedMotionState(ped: Player | number, motionStateHash: number, p2: boolean, p3: number, p4: boolean): boolean; - - export function getPedCurrentMoveBlendRatio(ped: Player | number, speedX?: number, speedY?: number): [boolean, number, number]; - - export function setPedMaxMoveBlendRatio(ped: Player | number, value: number): void; - - export function setPedMinMoveBlendRatio(ped: Player | number, value: number): void; - - /** - * Min: 0.00 - * Max: 10.00 - * Can be used in combo with fast run cheat. - * When value is set to 10.00: - * Sprinting without fast run cheat: 66 m/s - * Sprinting with fast run cheat: 77 m/s - * Needs to be looped! - * Note: According to IDA for the Xbox360 xex, when they check bgt they seem to have the min to 0.0f, but the max set to 1.15f not 10.0f. - */ - export function setPedMoveRateOverride(ped: Player | number, value: number): void; - - export function setPedMoveRateInWaterOverride(ped: Player | number, p1: number): void; - - /** - * Checks if the specified sexiness flag is set - * enum eSexinessFlags - * { - * SF_JEER_AT_HOT_PED = 0, - * SF_HURRIEDFEMALES_SEXY = 1, - * SF_HOT_PERSON = 2, - * }; - */ - export function pedHasSexinessFlagSet(ped: Player | number, sexinessFlag: number): boolean; + * Regarding p2, p3 and p4: Most common is 0, 0, 0); followed by 0, 1, 0); and 1, 1, 0); in R* scripts. p4 is very rarely something other than 0. + * enum eMotionState // 0x92A659FE + * { + * MotionState_None = 0xEE717723, + * MotionState_Idle = 0x9072A713, + * MotionState_Walk = 0xD827C3DB, + * MotionState_Run = 0xFFF7E7A4, + * MotionState_Sprint = 0xBD8817DB, + * MotionState_Crouch_Idle = 0x43FB099E, + * MotionState_Crouch_Walk = 0x08C31A98, + * MotionState_Crouch_Run = 0x3593CF09, + * MotionState_DoNothing = 0x0EC17E58, + * MotionState_AnimatedVelocity = 0x551AAC43, + * MotionState_InVehicle = 0x94D9D58D, + * MotionState_Aiming = 0x3F67C6AF, + * MotionState_Diving_Idle = 0x4848CDED, + * MotionState_Diving_Swim = 0x916E828C, + * MotionState_Swimming_TreadWater = 0xD1BF11C7, + * MotionState_Dead = 0x0DBB071C, + * MotionState_Stealth_Idle = 0x422D7A25, + * MotionState_Stealth_Walk = 0x042AB6A2, + * MotionState_Stealth_Run = 0xFB0B79E1, + * MotionState_Parachuting = 0xBAC0F10B, + * MotionState_ActionMode_Idle = 0xDA40A0DC, + * MotionState_ActionMode_Walk = 0xD2905EA7, + * MotionState_ActionMode_Run = 0x31BADE14, + * MotionState_Jetpack = 0x535E6A5E + * }; + */ + export function forcePedMotionState(ped: Ped | Player | number, motionStateHash: number, p2: boolean, p3: number, p4: boolean): boolean; + + export function getPedCurrentMoveBlendRatio(ped: Ped | Player | number, speedX?: number, speedY?: number): [boolean, number, number]; + + export function setPedMaxMoveBlendRatio(ped: Ped | Player | number, value: number): void; + + export function setPedMinMoveBlendRatio(ped: Ped | Player | number, value: number): void; + + /** + * Min: 0.00 + * Max: 10.00 + * Can be used in combo with fast run cheat. + * When value is set to 10.00: + * Sprinting without fast run cheat: 66 m/s + * Sprinting with fast run cheat: 77 m/s + * Needs to be looped! + * Note: According to IDA for the Xbox360 xex, when they check bgt they seem to have the min to 0.0f, but the max set to 1.15f not 10.0f. + */ + export function setPedMoveRateOverride(ped: Ped | Player | number, value: number): void; + + export function setPedMoveRateInWaterOverride(ped: Ped | Player | number, p1: number): void; + + /** + * Checks if the specified sexiness flag is set + * enum eSexinessFlags + * { + * SF_JEER_AT_HOT_PED = 0, + * SF_HURRIEDFEMALES_SEXY = 1, + * SF_HOT_PERSON = 2, + * }; + */ + export function pedHasSexinessFlagSet(ped: Ped | Player | number, sexinessFlag: number): boolean; + + /** + * Returns size of array, passed into the second variable. + * See below for usage information. + * This function actually requires a struct, where the first value is the maximum number of elements to return. Here is a sample of how I was able to get it to work correctly, without yet knowing the struct format. + * //Setup the array + * const int numElements = 10; + * const int arrSize = numElements * 2 + 2; + * Any veh[arrSize]; + * //0 index is the size of the array + * veh[0] = numElements; + * int count = PED::GET_PED_NEARBY_VEHICLES(PLAYER::PLAYER_PED_ID(), veh); + * if (veh != NULL) + * { + * //Simple loop to go through results + * for (int i = 0; i < count; i++) + * { + * int offsettedID = i * 2 + 2; + * //Make sure it exists + * if (veh[offsettedID] != NULL && ENTITY::DOES_ENTITY_EXIST(veh[offsettedID])) + * { + * //Do something + * } + * } + * } + */ + export function getPedNearbyVehicles(ped: Ped | Player | number, sizeAndVehs?: any): [number, any]; + + /** + * sizeAndPeds - is a pointer to an array. The array is filled with peds found nearby the ped supplied to the first argument. + * ignore - ped type to ignore + * Return value is the number of peds found and added to the array passed. + * ----------------------------------- + * To make this work in most menu bases at least in C++ do it like so, + * Formatted Example: https://pastebin.com/D8an9wwp + * ----------------------------------- + * Example: gtaforums.com/topic/789788-function-args-to-pedget-ped-nearby-peds/?p=1067386687 + */ + export function getPedNearbyPeds(ped: Ped | Player | number, sizeAndPeds: any, ignore: number): [number, any]; + + export function haveAllStreamingRequestsCompleted(ped: Ped | Player | number): boolean; + + export function isPedUsingActionMode(ped: Ped | Player | number): boolean; + + /** + * p2 is usually -1 in the scripts. action is either 0 or "DEFAULT_ACTION". + */ + export function setPedUsingActionMode(ped: Ped | Player | number, p1: boolean, p2: number, action: string): void; + + /** + * name: "MP_FEMALE_ACTION" found multiple times in the b617d scripts. + */ + export function setMovementModeOverride(ped: Ped | Player | number, name: string): void; + + /** + * Overrides the ped's collision capsule radius for the current tick. + * Must be called every tick to be effective. + * Setting this to 0.001 will allow warping through some objects. + */ + export function setPedCapsule(ped: Ped | Player | number, value: number): void; + + /** + * gtaforums.com/topic/885580-ped-headshotmugshot-txd/ + */ + export function registerPedheadshot(ped: Ped | Player | number): number; - /** - * Returns size of array, passed into the second variable. - * See below for usage information. - * This function actually requires a struct, where the first value is the maximum number of elements to return. Here is a sample of how I was able to get it to work correctly, without yet knowing the struct format. - * //Setup the array - * const int numElements = 10; - * const int arrSize = numElements * 2 + 2; - * Any veh[arrSize]; - * //0 index is the size of the array - * veh[0] = numElements; - * See NativeDB for reference: http://natives.altv.mp/#/0xCFF869CBFA210D82 - */ - export function getPedNearbyVehicles(ped: Player | number, sizeAndVehs?: any): [number, any]; - - /** - * Return value is the number of peds found and added to the array passed. - * ----------------------------------- - * To make this work in most menu bases at least in C++ do it like so, - * Formatted Example: https://pastebin.com/D8an9wwp - * ----------------------------------- - * Example: gtaforums.com/topic/789788-function-args-to-pedget-ped-nearby-peds/?p=1067386687 - * @param sizeAndPeds - is a pointer to an array. The array is filled with peds found nearby the ped supplied to the first argument. - * @param ignore - ped type to ignore - */ - export function getPedNearbyPeds(ped: Player | number, sizeAndPeds: any | null, ignore: number): [number, any]; - - export function haveAllStreamingRequestsCompleted(ped: Player | number): boolean; - - export function isPedUsingActionMode(ped: Player | number): boolean; - - /** - * @param p2 is usually -1 in the scripts. action is either 0 or "DEFAULT_ACTION". - */ - export function setPedUsingActionMode(ped: Player | number, p1: boolean, p2: number, action: string | null): void; - - /** - * @param name "MP_FEMALE_ACTION" found multiple times in the b617d scripts. - */ - export function setMovementModeOverride(ped: Player | number, name: string | null): void; - - /** - * Overrides the ped's collision capsule radius for the current tick. - * Must be called every tick to be effective. - * Setting this to 0.001 will allow warping through some objects. - */ - export function setPedCapsule(ped: Player | number, value: number): void; - - /** - * gtaforums.com/topic/885580-ped-headshotmugshot-txd/ - */ - export function registerPedheadshot(ped: Player | number): number; - - export function registerPedheadshotHires(ped: Player | number): number; + export function registerPedheadshotHires(ped: Ped | Player | number): number; /** - * Similar to REGISTER_PEDHEADSHOT but creates a transparent background instead of black. Example: https://i.imgur.com/iHz8ztn.png - */ - export function registerPedheadshotTransparent(ped: Player | number): number; - + * Similar to REGISTER_PEDHEADSHOT but creates a transparent background instead of black. Example: https://i.imgur.com/iHz8ztn.png + */ + export function registerPedheadshotTransparent(ped: Ped | Player | number): number; + /** - * gtaforums.com/topic/885580-ped-headshotmugshot-txd/ - */ + * gtaforums.com/topic/885580-ped-headshotmugshot-txd/ + */ export function unregisterPedheadshot(id: number): void; /** - * gtaforums.com/topic/885580-ped-headshotmugshot-txd/ - */ + * gtaforums.com/topic/885580-ped-headshotmugshot-txd/ + */ export function isPedheadshotValid(id: number): boolean; /** - * gtaforums.com/topic/885580-ped-headshotmugshot-txd/ - */ + * gtaforums.com/topic/885580-ped-headshotmugshot-txd/ + */ export function isPedheadshotReady(id: number): boolean; /** - * gtaforums.com/topic/885580-ped-headshotmugshot-txd/ - */ + * gtaforums.com/topic/885580-ped-headshotmugshot-txd/ + */ export function getPedheadshotTxdString(id: number): string; export function requestPedheadshotImgUpload(id: number): boolean; @@ -15709,9 +17573,9 @@ declare module "natives" { export function hasPedheadshotImgUploadSucceeded(): boolean; - export function setPedHeatscaleOverride(ped: Player | number, heatScale: number): void; + export function setPedHeatscaleOverride(ped: Ped | Player | number, heatScale: number): void; - export function disablePedHeatscaleOverride(ped: Player | number): void; + export function disablePedHeatscaleOverride(ped: Ped | Player | number): void; export function spawnpointsStartSearch(p0: number, p1: number, p2: number, p3: number, p4: number, interiorFlags: number, scale: number, duration: number): void; @@ -15731,98 +17595,104 @@ declare module "natives" { export function spawnpointsGetSearchResultFlags(p0: number, p1?: number): [void, number]; - export function setIkTarget(ped: Player | number, ikIndex: number, entityLookAt: Entity | number, boneLookAt: number, offsetX: number, offsetY: number, offsetZ: number, p7: any, blendInDuration: number, blendOutDuration: number): void; + export function setIkTarget(ped: Ped | Player | number, ikIndex: number, entityLookAt: Entity | number, boneLookAt: number, offsetX: number, offsetY: number, offsetZ: number, p7: any, blendInDuration: number, blendOutDuration: number): void; - export function forceInstantLegIkSetup(ped: Player | number): void; + export function forceInstantLegIkSetup(ped: Ped | Player | number): void; - export function requestActionModeAsset(asset: string | null): void; + export function requestActionModeAsset(asset: string): void; - export function hasActionModeAssetLoaded(asset: string | null): boolean; + export function hasActionModeAssetLoaded(asset: string): boolean; - export function removeActionModeAsset(asset: string | null): void; + export function removeActionModeAsset(asset: string): void; - export function requestStealthModeAsset(asset: string | null): void; + export function requestStealthModeAsset(asset: string): void; - export function hasStealthModeAssetLoaded(asset: string | null): boolean; + export function hasStealthModeAssetLoaded(asset: string): boolean; - export function removeStealthModeAsset(asset: string | null): void; + export function removeStealthModeAsset(asset: string): void; - export function setPedLodMultiplier(ped: Player | number, multiplier: number): void; + export function setPedLodMultiplier(ped: Ped | Player | number, multiplier: number): void; - export function setPedCanLosePropsOnDamage(ped: Player | number, toggle: boolean, p2: number): void; + export function setPedCanLosePropsOnDamage(ped: Ped | Player | number, toggle: boolean, p2: number): void; - export function setForceFootstepUpdate(ped: Player | number, toggle: boolean): void; + export function setForceFootstepUpdate(ped: Ped | Player | number, toggle: boolean): void; - export function setForceStepType(ped: Player | number, p1: boolean, type: number, p3: number): void; + export function setForceStepType(ped: Ped | Player | number, p1: boolean, type: number, p3: number): void; - export function isAnyHostilePedNearPoint(ped: Player | number, x: number, y: number, z: number, radius: number): boolean; + export function isAnyHostilePedNearPoint(ped: Ped | Player | number, x: number, y: number, z: number, radius: number): boolean; /** - * Toggles config flag CPED_CONFIG_FLAG_CanPlayInCarIdles. - */ - export function setPedCanPlayInCarIdles(ped: Player | number, toggle: boolean): void; + * Toggles config flag CPED_CONFIG_FLAG_CanPlayInCarIdles. + */ + export function setPedCanPlayInCarIdles(ped: Ped | Player | number, toggle: boolean): void; - export function isTargetPedInPerceptionArea(ped: Player | number, targetPed: Player | number, p2: number, p3: number, p4: number, p5: number): boolean; + export function isTargetPedInPerceptionArea(ped: Ped | Player | number, targetPed: Ped | Player | number, p2: number, p3: number, p4: number, p5: number): boolean; /** - * @param min and max are usually 100.0 and 200.0 - */ + * Min and max are usually 100.0 and 200.0 + */ export function setPopControlSphereThisFrame(x: number, y: number, z: number, min: number, max: number): void; - export function forceZeroMassInCollisions(ped: Player | number): void; + export function forceZeroMassInCollisions(ped: Ped | Player | number): void; - export function setDisableHighFallDeath(ped: Player | number, toggle: boolean): void; + export function setDisableHighFallDeath(ped: Ped | Player | number, toggle: boolean): void; export function setPedPhonePaletteIdx(p0: any, p1: any): void; - export function setPedSteerBias(ped: Player | number, value: number): void; + export function setPedSteerBias(ped: Ped | Player | number, value: number): void; - export function isPedSwitchingWeapon(Ped: Player | number): boolean; + export function isPedSwitchingWeapon(Ped: Ped | Player | number): boolean; export function setPedTreatedAsFriendly(p0: any, p1: any, p2: any): void; - export function setDisablePedMapCollision(ped: Player | number): void; - - export function enableMpLight(ped: Player | number, toggle: boolean): void; - - export function getMpLightEnabled(ped: Player | number): boolean; - - export function clearCoverPointForPed(ped: Player | number): void; - - export function setAllowStuntJumpCamera(ped: Player | number, toggle: boolean): void; - - /** - * Creates a rope at the specific position, that extends in the specified direction when not attached to any entities. - * __ - * Add_Rope(pos.x,pos.y,pos.z,0.0,0.0,0.0,20.0,4,20.0,1.0,0.0,false,false,false,5.0,false,NULL) - * When attached, Position does not matter - * When attached, Angle does not matter - * Rope Type: - * 4 and bellow is a thick rope - * 5 and up are small metal wires - * 0 crashes the game - * See NativeDB for reference: http://natives.altv.mp/#/0xE832D760399EB220 - * @param length Rope is forced to this length, generally best to keep this the same as your rope length. - * @param windingSpeed - Speed the Rope is being winded, using native START_ROPE_WINDING. Set positive for winding and negative for unwinding. - * @param rigid - If max length is zero, and this is set to false the rope will become rigid (it will force a specific distance, what ever length is, between the objects). - * @param unkPtr - unknown ptr, always 0 in orig scripts - */ + export function setDisablePedMapCollision(ped: Ped | Player | number): void; + + export function enableMpLight(ped: Ped | Player | number, toggle: boolean): void; + + export function getMpLightEnabled(ped: Ped | Player | number): boolean; + + export function clearCoverPointForPed(ped: Ped | Player | number): void; + + export function setAllowStuntJumpCamera(ped: Ped | Player | number, toggle: boolean): void; + + /** + * Creates a rope at the specific position, that extends in the specified direction when not attached to any entities. + * __ + * Add_Rope(pos.x,pos.y,pos.z,0.0,0.0,0.0,20.0,4,20.0,1.0,0.0,false,false,false,5.0,false,NULL) + * When attached, Position does not matter + * When attached, Angle does not matter + * Rope Type: + * 4 and bellow is a thick rope + * 5 and up are small metal wires + * 0 crashes the game + * Max_length - Rope is forced to this length, generally best to keep this the same as your rope length. + * windingSpeed - Speed the Rope is being winded, using native START_ROPE_WINDING. Set positive for winding and negative for unwinding. + * Rigid - If max length is zero, and this is set to false the rope will become rigid (it will force a specific distance, what ever length is, between the objects). + * breakable - Whether or not shooting the rope will break it. + * unkPtr - unknown ptr, always 0 in orig scripts + * __ + * Lengths can be calculated like so: + * float distance = abs(x1 - x2) + abs(y1 - y2) + abs(z1 - z2); // Rope length + * NOTES: + * Rope does NOT interact with anything you attach it to, in some cases it make interact with the world AFTER it breaks (seems to occur if you set the type to -1). + * Rope will sometimes contract and fall to the ground like you'd expect it to, but since it doesn't interact with the world the effect is just jaring. + */ export function addRope(x: number, y: number, z: number, rotX: number, rotY: number, rotZ: number, length: number, ropeType: number, maxLength: number, minLength: number, windingSpeed: number, p11: boolean, p12: boolean, rigid: boolean, p14: number, breakWhenShot: boolean, unkPtr?: any): [number, any]; - export function deleteRope(ropeId: number): [void, number]; + export function deleteRope(ropeId?: number): [void, number]; export function deleteChildRope(ropeId: number): void; - export function doesRopeExist(ropeId: number): [boolean, number]; + export function doesRopeExist(ropeId?: number): [boolean, number]; - export function ropeDrawEnabled(ropeId: number | null, p1: boolean): [void, number]; + export function ropeDrawEnabled(ropeId: number, p1: boolean): [void, number]; - export function ropeDrawShadowEnabled(ropeId: number | null, toggle: boolean): [void, number]; + export function ropeDrawShadowEnabled(ropeId: number, toggle: boolean): [void, number]; /** - * Rope presets can be found in the gamefiles. One example is "ropeFamily3", it is NOT a hash but rather a string. - */ - export function loadRopeData(ropeId: number, rope_preset: string | null): void; + * Rope presets can be found in the gamefiles. One example is "ropeFamily3", it is NOT a hash but rather a string. + */ + export function loadRopeData(ropeId: number, rope_preset: string): void; export function pinRopeVertex(ropeId: number, vertex: number, x: number, y: number, z: number): void; @@ -15831,13 +17701,13 @@ declare module "natives" { export function getRopeVertexCount(ropeId: number): number; /** - * Attaches entity 1 to entity 2. - */ + * Attaches entity 1 to entity 2. + */ export function attachEntitiesToRope(ropeId: number, ent1: Entity | number, ent2: Entity | number, ent1_x: number, ent1_y: number, ent1_z: number, ent2_x: number, ent2_y: number, ent2_z: number, length: number, p10: boolean, p11: boolean, p12?: any, p13?: any): [void, any, any]; /** - * The position supplied can be anywhere, and the entity should anchor relative to that point from it's origin. - */ + * The position supplied can be anywhere, and the entity should anchor relative to that point from it's origin. + */ export function attachRopeToEntity(ropeId: number, entity: Entity | number, x: number, y: number, z: number, p5: boolean): void; export function detachRopeFromEntity(ropeId: number, entity: Entity | number): void; @@ -15848,7 +17718,7 @@ declare module "natives" { export function ropeSetSmoothReelin(ropeId: number, p1: boolean): void; - export function isRopeAttachedAtBothEnds(ropeId: number): [boolean, number]; + export function isRopeAttachedAtBothEnds(ropeId?: number): [boolean, number]; export function getRopeLastVertexCoord(ropeId: number): Vector3; @@ -15865,15 +17735,15 @@ declare module "natives" { export function ropeConvertToSimple(ropeId: number): void; /** - * Loads rope textures for all ropes in the current scene. - */ + * Loads rope textures for all ropes in the current scene. + */ export function ropeLoadTextures(): void; export function ropeAreTexturesLoaded(): boolean; /** - * Unloads rope textures for all ropes in the current scene. - */ + * Unloads rope textures for all ropes in the current scene. + */ export function ropeUnloadTextures(): void; export function doesScriptOwnRope(ropeId: number): boolean; @@ -15887,13 +17757,13 @@ declare module "natives" { export function ropeGetDistanceBetweenEnds(ropeId: number): number; /** - * Forces a rope to a certain length. - */ + * Forces a rope to a certain length. + */ export function ropeForceLength(ropeId: number, length: number): void; /** - * Reset a rope to a certain length. - */ + * Reset a rope to a certain length. + */ export function ropeResetLength(ropeId: number, length: number): void; export function applyImpulseToCloth(posX: number, posY: number, posZ: number, vecX: number, vecY: number, vecZ: number, impulse: number): void; @@ -15910,61 +17780,61 @@ declare module "natives" { export function breakEntityGlass(entity: Entity | number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number, p7: number, p8: number, p9: any, p10: boolean): void; - export function getIsEntityAFrag(object: number): boolean; + export function getIsEntityAFrag(object: Object): boolean; - export function setDisableBreaking(object: number, toggle: boolean): void; + export function setDisableBreaking(object: Object, toggle: boolean): void; - export function resetDisableBreaking(object: number): void; + export function resetDisableBreaking(object: Object): void; - export function setDisableFragDamage(object: number, toggle: boolean): void; + export function setDisableFragDamage(object: Object, toggle: boolean): void; /** - * PED_RAGDOLL_BUMP Proof? - */ + * PED_RAGDOLL_BUMP Proof? + */ export function setUseKinematicPhysics(entity: Entity | number, toggle: boolean): void; export function setInStuntMode(p0: boolean): void; /** - * Related to the lower-end of a vehicles fTractionCurve, e.g., from standing starts and acceleration from low/zero speeds. - */ + * Related to the lower-end of a vehicles fTractionCurve, e.g., from standing starts and acceleration from low/zero speeds. + */ export function setInArenaMode(toggle: boolean): void; /** - * Gets the ped for a specified player index. - */ - export function getPlayerPed(player: Player | number): number; + * Gets the ped for a specified player index. + */ + export function getPlayerPed(player: Player | number): Ped | Player | number; /** - * Does the same like PLAYER::GET_PLAYER_PED - */ - export function getPlayerPedScriptIndex(player: Player | number): number; + * Does the same like PLAYER::GET_PLAYER_PED + */ + export function getPlayerPedScriptIndex(player: Player | number): Ped | Player | number; /** - * Set the model for a specific Player. Be aware that this will destroy the current Ped for the Player and create a new one, any reference to the old ped should be reset - * Make sure to request the model first and wait until it has loaded. - */ + * Set the model for a specific Player. Be aware that this will destroy the current Ped for the Player and create a new one, any reference to the old ped should be reset + * Make sure to request the model first and wait until it has loaded. + */ export function setPlayerModel(player: Player | number, model: number): void; - export function changePlayerPed(player: Player | number, ped: Player | number, p2: boolean, resetDamage: boolean): void; + export function changePlayerPed(player: Player | number, ped: Ped | Player | number, p2: boolean, resetDamage: boolean): void; export function getPlayerRgbColour(player: Player | number, r?: number, g?: number, b?: number): [void, number, number, number]; /** - * Gets the number of players in the current session. - * @returns If not multiplayer, always returns 1. - */ + * Gets the number of players in the current session. + * If not multiplayer, always returns 1. + */ export function getNumberOfPlayers(): number; /** - * Gets the player's team. - * Does nothing in singleplayer. - */ + * Gets the player's team. + * Does nothing in singleplayer. + */ export function getPlayerTeam(player: Player | number): number; /** - * Set player team on deathmatch and last team standing.. - */ + * Set player team on deathmatch and last team standing.. + */ export function setPlayerTeam(player: Player | number, team: number): void; export function getNumberOfPlayersInTeam(team: number): number; @@ -15972,44 +17842,44 @@ declare module "natives" { export function getPlayerName(player: Player | number): string; /** - * Remnant from GTA IV. Does nothing in GTA V. - */ + * Remnant from GTA IV. Does nothing in GTA V. + */ export function getWantedLevelRadius(player: Player | number): number; export function getPlayerWantedCentrePosition(player: Player | number): Vector3; /** - * # Predominant call signatures - * # Parameter value ranges - * P0: PLAYER::PLAYER_ID() - * @param player :SET_PLAYER_WANTED_CENTRE_POSITION(PLAYER::PLAYER_ID(), ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 1)); - * @param position ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 1) - * @param p2 Not set by any call - */ - export function setPlayerWantedCentrePosition(player: Player | number, position: Vector3 | null, p2: boolean, p3: boolean): [void, Vector3]; + * # Predominant call signatures + * PLAYER::SET_PLAYER_WANTED_CENTRE_POSITION(PLAYER::PLAYER_ID(), ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 1)); + * # Parameter value ranges + * P0: PLAYER::PLAYER_ID() + * P1: ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 1) + * P2: Not set by any call + */ + export function setPlayerWantedCentrePosition(player: Player | number, position: Vector3, p2: boolean, p3: boolean): [void, Vector3]; /** - * Drft - */ + * Drft + */ export function getWantedLevelThreshold(wantedLevel: number): number; /** - * Call SET_PLAYER_WANTED_LEVEL_NOW for immediate effect - * disableNoMission- Disables When Off Mission- appears to always be false - * @param wantedLevel is an integer value representing 0 to 5 stars even though the game supports the 6th wanted level but no police will appear since no definitions are present for it in the game files - */ + * Call SET_PLAYER_WANTED_LEVEL_NOW for immediate effect + * wantedLevel is an integer value representing 0 to 5 stars even though the game supports the 6th wanted level but no police will appear since no definitions are present for it in the game files + * disableNoMission- Disables When Off Mission- appears to always be false + */ export function setPlayerWantedLevel(player: Player | number, wantedLevel: number, disableNoMission: boolean): void; /** - * @param p2 is always false in R* scripts - */ + * p2 is always false in R* scripts + */ export function setPlayerWantedLevelNoDrop(player: Player | number, wantedLevel: number, p2: boolean): void; /** - * Forces any pending wanted level to be applied to the specified player immediately. - * Call SET_PLAYER_WANTED_LEVEL with the desired wanted level, followed by SET_PLAYER_WANTED_LEVEL_NOW. - * Second parameter is unknown (always false). - */ + * Forces any pending wanted level to be applied to the specified player immediately. + * Call SET_PLAYER_WANTED_LEVEL with the desired wanted level, followed by SET_PLAYER_WANTED_LEVEL_NOW. + * Second parameter is unknown (always false). + */ export function setPlayerWantedLevelNow(player: Player | number, p1: boolean): void; export function arePlayerFlashingStarsAboutToDrop(player: Player | number): boolean; @@ -16023,8 +17893,9 @@ declare module "natives" { export function isPlayerWantedLevelGreater(player: Player | number, wantedLevel: number): boolean; /** - * PLAYER::GET_PLAYER_WANTED_LEVEL(player); executes in less than half the time. Which means that it's worth first checking if the wanted level needs to be cleared before clearing. However, this is mostly about good code practice and can important in other situations. The difference in time in this example is negligible. - */ + * This executes at the same as speed as PLAYER::SET_PLAYER_WANTED_LEVEL(player, 0, false); + * PLAYER::GET_PLAYER_WANTED_LEVEL(player); executes in less than half the time. Which means that it's worth first checking if the wanted level needs to be cleared before clearing. However, this is mostly about good code practice and can important in other situations. The difference in time in this example is negligible. + */ export function clearPlayerWantedLevel(player: Player | number): void; export function isPlayerDead(player: Player | number): boolean; @@ -16032,17 +17903,21 @@ declare module "natives" { export function isPlayerPressingHorn(player: Player | number): boolean; /** - * SPC_AMBIENT_SCRIPT = (1 << 1), - * SPC_CLEAR_TASKS = (1 << 2), - * SPC_REMOVE_FIRES = (1 << 3), - * SPC_REMOVE_EXPLOSIONS = (1 << 4), - * SPC_REMOVE_PROJECTILES = (1 << 5), - * SPC_DEACTIVATE_GADGETS = (1 << 6), - * SPC_REENABLE_CONTROL_ON_DEATH = (1 << 7), - * SPC_LEAVE_CAMERA_CONTROL_ON = (1 << 8), - * SPC_ALLOW_PLAYER_DAMAGE = (1 << 9), - * See NativeDB for reference: http://natives.altv.mp/#/0x8D32347D6D4C40A2 - */ + * Flags: + * SPC_AMBIENT_SCRIPT = (1 << 1), + * SPC_CLEAR_TASKS = (1 << 2), + * SPC_REMOVE_FIRES = (1 << 3), + * SPC_REMOVE_EXPLOSIONS = (1 << 4), + * SPC_REMOVE_PROJECTILES = (1 << 5), + * SPC_DEACTIVATE_GADGETS = (1 << 6), + * SPC_REENABLE_CONTROL_ON_DEATH = (1 << 7), + * SPC_LEAVE_CAMERA_CONTROL_ON = (1 << 8), + * SPC_ALLOW_PLAYER_DAMAGE = (1 << 9), + * SPC_DONT_STOP_OTHER_CARS_AROUND_PLAYER = (1 << 10), + * SPC_PREVENT_EVERYBODY_BACKOFF = (1 << 11), + * SPC_ALLOW_PAD_SHAKE = (1 << 12) + * See: https://alloc8or.re/gta5/doc/enums/eSetPlayerControlFlag.txt + */ export function setPlayerControl(player: Player | number, bHasControl: boolean, flags: number): void; export function getPlayerWantedLevel(player: Player | number): number; @@ -16050,21 +17925,21 @@ declare module "natives" { export function setMaxWantedLevel(maxWantedLevel: number): void; /** - * If toggle is set to false: - * The police won't be shown on the (mini)map - * If toggle is set to true: - * The police will be shown on the (mini)map - */ + * If toggle is set to false: + * The police won't be shown on the (mini)map + * If toggle is set to true: + * The police will be shown on the (mini)map + */ export function setPoliceRadarBlips(toggle: boolean): void; /** - * The player will be ignored by the police if toggle is set to true - */ + * The player will be ignored by the police if toggle is set to true + */ export function setPoliceIgnorePlayer(player: Player | number, toggle: boolean): void; /** - * Checks whether the specified player has a Ped, the Ped is not dead, is not injured and is not arrested. - */ + * Checks whether the specified player has a Ped, the Ped is not dead, is not injured and is not arrested. + */ export function isPlayerPlaying(player: Player | number): boolean; export function setEveryoneIgnorePlayer(player: Player | number, toggle: boolean): void; @@ -16076,8 +17951,8 @@ declare module "natives" { export function setAllNeutralRandomPedsFlee(player: Player | number, toggle: boolean): void; /** - * - This is called after SET_ALL_RANDOM_PEDS_FLEE_THIS_FRAME - */ + * - This is called after SET_ALL_RANDOM_PEDS_FLEE_THIS_FRAME + */ export function setAllNeutralRandomPedsFleeThisFrame(player: Player | number): void; export function setLawPedsCanAttackNonWantedPlayerThisFrame(player: Player | number): void; @@ -16087,8 +17962,8 @@ declare module "natives" { export function setWantedLevelMultiplier(multiplier: number): void; /** - * Max value is 1.0 - */ + * Max value is 1.0 + */ export function setWantedLevelDifficulty(player: Player | number, difficulty: number): void; export function resetWantedLevelDifficulty(player: Player | number): void; @@ -16102,42 +17977,84 @@ declare module "natives" { export function startFiringAmnesty(duration: number): void; /** - * From am_armybase.ysc.c4: - * PLAYER::REPORT_CRIME(PLAYER::PLAYER_ID(4), 36, PLAYER::GET_WANTED_LEVEL_THRESHOLD(4)); - * ----- - * This was taken from the GTAV.exe v1.334. The function is called sub_140592CE8. For a full decompilation of the function, see here: https://pastebin.com/09qSMsN7 - * ----- - * 1: Firearms possession - * 2: Person running a red light ("5-0-5") - * 3: Reckless driver - * 4: Speeding vehicle (a "5-10") - * See NativeDB for reference: http://natives.altv.mp/#/0xE9B09589827545E7 - * @param player :REPORT_CRIME(PLAYER::PLAYER_ID(), 37, PLAYER::GET_WANTED_LEVEL_THRESHOLD(1)); - */ + * PLAYER::REPORT_CRIME(PLAYER::PLAYER_ID(), 37, PLAYER::GET_WANTED_LEVEL_THRESHOLD(1)); + * From am_armybase.ysc.c4: + * PLAYER::REPORT_CRIME(PLAYER::PLAYER_ID(4), 36, PLAYER::GET_WANTED_LEVEL_THRESHOLD(4)); + * ----- + * This was taken from the GTAV.exe v1.334. The function is called sub_140592CE8. For a full decompilation of the function, see here: https://pastebin.com/09qSMsN7 + * ----- + * crimeType: + * 1: Firearms possession + * 2: Person running a red light ("5-0-5") + * 3: Reckless driver + * 4: Speeding vehicle (a "5-10") + * 5: Traffic violation (a "5-0-5") + * 6: Motorcycle rider without a helmet + * 7: Vehicle theft (a "5-0-3") + * 8: Grand Theft Auto + * 9: ??? + * 10: ??? + * 11: Assault on a civilian (a "2-40") + * 12: Assault on an officer + * 13: Assault with a deadly weapon (a "2-45") + * 14: Officer shot (a "2-45") + * 15: Pedestrian struck by a vehicle + * 16: Officer struck by a vehicle + * 17: Helicopter down (an "AC"?) + * 18: Civilian on fire (a "2-40") + * 19: Officer set on fire (a "10-99") + * 20: Car on fire + * 21: Air unit down (an "AC"?) + * 22: An explosion (a "9-96") + * 23: A stabbing (a "2-45") (also something else I couldn't understand) + * 24: Officer stabbed (also something else I couldn't understand) + * 25: Attack on a vehicle ("MDV"?) + * 26: Damage to property + * 27: Suspect threatening officer with a firearm + * 28: Shots fired + * 29: ??? + * 30: ??? + * 31: ??? + * 32: ??? + * 33: ??? + * 34: A "2-45" + * 35: ??? + * 36: A "9-25" + * 37: ??? + * 38: ??? + * 39: ??? + * 40: ??? + * 41: ??? + * 42: ??? + * 43: Possible disturbance + * 44: Civilian in need of assistance + * 45: ??? + * 46: ??? + */ export function reportCrime(player: Player | number, crimeType: number, wantedLvlThresh: number): void; /** - * @param crimeType see REPORT_CRIME - */ + * crimeType: see REPORT_CRIME + */ export function suppressCrimeThisFrame(player: Player | number, crimeType: number): void; /** - * This native is used in both singleplayer and multiplayer scripts. - * Always used like this in scripts - * @param player :UPDATE_WANTED_POSITION_THIS_FRAME(PLAYER::PLAYER_ID()); - */ + * This native is used in both singleplayer and multiplayer scripts. + * Always used like this in scripts + * PLAYER::UPDATE_WANTED_POSITION_THIS_FRAME(PLAYER::PLAYER_ID()); + */ export function updateWantedPositionThisFrame(player: Player | number): void; /** - * This has been found in use in the decompiled files. - */ + * This has been found in use in the decompiled files. + */ export function suppressLosingWantedLevelIfHiddenThisFrame(player: Player | number): void; export function allowEvasionHudIfDisablingHiddenEvasionThisFrame(player: Player | number, p1: any): void; /** - * This has been found in use in the decompiled files. - */ + * This has been found in use in the decompiled files. + */ export function forceStartHiddenEvasion(player: Player | number): void; export function suppressWitnessesCallingPoliceThisFrame(player: Player | number): void; @@ -16145,18 +18062,18 @@ declare module "natives" { export function reportPoliceSpottedPlayer(player: Player | number): void; /** - * PLAYER::SET_LAW_RESPONSE_DELAY_OVERRIDE(rPtr((&l_122) + 71)); // Found in decompilation - * *** - * In "am_hold_up.ysc" used once: - * l_8d._f47 = MISC::GET_RANDOM_FLOAT_IN_RANGE(18.0, 28.0); - * PLAYER::SET_LAW_RESPONSE_DELAY_OVERRIDE((l_8d._f47)); - */ + * PLAYER::SET_LAW_RESPONSE_DELAY_OVERRIDE(rPtr((&l_122) + 71)); // Found in decompilation + * *** + * In "am_hold_up.ysc" used once: + * l_8d._f47 = MISC::GET_RANDOM_FLOAT_IN_RANGE(18.0, 28.0); + * PLAYER::SET_LAW_RESPONSE_DELAY_OVERRIDE((l_8d._f47)); + */ export function setLawResponseDelayOverride(p0: number): void; /** - * 2 matches in 1 script - am_hold_up - * Used in multiplayer scripts? - */ + * 2 matches in 1 script - am_hold_up + * Used in multiplayer scripts? + */ export function resetLawResponseDelayOverride(): void; export function canPlayerStartMission(player: Player | number): boolean; @@ -16166,52 +18083,52 @@ declare module "natives" { export function isPlayerTargettingEntity(player: Player | number, entity: Entity | number): boolean; /** - * Assigns the handle of locked-on melee target to *entity that you pass it. - * Returns false if no entity found. - */ - export function getPlayerTargetEntity(player: Player | number, entity?: Entity | number): [boolean, number]; + * Assigns the handle of locked-on melee target to *entity that you pass it. + * Returns false if no entity found. + */ + export function getPlayerTargetEntity(player: Player | number, entity?: Entity | number): [boolean, Entity | number]; /** - * Gets a value indicating whether the specified player is currently aiming freely. - */ + * Gets a value indicating whether the specified player is currently aiming freely. + */ export function isPlayerFreeAiming(player: Player | number): boolean; /** - * Gets a value indicating whether the specified player is currently aiming freely at the specified entity. - */ + * Gets a value indicating whether the specified player is currently aiming freely at the specified entity. + */ export function isPlayerFreeAimingAtEntity(player: Player | number, entity: Entity | number): boolean; /** - * Returns TRUE if it found an entity in your crosshair within range of your weapon. Assigns the handle of the target to the *entity that you pass it. - * Returns false if no entity found. - */ - export function getEntityPlayerIsFreeAimingAt(player: Player | number, entity?: Entity | number): [boolean, number]; + * Returns TRUE if it found an entity in your crosshair within range of your weapon. Assigns the handle of the target to the *entity that you pass it. + * Returns false if no entity found. + */ + export function getEntityPlayerIsFreeAimingAt(player: Player | number, entity?: Entity | number): [boolean, Entity | number]; /** - * Affects the range of auto aim target. - */ + * Affects the range of auto aim target. + */ export function setPlayerLockonRangeOverride(player: Player | number, range: number): void; /** - * Set whether this player should be able to do drive-bys. - * "A drive-by is when a ped is aiming/shooting from vehicle. This includes middle finger taunts. By setting this value to false I confirm the player is unable to do all that. Tested on tick." - */ + * Set whether this player should be able to do drive-bys. + * "A drive-by is when a ped is aiming/shooting from vehicle. This includes middle finger taunts. By setting this value to false I confirm the player is unable to do all that. Tested on tick." + */ export function setPlayerCanDoDriveBy(player: Player | number, toggle: boolean): void; /** - * Sets whether this player can be hassled by gangs. - */ + * Sets whether this player can be hassled by gangs. + */ export function setPlayerCanBeHassledByGangs(player: Player | number, toggle: boolean): void; /** - * Sets whether this player can take cover. - */ + * Sets whether this player can take cover. + */ export function setPlayerCanUseCover(player: Player | number, toggle: boolean): void; /** - * Gets the maximum wanted level the player can get. - * Ranges from 0 to 5. - */ + * Gets the maximum wanted level the player can get. + * Ranges from 0 to 5. + */ export function getMaxWantedLevel(): number; export function isPlayerTargettingAnything(player: Player | number): boolean; @@ -16231,61 +18148,61 @@ declare module "natives" { export function setPlayerUnderwaterBreathPercentRemaining(player: Player | number, time: number): number; /** - * Returns the group ID the player is member of. - */ + * Returns the group ID the player is member of. + */ export function getPlayerGroup(player: Player | number): number; export function getPlayerMaxArmour(player: Player | number): number; /** - * Can the player control himself, used to disable controls for player for things like a cutscene. - * --- - * You can't disable controls with this, use SET_PLAYER_CONTROL(...) for this. - */ + * Can the player control himself, used to disable controls for player for things like a cutscene. + * --- + * You can't disable controls with this, use SET_PLAYER_CONTROL(...) for this. + */ export function isPlayerControlOn(player: Player | number): boolean; /** - * Returns true when the player is not able to control the cam i.e. when running a benchmark test, switching the player or viewing a cutscene. - * Note: I am not 100% sure if the native actually checks if the cam control is disabled but it seems promising. - */ + * Returns true when the player is not able to control the cam i.e. when running a benchmark test, switching the player or viewing a cutscene. + * Note: I am not 100% sure if the native actually checks if the cam control is disabled but it seems promising. + */ export function getAreCameraControlsDisabled(): boolean; export function isPlayerScriptControlOn(player: Player | number): boolean; /** - * Returns TRUE if the player ('s ped) is climbing at the moment. - */ + * Returns TRUE if the player ('s ped) is climbing at the moment. + */ export function isPlayerClimbing(player: Player | number): boolean; /** - * Return true while player is being arrested / busted. - * If atArresting is set to 0, this function will return 1 only when the busted screen is shown. - * @returns If atArresting is set to 1, this function will return 1 when player is being arrested (while player is putting his hand up, but still have control) - */ + * Return true while player is being arrested / busted. + * If atArresting is set to 1, this function will return 1 when player is being arrested (while player is putting his hand up, but still have control) + * If atArresting is set to 0, this function will return 1 only when the busted screen is shown. + */ export function isPlayerBeingArrested(player: Player | number, atArresting: boolean): boolean; export function resetPlayerArrestState(player: Player | number): void; /** - * Alternative: GET_VEHICLE_PED_IS_IN(PLAYER_PED_ID(), 1); - */ - export function getPlayersLastVehicle(): number; + * Alternative: GET_VEHICLE_PED_IS_IN(PLAYER_PED_ID(), 1); + */ + export function getPlayersLastVehicle(): Vehicle | number; /** - * Returns the same as PLAYER_ID and NETWORK_PLAYER_ID_TO_INT - */ - export function getPlayerIndex(): number; + * Returns the same as PLAYER_ID and NETWORK_PLAYER_ID_TO_INT + */ + export function getPlayerIndex(): Player | number; /** - * @returns Simply returns whatever is passed to it (Regardless of whether the handle is valid or not). - */ - export function intToPlayerindex(value: number): number; + * Simply returns whatever is passed to it (Regardless of whether the handle is valid or not). + */ + export function intToPlayerindex(value: number): Player | number; /** - * -------------------------------------------------------- - * if (NETWORK::NETWORK_IS_PARTICIPANT_ACTIVE(PLAYER::INT_TO_PARTICIPANTINDEX(i))) - * @returns Simply returns whatever is passed to it (Regardless of whether the handle is valid or not). - */ + * Simply returns whatever is passed to it (Regardless of whether the handle is valid or not). + * -------------------------------------------------------- + * if (NETWORK::NETWORK_IS_PARTICIPANT_ACTIVE(PLAYER::INT_TO_PARTICIPANTINDEX(i))) + */ export function intToParticipantindex(value: number): number; export function getTimeSincePlayerHitVehicle(player: Player | number): number; @@ -16299,32 +18216,32 @@ declare module "natives" { export function isPlayerFreeForAmbientTask(player: Player | number): boolean; /** - * Always returns 0 in story mode. - * @returns This returns YOUR 'identity' as a Player type. - */ - export function playerId(): number; + * This returns YOUR 'identity' as a Player type. + * Always returns 0 in story mode. + */ + export function playerId(): Player | number; /** - * Returns current player ped - */ - export function playerPedId(): number; + * Returns current player ped + */ + export function playerPedId(): Ped | Player | number; /** - * Does exactly the same thing as PLAYER_ID() - */ + * Does exactly the same thing as PLAYER_ID() + */ export function networkPlayerIdToInt(): number; export function hasForceCleanupOccurred(cleanupFlags: number): boolean; /** - * used with 1,2,8,64,128 in the scripts - */ + * used with 1,2,8,64,128 in the scripts + */ export function forceCleanup(cleanupFlags: number): void; /** - * PLAYER::FORCE_CLEANUP_FOR_ALL_THREADS_WITH_THIS_NAME("pb_prostitute", 1); // Found in decompilation - */ - export function forceCleanupForAllThreadsWithThisName(name: string | null, cleanupFlags: number): void; + * PLAYER::FORCE_CLEANUP_FOR_ALL_THREADS_WITH_THIS_NAME("pb_prostitute", 1); // Found in decompilation + */ + export function forceCleanupForAllThreadsWithThisName(name: string, cleanupFlags: number): void; export function forceCleanupForThreadWithThisId(id: number, cleanupFlags: number): void; @@ -16335,77 +18252,148 @@ declare module "natives" { export function setPlayerMayNotEnterAnyVehicle(player: Player | number): void; /** - * 1 - Welcome to Los Santos - * 2 - A Friendship Resurrected - * 3 - A Fair Day's Pay - * 4 - The Moment of Truth - * 5 - To Live or Die in Los Santos - * 6 - Diamond Hard - * 7 - Subversive - * 8 - Blitzed - * 9 - Small Town, Big Job - * See NativeDB for reference: http://natives.altv.mp/#/0xBEC7076D64130195 - */ + * 1 - Welcome to Los Santos + * 2 - A Friendship Resurrected + * 3 - A Fair Day's Pay + * 4 - The Moment of Truth + * 5 - To Live or Die in Los Santos + * 6 - Diamond Hard + * 7 - Subversive + * 8 - Blitzed + * 9 - Small Town, Big Job + * 10 - The Government Gimps + * 11 - The Big One! + * 12 - Solid Gold, Baby! + * 13 - Career Criminal + * 14 - San Andreas Sightseer + * 15 - All's Fare in Love and War + * 16 - TP Industries Arms Race + * 17 - Multi-Disciplined + * 18 - From Beyond the Stars + * 19 - A Mystery, Solved + * 20 - Waste Management + * 21 - Red Mist + * 22 - Show Off + * 23 - Kifflom! + * 24 - Three Man Army + * 25 - Out of Your Depth + * 26 - Altruist Acolyte + * 27 - A Lot of Cheddar + * 28 - Trading Pure Alpha + * 29 - Pimp My Sidearm + * 30 - Wanted: Alive Or Alive + * 31 - Los Santos Customs + * 32 - Close Shave + * 33 - Off the Plane + * 34 - Three-Bit Gangster + * 35 - Making Moves + * 36 - Above the Law + * 37 - Numero Uno + * 38 - The Midnight Club + * 39 - Unnatural Selection + * 40 - Backseat Driver + * 41 - Run Like The Wind + * 42 - Clean Sweep + * 43 - Decorated + * 44 - Stick Up Kid + * 45 - Enjoy Your Stay + * 46 - Crew Cut + * 47 - Full Refund + * 48 - Dialling Digits + * 49 - American Dream + * 50 - A New Perspective + * 51 - Be Prepared + * 52 - In the Name of Science + * 53 - Dead Presidents + * 54 - Parole Day + * 55 - Shot Caller + * 56 - Four Way + * 57 - Live a Little + * 58 - Can't Touch This + * 59 - Mastermind + * 60 - Vinewood Visionary + * 61 - Majestic + * 62 - Humans of Los Santos + * 63 - First Time Director + * 64 - Animal Lover + * 65 - Ensemble Piece + * 66 - Cult Movie + * 67 - Location Scout + * 68 - Method Actor + * 69 - Cryptozoologist + * 70 - Getting Started + * 71 - The Data Breaches + * 72 - The Bogdan Problem + * 73 - The Doomsday Scenario + * 74 - A World Worth Saving + * 75 - Orbital Obliteration + * 76 - Elitist + * 77 - Masterminds + */ export function giveAchievementToPlayer(achievementId: number): boolean; /** - * For Steam. - * @returns Does nothing and always returns false in the retail version of the game. - */ + * For Steam. + * Does nothing and always returns false in the retail version of the game. + */ export function setAchievementProgress(achievementId: number, progress: number): boolean; /** - * For Steam. - * @returns Always returns 0 in retail version of the game. - */ + * For Steam. + * Always returns 0 in retail version of the game. + */ export function getAchievementProgress(achievementId: number): number; /** - * See GIVE_ACHIEVEMENT_TO_PLAYER - */ + * See GIVE_ACHIEVEMENT_TO_PLAYER + */ export function hasAchievementBeenPassed(achievementId: number): boolean; /** - * Returns TRUE if the game is in online mode and FALSE if in offline mode. - * This is an alias for NETWORK_IS_SIGNED_ONLINE. - */ + * Returns TRUE if the game is in online mode and FALSE if in offline mode. + * This is an alias for NETWORK_IS_SIGNED_ONLINE. + */ export function isPlayerOnline(): boolean; + /** + * this function is hard-coded to always return 0. + */ export function isPlayerLoggingInNp(): boolean; /** - * Purpose of the BOOL currently unknown. - * Both, true and false, work - */ + * Purpose of the BOOL currently unknown. + * Both, true and false, work + */ export function displaySystemSigninUi(p0: boolean): void; export function isSystemUiBeingDisplayed(): boolean; /** - * Simply sets you as invincible (Health will not deplete). - * Use 0x733A643B5B0C53C1 instead if you want Ragdoll enabled, which is equal to: - * *(DWORD *)(playerPedAddress + 0x188) |= (1 << 9); - */ + * Simply sets you as invincible (Health will not deplete). + * Use 0x733A643B5B0C53C1 instead if you want Ragdoll enabled, which is equal to: + * *(DWORD *)(playerPedAddress + 0x188) |= (1 << 9); + */ export function setPlayerInvincible(player: Player | number, toggle: boolean): void; /** - * Returns the Player's Invincible status. - * bool IsPlayerInvincible(Player player) - * { - * auto addr = getScriptHandleBaseAddress(GET_PLAYER_PED(player)); - * if (addr) - * { - * DWORD flag = *(DWORD *)(addr + 0x188); - * return ((flag & (1 << 8)) != 0) || ((flag & (1 << 9)) != 0); - * } - * See NativeDB for reference: http://natives.altv.mp/#/0xB721981B2B939E07 - * @returns This function will always return false if 0x733A643B5B0C53C1 is used to set the invincibility status. To always get the correct result, use this: - */ + * Returns the Player's Invincible status. + * This function will always return false if 0x733A643B5B0C53C1 is used to set the invincibility status. To always get the correct result, use this: + * bool IsPlayerInvincible(Player player) + * { + * auto addr = getScriptHandleBaseAddress(GET_PLAYER_PED(player)); + * if (addr) + * { + * DWORD flag = *(DWORD *)(addr + 0x188); + * return ((flag & (1 << 8)) != 0) || ((flag & (1 << 9)) != 0); + * } + * return false; + * } + */ export function getPlayerInvincible(player: Player | number): boolean; /** - * @returns Always returns false. - */ + * Always returns false. + */ export function getPlayerDebugInvincible(player: Player | number): boolean; export function setPlayerInvincibleButHasReactions(player: Player | number, toggle: boolean): void; @@ -16417,32 +18405,37 @@ declare module "natives" { export function givePlayerRagdollControl(player: Player | number, toggle: boolean): void; /** - * Example from fm_mission_controler.ysc.c4: - * All other decompiled scripts using this seem to be using the player id as the first parameter, so I feel the need to confirm it as so. - * No need to confirm it says PLAYER_ID() so it uses PLAYER_ID() lol. - * @param player :SET_PLAYER_LOCKON(PLAYER::PLAYER_ID(), 1); - */ + * Example from fm_mission_controler.ysc.c4: + * PLAYER::SET_PLAYER_LOCKON(PLAYER::PLAYER_ID(), 1); + * All other decompiled scripts using this seem to be using the player id as the first parameter, so I feel the need to confirm it as so. + * No need to confirm it says PLAYER_ID() so it uses PLAYER_ID() lol. + */ export function setPlayerLockon(player: Player | number, toggle: boolean): void; /** - * Sets your targeting mode. - * 0 = Assisted Aim - Full - * 1 = Assisted Aim - Partial - * 2 = Free Aim - Assisted - * 3 = Free Aim - */ + * Sets your targeting mode. + * 0 = Assisted Aim - Full + * 1 = Assisted Aim - Partial + * 2 = Free Aim - Assisted + * 3 = Free Aim + */ export function setPlayerTargetingMode(targetMode: number): void; + /** + * Returns targeting mode. See SET_PLAYER_TARGETING_MODE + */ + export function getPlayerTargetingMode(): number; + export function setPlayerTargetLevel(targetLevel: number): void; /** - * Returns profile setting 237. - */ + * Returns profile setting 237. + */ export function getIsUsingFpsThirdPersonCover(): boolean; /** - * Returns profile setting 243. - */ + * Returns profile setting 243. + */ export function getIsUsingHoodCamera(): boolean; export function clearPlayerHasDamagedAtLeastOnePed(player: Player | number): void; @@ -16454,42 +18447,42 @@ declare module "natives" { export function hasPlayerDamagedAtLeastOneNonAnimalPed(player: Player | number): boolean; /** - * This can be between 1.0f - 14.9f - * You can change the max in IDA from 15.0. I say 15.0 as the function blrs if what you input is greater than or equal to 15.0 hence why it's 14.9 max default. - */ + * This can be between 1.0f - 14.9f + * You can change the max in IDA from 15.0. I say 15.0 as the function blrs if what you input is greater than or equal to 15.0 hence why it's 14.9 max default. + */ export function setAirDragMultiplierForPlayersVehicle(player: Player | number, multiplier: number): void; /** - * Swim speed multiplier. - * Just call it one time, it is not required to be called once every tick. - Note copied from below native. - * Note: At least the IDA method if you change the max float multiplier from 1.5 it will change it for both this and RUN_SPRINT below. I say 1.5 as the function blrs if what you input is greater than or equal to 1.5 hence why it's 1.49 max default. - * @param multiplier goes up to 1.49 - */ + * Swim speed multiplier. + * Multiplier goes up to 1.49 + * Just call it one time, it is not required to be called once every tick. - Note copied from below native. + * Note: At least the IDA method if you change the max float multiplier from 1.5 it will change it for both this and RUN_SPRINT below. I say 1.5 as the function blrs if what you input is greater than or equal to 1.5 hence why it's 1.49 max default. + */ export function setSwimMultiplierForPlayer(player: Player | number, multiplier: number): void; /** - * Just call it one time, it is not required to be called once every tick. - * Note: At least the IDA method if you change the max float multiplier from 1.5 it will change it for both this and SWIM above. I say 1.5 as the function blrs if what you input is greater than or equal to 1.5 hence why it's 1.49 max default. - * @param multiplier goes up to 1.49 any value above will be completely overruled by the game and the multiplier will not take effect, this can be edited in memory however. - */ + * Multiplier goes up to 1.49 any value above will be completely overruled by the game and the multiplier will not take effect, this can be edited in memory however. + * Just call it one time, it is not required to be called once every tick. + * Note: At least the IDA method if you change the max float multiplier from 1.5 it will change it for both this and SWIM above. I say 1.5 as the function blrs if what you input is greater than or equal to 1.5 hence why it's 1.49 max default. + */ export function setRunSprintMultiplierForPlayer(player: Player | number, multiplier: number): void; /** - * Returns the time since the character was arrested in (ms) milliseconds. - * example - * var time = Function.call(Hash.GET_TIME_SINCE_LAST_ARREST(); - * UI.DrawSubtitle(time.ToString()); - * if player has not been arrested, the int returned will be -1. - */ + * Returns the time since the character was arrested in (ms) milliseconds. + * example + * var time = Function.call(Hash.GET_TIME_SINCE_LAST_ARREST(); + * UI.DrawSubtitle(time.ToString()); + * if player has not been arrested, the int returned will be -1. + */ export function getTimeSinceLastArrest(): number; /** - * Returns the time since the character died in (ms) milliseconds. - * example - * var time = Function.call(Hash.GET_TIME_SINCE_LAST_DEATH(); - * UI.DrawSubtitle(time.ToString()); - * if player has not died, the int returned will be -1. - */ + * Returns the time since the character died in (ms) milliseconds. + * example + * var time = Function.call(Hash.GET_TIME_SINCE_LAST_DEATH(); + * UI.DrawSubtitle(time.ToString()); + * if player has not died, the int returned will be -1. + */ export function getTimeSinceLastDeath(): number; export function assistedMovementCloseRoute(): void; @@ -16503,33 +18496,33 @@ declare module "natives" { export function setPlayerForceSkipAimIntro(player: Player | number, toggle: boolean): void; /** - * Inhibits the player from using any method of combat including melee and firearms. - * NOTE: Only disables the firing for one frame - */ + * Inhibits the player from using any method of combat including melee and firearms. + * NOTE: Only disables the firing for one frame + */ export function disablePlayerFiring(player: Player | number, toggle: boolean): void; /** - * Used only once in R* scripts (freemode.ysc). - */ + * Used only once in R* scripts (freemode.ysc). + */ export function disablePlayerThrowGrenadeWhileUsingGun(): void; export function setDisableAmbientMeleeMove(player: Player | number, toggle: boolean): void; /** - * Default is 100. Use player id and not ped id. For instance: PLAYER::SET_PLAYER_MAX_ARMOUR(PLAYER::PLAYER_ID(), 100); // main_persistent.ct4 - */ + * Default is 100. Use player id and not ped id. For instance: PLAYER::SET_PLAYER_MAX_ARMOUR(PLAYER::PLAYER_ID(), 100); // main_persistent.ct4 + */ export function setPlayerMaxArmour(player: Player | number, value: number): void; /** - * @param p1 is always 0 in the scripts - */ + * p1 is always 0 in the scripts + */ export function specialAbilityActivate(player: Player | number, p1: number): void; export function setSpecialAbilityMp(player: Player | number, p1: number, p2: any): void; /** - * @param p1 is always 0 in the scripts - */ + * p1 is always 0 in the scripts + */ export function specialAbilityDeactivateMp(player: Player | number, p1: number): void; export function specialAbilityDeactivate(player: Player | number, p1: any): void; @@ -16541,44 +18534,44 @@ declare module "natives" { export function specialAbilityChargeOnMissionFailed(player: Player | number, p1: any): void; /** - * Every occurrence of p1 & p2 were both true. - */ + * Every occurrence of p1 & p2 were both true. + */ export function specialAbilityChargeSmall(player: Player | number, p1: boolean, p2: boolean, p3: any): void; /** - * Only 1 match. Both p1 & p2 were true. - */ + * Only 1 match. Both p1 & p2 were true. + */ export function specialAbilityChargeMedium(player: Player | number, p1: boolean, p2: boolean, p3: any): void; /** - * 2 matches. p1 was always true. - */ + * 2 matches. p1 was always true. + */ export function specialAbilityChargeLarge(player: Player | number, p1: boolean, p2: boolean, p3: any): void; /** - * @param p1 appears to always be 1 (only comes up twice) - */ - export function specialAbilityChargeContinuous(player: Player | number, p1: Player | number, p2: any): void; + * p1 appears to always be 1 (only comes up twice) + */ + export function specialAbilityChargeContinuous(player: Player | number, p1: Ped | Player | number, p2: any): void; /** - * @param p1 appears as 5, 10, 15, 25, or 30. p2 is always true. - */ + * p1 appears as 5, 10, 15, 25, or 30. p2 is always true. + */ export function specialAbilityChargeAbsolute(player: Player | number, p1: number, p2: boolean, p3: any): void; /** - * @param normalizedValue is from 0.0 - 1.0 - * @param p2 is always 1 - */ + * normalizedValue is from 0.0 - 1.0 + * p2 is always 1 + */ export function specialAbilityChargeNormalized(player: Player | number, normalizedValue: number, p2: boolean, p3: any): void; /** - * Also known as _RECHARGE_SPECIAL_ABILITY - */ + * Also known as _RECHARGE_SPECIAL_ABILITY + */ export function specialAbilityFillMeter(player: Player | number, p1: boolean, p2: any): void; /** - * @param p1 was always true. - */ + * p1 was always true. + */ export function specialAbilityDepleteMeter(player: Player | number, p1: boolean, p2: any): void; export function specialAbilityLock(playerModel: number, p1: any): void; @@ -16600,30 +18593,30 @@ declare module "natives" { export function updateSpecialAbilityFromStat(player: Player | number, p1: any): void; /** - * Appears once in "re_dealgonewrong" - */ + * Appears once in "re_dealgonewrong" + */ export function getIsPlayerDrivingOnHighway(player: Player | number): boolean; /** - * Only 1 occurrence. p1 was 2. - */ + * Only 1 occurrence. p1 was 2. + */ export function getIsPlayerDrivingWreckless(player: Player | number, p1: number): boolean; /** - * 2 occurrences in agency_heist3a. p1 was 0.7f then 0.4f. - */ + * 2 occurrences in agency_heist3a. p1 was 0.7f then 0.4f. + */ export function getIsMoppingAreaFreeInFrontOfPlayer(player: Player | number, p1: number): boolean; /** - * `findCollisionLand`: This teleports the player to land when set to true and will not consider the Z coordinate parameter provided by you. It will automatically put the Z coordinate so that you don't fall from sky. - */ + * `findCollisionLand`: This teleports the player to land when set to true and will not consider the Z coordinate parameter provided by you. It will automatically put the Z coordinate so that you don't fall from sky. + */ export function startPlayerTeleport(player: Player | number, x: number, y: number, z: number, heading: number, p5: boolean, findCollisionLand: boolean, p7: boolean): void; export function updatePlayerTeleport(player: Player | number): boolean; /** - * Disables the player's teleportation - */ + * Disables the player's teleportation + */ export function stopPlayerTeleport(): void; export function isPlayerTeleportActive(): boolean; @@ -16631,9 +18624,9 @@ declare module "natives" { export function getPlayerCurrentStealthNoise(player: Player | number): number; /** - * `regenRate`: The recharge multiplier, a value between 0.0 and 1.0. - * Use 1.0 to reset it back to normal - */ + * `regenRate`: The recharge multiplier, a value between 0.0 and 1.0. + * Use 1.0 to reset it back to normal + */ export function setPlayerHealthRechargeMultiplier(player: Player | number, regenRate: number): void; export function getPlayerHealthRechargeMaxPercent(player: Player | number): number; @@ -16641,47 +18634,47 @@ declare module "natives" { export function setPlayerHealthRechargeMaxPercent(player: Player | number, limit: number): void; /** - * Needs to be called every frame. - */ + * Needs to be called every frame. + */ export function disablePlayerHealthRecharge(player: Player | number): void; export function setPlayerFallDistanceToTriggerRagdollOverride(player: Player | number, p1: number): void; /** - * This modifies the damage value of your weapon. Whether it is a multiplier or base damage is unknown. - * Based on tests, it is unlikely to be a multiplier. - * modifier's min value is 0.1 - */ + * This modifies the damage value of your weapon. Whether it is a multiplier or base damage is unknown. + * Based on tests, it is unlikely to be a multiplier. + * modifier's min value is 0.1 + */ export function setPlayerWeaponDamageModifier(player: Player | number, modifier: number): void; /** - * modifier's min value is 0.1 - */ + * modifier's min value is 0.1 + */ export function setPlayerWeaponDefenseModifier(player: Player | number, modifier: number): void; /** - * modifier's min value is 0.1 - */ + * modifier's min value is 0.1 + */ export function setPlayerWeaponMinigunDefenseModifier(player: Player | number, modifier: number): void; /** - * modifier's min value is 0.1 - */ + * modifier's min value is 0.1 + */ export function setPlayerMeleeWeaponDamageModifier(player: Player | number, modifier: number, p2: boolean): void; /** - * modifier's min value is 0.1 - */ + * modifier's min value is 0.1 + */ export function setPlayerMeleeWeaponDefenseModifier(player: Player | number, modifier: number): void; /** - * modifier's min value is 0.1 - */ + * modifier's min value is 0.1 + */ export function setPlayerVehicleDamageModifier(player: Player | number, modifier: number): void; /** - * modifier's min value is 0.1 - */ + * modifier's min value is 0.1 + */ export function setPlayerVehicleDefenseModifier(player: Player | number, modifier: number): void; export function setPlayerMaxExplosiveDamage(player: Player | number, p1: number): void; @@ -16691,69 +18684,93 @@ declare module "natives" { export function setPlayerWeaponTakedownDefenseModifier(player: Player | number, p1: number): void; /** - * Tints: - * None = -1, - * Rainbow = 0, - * Red = 1, - * SeasideStripes = 2, - * WidowMaker = 3, - * Patriot = 4, - * Blue = 5, - * Black = 6, - * See NativeDB for reference: http://natives.altv.mp/#/0xA3D0E54541D9A5E5 - */ + * Tints: + * None = -1, + * Rainbow = 0, + * Red = 1, + * SeasideStripes = 2, + * WidowMaker = 3, + * Patriot = 4, + * Blue = 5, + * Black = 6, + * Hornet = 7, + * AirFocce = 8, + * Desert = 9, + * Shadow = 10, + * HighAltitude = 11, + * Airbone = 12, + * Sunrise = 13, + */ export function setPlayerParachuteTintIndex(player: Player | number, tintIndex: number): void; /** - * Tints: - * None = -1, - * Rainbow = 0, - * Red = 1, - * SeasideStripes = 2, - * WidowMaker = 3, - * Patriot = 4, - * Blue = 5, - * Black = 6, - * See NativeDB for reference: http://natives.altv.mp/#/0x75D3F7A1B0D9B145 - */ + * Tints: + * None = -1, + * Rainbow = 0, + * Red = 1, + * SeasideStripes = 2, + * WidowMaker = 3, + * Patriot = 4, + * Blue = 5, + * Black = 6, + * Hornet = 7, + * AirFocce = 8, + * Desert = 9, + * Shadow = 10, + * HighAltitude = 11, + * Airbone = 12, + * Sunrise = 13, + */ export function getPlayerParachuteTintIndex(player: Player | number, tintIndex?: number): [void, number]; /** - * Tints: - * None = -1, - * Rainbow = 0, - * Red = 1, - * SeasideStripes = 2, - * WidowMaker = 3, - * Patriot = 4, - * Blue = 5, - * Black = 6, - * See NativeDB for reference: http://natives.altv.mp/#/0xAF04C87F5DC1DF38 - */ + * Tints: + * None = -1, + * Rainbow = 0, + * Red = 1, + * SeasideStripes = 2, + * WidowMaker = 3, + * Patriot = 4, + * Blue = 5, + * Black = 6, + * Hornet = 7, + * AirFocce = 8, + * Desert = 9, + * Shadow = 10, + * HighAltitude = 11, + * Airbone = 12, + * Sunrise = 13, + */ export function setPlayerReserveParachuteTintIndex(player: Player | number, index: number): void; /** - * Tints: - * None = -1, - * Rainbow = 0, - * Red = 1, - * SeasideStripes = 2, - * WidowMaker = 3, - * Patriot = 4, - * Blue = 5, - * Black = 6, - * See NativeDB for reference: http://natives.altv.mp/#/0xD5A016BC3C09CF40 - */ + * Tints: + * None = -1, + * Rainbow = 0, + * Red = 1, + * SeasideStripes = 2, + * WidowMaker = 3, + * Patriot = 4, + * Blue = 5, + * Black = 6, + * Hornet = 7, + * AirFocce = 8, + * Desert = 9, + * Shadow = 10, + * HighAltitude = 11, + * Airbone = 12, + * Sunrise = 13, + */ export function getPlayerReserveParachuteTintIndex(player: Player | number, index?: number): [void, number]; /** - * tints 0- 13 - * 0 - unkown - * 1 - unkown - * 2 - unkown - * 3 - unkown - * 4 - unkown - */ + * tints 0- 13 + * 0 - unkown + * 1 - unkown + * 2 - unkown + * 3 - unkown + * 4 - unkown + */ export function setPlayerParachutePackTintIndex(player: Player | number, tintIndex: number): void; export function getPlayerParachutePackTintIndex(player: Player | number, tintIndex?: number): [void, number]; @@ -16769,30 +18786,30 @@ declare module "natives" { export function getPlayerParachuteSmokeTrailColor(player: Player | number, r?: number, g?: number, b?: number): [void, number, number, number]; /** - * example: - * wouldnt the flag be the seatIndex? - * @param player :SET_PLAYER_RESET_FLAG_PREFER_REAR_SEATS(PLAYER::PLAYER_ID(), 6); - * @param flags 0-6 - */ + * example: + * flags: 0-6 + * PLAYER::SET_PLAYER_RESET_FLAG_PREFER_REAR_SEATS(PLAYER::PLAYER_ID(), 6); + * wouldnt the flag be the seatIndex? + */ export function setPlayerPhonePaletteIdx(player: Player | number, flags: number): void; export function setPlayerNoiseMultiplier(player: Player | number, multiplier: number): void; /** - * Values around 1.0f to 2.0f used in game scripts. - */ + * Values around 1.0f to 2.0f used in game scripts. + */ export function setPlayerSneakingNoiseMultiplier(player: Player | number, multiplier: number): void; - export function canPedHearPlayer(player: Player | number, ped: Player | number): boolean; + export function canPedHearPlayer(player: Player | number, ped: Ped | Player | number): boolean; /** - * This is to make the player walk without accepting input from INPUT. - * C# Example : - * Function.Call(Hash.SIMULATE_PLAYER_INPUT_GAIT, Game.Player, 1.0f, 100, 1.0f, 1, 0); //Player will go forward for 100ms - * @param gaitType is in increments of 100s. 2000, 500, 300, 200, etc. - * @param p4 is always 1 and p5 is always 0. - */ - export function simulatePlayerInputGait(player: Player | number, amount: number, gaitType: number, speed: number, p4: boolean, p5: boolean): void; + * This is to make the player walk without accepting input from INPUT. + * gaitType is in increments of 100s. 2000, 500, 300, 200, etc. + * p4 is always 1 and p5 is always 0. + * C# Example : + * Function.Call(Hash.SIMULATE_PLAYER_INPUT_GAIT, Game.Player, 1.0f, 100, 1.0f, 1, 0); //Player will go forward for 100ms + */ + export function simulatePlayerInputGait(player: Player | number, amount: number, gaitType: number, speed: number, p4: boolean, p5: boolean, p6: any): void; export function resetPlayerInputGait(player: Player | number): void; @@ -16811,47 +18828,47 @@ declare module "natives" { export function setPlayerClothPinFrames(player: Player | number, p1: number): void; /** - * Every occurrence was either 0 or 2. - */ + * Every occurrence was either 0 or 2. + */ export function setPlayerClothPackageIndex(index: number): void; /** - * 6 matches across 4 scripts. 5 occurrences were 240. The other was 255. - */ + * 6 matches across 4 scripts. 5 occurrences were 240. The other was 255. + */ export function setPlayerClothLockCounter(value: number): void; /** - * Only 1 match. ob_sofa_michael. - * PLAYER::PLAYER_ATTACH_VIRTUAL_BOUND(-804.5928f, 173.1801f, 71.68436f, 0f, 0f, 0.590625f, 1f, 0.7f);1.0.335.2, 1.0.350.1/2, 1.0.372.2, 1.0.393.2, 1.0.393.4, 1.0.463.1; - */ + * Only 1 match. ob_sofa_michael. + * PLAYER::PLAYER_ATTACH_VIRTUAL_BOUND(-804.5928f, 173.1801f, 71.68436f, 0f, 0f, 0.590625f, 1f, 0.7f);1.0.335.2, 1.0.350.1/2, 1.0.372.2, 1.0.393.2, 1.0.393.4, 1.0.463.1; + */ export function playerAttachVirtualBound(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number, p7: number): void; /** - * 1.0.335.2, 1.0.350.1/2, 1.0.372.2, 1.0.393.2, 1.0.393.4, 1.0.463.1; - */ + * 1.0.335.2, 1.0.350.1/2, 1.0.372.2, 1.0.393.2, 1.0.393.4, 1.0.463.1; + */ export function playerDetachVirtualBound(): void; export function hasPlayerBeenSpottedInStolenVehicle(player: Player | number): boolean; /** - * Returns true if an unk value is greater than 0.0f - */ + * Returns true if an unk value is greater than 0.0f + */ export function isPlayerBattleAware(player: Player | number): boolean; export function getPlayerReceivedBattleEventRecently(player: Player | number, p1: number, p2: boolean): boolean; /** - * Appears only 3 times in the scripts, more specifically in michael1.ysc - * - - * This can be used to prevent dying if you are "out of the world" - */ + * Appears only 3 times in the scripts, more specifically in michael1.ysc + * - + * This can be used to prevent dying if you are "out of the world" + */ export function extendWorldBoundaryForPlayer(x: number, y: number, z: number): void; export function resetWorldBoundaryForPlayer(): void; /** - * Returns true if the player is riding a train. - */ + * Returns true if the player is riding a train. + */ export function isPlayerRidingTrain(player: Player | number): boolean; export function hasPlayerLeftTheWorld(player: Player | number): boolean; @@ -16859,9 +18876,9 @@ declare module "natives" { export function setPlayerLeavePedBehind(player: Player | number, toggle: boolean): void; /** - * @param p1 was always 5. - * @param p4 was always false. - */ + * p1 was always 5. + * p4 was always false. + */ export function setPlayerParachuteVariationOverride(player: Player | number, p1: number, p2: any, p3: any, p4: boolean): void; export function clearPlayerParachuteVariationOverride(player: Player | number): void; @@ -16901,8 +18918,8 @@ declare module "natives" { export function isPlayerVehicleWeaponToggledToNonHoming(p0: any): boolean; /** - * Unsets playerPed+330 if the current weapon has certain flags. - */ + * Unsets playerPed+330 if the current weapon has certain flags. + */ export function setPlayerVehicleWeaponToNonHoming(p0: any): void; export function setPlayerHomingDisabledForAllVehicleWeapons(p0: any, p1: any): void; @@ -16914,8 +18931,8 @@ declare module "natives" { export function setPlayerPreviousVariationData(player: Player | number, p1: number, p2: number, p3: any, p4: any, p5: any): void; /** - * Resets values set by SET_SCRIPT_FIRE_POSITION - */ + * Resets values set by SET_SCRIPT_FIRE_POSITION + */ export function removeScriptFirePosition(): void; export function setScriptFirePosition(coordX: number, coordY: number, coordZ: number): void; @@ -16929,54 +18946,54 @@ declare module "natives" { export function replayRecordBackForTime(p0: number, p1: number, p2: number): void; /** - * -This function appears to be deprecated/ unused. Tracing the call internally leads to a _nullsub - - * first one seems to be a string of a mission name, second one seems to be a bool/toggle - * @param p1 was always 0. - */ - export function replayCheckForEventThisFrame(missionNameLabel: string | null, p1: any): void; + * -This function appears to be deprecated/ unused. Tracing the call internally leads to a _nullsub - + * first one seems to be a string of a mission name, second one seems to be a bool/toggle + * p1 was always 0. + */ + export function replayCheckForEventThisFrame(missionNameLabel: string, p1: any): void; /** - * This disable the recording feature and has to be called every frame. - */ + * This disable the recording feature and has to be called every frame. + */ export function replayPreventRecordingThisFrame(): void; export function replayResetEventInfo(): void; /** - * This will disable the ability to make camera changes in R* Editor. - */ + * This will disable the ability to make camera changes in R* Editor. + */ export function replayDisableCameraMovementThisFrame(): void; /** - * Does nothing (it's a nullsub). - */ + * Does nothing (it's a nullsub). + */ export function recordGreatestMoment(p0: number, p1: number, p2: number): void; /** - * Starts recording a replay. - * If mode is 0, turns on action replay. - * If mode is 1, starts recording. - * If already recording a replay, does nothing. - */ + * Starts recording a replay. + * If mode is 0, turns on action replay. + * If mode is 1, starts recording. + * If already recording a replay, does nothing. + */ export function startReplayRecording(mode: number): void; /** - * Stops recording and saves the recorded clip. - */ + * Stops recording and saves the recorded clip. + */ export function stopReplayRecording(): void; /** - * Stops recording and discards the recorded clip. - */ + * Stops recording and discards the recorded clip. + */ export function cancelReplayRecording(): void; export function saveReplayRecording(): boolean; /** - * mov al, cs:g_bIsRecordingGameplay // byte_141DD0CD0 in b944 - * retn - * @returns Checks if you're recording, returns TRUE when you start recording (F1) or turn on action replay (F2) - */ + * Checks if you're recording, returns TRUE when you start recording (F1) or turn on action replay (F2) + * mov al, cs:g_bIsRecordingGameplay // byte_141DD0CD0 in b944 + * retn + */ export function isReplayRecording(): boolean; export function isReplayInitialized(): boolean; @@ -16986,46 +19003,60 @@ declare module "natives" { export function isReplayRecordSpaceAvailable(p0: boolean): boolean; /** - * Does nothing (it's a nullsub). - */ - export function registerEffectForReplayEditor(p0: string | null, p1: boolean): void; + * Does nothing (it's a nullsub). + */ + export function registerEffectForReplayEditor(p0: string, p1: boolean): void; /** - * Returns a bool if interior rendering is disabled, if yes, all "normal" rendered interiors are invisible - */ + * Returns a bool if interior rendering is disabled, if yes, all "normal" rendered interiors are invisible + */ export function replaySystemHasRequestedAScriptCleanup(): boolean; /** - * Disables some other rendering (internal) - */ + * Disables some other rendering (internal) + */ export function setScriptsHaveCleanedUpForReplaySystem(): void; export function setReplaySystemPausedForSave(p0: boolean): void; /** - * Sets (almost, not sure) all Rockstar Editor values (bIsRecording etc) to 0. - */ + * Sets (almost, not sure) all Rockstar Editor values (bIsRecording etc) to 0. + */ export function replayControlShutdown(): void; /** - * Please note that you will need to call DO_SCREEN_FADE_IN after exiting the Rockstar Editor when you call this. - */ + * Please note that you will need to call DO_SCREEN_FADE_IN after exiting the Rockstar Editor when you call this. + */ export function activateRockstarEditor(p0: number): void; - export function requestScript(scriptName: string | null): void; + export function savemigrationIsMpEnabled(): boolean; - export function setScriptAsNoLongerNeeded(scriptName: string | null): void; + export function savemigrationMpRequestAccounts(): boolean; + + export function savemigrationMpGetAccountsStatus(): number; + + export function savemigrationMpNumAccounts(): number; + + export function savemigrationMpGetAccount(p0: number, p1?: any): [boolean, any]; + + export function savemigrationMpRequestStatus(): boolean; + + export function savemigrationMpGetStatus(): number; + + export function requestScript(scriptName: string): void; + + export function setScriptAsNoLongerNeeded(scriptName: string): void; /** - * Returns if a script has been loaded into the game. Used to see if a script was loaded after requesting. - */ - export function hasScriptLoaded(scriptName: string | null): boolean; + * Returns if a script has been loaded into the game. Used to see if a script was loaded after requesting. + */ + export function hasScriptLoaded(scriptName: string): boolean; - export function doesScriptExist(scriptName: string | null): boolean; + export function doesScriptExist(scriptName: string): boolean; /** - * formerly _REQUEST_STREAMED_SCRIPT - */ + * formerly _REQUEST_STREAMED_SCRIPT + */ export function requestScriptWithNameHash(scriptHash: number): void; export function setScriptWithNameHashAsNoLongerNeeded(scriptHash: number): void; @@ -17041,11 +19072,14 @@ declare module "natives" { export function getNameOfScriptWithThisId(threadId: number): string; /** - * Starts a new iteration of the current threads. - * Call this first, then SCRIPT_THREAD_ITERATOR_GET_NEXT_THREAD_ID (0x30B4FA1C82DD4B9F) - */ + * Starts a new iteration of the current threads. + * Call this first, then SCRIPT_THREAD_ITERATOR_GET_NEXT_THREAD_ID (0x30B4FA1C82DD4B9F) + */ export function scriptThreadIteratorReset(): void; + /** + * If the function returns 0, the end of the iteration has been reached. + */ export function scriptThreadIteratorGetNextThreadId(): number; export function getIdOfThisThread(): number; @@ -17053,12 +19087,12 @@ declare module "natives" { export function terminateThisThread(): void; /** - * Gets the number of instances of the specified script is currently running. - * if (program) - * v3 = rage::scrProgram::GetNumRefs(program) - 1; - * return v3; - * @returns Actually returns numRefs - 1. - */ + * Gets the number of instances of the specified script is currently running. + * Actually returns numRefs - 1. + * if (program) + * v3 = rage::scrProgram::GetNumRefs(program) - 1; + * return v3; + */ export function getNumberOfThreadsRunningTheScriptWithThisHash(scriptHash: number): number; export function getThisScriptName(): string; @@ -17066,32 +19100,32 @@ declare module "natives" { export function getHashOfThisScriptName(): number; /** - * @param eventGroup 0 = SCRIPT_EVENT_QUEUE_AI (CEventGroupScriptAI), 1 = SCRIPT_EVENT_QUEUE_NETWORK (CEventGroupScriptNetwork) - */ + * eventGroup: 0 = SCRIPT_EVENT_QUEUE_AI (CEventGroupScriptAI), 1 = SCRIPT_EVENT_QUEUE_NETWORK (CEventGroupScriptNetwork) + */ export function getNumberOfEvents(eventGroup: number): number; /** - * @param eventGroup 0 = SCRIPT_EVENT_QUEUE_AI (CEventGroupScriptAI), 1 = SCRIPT_EVENT_QUEUE_NETWORK (CEventGroupScriptNetwork) - */ + * eventGroup: 0 = SCRIPT_EVENT_QUEUE_AI (CEventGroupScriptAI), 1 = SCRIPT_EVENT_QUEUE_NETWORK (CEventGroupScriptNetwork) + */ export function getEventExists(eventGroup: number, eventIndex: number): boolean; /** - * @param eventGroup 0 = SCRIPT_EVENT_QUEUE_AI (CEventGroupScriptAI), 1 = SCRIPT_EVENT_QUEUE_NETWORK (CEventGroupScriptNetwork) - */ + * eventGroup: 0 = SCRIPT_EVENT_QUEUE_AI (CEventGroupScriptAI), 1 = SCRIPT_EVENT_QUEUE_NETWORK (CEventGroupScriptNetwork) + */ export function getEventAtIndex(eventGroup: number, eventIndex: number): number; /** - * Note: eventDataSize is NOT the size in bytes, it is the size determined by the SIZE_OF operator (RAGE Script operator, not C/C++ sizeof). That is, the size in bytes divided by 8 (script variables are always 8-byte aligned!). - * @param eventGroup 0 = SCRIPT_EVENT_QUEUE_AI (CEventGroupScriptAI), 1 = SCRIPT_EVENT_QUEUE_NETWORK (CEventGroupScriptNetwork) - */ - export function getEventData(eventGroup: number, eventIndex: number, eventData: any | null, eventDataSize: number): [boolean, any]; + * eventGroup: 0 = SCRIPT_EVENT_QUEUE_AI (CEventGroupScriptAI), 1 = SCRIPT_EVENT_QUEUE_NETWORK (CEventGroupScriptNetwork) + * Note: eventDataSize is NOT the size in bytes, it is the size determined by the SIZE_OF operator (RAGE Script operator, not C/C++ sizeof). That is, the size in bytes divided by 8 (script variables are always 8-byte aligned!). + */ + export function getEventData(eventGroup: number, eventIndex: number, eventData: any, eventDataSize: number): [boolean, any]; /** - * Note: eventDataSize is NOT the size in bytes, it is the size determined by the SIZE_OF operator (RAGE Script operator, not C/C++ sizeof). That is, the size in bytes divided by 8 (script variables are always 8-byte aligned!). - * @param eventGroup 0 = SCRIPT_EVENT_QUEUE_AI (CEventGroupScriptAI), 1 = SCRIPT_EVENT_QUEUE_NETWORK (CEventGroupScriptNetwork) - * @param playerBits (also known as playersToBroadcastTo) is a bitset that indicates which players this event should be sent to. In order to send the event to specific players only, use (1 << playerIndex). Set all bits if it should be broadcast to all players. - */ - export function triggerScriptEvent(eventGroup: number, eventData: any | null, eventDataSize: number, playerBits: number): [void, any]; + * eventGroup: 0 = SCRIPT_EVENT_QUEUE_AI (CEventGroupScriptAI), 1 = SCRIPT_EVENT_QUEUE_NETWORK (CEventGroupScriptNetwork) + * Note: eventDataSize is NOT the size in bytes, it is the size determined by the SIZE_OF operator (RAGE Script operator, not C/C++ sizeof). That is, the size in bytes divided by 8 (script variables are always 8-byte aligned!). + * playerBits (also known as playersToBroadcastTo) is a bitset that indicates which players this event should be sent to. In order to send the event to specific players only, use (1 << playerIndex). Set all bits if it should be broadcast to all players. + */ + export function triggerScriptEvent(eventGroup: number, eventData: any, eventDataSize: number, playerBits: number): [void, any]; export function shutdownLoadingScreen(): void; @@ -17102,56 +19136,66 @@ declare module "natives" { export function commitToLoadingscreenSelction(): void; /** - * Returns true if bit 0 in GtaThread+0x154 is set. - */ + * Returns true if bit 0 in GtaThread+0x154 is set. + */ export function bgIsExitflagSet(): boolean; /** - * Sets bit 1 in GtaThread+0x154 - */ + * Sets bit 1 in GtaThread+0x154 + */ export function bgSetExitflagResponse(): void; /** - * Hashed version of BG_START_CONTEXT. - */ + * Hashed version of BG_START_CONTEXT. + */ export function bgStartContextHash(contextHash: number): void; /** - * Hashed version of BG_END_CONTEXT. - */ + * Hashed version of BG_END_CONTEXT. + */ export function bgEndContextHash(contextHash: number): void; /** - * Inserts the given context into the background scripts context map. - */ - export function bgStartContext(contextName: string | null): void; + * Inserts the given context into the background scripts context map. + */ + export function bgStartContext(contextName: string): void; /** - * Deletes the given context from the background scripts context map. - */ - export function bgEndContext(contextName: string | null): void; + * Deletes the given context from the background scripts context map. + */ + export function bgEndContext(contextName: string): void; - export function bgDoesLaunchParamExist(scriptIndex: number, p1: string | null): boolean; + export function bgDoesLaunchParamExist(scriptIndex: number, p1: string): boolean; - export function bgGetLaunchParamValue(scriptIndex: number, p1: string | null): number; + export function bgGetLaunchParamValue(scriptIndex: number, p1: string): number; export function bgGetScriptIdFromNameHash(p0: number): number; /** - * See TRIGGER_SCRIPT_EVENT - */ - export function sendTuScriptEvent(eventGroup: number, eventData: any | null, eventDataSize: number, playerBits: number): [void, any]; + * New variant of SEND_TU_SCRIPT_EVENT that automatically initializes the event data header. + * See TRIGGER_SCRIPT_EVENT for more info. + */ + export function sendTuScriptEventNew(eventGroup: number, eventData: any, eventDataSize: number, playerBits: number, eventType: number): [void, any]; /** - * Asynchronously starts a line-of-sight (raycast) world probe shape test. - * @param p8 is a bit mask with bits 1, 2 and/or 4, relating to collider types; 4 should usually be used. - * @returns Use the handle with 0x3D87450E15D98694 or 0x65287525D951F6BE until it returns 0 or 2. - */ + * Registers a protected variable that will be checked for modifications by the anticheat + */ + export function registerScriptVariable(variable?: any): [void, any]; + + export function unregisterScriptVariable(variable?: any): [void, any]; + + export function forceCheckScriptVariables(): void; + + /** + * Asynchronously starts a line-of-sight (raycast) world probe shape test. + * Use the handle with 0x3D87450E15D98694 or 0x65287525D951F6BE until it returns 0 or 2. + * p8 is a bit mask with bits 1, 2 and/or 4, relating to collider types; 4 should usually be used. + */ export function startShapeTestLosProbe(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, flags: number, entity: Entity | number, p8: number): number; /** - * Does the same as 0x7EE9F5D83DD4F90E, except blocking until the shape test completes. - */ + * Does the same as 0x7EE9F5D83DD4F90E, except blocking until the shape test completes. + */ export function startExpensiveSynchronousShapeTestLosProbe(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, flags: number, entity: Entity | number, p8: number): number; export function startShapeTestBoundingBox(entity: Entity | number, flags1: number, flags2: number): number; @@ -17161,39 +19205,40 @@ declare module "natives" { export function startShapeTestBound(entity: Entity | number, flags1: number, flags2: number): number; /** - * Raycast from point to point, where the ray has a radius. - * vehicles=10 - * peds =12 - * Iterating through flags yields many ped / vehicle/ object combinations - * @param entity is an entity to ignore - * @param p9 = 7, but no idea what it does - */ + * Raycast from point to point, where the ray has a radius. + * flags: + * vehicles=10 + * peds =12 + * Iterating through flags yields many ped / vehicle/ object combinations + * p9 = 7, but no idea what it does + * Entity is an entity to ignore + */ export function startShapeTestCapsule(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, radius: number, flags: number, entity: Entity | number, p9: number): number; export function startShapeTestSweptSphere(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, radius: number, flags: number, entity: Entity | number, p9: any): number; /** - * Returns a ShapeTest handle that can be used with GET_SHAPE_TEST_RESULT. - * In its only usage in game scripts its called with flag set to 511, entity to player_ped_id and flag2 set to 7 - */ - export function startShapeTestMouseCursorLosProbe(pVec1: Vector3 | null, pVec2: Vector3 | null, flag: number, entity: Entity | number, flag2: number): [number, Vector3, Vector3]; + * Returns a ShapeTest handle that can be used with GET_SHAPE_TEST_RESULT. + * In its only usage in game scripts its called with flag set to 511, entity to player_ped_id and flag2 set to 7 + */ + export function startShapeTestMouseCursorLosProbe(pVec1: Vector3, pVec2: Vector3, flag: number, entity: Entity | number, flag2: number): [number, Vector3, Vector3]; /** - * Returns the result of a shape test: 0 if the handle is invalid, 1 if the shape test is still pending, or 2 if the shape test has completed, and the handle should be invalidated. - * When used with an asynchronous shape test, this native should be looped until returning 0 or 2, after which the handle is invalidated. - */ - export function getShapeTestResult(shapeTestHandle: number, hit?: boolean, endCoords?: Vector3, surfaceNormal?: Vector3, entityHit?: Entity | number): [number, boolean, Vector3, Vector3, number]; + * Returns the result of a shape test: 0 if the handle is invalid, 1 if the shape test is still pending, or 2 if the shape test has completed, and the handle should be invalidated. + * When used with an asynchronous shape test, this native should be looped until returning 0 or 2, after which the handle is invalidated. + */ + export function getShapeTestResult(shapeTestHandle: number, hit?: boolean, endCoords?: Vector3, surfaceNormal?: Vector3, entityHit?: Entity | number): [number, boolean, Vector3, Vector3, Entity | number]; /** - * Returns the result of a shape test, also returning the material of any touched surface. - * When used with an asynchronous shape test, this native should be looped until returning 0 or 2, after which the handle is invalidated. - * @returns Unless the return value is 2, the other return values are undefined. - */ - export function getShapeTestResultIncludingMaterial(shapeTestHandle: number, hit?: boolean, endCoords?: Vector3, surfaceNormal?: Vector3, materialHash?: number, entityHit?: Entity | number): [number, boolean, Vector3, Vector3, number, number]; + * Returns the result of a shape test, also returning the material of any touched surface. + * When used with an asynchronous shape test, this native should be looped until returning 0 or 2, after which the handle is invalidated. + * Unless the return value is 2, the other return values are undefined. + */ + export function getShapeTestResultIncludingMaterial(shapeTestHandle: number, hit?: boolean, endCoords?: Vector3, surfaceNormal?: Vector3, materialHash?: number, entityHit?: Entity | number): [number, boolean, Vector3, Vector3, number, Entity | number]; /** - * Invalidates the entity handle passed by removing the fwScriptGuid from the entity. This should be used when receiving an ambient entity from shape testing natives, but can also be used for other natives returning an 'irrelevant' entity handle. - */ + * Invalidates the entity handle passed by removing the fwScriptGuid from the entity. This should be used when receiving an ambient entity from shape testing natives, but can also be used for other natives returning an 'irrelevant' entity handle. + */ export function releaseScriptGuidFromEntity(entityHit: Entity | number): void; export function scInboxGetTotalNumMessages(): number; @@ -17204,24 +19249,22 @@ declare module "natives" { export function scInboxSetMessageAsReadAtIndex(msgIndex: number): boolean; - export function scInboxMessageGetDataInt(p0: number, context: string | null, out?: number): [boolean, number]; + export function scInboxMessageGetDataInt(p0: number, context: string, out?: number): [boolean, number]; - export function scInboxMessageGetDataBool(p0: number, p1: string | null): boolean; + export function scInboxMessageGetDataBool(p0: number, p1: string): boolean; - export function scInboxMessageGetDataString(p0: number, context: string | null, out?: string | null): [boolean, string]; + export function scInboxMessageGetDataString(p0: number, context: string, out: string): boolean; export function scInboxMessageDoApply(p0: number): boolean; export function scInboxMessageGetRawTypeAtIndex(p0: number): string; - export function scInboxMessagePushGamerT0RecipList(gamerHandle: any): [void, any]; + export function scInboxMessagePushGamerT0RecipList(gamerHandle?: any): [void, any]; - export function scInboxSendUgcstatupdateToRecipList(data: any): [void, any]; + export function scInboxSendUgcstatupdateToRecipList(data?: any): [void, any]; export function scInboxMessageGetUgcdata(p0: number, p1?: any): [boolean, any]; - export function scInboxSendBountyToRecipList(data: any): [boolean, any]; - export function scInboxGetBountyDataAtIndex(index: number, outData?: any): [boolean, any]; export function scEmailRetrieveEmails(offset: number, limit: number): void; @@ -17232,13 +19275,13 @@ declare module "natives" { export function scEmailGetEmailAtIndex(p0: number, p1?: any): [boolean, any]; - export function scEmailDeleteEmails(p0: any | null, p1: any): [void, any]; + export function scEmailDeleteEmails(p0: any, p1: any): [void, any]; - export function scEmailMessagePushGamerToRecipList(gamerHandle: any): [void, any]; + export function scEmailMessagePushGamerToRecipList(gamerHandle?: any): [void, any]; export function scEmailMessageClearRecipList(): void; - export function scEmailSendEmail(p0: string | null): void; + export function scEmailSendEmail(p0: string): void; export function scEmailSetCurrentEmailTag(p0: any): boolean; @@ -17252,27 +19295,27 @@ declare module "natives" { export function scPresenceAttrSetFloat(attrHash: number, value: number): boolean; - export function scPresenceAttrSetString(attrHash: number, value: string | null): boolean; + export function scPresenceAttrSetString(attrHash: number, value: string): boolean; export function scPresenceSetActivityRating(p0: any, p1: number): boolean; - export function scGamerdataGetInt(name: string | null, value?: number): [boolean, number]; + export function scGamerdataGetInt(name: string, value?: number): [boolean, number]; - export function scGamerdataGetFloat(name: string | null, value?: number): [boolean, number]; + export function scGamerdataGetFloat(name: string, value?: number): [boolean, number]; - export function scGamerdataGetBool(name: string | null): boolean; + export function scGamerdataGetBool(name: string): boolean; - export function scGamerdataGetString(name: string | null, value?: string | null): [boolean, string]; + export function scGamerdataGetString(name: string, value: string): boolean; - export function scGamerdataGetActiveXpBonus(value: number): [boolean, number]; + export function scGamerdataGetActiveXpBonus(value?: number): [boolean, number]; /** - * Starts a task to check an entered string for profanity on the ROS/Social Club services. - * See also: 1753344C770358AE, 82E4A58BABC15AE7. - */ - export function scProfanityCheckString(string: string | null, token?: number): [boolean, number]; + * Starts a task to check an entered string for profanity on the ROS/Social Club services. + * See also: 1753344C770358AE, 82E4A58BABC15AE7. + */ + export function scProfanityCheckString(string: string, token?: number): [boolean, number]; - export function scProfanityCheckStringUgc(string: string | null, token?: number): [boolean, number]; + export function scProfanityCheckStringUgc(string: string, token?: number): [boolean, number]; export function scProfanityGetCheckIsValid(token: number): boolean; @@ -17282,7 +19325,7 @@ declare module "natives" { export function scProfanityGetStringStatus(token: number): number; - export function scLicenseplateCheckString(p0: string | null, p1?: number): [boolean, number]; + export function scLicenseplateCheckString(p0: string, p1?: number): [boolean, number]; export function scLicenseplateGetCheckIsValid(p0: any): boolean; @@ -17294,15 +19337,15 @@ declare module "natives" { export function scLicenseplateGetPlateData(token: number, plateIndex: number): string; - export function scLicenseplateSetPlateData(oldPlateText: string | null, newPlateText: string | null, plateData?: any): [boolean, any]; + export function scLicenseplateSetPlateData(oldPlateText: string, newPlateText: string, plateData?: any): [boolean, any]; - export function scLicenseplateAdd(plateText: string | null, plateData?: any, token?: number): [boolean, any, number]; + export function scLicenseplateAdd(plateText: string, plateData?: any, token?: number): [boolean, any, number]; export function scLicenseplateGetAddIsPending(token: number): boolean; export function scLicenseplateGetAddStatus(token: number): number; - export function scLicenseplateIsvalid(plateText: string | null, token?: number): [boolean, number]; + export function scLicenseplateIsvalid(plateText: string, token?: number): [boolean, number]; export function scLicenseplateGetIsvalidIsPending(token: number): boolean; @@ -17312,35 +19355,35 @@ declare module "natives" { export function scCommunityEventGetEventId(): number; - export function scCommunityEventGetExtraDataInt(p0: string | null, p1?: number): [boolean, number]; + export function scCommunityEventGetExtraDataInt(p0: string, p1?: number): [boolean, number]; - export function scCommunityEventGetExtraDataFloat(p0: string | null, p1?: number): [boolean, number]; + export function scCommunityEventGetExtraDataFloat(p0: string, p1?: number): [boolean, number]; - export function scCommunityEventGetExtraDataString(p0: string | null, p1?: string | null): [boolean, string]; + export function scCommunityEventGetExtraDataString(p0: string, p1: string): boolean; - export function scCommunityEventGetDisplayName(p0: string | null): [boolean, string]; + export function scCommunityEventGetDisplayName(p0: string): boolean; - export function scCommunityEventIsActiveForType(p0: string | null): boolean; + export function scCommunityEventIsActiveForType(p0: string): boolean; - export function scCommunityEventGetEventIdForType(p0: string | null): number; + export function scCommunityEventGetEventIdForType(p0: string): number; - export function scCommunityEventGetExtraDataIntForType(p0: string | null, p1: number | null, p2: string | null): [boolean, number]; + export function scCommunityEventGetExtraDataIntForType(p0: string, p1: number, p2: string): [boolean, number]; - export function scCommunityEventGetExtraDataFloatForType(p0: string | null, p1: number | null, p2: string | null): [boolean, number]; + export function scCommunityEventGetExtraDataFloatForType(p0: string, p1: number, p2: string): [boolean, number]; - export function scCommunityEventGetExtraDataStringForType(p0: string | null, p1: string | null, p2: string | null): [boolean, string]; + export function scCommunityEventGetExtraDataStringForType(p0: string, p1: string, p2: string): boolean; - export function scCommunityEventGetDisplayNameForType(p0: string | null, p1: string | null): [boolean, string]; + export function scCommunityEventGetDisplayNameForType(p0: string, p1: string): boolean; export function scCommunityEventIsActiveById(p0: number): boolean; - export function scCommunityEventGetExtraDataIntById(p0: number, p1: string | null, p2?: number): [boolean, number]; + export function scCommunityEventGetExtraDataIntById(p0: number, p1: string, p2?: number): [boolean, number]; - export function scCommunityEventGetExtraDataFloatById(p0: number, p1: string | null, p2?: number): [boolean, number]; + export function scCommunityEventGetExtraDataFloatById(p0: number, p1: string, p2?: number): [boolean, number]; - export function scCommunityEventGetExtraDataStringById(p0: number, p1: string | null, p2?: string | null): [boolean, string]; + export function scCommunityEventGetExtraDataStringById(p0: number, p1: string, p2: string): boolean; - export function scCommunityEventGetDisplayNameById(p0: number, p1?: string | null): [boolean, string]; + export function scCommunityEventGetDisplayNameById(p0: number, p1: string): boolean; export function scTransitionNewsShow(p0: any): boolean; @@ -17350,37 +19393,37 @@ declare module "natives" { export function scTransitionNewsHasExtraDataTu(): boolean; - export function scTransitionNewsGetExtraDataIntTu(p0: string | null, p1?: number): [boolean, number]; + export function scTransitionNewsGetExtraDataIntTu(p0: string, p1?: number): [boolean, number]; export function scTransitionNewsEnd(): void; export function scPauseNewsInitStarterPack(p0: any): boolean; /** - * Fills some 0x30 sized struct - */ + * Fills some 0x30 sized struct + */ export function scPauseNewsGetPendingStory(p0: any): boolean; export function scPauseNewsShutdown(): void; /** - * Returns the nickname of the logged-in Rockstar Social Club account. - */ + * Returns the nickname of the logged-in Rockstar Social Club account. + */ export function scAccountInfoGetNickname(): string; - export function scAchievementInfoStatus(p0: number): [boolean, number]; + export function scAchievementInfoStatus(p0?: number): [boolean, number]; /** - * Same as HAS_ACHIEVEMENT_BEEN_PASSED - */ + * Same as HAS_ACHIEVEMENT_BEEN_PASSED + */ export function scHasAchievementBeenPassed(achievementId: number): boolean; /** - * Example: - * for (v_2 = 0; v_2 <= 4; v_2 += 1) { - * STATS::STAT_CLEAR_SLOT_FOR_RELOAD(v_2); - * } - */ + * Example: + * for (v_2 = 0; v_2 <= 4; v_2 += 1) { + * STATS::STAT_CLEAR_SLOT_FOR_RELOAD(v_2); + * } + */ export function statClearSlotForReload(statSlot: number): boolean; export function statLoad(statSlot: number): boolean; @@ -17396,8 +19439,8 @@ declare module "natives" { export function statSavePendingOrRequested(): boolean; /** - * @param p0 is characterSlot? seems range from 0 to 2 - */ + * p0 is characterSlot? seems range from 0 to 2 + */ export function statDeleteSlot(p0: number): boolean; export function statSlotIsLoaded(statSlot: number): boolean; @@ -17421,101 +19464,160 @@ declare module "natives" { export function statGetLoadSafeToProgressToMpFromSp(): boolean; /** - * Example: - * STATS::STAT_SET_INT(MISC::GET_HASH_KEY("MPPLY_KILLS_PLAYERS"), 1337, true); - */ + * Returns stat hash based on dataType, statIndex/statId and characterSlot. Related to CStatsMpCharacterMappingData + */ + export function getStatHashForCharacterStat(dataType: number, statIndex: number, charSlot: number): number; + + /** + * Example: + * STATS::STAT_SET_INT(MISC::GET_HASH_KEY("MPPLY_KILLS_PLAYERS"), 1337, true); + */ export function statSetInt(statName: number, value: number, save: boolean): boolean; /** - * Example: - * STATS::STAT_SET_FLOAT(MISC::GET_HASH_KEY("MP0_WEAPON_ACCURACY"), 66.6f, true); - */ + * Example: + * STATS::STAT_SET_FLOAT(MISC::GET_HASH_KEY("MP0_WEAPON_ACCURACY"), 66.6f, true); + */ export function statSetFloat(statName: number, value: number, save: boolean): boolean; /** - * Example: - * STATS::STAT_SET_BOOL(MISC::GET_HASH_KEY("MPPLY_MELEECHLENGECOMPLETED"), trur, true); - */ + * Example: + * STATS::STAT_SET_BOOL(MISC::GET_HASH_KEY("MPPLY_MELEECHLENGECOMPLETED"), trur, true); + */ export function statSetBool(statName: number, value: boolean, save: boolean): boolean; /** - * The following values have been found in the decompiled scripts: - * "RC_ABI1" - * "RC_ABI2" - * "RC_BA1" - * "RC_BA2" - * "RC_BA3" - * "RC_BA3A" - * "RC_BA3C" - * "RC_BA4" - * See NativeDB for reference: http://natives.altv.mp/#/0x17695002FD8B2AE0 - */ - export function statSetGxtLabel(statName: number, value: string | null, save: boolean): boolean; - - /** - * 'value' is a structure to a structure, 'numFields' is how many fields there are in said structure (usually 7). - * The structure looks like this: - * int year - * int month - * int day - * int hour - * int minute - * int second - * int millisecond - * The decompiled scripts use TIME::GET_POSIX_TIME to fill this structure. - */ - export function statSetDate(statName: number, value: any | null, numFields: number, save: boolean): [boolean, any]; - - export function statSetString(statName: number, value: string | null, save: boolean): boolean; + * The following values have been found in the decompiled scripts: + * "RC_ABI1" + * "RC_ABI2" + * "RC_BA1" + * "RC_BA2" + * "RC_BA3" + * "RC_BA3A" + * "RC_BA3C" + * "RC_BA4" + * "RC_DRE1" + * "RC_EPS1" + * "RC_EPS2" + * "RC_EPS3" + * "RC_EPS4" + * "RC_EPS5" + * "RC_EPS6" + * "RC_EPS7" + * "RC_EPS8" + * "RC_EXT1" + * "RC_EXT2" + * "RC_EXT3" + * "RC_EXT4" + * "RC_FAN1" + * "RC_FAN2" + * "RC_FAN3" + * "RC_HAO1" + * "RC_HUN1" + * "RC_HUN2" + * "RC_JOS1" + * "RC_JOS2" + * "RC_JOS3" + * "RC_JOS4" + * "RC_MAU1" + * "RC_MIN1" + * "RC_MIN2" + * "RC_MIN3" + * "RC_MRS1" + * "RC_MRS2" + * "RC_NI1" + * "RC_NI1A" + * "RC_NI1B" + * "RC_NI1C" + * "RC_NI1D" + * "RC_NI2" + * "RC_NI3" + * "RC_OME1" + * "RC_OME2" + * "RC_PA1" + * "RC_PA2" + * "RC_PA3" + * "RC_PA3A" + * "RC_PA3B" + * "RC_PA4" + * "RC_RAM1" + * "RC_RAM2" + * "RC_RAM3" + * "RC_RAM4" + * "RC_RAM5" + * "RC_SAS1" + * "RC_TON1" + * "RC_TON2" + * "RC_TON3" + * "RC_TON4" + * "RC_TON5" + */ + export function statSetGxtLabel(statName: number, value: string, save: boolean): boolean; + + /** + * 'value' is a structure to a structure, 'numFields' is how many fields there are in said structure (usually 7). + * The structure looks like this: + * int year + * int month + * int day + * int hour + * int minute + * int second + * int millisecond + * The decompiled scripts use TIME::GET_POSIX_TIME to fill this structure. + */ + export function statSetDate(statName: number, value: any, numFields: number, save: boolean): [boolean, any]; + + export function statSetString(statName: number, value: string, save: boolean): boolean; export function statSetPos(statName: number, x: number, y: number, z: number, save: boolean): boolean; export function statSetMaskedInt(statName: number, p1: number, p2: number, p3: number, save: boolean): boolean; - export function statSetUserId(statName: number, value: string | null, save: boolean): boolean; + export function statSetUserId(statName: number, value: string, save: boolean): boolean; /** - * @param p1 always true. - */ + * p1 always true. + */ export function statSetCurrentPosixTime(statName: number, p1: boolean): boolean; /** - * @param p2 appears to always be -1 - */ - export function statGetInt(statHash: number, outValue: number | null, p2: number): [boolean, number]; + * p2 appears to always be -1 + */ + export function statGetInt(statHash: number, outValue: number, p2: number): [boolean, number]; - export function statGetFloat(statHash: number, outValue: number | null, p2: any): [boolean, number]; + export function statGetFloat(statHash: number, outValue: number, p2: any): [boolean, number]; - export function statGetBool(statHash: number, outValue: boolean | null, p2: any): [boolean, boolean]; + export function statGetBool(statHash: number, outValue: boolean, p2: any): [boolean, boolean]; /** - * @param p3 is probably characterSlot or BOOL save, always -1 - */ - export function statGetDate(statHash: number, outValue: any | null, numFields: number, p3: any): [boolean, any]; + * p3 is probably characterSlot or BOOL save, always -1 + */ + export function statGetDate(statHash: number, outValue: any, numFields: number, p3: any): [boolean, any]; /** - * @param p1 is always -1 in the script files - */ + * p1 is always -1 in the script files + */ export function statGetString(statHash: number, p1: number): string; /** - * @param outZ is probably characterSlot or BOOL save, always -1 - */ - export function statGetPos(statName: number, outX: number | null, outY: number | null, outZ: number | null, p4: any): [boolean, number, number, number]; + * p3 is probably characterSlot or BOOL save, always -1 + */ + export function statGetPos(statName: number, outX: number, outY: number, outZ: number, p4: any): [boolean, number, number, number]; /** - * @param p4 is probably characterSlot or BOOL save - */ - export function statGetMaskedInt(statHash: number, outValue: number | null, p2: number, p3: number, p4: any): [boolean, number]; + * p4 is probably characterSlot or BOOL save + */ + export function statGetMaskedInt(statHash: number, outValue: number, p2: number, p3: number, p4: any): [boolean, number]; /** - * @returns Returns the rockstar ID (user id) value of a given stat. Returns "STAT_UNKNOWN" if the statHash is invalid or the stat has no userId - */ + * Returns the rockstar ID (user id) value of a given stat. Returns "STAT_UNKNOWN" if the statHash is invalid or the stat has no userId + */ export function statGetUserId(statHash: number): string; export function statGetLicensePlate(statName: number): string; - export function statSetLicensePlate(statName: number, str: string | null): boolean; + export function statSetLicensePlate(statName: number, str: string): boolean; export function statIncrement(statName: number, value: number): void; @@ -17526,13 +19628,13 @@ declare module "natives" { export function statCommunityGetHistory(statName: number, p1: number, outValue?: number): [boolean, number]; /** - * @param p0 seems to range from 0 to 7 - */ + * p0 seems to range from 0 to 7 + */ export function statResetAllOnlineCharacterStats(p0: number): void; /** - * @param p0 seems to range from 0 to 7 - */ + * p0 seems to range from 0 to 7 + */ export function statLocalResetAllOnlineCharacterStats(p0: number): void; export function statGetNumberOfDays(statName: number): number; @@ -17544,19 +19646,19 @@ declare module "natives" { export function statGetNumberOfSeconds(statName: number): number; /** - * Does not take effect immediately, unfortunately. - * @param profileSetting seems to only be 936, 937 and 938 in scripts - */ + * Does not take effect immediately, unfortunately. + * profileSetting seems to only be 936, 937 and 938 in scripts + */ export function statSetProfileSettingValue(profileSetting: number, value: number): void; /** - * This native does absolutely nothing, just a nullsub - */ + * This native does absolutely nothing, just a nullsub + */ export function statsCompletedCharacterCreation(p0: any): void; /** - * Needs more research. Possibly used to calculate the "mask" when calling "STAT_SET_MASKED_INT"? - */ + * Needs more research. Possibly used to calculate the "mask" when calling "STAT_SET_MASKED_INT"? + */ export function packedStatGetIntStatIndex(p0: number): number; export function getPackedIntStatKey(index: number, spStat: boolean, charStat: boolean, character: number): number; @@ -17564,19 +19666,26 @@ declare module "natives" { export function getPackedTuIntStatKey(index: number, spStat: boolean, charStat: boolean, character: number): number; /** - * Needs more research. Gets the stat name of a masked int? - * "_NGPSTAT_INT" - * "_MP_NGPSTAT_INT" - * "_MP_LRPSTAT_INT" - * "_MP_APAPSTAT_INT" - * "_MP_LR2PSTAT_INT" - * "_MP_BIKEPSTAT_INT" - * "_MP_IMPEXPPSTAT_INT" - * "_MP_GUNRPSTAT_INT" - * See NativeDB for reference: http://natives.altv.mp/#/0x2B4CDCA6F07FF3DA - * @param section - values used in the decompiled scripts: - */ - export function getPackedNgIntStatKey(index: number, spStat: boolean, charStat: boolean, character: number, section: string | null): number; + * Needs more research. Gets the stat name of a masked int? + * section - values used in the decompiled scripts: + * "_NGPSTAT_INT" + * "_MP_NGPSTAT_INT" + * "_MP_LRPSTAT_INT" + * "_MP_APAPSTAT_INT" + * "_MP_LR2PSTAT_INT" + * "_MP_BIKEPSTAT_INT" + * "_MP_IMPEXPPSTAT_INT" + * "_MP_GUNRPSTAT_INT" + * "_NGDLCPSTAT_INT" + * "_MP_NGDLCPSTAT_INT" + * "_DLCSMUGCHARPSTAT_INT" + * "_GANGOPSPSTAT_INT" + * "_BUSINESSBATPSTAT_INT" + * "_ARENAWARSPSTAT_INT" + * "_CASINOPSTAT_INT" + * "_CASINOHSTPSTAT_INT" + */ + export function getPackedNgIntStatKey(index: number, spStat: boolean, charStat: boolean, character: number, section: string): number; export function getPackedStatBoolCode(index: number, characterSlot: number): boolean; @@ -17586,9 +19695,20 @@ declare module "natives" { export function setPackedStatIntCode(index: number, value: number, characterSlot: number): void; - export function playstatsBackgroundScriptAction(action: string | null, value: number): void; + export function playstatsBackgroundScriptAction(action: string, value: number): void; + + /** + * p3: VehicleConversion, SCAdminCashGift + * p4: 0 + */ + export function playstatsFlowLow(posX: number, posY: number, posZ: number, p3: string, p4: any, amount: number): void; + + /** + * interiorAction: can either be InteriorEntry or InteriorExit + */ + export function playstatsFlowMedium(x: number, y: number, z: number, interiorAction: string, p4: number, p5: number): void; - export function playstatsNpcInvite(p0: string | null): void; + export function playstatsNpcInvite(p0: string): void; export function playstatsAwardXp(amount: number, type: number, category: number): void; @@ -17596,17 +19716,17 @@ declare module "natives" { export function playstatsStartedSessionInOfflinemode(): void; - export function playstatsActivityDone(p0: number, activityId: number): void; + export function playstatsActivityDone(p0: number, activityId: number, p2: any): void; export function playstatsLeaveJobChain(p0: any, p1: any, p2: any, p3: any, p4: any): void; - export function playstatsMissionStarted(p0: string | null, p1: any, p2: any, p3: boolean): void; + export function playstatsMissionStarted(p0: string, p1: any, p2: any, p3: boolean): void; - export function playstatsMissionOver(p0: string | null, p1: any, p2: any, p3: boolean, p4: boolean, p5: boolean): void; + export function playstatsMissionOver(p0: string, p1: any, p2: any, p3: boolean, p4: boolean, p5: boolean): void; - export function playstatsMissionCheckpoint(p0: string | null, p1: any, p2: any, p3: any): void; + export function playstatsMissionCheckpoint(p0: string, p1: any, p2: any, p3: any): void; - export function playstatsRandomMissionDone(name: string | null, p1: any, p2: any, p3: any): void; + export function playstatsRandomMissionDone(name: string, p1: any, p2: any, p3: any): void; export function playstatsRosBet(amount: number, act: number, player: Player | number, cm: number): void; @@ -17635,20 +19755,20 @@ declare module "natives" { export function playstatsFriendActivity(p0: number, p1: boolean): void; /** - * This native does absolutely nothing, just a nullsub - */ + * This native does absolutely nothing, just a nullsub + */ export function playstatsOddjobDone(totalTimeMs: number, p1: number, p2: boolean): void; - export function playstatsPropChange(p0: Player | number, p1: number, p2: number, p3: number): void; + export function playstatsPropChange(p0: Ped | Player | number, p1: number, p2: number, p3: number): void; - export function playstatsClothChange(p0: Player | number, p1: any, p2: any, p3: any, p4: any): void; + export function playstatsClothChange(p0: Ped | Player | number, p1: any, p2: any, p3: any, p4: any): void; /** - * This is a typo made by R*. It's supposed to be called PLAYSTATS_WEAPON_MOD_CHANGE. - */ + * This is a typo made by R*. It's supposed to be called PLAYSTATS_WEAPON_MOD_CHANGE. + */ export function playstatsWeaponModeChange(weaponHash: number, componentHashTo: number, componentHashFrom: number): void; - export function playstatsCheatApplied(cheat: string | null): void; + export function playstatsCheatApplied(cheat: string): void; export function playstatsJobActivityEnd(p0?: any, p1?: any, p2?: any, p3?: any): [void, any, any, any, any]; @@ -17658,7 +19778,7 @@ declare module "natives" { export function playstatsJobLtsRoundEnd(p0?: any, p1?: any, p2?: any, p3?: any): [void, any, any, any, any]; - export function playstatsQuickfixTool(element: number, item: string | null): void; + export function playstatsQuickfixTool(element: number, item: string): void; export function playstatsIdleKick(msStoodIdle: number): void; @@ -17666,13 +19786,13 @@ declare module "natives" { export function playstatsHeistSaveCheat(hash: number, p1: number): void; - export function playstatsAppendDirectorMetric(p0: any): [void, any]; + export function playstatsAppendDirectorMetric(p0?: any): [void, any]; export function playstatsAwardBadSport(id: number): void; export function playstatsPegasusAsPersonalAircraft(modelHash: number): void; - export function playstatsShopmenuNav(p0: any, p1: any, p2: any): void; + export function playstatsShopmenuNav(p0: any, p1: any, p2: any, p3: any): void; export function playstatsFmEventChallenges(p0: any): void; @@ -17700,7 +19820,7 @@ declare module "natives" { export function playstatsFmEventHuntbeast(p0: any): void; - export function playstatsPimenuHideOptions(data: any): [void, any]; + export function playstatsPimenuHideOptions(data?: any): [void, any]; export function leaderboardsGetNumberOfColumns(p0: number, p1: any): number; @@ -17718,25 +19838,23 @@ declare module "natives" { export function leaderboardsReadSuccessful(p0: any, p1: any, p2: any): boolean; - export function leaderboards2ReadFriendsByRow(p0: any | null, p1: any | null, p2: any, p3: boolean, p4: any, p5: any): [boolean, any, any]; + export function leaderboards2ReadFriendsByRow(p0: any, p1: any, p2: any, p3: boolean, p4: any, p5: any): [boolean, any, any]; export function leaderboards2ReadByHandle(p0?: any, p1?: any): [boolean, any, any]; - export function leaderboards2ReadByRow(p0: any | null, p1: any | null, p2: any, p3: any | null, p4: any, p5: any | null, p6: any): [boolean, any, any, any, any]; - - export function leaderboards2ReadByRank(p0: any | null, p1: any, p2: any): [boolean, any]; + export function leaderboards2ReadByRank(p0: any, p1: any, p2: any): [boolean, any]; - export function leaderboards2ReadByRadius(p0: any | null, p1: any, p2?: any): [boolean, any, any]; + export function leaderboards2ReadByRadius(p0: any, p1: any, p2?: any): [boolean, any, any]; - export function leaderboards2ReadByScoreInt(p0: any | null, p1: any, p2: any): [boolean, any]; + export function leaderboards2ReadByScoreInt(p0: any, p1: any, p2: any): [boolean, any]; - export function leaderboards2ReadByScoreFloat(p0: any | null, p1: number, p2: any): [boolean, any]; + export function leaderboards2ReadByScoreFloat(p0: any, p1: number, p2: any): [boolean, any]; export function leaderboards2ReadRankPrediction(p0?: any, p1?: any, p2?: any): [boolean, any, any, any]; - export function leaderboards2ReadByPlaform(p0: any | null, gamerHandleCsv: string | null, platformName: string | null): [boolean, any]; + export function leaderboards2ReadByPlaform(p0: any, gamerHandleCsv: string, platformName: string): [boolean, any]; - export function leaderboards2ReadGetRowDataStart(p0: any): [boolean, any]; + export function leaderboards2ReadGetRowDataStart(p0?: any): [boolean, any]; export function leaderboards2ReadGetRowDataEnd(): void; @@ -17746,13 +19864,13 @@ declare module "natives" { export function leaderboards2ReadGetRowDataFloat(p0: any, p1: any): number; - export function leaderboards2WriteData(p0: any): [boolean, any]; + export function leaderboards2WriteData(p0?: any): [boolean, any]; export function leaderboardsWriteAddColumn(p0: any, p1: any, p2: number): void; export function leaderboardsWriteAddColumnLong(p0: any, p1: any, p2: any): void; - export function leaderboardsCacheDataRow(p0: any): [boolean, any]; + export function leaderboardsCacheDataRow(p0?: any): [boolean, any]; export function leaderboardsClearCacheData(): void; @@ -17770,7 +19888,7 @@ declare module "natives" { export function presenceEventUpdatestatFloat(statHash: number, value: number, p2: number): void; - export function presenceEventUpdatestatIntWithString(statHash: number, value: number, p2: number, string: string | null): void; + export function presenceEventUpdatestatIntWithString(statHash: number, value: number, p2: number, string: string): void; export function getPlayerHasDrivenAllVehicles(): boolean; @@ -17779,23 +19897,23 @@ declare module "natives" { export function setProfileSettingPrologueComplete(): void; /** - * Sets profile setting 939 - */ + * Sets profile setting 939 + */ export function setProfileSettingSpChopMissionComplete(): void; /** - * Sets profile setting 933 - */ + * Sets profile setting 933 + */ export function setProfileSettingCreatorRacesDone(value: number): void; /** - * Sets profile setting 934 - */ + * Sets profile setting 934 + */ export function setProfileSettingCreatorDmDone(value: number): void; /** - * Sets profile setting 935 - */ + * Sets profile setting 935 + */ export function setProfileSettingCreatorCtfDone(value: number): void; export function setJobActivityIdStarted(p0: any, characterSlot: number): void; @@ -17803,8 +19921,8 @@ declare module "natives" { export function setFreemodePrologueDone(p0: any, characterSlot: number): void; /** - * Sets profile setting 940 and 941 - */ + * Sets profile setting 940 and 941 + */ export function setFreemodeStrandProgressionStatus(profileSetting: number, settingValue: number): void; export function statNetworkIncrementOnSuicide(p0: any, p1: number): void; @@ -17818,9 +19936,9 @@ declare module "natives" { export function statMigrateClearForRestart(): void; /** - * @param platformName must be one of the following: ps3, xbox360, ps4, xboxone - */ - export function statMigrateSavegameStart(platformName: string | null): boolean; + * platformName must be one of the following: ps3, xbox360, ps4, xboxone + */ + export function statMigrateSavegameStart(platformName: string): boolean; export function statMigrateSavegameGetStatus(): number; @@ -17832,112 +19950,145 @@ declare module "natives" { export function statMigrateCheckGetPlatformStatus(p0: number, p1?: any): [number, any]; - export function statGetSaveMigrationStatus(data: any): [number, any]; + export function statGetSaveMigrationStatus(data?: any): [number, any]; export function statSaveMigrationCancelPendingOperation(): boolean; export function statGetCancelSaveMigrationStatus(): number; - export function statSaveMigrationConsumeContent(contentId: number, srcPlatform: string | null, srcGamerHandle: string | null): boolean; + export function statSaveMigrationConsumeContent(contentId: number, srcPlatform: string, srcGamerHandle: string): boolean; - export function statGetSaveMigrationConsumeContentStatus(p0: number): [number, number]; + export function statGetSaveMigrationConsumeContentStatus(p0?: number): [number, number]; export function statEnableStatsTracking(): void; /** - * Prevents updates to CStatsMgr (e.g., STAT_SET_* natives) - */ + * Prevents updates to CStatsMgr (e.g., STAT_SET_* natives) + */ export function statDisableStatsTracking(): void; export function statIsStatsTrackingEnabled(): boolean; /** - * enum StatTrackingType - * { - * LongestWheelie = 1, - * LongestStoppie = 2, - * NoCrashes = 3, - * HighestSpeed = 4, - * _MostFlips = 5, - * _LongestSpin = 6, - * _HighestJumpReached = 7, - * See NativeDB for reference: http://natives.altv.mp/#/0x33D72899E24C3365 - */ + * enum StatTrackingType + * { + * LongestWheelie = 1, + * LongestStoppie = 2, + * NoCrashes = 3, + * HighestSpeed = 4, + * _MostFlips = 5, + * _LongestSpin = 6, + * _HighestJumpReached = 7, + * LongestJump = 8, + * _NearMissesNoCrash = 9, + * LongestFallSurvived = 10, + * LowestParachute = 11, + * ReverseDriving = 12, + * LongestFreefall = 13, + * VehiclesStolen = 14, + * _SomeCFireEventCount = 15, + * _Unk16 = 16, + * _LowFlyingTime = 17, + * LowFlying = 18, + * _InvertedFlyingTime = 19, + * InvertedFlying = 20, + * _PlaneSpinCount = 21, + * MeleeKills = 22, // Players + * _LongestSniperKill = 23, + * SniperSkills = 24, // Players + * DrivebyKills = 25, // Players + * HeadshotKills = 26, // Players + * LongestBail = 27, + * _TotalRammedByCar = 28, + * NearMissesPrecise = 29, + * _FreefallTime = 30, + * Unk31 = 31, + * } + * enum StatTrackingValueType + * { + * Total, + * Max, + * Min + * } + */ export function statStartRecordStat(statType: number, valueType: number): boolean; export function statStopRecordStat(): boolean; - export function statGetRecordedValue(value: number): [boolean, number]; + export function statGetRecordedValue(value?: number): [boolean, number]; export function statIsRecordingStat(): boolean; /** - * Perform the most near misses with other vehicles in a land vehicle without crashing - */ + * Perform the most near misses with other vehicles in a land vehicle without crashing + */ export function statGetCurrentNearMissNocrashPrecise(): number; /** - * Perform the longest wheelie on a motorcycle - */ + * Perform the longest wheelie on a motorcycle + */ export function statGetCurrentRearWheelDistance(): number; /** - * Perform the longest stoppie on a motorcycle - */ + * Perform the longest stoppie on a motorcycle + */ export function statGetCurrentFrontWheelDistance(): number; /** - * Perform the longest jump in a land vehicle - */ + * Perform the longest jump in a land vehicle + */ export function statGetCurrentJumpDistance(): number; /** - * Drive the furthest distance in a land vehicle without crashing - */ + * Drive the furthest distance in a land vehicle without crashing + */ export function statGetCurrentDriveNocrashDistance(): number; /** - * Achieve the highest speed in a land vehicle - */ + * Achieve the highest speed in a land vehicle + */ export function statGetCurrentSpeed(): number; /** - * Reverse the longest distance without crashing - */ + * Reverse the longest distance without crashing + */ export function statGetCurrentDrivingReverseDistance(): number; /** - * Fall the longest distance with a parachute before opening it - */ + * Fall the longest distance with a parachute before opening it + */ export function statGetCurrentSkydivingDistance(): number; /** - * Fly low to the ground for the longest distance - */ + * Fly low to the ground for the longest distance + */ export function statGetChallengeFlyingDist(): number; - export function statGetFlyingAltitude(outValue: number): [boolean, number]; + export function statGetFlyingAltitude(outValue?: number): [boolean, number]; /** - * Or non-flyable area - */ + * Or non-flyable area + */ export function statIsPlayerVehicleAboveOcean(): boolean; /** - * Travel the furthest distance when bailing from a vehicle - */ + * Travel the furthest distance when bailing from a vehicle + */ export function statGetVehicleBailDistance(): number; + /** + * This function is hard-coded to always return 1. + */ export function statRollbackSaveMigration(): boolean; /** - * Sets profile setting 866 - */ + * Sets profile setting 866 + */ export function setHasSpecialeditionContent(value: number): void; /** - * Sets profile setting 501 - */ + * Sets profile setting 501 + */ export function setSaveMigrationTransactionIdWarning(transactionId: number): void; export function getBossGoonUuid(characterSlot: number, p1: any, p2: any): void; @@ -17978,21 +20129,21 @@ declare module "natives" { export function playstatsSpentPiCustomLoadout(amount: number): void; - export function playstatsBuyContrabandMission(data: any): [void, any]; + export function playstatsBuyContrabandMission(data?: any): [void, any]; - export function playstatsSellContrabandMission(data: any): [void, any]; + export function playstatsSellContrabandMission(data?: any): [void, any]; - export function playstatsDefendContrabandMission(data: any): [void, any]; + export function playstatsDefendContrabandMission(data?: any): [void, any]; - export function playstatsRecoverContrabandMission(data: any): [void, any]; + export function playstatsRecoverContrabandMission(data?: any): [void, any]; export function playstatsHitContrabandDestroyLimit(p0: any): void; - export function startBeingBoss(p0: any): void; + export function startBeingBoss(p0: any, p1: any, p2: any): void; export function startBeingGoon(p0: any, p1: any, p2: any): void; - export function endBeingBoss(p0: any, p1: any): void; + export function endBeingBoss(p0: any, p1: any, p2: any): void; export function endBeingGoon(p0: any, p1: any, p2: any, p3: any, p4: any): void; @@ -18011,13 +20162,13 @@ declare module "natives" { export function sendMetricPunishBodyguard(p0: any): void; /** - * Allows CEventNetworkStuntPerformed to be triggered. - */ + * Allows CEventNetworkStuntPerformed to be triggered. + */ export function playstatsStartTrackingStunts(): void; /** - * Disallows CEventNetworkStuntPerformed to be triggered. - */ + * Disallows CEventNetworkStuntPerformed to be triggered. + */ export function playstatsStopTrackingStunts(): void; export function playstatsMissionEnded(p0: any): void; @@ -18046,11 +20197,11 @@ declare module "natives" { export function playstatsCopyRankIntoNewSlot(p0: any, p1: any, p2: any, p3: any, p4: any, p5: any, p6: any): void; - export function playstatsDupeDetected(data: any): [void, any]; + export function playstatsDupeDetected(data?: any): [void, any]; export function playstatsBanAlert(p0: number): void; - export function playstatsGunrunningMissionEnded(data: any): [void, any]; + export function playstatsGunrunningMissionEnded(data?: any): [void, any]; export function playstatsGunrunningRnd(p0: any): void; @@ -18064,17 +20215,17 @@ declare module "natives" { export function playstatsMinigameUsage(p0: any, p1: any, p2: any): void; - export function playstatsStoneHatchetEnded(data: any): [void, any]; + export function playstatsStoneHatchetEnded(data?: any): [void, any]; - export function playstatsSmugglerMissionEnded(data: any): [void, any]; + export function playstatsSmugglerMissionEnded(data?: any): [void, any]; - export function playstatsFmHeistPrepEnded(data: any): [void, any]; + export function playstatsFmHeistPrepEnded(data?: any): [void, any]; - export function playstatsInstancedHeistEnded(data: any | null, p1: any, p2: any, p3: any): [void, any]; + export function playstatsInstancedHeistEnded(data: any, p1: any, p2: any, p3: any): [void, any]; - export function playstatsDarCheckpoint(data: any): [void, any]; + export function playstatsDarCheckpoint(data?: any): [void, any]; - export function playstatsEnterSessionPack(data: any): [void, any]; + export function playstatsEnterSessionPack(data?: any): [void, any]; export function playstatsDroneUsage(p0: number, p1: number, p2: number): void; @@ -18082,7 +20233,7 @@ declare module "natives" { export function playstatsArenaWarsSpectator(p0: number, p1: number, p2: number, p3: number, p4: number): void; - export function playstatsArenaWarsEnded(data: any): [void, any]; + export function playstatsArenaWarsEnded(data?: any): [void, any]; export function playstatsSwitchPassiveMode(p0: boolean, p1: number, p2: number, p3: number): void; @@ -18118,13 +20269,13 @@ declare module "natives" { export function playstatsArcadeLoveMatch(p0: any, p1: any): void; - export function playstatsFreemodeCasinoMissionEnded(data: any): [void, any]; + export function playstatsFreemodeCasinoMissionEnded(data?: any): [void, any]; export function playstatsHeist3Drone(p0: any): void; export function playstatsHeist3Hack(p0: any, p1: any, p2: any, p3: any, p4: any, p5: any): void; - export function playstatsNpcPhone(p0: any, p1: any, p2: any, p3: any, p4: any, p5: any, p6: any, p7: any, p8: any, p9: any, p10: any, p11: any, p12: any): void; + export function playstatsNpcPhone(p0?: any): [void, any]; export function playstatsArcadeCabinet(p0: any): void; @@ -18142,7 +20293,7 @@ declare module "natives" { export function playstatsKillYourself(): void; - export function playstatsFmMissionEnd(p0: any, p1: any, p2: any): void; + export function playstatsFmMissionEnd(p0: any, p1: any, p2: any, p3: any): void; export function playstatsHeist4Prep(p0: any): void; @@ -18176,6 +20327,8 @@ declare module "natives" { export function playstatsHubExit(p0: any): void; + export function playstatsVehDel(bossId1: number, bossId2: number, bossType: number, vehicleID: number, reason: number): void; + export function playstatsInventory(p0: any): void; export function playstatsAcidMissionEnd(p0: any): void; @@ -18186,6 +20339,19 @@ declare module "natives" { export function playstatsPlayerStyle(p0: any): void; + export function playstatsRandomEvent(p0: any): void; + + export function playstatsAlert(data?: any): [void, any]; + + export function playstatsAttritionStageEnd(p0: any): void; + + export function playstatsShowroomNav(p0: any, p1: any, entity: number): void; + + /** + * Data struct contains various tunables related to test drives at Simeons Showroom or Luxury Showcase. + */ + export function playstatsShowroomOverview(data?: any): [void, any]; + export function loadAllObjectsNow(): void; export function loadScene(x: number, y: number, z: number): void; @@ -18197,47 +20363,47 @@ declare module "natives" { export function setInteriorActive(interiorID: number, toggle: boolean): void; /** - * Request a model to be loaded into memory. - */ + * Request a model to be loaded into memory. + */ export function requestModel(model: number): void; export function requestMenuPedModel(model: number): void; /** - * Checks if the specified model has loaded into memory. - */ + * Checks if the specified model has loaded into memory. + */ export function hasModelLoaded(model: number): boolean; /** - * STREAMING::REQUEST_MODELS_IN_ROOM(l_13BC, "V_FIB01_cur_elev"); - * STREAMING::REQUEST_MODELS_IN_ROOM(l_13BC, "limbo"); - * STREAMING::REQUEST_MODELS_IN_ROOM(l_13BB, "V_Office_gnd_lifts"); - * STREAMING::REQUEST_MODELS_IN_ROOM(l_13BB, "limbo"); - * STREAMING::REQUEST_MODELS_IN_ROOM(l_13BC, "v_fib01_jan_elev"); - * STREAMING::REQUEST_MODELS_IN_ROOM(l_13BC, "limbo"); - */ - export function requestModelsInRoom(interior: number, roomName: string | null): void; + * STREAMING::REQUEST_MODELS_IN_ROOM(l_13BC, "V_FIB01_cur_elev"); + * STREAMING::REQUEST_MODELS_IN_ROOM(l_13BC, "limbo"); + * STREAMING::REQUEST_MODELS_IN_ROOM(l_13BB, "V_Office_gnd_lifts"); + * STREAMING::REQUEST_MODELS_IN_ROOM(l_13BB, "limbo"); + * STREAMING::REQUEST_MODELS_IN_ROOM(l_13BC, "v_fib01_jan_elev"); + * STREAMING::REQUEST_MODELS_IN_ROOM(l_13BC, "limbo"); + */ + export function requestModelsInRoom(interior: number, roomName: string): void; /** - * Unloads model from memory - */ + * Unloads model from memory + */ export function setModelAsNoLongerNeeded(model: number): void; /** - * Check if model is in cdimage(rpf) - */ + * Check if model is in cdimage(rpf) + */ export function isModelInCdimage(model: number): boolean; /** - * Returns whether the specified model exists in the game. - */ + * Returns whether the specified model exists in the game. + */ export function isModelValid(model: number): boolean; export function isModelAPed(model: number): boolean; /** - * Returns whether the specified model represents a vehicle. - */ + * Returns whether the specified model represents a vehicle. + */ export function isModelAVehicle(model: number): boolean; export function requestCollisionAtCoord(x: number, y: number, z: number): void; @@ -18247,102 +20413,102 @@ declare module "natives" { export function hasCollisionForModelLoaded(model: number): boolean; /** - * Alias of REQUEST_COLLISION_AT_COORD. - */ + * Alias of REQUEST_COLLISION_AT_COORD. + */ export function requestAdditionalCollisionAtCoord(x: number, y: number, z: number): void; /** - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - */ - export function doesAnimDictExist(animDict: string | null): boolean; + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function doesAnimDictExist(animDict: string): boolean; /** - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - */ - export function requestAnimDict(animDict: string | null): void; + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function requestAnimDict(animDict: string): void; /** - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - */ - export function hasAnimDictLoaded(animDict: string | null): boolean; + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function hasAnimDictLoaded(animDict: string): boolean; /** - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - */ - export function removeAnimDict(animDict: string | null): void; + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function removeAnimDict(animDict: string): void; /** - * Starts loading the specified animation set. An animation set provides movement animations for a ped. See SET_PED_MOVEMENT_CLIPSET. - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - * Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json - */ - export function requestAnimSet(animSet: string | null): void; + * Starts loading the specified animation set. An animation set provides movement animations for a ped. See SET_PED_MOVEMENT_CLIPSET. + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + * Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json + */ + export function requestAnimSet(animSet: string): void; /** - * Gets whether the specified animation set has finished loading. An animation set provides movement animations for a ped. See SET_PED_MOVEMENT_CLIPSET. - * Animation set and clip set are synonymous. - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - * Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json - */ - export function hasAnimSetLoaded(animSet: string | null): boolean; + * Gets whether the specified animation set has finished loading. An animation set provides movement animations for a ped. See SET_PED_MOVEMENT_CLIPSET. + * Animation set and clip set are synonymous. + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + * Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json + */ + export function hasAnimSetLoaded(animSet: string): boolean; /** - * Unloads the specified animation set. An animation set provides movement animations for a ped. See SET_PED_MOVEMENT_CLIPSET. - * Animation set and clip set are synonymous. - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - * Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json - */ - export function removeAnimSet(animSet: string | null): void; + * Unloads the specified animation set. An animation set provides movement animations for a ped. See SET_PED_MOVEMENT_CLIPSET. + * Animation set and clip set are synonymous. + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + * Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json + */ + export function removeAnimSet(animSet: string): void; /** - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - * Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json - */ - export function requestClipSet(clipSet: string | null): void; + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + * Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json + */ + export function requestClipSet(clipSet: string): void; /** - * Alias for HAS_ANIM_SET_LOADED. - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - * Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json - */ - export function hasClipSetLoaded(clipSet: string | null): boolean; + * Alias for HAS_ANIM_SET_LOADED. + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + * Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json + */ + export function hasClipSetLoaded(clipSet: string): boolean; /** - * Alias for REMOVE_ANIM_SET. - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - * Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json - */ - export function removeClipSet(clipSet: string | null): void; + * Alias for REMOVE_ANIM_SET. + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + * Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json + */ + export function removeClipSet(clipSet: string): void; /** - * Exemple: REQUEST_IPL("TrevorsTrailerTrash"); - * Full list of IPLs and interior entity sets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ipls.json - */ - export function requestIpl(iplName: string | null): void; + * Exemple: REQUEST_IPL("TrevorsTrailerTrash"); + * Full list of IPLs and interior entity sets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ipls.json + */ + export function requestIpl(iplName: string): void; /** - * Removes an IPL from the map. - * Full list of IPLs and interior entity sets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ipls.json - * Example: - * C#: - * Function.Call(Hash.REMOVE_IPL, "trevorstrailertidy"); - * C++: - * STREAMING::REMOVE_IPL("trevorstrailertidy"); - * @param iplName = Name of IPL you want to remove. - */ - export function removeIpl(iplName: string | null): void; + * Removes an IPL from the map. + * Full list of IPLs and interior entity sets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ipls.json + * Example: + * C#: + * Function.Call(Hash.REMOVE_IPL, "trevorstrailertidy"); + * C++: + * STREAMING::REMOVE_IPL("trevorstrailertidy"); + * iplName = Name of IPL you want to remove. + */ + export function removeIpl(iplName: string): void; /** - * Full list of IPLs and interior entity sets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ipls.json - */ - export function isIplActive(iplName: string | null): boolean; + * Full list of IPLs and interior entity sets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ipls.json + */ + export function isIplActive(iplName: string): boolean; export function setStreaming(toggle: boolean): void; /** - * 0 - default - * 1 - HeistIsland - */ + * 0 - default + * 1 - HeistIsland + */ export function loadGlobalWaterFile(waterType: number): void; export function getGlobalWaterFile(): number; @@ -18354,15 +20520,15 @@ declare module "natives" { export function setReduceVehicleModelBudget(toggle: boolean): void; /** - * This is a NOP function. It does nothing at all. - */ + * This is a NOP function. It does nothing at all. + */ export function setDitchPoliceModels(toggle: boolean): void; export function getNumberOfStreamingRequests(): number; /** - * maps script name (thread + 0xD0) by lookup via scriptfx.dat - does nothing when script name is empty - */ + * maps script name (thread + 0xD0) by lookup via scriptfx.dat - does nothing when script name is empty + */ export function requestPtfxAsset(): void; export function hasPtfxAssetLoaded(): boolean; @@ -18370,42 +20536,46 @@ declare module "natives" { export function removePtfxAsset(): void; /** - * From the b678d decompiled scripts: - * STREAMING::REQUEST_NAMED_PTFX_ASSET("core_snow"); - * STREAMING::REQUEST_NAMED_PTFX_ASSET("fm_mission_controler"); - * STREAMING::REQUEST_NAMED_PTFX_ASSET("proj_xmas_firework"); - * STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_apartment_mp"); - * STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_biolab_heist"); - * STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_indep_fireworks"); - * STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_indep_parachute"); - * STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_indep_wheelsmoke"); - * See NativeDB for reference: http://natives.altv.mp/#/0xB80D8756B4668AB6 - */ - export function requestNamedPtfxAsset(fxName: string | null): void; + * From the b678d decompiled scripts: + * STREAMING::REQUEST_NAMED_PTFX_ASSET("core_snow"); + * STREAMING::REQUEST_NAMED_PTFX_ASSET("fm_mission_controler"); + * STREAMING::REQUEST_NAMED_PTFX_ASSET("proj_xmas_firework"); + * STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_apartment_mp"); + * STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_biolab_heist"); + * STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_indep_fireworks"); + * STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_indep_parachute"); + * STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_indep_wheelsmoke"); + * STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_mp_cig_plane"); + * STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_mp_creator"); + * STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_mp_tankbattle"); + * STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_ornate_heist"); + * STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_prison_break_heist_station"); + */ + export function requestNamedPtfxAsset(fxName: string): void; - export function hasNamedPtfxAssetLoaded(fxName: string | null): boolean; + export function hasNamedPtfxAssetLoaded(fxName: string): boolean; - export function removeNamedPtfxAsset(fxName: string | null): void; + export function removeNamedPtfxAsset(fxName: string): void; export function setVehiclePopulationBudget(p0: number): void; /** - * Control how many new (ambient?) peds will spawn in the game world. - * Range for p0 seems to be 0-3, where 0 is none and 3 is the normal level. - */ + * Control how many new (ambient?) peds will spawn in the game world. + * Range for p0 seems to be 0-3, where 0 is none and 3 is the normal level. + */ export function setPedPopulationBudget(p0: number): void; export function clearFocus(): void; /** - * Override the area where the camera will render the terrain. - * p3, p4 and p5 are usually set to 0.0 - */ + * Override the area where the camera will render the terrain. + * p3, p4 and p5 are usually set to 0.0 + */ export function setFocusPosAndVel(x: number, y: number, z: number, offsetX: number, offsetY: number, offsetZ: number): void; /** - * It seems to make the entity's coords mark the point from which LOD-distances are measured. In my testing, setting a vehicle as the focus entity and moving that vehicle more than 300 distance units away from the player will make the level of detail around the player go down drastically (shadows disappear, textures go extremely low res, etc). The player seems to be the default focus entity. - */ + * It seems to make the entity's coords mark the point from which LOD-distances are measured. In my testing, setting a vehicle as the focus entity and moving that vehicle more than 300 distance units away from the player will make the level of detail around the player go down drastically (shadows disappear, textures go extremely low res, etc). The player seems to be the default focus entity. + */ export function setFocusEntity(entity: Entity | number): void; export function isEntityFocus(entity: Entity | number): boolean; @@ -18413,30 +20583,30 @@ declare module "natives" { export function setRestoreFocusEntity(p0: Entity | number): void; /** - * Possible p0 values: - * "prologue" - * "Prologue_Main" - */ - export function setMapdatacullboxEnabled(name: string | null, toggle: boolean): void; + * Possible p0 values: + * "prologue" + * "Prologue_Main" + */ + export function setMapdatacullboxEnabled(name: string, toggle: boolean): void; /** - * This native does absolutely nothing, just a nullsub - */ + * This native does absolutely nothing, just a nullsub + */ export function setAllMapdataCulled(p0: any): void; /** - * @returns Always returns zero. - */ + * Always returns zero. + */ export function streamvolCreateSphere(x: number, y: number, z: number, rad: number, p4: any, p5: any): number; /** - * @returns Always returns zero. - */ + * Always returns zero. + */ export function streamvolCreateFrustum(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number, p7: any, p8: any): number; /** - * @returns Always returns zero. - */ + * Always returns zero. + */ export function streamvolCreateLine(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: any): number; export function streamvolDelete(unused: any): void; @@ -18448,10 +20618,10 @@ declare module "natives" { export function isStreamvolActive(): boolean; /** - * `radius` value is usually between `3f` and `7000f` in original 1868 scripts. - * `p7` is 0, 1, 2, 3 or 4 used in decompiled scripts, 0 is by far the most common. - * Returns True if success, used only 7 times in decompiled scripts of 1868 - */ + * `radius` value is usually between `3f` and `7000f` in original 1868 scripts. + * `p7` is 0, 1, 2, 3 or 4 used in decompiled scripts, 0 is by far the most common. + * Returns True if success, used only 7 times in decompiled scripts of 1868 + */ export function newLoadSceneStart(posX: number, posY: number, posZ: number, offsetX: number, offsetY: number, offsetZ: number, radius: number, p7: number): boolean; export function newLoadSceneStartSphere(x: number, y: number, z: number, radius: number, p4: any): boolean; @@ -18465,30 +20635,41 @@ declare module "natives" { export function isSafeToStartPlayerSwitch(): boolean; /** - * // this enum comes directly from R* so don't edit this - * enum ePlayerSwitchTypes - * { - * SWITCH_TYPE_AUTO, - * SWITCH_TYPE_LONG, - * SWITCH_TYPE_MEDIUM, - * SWITCH_TYPE_SHORT - * }; - * Use GET_IDEAL_PLAYER_SWITCH_TYPE for the best switch type. - * See NativeDB for reference: http://natives.altv.mp/#/0xFAA23F2CBA159D67 - * @returns Note: DO NOT, use SWITCH_TYPE_LONG with flag 513. It leaves you stuck in the clouds. You'll have to call STOP_PLAYER_SWITCH() to return to your ped. - */ - export function startPlayerSwitch(from: Player | number, to: Player | number, flags: number, switchType: number): void; + * // this enum comes directly from R* so don't edit this + * enum ePlayerSwitchTypes + * { + * SWITCH_TYPE_AUTO, + * SWITCH_TYPE_LONG, + * SWITCH_TYPE_MEDIUM, + * SWITCH_TYPE_SHORT + * }; + * Use GET_IDEAL_PLAYER_SWITCH_TYPE for the best switch type. + * ---------------------------------------------------- + * Examples from the decompiled scripts: + * STREAMING::START_PLAYER_SWITCH(l_832._f3, PLAYER::PLAYER_PED_ID(), 0, 3); + * STREAMING::START_PLAYER_SWITCH(l_832._f3, PLAYER::PLAYER_PED_ID(), 2050, 3); + * STREAMING::START_PLAYER_SWITCH(PLAYER::PLAYER_PED_ID(), l_832._f3, 1024, 3); + * STREAMING::START_PLAYER_SWITCH(g_141F27, PLAYER::PLAYER_PED_ID(), 513, v_14); + * Note: DO NOT, use SWITCH_TYPE_LONG with flag 513. It leaves you stuck in the clouds. You'll have to call STOP_PLAYER_SWITCH() to return to your ped. + * Flag 8 w/ SWITCH_TYPE_LONG will zoom out 3 steps, then zoom in 2/3 steps and stop on the 3rd and just hang there. + * Flag 8 w/ SWITCH_TYPE_MEDIUM will zoom out 1 step, and just hang there. + */ + export function startPlayerSwitch(from: Ped | Player | number, to: Ped | Player | number, flags: number, switchType: number): void; export function stopPlayerSwitch(): void; /** - * Returns true if the player is currently switching, false otherwise. - * (When the camera is in the sky moving from Trevor to Franklin for example) - */ + * Returns true if the player is currently switching, false otherwise. + * (When the camera is in the sky moving from Trevor to Franklin for example) + */ export function isPlayerSwitchInProgress(): boolean; export function getPlayerSwitchType(): number; + /** + * x1, y1, z1 -- Coords of your ped model + * x2, y2, z2 -- Coords of the ped you want to switch to + */ export function getIdealPlayerSwitchType(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): number; export function getPlayerSwitchState(): number; @@ -18502,9 +20683,9 @@ declare module "natives" { export function setPlayerSwitchOutro(cameraCoordX: number, cameraCoordY: number, cameraCoordZ: number, camRotationX: number, camRotationY: number, camRotationZ: number, camFov: number, camFarClip: number, rotationOrder: number): void; /** - * All names can be found in playerswitchestablishingshots.meta - */ - export function setPlayerSwitchEstablishingShot(name: string | null): void; + * All names can be found in playerswitchestablishingshots.meta + */ + export function setPlayerSwitchEstablishingShot(name: string): void; export function allowPlayerSwitchPan(): void; @@ -18521,22 +20702,22 @@ declare module "natives" { export function disableSwitchOutroFx(): void; /** - * doesn't act normally when used on mount chilliad - * 2^n - Enabled Functionality: - * 0 - Skip camera rotate up - * 3 - Wait for SET_PLAYER_SWITCH_ESTABLISHING_SHOT / hang at last step. You will still need to run 0x74DE2E8739086740 to exit "properly" and then STOP_PLAYER_SWITCH - * 6 - Invert Switch Direction (false = out, true = in) - * 8 - Hang above ped - * 0: 1 step towards ped - * 1: 3 steps out from ped - * 2: 1 step out from ped - * 3: 1 step towards ped - * @param flags is a bitflag: - * @param switchType 0 - 3 - */ - export function switchToMultiFirstpart(ped: Player | number, flags: number, switchType: number): void; + * doesn't act normally when used on mount chilliad + * Flags is a bitflag: + * 2^n - Enabled Functionality: + * 0 - Skip camera rotate up + * 3 - Wait for SET_PLAYER_SWITCH_ESTABLISHING_SHOT / hang at last step. You will still need to run 0x74DE2E8739086740 to exit "properly" and then STOP_PLAYER_SWITCH + * 6 - Invert Switch Direction (false = out, true = in) + * 8 - Hang above ped + * switchType: 0 - 3 + * 0: 1 step towards ped + * 1: 3 steps out from ped + * 2: 1 step out from ped + * 3: 1 step towards ped + */ + export function switchToMultiFirstpart(ped: Ped | Player | number, flags: number, switchType: number): void; - export function switchToMultiSecondpart(ped: Player | number): void; + export function switchToMultiSecondpart(ped: Ped | Player | number): void; export function isSwitchToMultiFirstpartFinished(): boolean; @@ -18551,10 +20732,10 @@ declare module "natives" { export function getLodscale(): number; /** - * This allows you to override "extended distance scaling" setting. Needs to be called each frame. - * Max scaling seems to be 200.0, normal is 1.0 - * See https://gfycat.com/DetailedHauntingIncatern - */ + * This allows you to override "extended distance scaling" setting. Needs to be called each frame. + * Max scaling seems to be 200.0, normal is 1.0 + * See https://gfycat.com/DetailedHauntingIncatern + */ export function overrideLodscaleThisFrame(scaling: number): void; export function remapLodscaleRangeThisFrame(p0: number, p1: number, p2: number, p3: number): void; @@ -18565,7 +20746,7 @@ declare module "natives" { export function forceAllowTimeBasedFadingThisFrame(): void; - export function iplGroupSwapStart(iplName1: string | null, iplName2: string | null): void; + export function iplGroupSwapStart(iplName1: string, iplName2: string): void; export function iplGroupSwapCancel(): void; @@ -18576,23 +20757,23 @@ declare module "natives" { export function iplGroupSwapIsActive(): boolean; /** - * This native is used to attribute the SRL that BEGIN_SRL is going to load. This is usually used for 'in-game' cinematics (not cutscenes but camera stuff) instead of SET_FOCUS_POS_AND_VEL because it loads a specific area of the map which is pretty useful when the camera moves from distant areas. - * For instance, GTA:O opening cutscene. - * https://pastebin.com/2EeKVeLA : a list of SRL found in srllist.meta - * https://pastebin.com/zd9XYUWY here is the content of a SRL file opened with codewalker. - */ - export function prefetchSrl(srl: string | null): void; + * This native is used to attribute the SRL that BEGIN_SRL is going to load. This is usually used for 'in-game' cinematics (not cutscenes but camera stuff) instead of SET_FOCUS_POS_AND_VEL because it loads a specific area of the map which is pretty useful when the camera moves from distant areas. + * For instance, GTA:O opening cutscene. + * https://pastebin.com/2EeKVeLA : a list of SRL found in srllist.meta + * https://pastebin.com/zd9XYUWY here is the content of a SRL file opened with codewalker. + */ + export function prefetchSrl(srl: string): void; /** - * Returns true when the srl from BEGIN_SRL is loaded. - */ + * Returns true when the srl from BEGIN_SRL is loaded. + */ export function isSrlLoaded(): boolean; export function beginSrl(): void; /** - * Clear the current srl and stop rendering the area selected by PREFETCH_SRL and started with BEGIN_SRL. - */ + * Clear the current srl and stop rendering the area selected by PREFETCH_SRL and started with BEGIN_SRL. + */ export function endSrl(): void; export function setSrlTime(p0: number): void; @@ -18618,316 +20799,375 @@ declare module "natives" { export function removeModelFromCreatorBudget(modelHash: number): void; /** - * 0.0 = no memory used - * 1.0 = all memory used - * Maximum model memory (as defined in common\data\missioncreatordata.meta) is 100 MiB - */ + * 0.0 = no memory used + * 1.0 = all memory used + * Maximum model memory (as defined in common\data\missioncreatordata.meta) is 100 MiB + */ export function getUsedCreatorBudget(): number; /** - * Enables the specified island. For more information, see islandhopper.meta - */ - export function setIslandEnabled(name: string | null, toggle: boolean): void; + * Enables the specified island. For more information, see islandhopper.meta + */ + export function setIslandEnabled(name: string, toggle: boolean): void; /** - * Stand still (?) - */ - export function taskPause(ped: Player | number, ms: number): void; + * Stand still (?) + */ + export function taskPause(ped: Ped | Player | number, ms: number): void; /** - * Makes the specified ped stand still for (time) milliseconds. - */ - export function taskStandStill(ped: Player | number, time: number): void; + * Makes the specified ped stand still for (time) milliseconds. + */ + export function taskStandStill(ped: Ped | Player | number, time: number): void; /** - * Definition is wrong. This has 4 parameters (Not sure when they were added. v350 has 2, v678 has 4). - * v678: Ped ped, bool unused, bool flag1, bool flag2 - * flag1 = super jump, flag2 = do nothing if flag1 is false and doubles super jump height if flag1 is true. - * @param ped Ped ped, bool unused - */ - export function taskJump(ped: Player | number, usePlayerLaunchForce: boolean, doSuperJump: boolean, useFullSuperJumpForce: boolean): void; + * Definition is wrong. This has 4 parameters (Not sure when they were added. v350 has 2, v678 has 4). + * v350: Ped ped, bool unused + * v678: Ped ped, bool unused, bool flag1, bool flag2 + * flag1 = super jump, flag2 = do nothing if flag1 is false and doubles super jump height if flag1 is true. + */ + export function taskJump(ped: Ped | Player | number, usePlayerLaunchForce: boolean, doSuperJump: boolean, useFullSuperJumpForce: boolean): void; - export function taskCower(ped: Player | number, duration: number): void; + export function taskCower(ped: Ped | Player | number, duration: number): void; /** - * In the scripts, p3 was always -1. - * Also facingPed can be 0 or -1 so ped will just raise hands up. - * @param timeToFacePed seems to be duration or timeout of turn animation. - */ - export function taskHandsUp(ped: Player | number, duration: number, facingPed: Player | number, timeToFacePed: number, flags: number): void; + * In the scripts, p3 was always -1. + * p3 seems to be duration or timeout of turn animation. + * Also facingPed can be 0 or -1 so ped will just raise hands up. + */ + export function taskHandsUp(ped: Ped | Player | number, duration: number, facingPed: Ped | Player | number, timeToFacePed: number, flags: number): void; - export function updateTaskHandsUpDuration(ped: Player | number, duration: number): void; + export function updateTaskHandsUpDuration(ped: Ped | Player | number, duration: number): void; /** - * The given ped will try to open the nearest door to 'seat'. - * Example: telling the ped to open the door for the driver seat does not necessarily mean it will open the driver door, it may choose to open the passenger door instead if that one is closer. - */ - export function taskOpenVehicleDoor(ped: Player | number, vehicle: Vehicle | number, timeOut: number, seat: number, speed: number): void; + * The given ped will try to open the nearest door to 'seat'. + * Example: telling the ped to open the door for the driver seat does not necessarily mean it will open the driver door, it may choose to open the passenger door instead if that one is closer. + */ + export function taskOpenVehicleDoor(ped: Ped | Player | number, vehicle: Vehicle | number, timeOut: number, seat: number, speed: number): void; /** - * Usage of seat - * -1 = driver - * 0 = passenger - * 1 = left back seat - * 2 = right back seat - * 3 = outside left - * 4 = outside right - * @param vehicle normal, 3 - * @param speed 1.0 = walk, 2.0 = run - * @param flag 1 = normal, 3 = teleport to vehicle, 16 = teleport directly into vehicle - * @param overrideEntryClipsetName is always 0 - */ - export function taskEnterVehicle(ped: Player | number, vehicle: Vehicle | number, timeout: number, seat: number, speed: number, flag: number, overrideEntryClipsetName: string | null): void; + * speed 1.0 = walk, 2.0 = run + * p5 1 = normal, 3 = teleport to vehicle, 16 = teleport directly into vehicle + * p6 is always 0 + * Usage of seat + * -1 = driver + * 0 = passenger + * 1 = left back seat + * 2 = right back seat + * 3 = outside left + * 4 = outside right + */ + export function taskEnterVehicle(ped: Ped | Player | number, vehicle: Vehicle | number, timeout: number, seat: number, speed: number, flag: number, overrideEntryClipsetName: string, p7: any): void; /** - * 0 = normal exit and closes door. - * 1 = normal exit and closes door. - * 16 = teleports outside, door kept closed. - * 64 = normal exit and closes door, maybe a bit slower animation than 0. - * 256 = normal exit but does not close the door. - * 4160 = ped is throwing himself out, even when the vehicle is still. - * 262144 = ped moves to passenger seat first, then exits normally - * Others to be tried out: 320, 512, 131072. - * @param flags from decompiled scripts: - */ - export function taskLeaveVehicle(ped: Player | number, vehicle: Vehicle | number, flags: number): void; + * Flags from decompiled scripts: + * 0 = normal exit and closes door. + * 1 = normal exit and closes door. + * 16 = teleports outside, door kept closed. + * 64 = normal exit and closes door, maybe a bit slower animation than 0. + * 256 = normal exit but does not close the door. + * 4160 = ped is throwing himself out, even when the vehicle is still. + * 262144 = ped moves to passenger seat first, then exits normally + * Others to be tried out: 320, 512, 131072. + */ + export function taskLeaveVehicle(ped: Ped | Player | number, vehicle: Vehicle | number, flags: number): void; - export function taskGetOffBoat(ped: Player | number, boat: Vehicle | number): void; + export function taskGetOffBoat(ped: Ped | Player | number, boat: Vehicle | number): void; - export function taskSkyDive(ped: Player | number, instant: boolean): void; + export function taskSkyDive(ped: Ped | Player | number, instant: boolean): void; /** - * Second parameter is unused. - * second parameter was for jetpack in the early stages of gta and the hard coded code is now removed - */ - export function taskParachute(ped: Player | number, giveParachuteItem: boolean, instant: boolean): void; + * Second parameter is unused. + * second parameter was for jetpack in the early stages of gta and the hard coded code is now removed + */ + export function taskParachute(ped: Ped | Player | number, giveParachuteItem: boolean, instant: boolean): void; /** - * makes ped parachute to coords x y z. Works well with PATHFIND::GET_SAFE_COORD_FOR_PED - */ - export function taskParachuteToTarget(ped: Player | number, x: number, y: number, z: number): void; + * makes ped parachute to coords x y z. Works well with PATHFIND::GET_SAFE_COORD_FOR_PED + */ + export function taskParachuteToTarget(ped: Ped | Player | number, x: number, y: number, z: number): void; - export function setParachuteTaskTarget(ped: Player | number, x: number, y: number, z: number): void; + export function setParachuteTaskTarget(ped: Ped | Player | number, x: number, y: number, z: number): void; - export function setParachuteTaskThrust(ped: Player | number, thrust: number): void; + export function setParachuteTaskThrust(ped: Ped | Player | number, thrust: number): void; /** - * Only appears twice in the scripts. - * TASK::TASK_RAPPEL_FROM_HELI(PLAYER::PLAYER_PED_ID(), 10.0f); - * TASK::TASK_RAPPEL_FROM_HELI(a_0, 10.0f); - * @param minHeightAboveGround the minimum height above ground the heli must be at before the ped can start rappelling - */ - export function taskRappelFromHeli(ped: Player | number, minHeightAboveGround: number): void; + * minHeightAboveGround: the minimum height above ground the heli must be at before the ped can start rappelling + * Only appears twice in the scripts. + * TASK::TASK_RAPPEL_FROM_HELI(PLAYER::PLAYER_PED_ID(), 10.0f); + * TASK::TASK_RAPPEL_FROM_HELI(a_0, 10.0f); + */ + export function taskRappelFromHeli(ped: Ped | Player | number, minHeightAboveGround: number): void; /** - * info about driving modes: https://gtaforums.com/topic/822314-guide-driving-styles/ - */ - export function taskVehicleDriveToCoord(ped: Player | number, vehicle: Vehicle | number, x: number, y: number, z: number, speed: number, p6: any, vehicleModel: number, drivingMode: number, stopRange: number, straightLineDistance: number): void; + * info about driving modes: https://gtaforums.com/topic/822314-guide-driving-styles/ + */ + export function taskVehicleDriveToCoord(ped: Ped | Player | number, vehicle: Vehicle | number, x: number, y: number, z: number, speed: number, p6: any, vehicleModel: number, drivingMode: number, stopRange: number, straightLineDistance: number): void; - export function taskVehicleDriveToCoordLongrange(ped: Player | number, vehicle: Vehicle | number, x: number, y: number, z: number, speed: number, driveMode: number, stopRange: number): void; + export function taskVehicleDriveToCoordLongrange(ped: Ped | Player | number, vehicle: Vehicle | number, x: number, y: number, z: number, speed: number, driveMode: number, stopRange: number): void; - export function taskVehicleDriveWander(ped: Player | number, vehicle: Vehicle | number, speed: number, drivingStyle: number): void; + export function taskVehicleDriveWander(ped: Ped | Player | number, vehicle: Vehicle | number, speed: number, drivingStyle: number): void; /** - * @param timeout always -1 - * @param stoppingRange always 10.0 - * @param persistFollowing always 1 - */ - export function taskFollowToOffsetOfEntity(ped: Player | number, entity: Entity | number, offsetX: number, offsetY: number, offsetZ: number, movementSpeed: number, timeout: number, stoppingRange: number, persistFollowing: boolean): void; + * p6 always -1 + * p7 always 10.0 + * p8 always 1 + */ + export function taskFollowToOffsetOfEntity(ped: Ped | Player | number, entity: Entity | number, offsetX: number, offsetY: number, offsetZ: number, movementSpeed: number, timeout: number, stoppingRange: number, persistFollowing: boolean): void; - export function taskGoStraightToCoord(ped: Player | number, x: number, y: number, z: number, speed: number, timeout: number, targetHeading: number, distanceToSlide: number): void; + export function taskGoStraightToCoord(ped: Ped | Player | number, x: number, y: number, z: number, speed: number, timeout: number, targetHeading: number, distanceToSlide: number): void; - export function taskGoStraightToCoordRelativeToEntity(ped: Player | number, entity: Entity | number, x: number, y: number, z: number, moveBlendRatio: number, time: number): void; + export function taskGoStraightToCoordRelativeToEntity(ped: Ped | Player | number, entity: Entity | number, x: number, y: number, z: number, moveBlendRatio: number, time: number): void; /** - * Makes the specified ped achieve the specified heading. - * pedHandle: The handle of the ped to assign the task to. - * @param heading The desired heading. - * @param timeout The time, in milliseconds, to allow the task to complete. If the task times out, it is cancelled, and the ped will stay at the heading it managed to reach in the time. - */ - export function taskAchieveHeading(ped: Player | number, heading: number, timeout: number): void; + * Makes the specified ped achieve the specified heading. + * pedHandle: The handle of the ped to assign the task to. + * heading: The desired heading. + * timeout: The time, in milliseconds, to allow the task to complete. If the task times out, it is cancelled, and the ped will stay at the heading it managed to reach in the time. + */ + export function taskAchieveHeading(ped: Ped | Player | number, heading: number, timeout: number): void; /** - * MulleKD19: Clears the current point route. Call this before TASK_EXTEND_ROUTE and TASK_FOLLOW_POINT_ROUTE. - */ + * MulleKD19: Clears the current point route. Call this before TASK_EXTEND_ROUTE and TASK_FOLLOW_POINT_ROUTE. + */ export function taskFlushRoute(): void; /** - * MulleKD19: Adds a new point to the current point route. Call TASK_FLUSH_ROUTE before the first call to this. Call TASK_FOLLOW_POINT_ROUTE to make the Ped go the route. - * A maximum of 8 points can be added. - */ + * MulleKD19: Adds a new point to the current point route. Call TASK_FLUSH_ROUTE before the first call to this. Call TASK_FOLLOW_POINT_ROUTE to make the Ped go the route. + * A maximum of 8 points can be added. + */ export function taskExtendRoute(x: number, y: number, z: number): void; /** - * MulleKD19: Makes the ped go on the created point route. - * int: Unknown. Can be 0, 1, 2 or 3. - * Example: - * TASK_FLUSH_ROUTE(); - * TASK_EXTEND_ROUTE(0f, 0f, 70f); - * TASK_EXTEND_ROUTE(10f, 0f, 70f); - * TASK_EXTEND_ROUTE(10f, 10f, 70f); - * TASK_FOLLOW_POINT_ROUTE(GET_PLAYER_PED(), 1f, 0); - * @param ped The ped to give the task to. - * @param speed The speed to move at in m/s. - */ - export function taskFollowPointRoute(ped: Player | number, speed: number, mode: number): void; - - /** - * The entity will move towards the target until time is over (duration) or get in target's range (distance). p5 and p6 are unknown, but you could leave p5 = 1073741824 or 100 or even 0 (didn't see any difference but on the decompiled scripts, they use 1073741824 mostly) and p6 = 0 - * Note: I've only tested it on entity -> ped and target -> vehicle. It could work differently on other entities, didn't try it yet. - * Example: TASK::TASK_GO_TO_ENTITY(pedHandle, vehicleHandle, 5000, 4.0, 100, 1073741824, 0) - * Ped will run towards the vehicle for 5 seconds and stop when time is over or when he gets 4 meters(?) around the vehicle (with duration = -1, the task duration will be ignored). - * enum EGOTO_ENTITY_SCRIPT_FLAGS - * { - * EGOTO_ENTITY_NEVER_SLOW_FOR_PATH_LENGTH = 0x01, - * }; - */ + * MulleKD19: Makes the ped go on the created point route. + * ped: The ped to give the task to. + * speed: The speed to move at in m/s. + * int: Unknown. Can be 0, 1, 2 or 3. + * Example: + * TASK_FLUSH_ROUTE(); + * TASK_EXTEND_ROUTE(0f, 0f, 70f); + * TASK_EXTEND_ROUTE(10f, 0f, 70f); + * TASK_EXTEND_ROUTE(10f, 10f, 70f); + * TASK_FOLLOW_POINT_ROUTE(GET_PLAYER_PED(), 1f, 0); + */ + export function taskFollowPointRoute(ped: Ped | Player | number, speed: number, mode: number): void; + + /** + * The entity will move towards the target until time is over (duration) or get in target's range (distance). p5 and p6 are unknown, but you could leave p5 = 1073741824 or 100 or even 0 (didn't see any difference but on the decompiled scripts, they use 1073741824 mostly) and p6 = 0 + * Note: I've only tested it on entity -> ped and target -> vehicle. It could work differently on other entities, didn't try it yet. + * Example: TASK::TASK_GO_TO_ENTITY(pedHandle, vehicleHandle, 5000, 4.0, 100, 1073741824, 0) + * Ped will run towards the vehicle for 5 seconds and stop when time is over or when he gets 4 meters(?) around the vehicle (with duration = -1, the task duration will be ignored). + * enum EGOTO_ENTITY_SCRIPT_FLAGS + * { + * EGOTO_ENTITY_NEVER_SLOW_FOR_PATH_LENGTH = 0x01, + * }; + */ export function taskGoToEntity(entity: Entity | number, target: Entity | number, duration: number, distance: number, moveBlendRatio: number, slowDownDistance: number, flags: number): void; /** - * Makes the specified ped flee the specified distance from the specified position. - */ - export function taskSmartFleeCoord(ped: Player | number, x: number, y: number, z: number, distance: number, time: number, preferPavements: boolean, quitIfOutOfRange: boolean): void; + * Makes the specified ped flee the specified distance from the specified position. + */ + export function taskSmartFleeCoord(ped: Ped | Player | number, x: number, y: number, z: number, distance: number, time: number, preferPavements: boolean, quitIfOutOfRange: boolean): void; /** - * Makes a ped run away from another ped (fleeTarget). - * distance = ped will flee this distance. - * @param fleeTime = ped will flee for this amount of time, set to "-1" to flee forever - */ - export function taskSmartFleePed(ped: Player | number, fleeTarget: Player | number, safeDistance: number, fleeTime: number, preferPavements: boolean, updateToNearestHatedPed: boolean): void; + * Makes a ped run away from another ped (fleeTarget). + * distance = ped will flee this distance. + * fleeTime = ped will flee for this amount of time, set to "-1" to flee forever + */ + export function taskSmartFleePed(ped: Ped | Player | number, fleeTarget: Ped | Player | number, safeDistance: number, fleeTime: number, preferPavements: boolean, updateToNearestHatedPed: boolean): void; - export function taskReactAndFleePed(ped: Player | number, fleeTarget: Player | number): void; + export function taskReactAndFleePed(ped: Ped | Player | number, fleeTarget: Ped | Player | number): void; - export function taskShockingEventReact(ped: Player | number, eventHandle: number): void; + export function taskShockingEventReact(ped: Ped | Player | number, eventHandle: number): void; - export function taskWanderInArea(ped: Player | number, x: number, y: number, z: number, radius: number, minimalLength: number, timeBetweenWalks: number): void; + export function taskWanderInArea(ped: Ped | Player | number, x: number, y: number, z: number, radius: number, minimalLength: number, timeBetweenWalks: number): void; /** - * Makes ped walk around the area. - * set p1 to 10.0f and p2 to 10 if you want the ped to walk anywhere without a duration. - */ - export function taskWanderStandard(ped: Player | number, heading: number, flags: number): void; + * Makes ped walk around the area. + * set p1 to 10.0f and p2 to 10 if you want the ped to walk anywhere without a duration. + */ + export function taskWanderStandard(ped: Ped | Player | number, heading: number, flags: number): void; - export function taskWanderSpecific(ped: Player | number, conditionalAnimGroupStr: string | null, conditionalAnimStr: string | null, heading: number): void; + export function taskWanderSpecific(ped: Ped | Player | number, conditionalAnimGroupStr: string, conditionalAnimStr: string, heading: number): void; /** - * Modes: - * 0 - ignore heading - * 1 - park forward - * 2 - park backwards - * Depending on the angle of approach, the vehicle can park at the specified heading or at its exact opposite (-180) angle. - * @param radius seems to define how close the vehicle has to be -after parking- to the position for this task considered completed. If the value is too small, the vehicle will try to park again until it's exactly where it should be. 20.0 Works well but lower values don't, like the radius is measured in centimeters or something. - */ - export function taskVehiclePark(ped: Player | number, vehicle: Vehicle | number, x: number, y: number, z: number, heading: number, mode: number, radius: number, keepEngineOn: boolean): void; + * Modes: + * 0 - ignore heading + * 1 - park forward + * 2 - park backwards + * Depending on the angle of approach, the vehicle can park at the specified heading or at its exact opposite (-180) angle. + * Radius seems to define how close the vehicle has to be -after parking- to the position for this task considered completed. If the value is too small, the vehicle will try to park again until it's exactly where it should be. 20.0 Works well but lower values don't, like the radius is measured in centimeters or something. + */ + export function taskVehiclePark(ped: Ped | Player | number, vehicle: Vehicle | number, x: number, y: number, z: number, heading: number, mode: number, radius: number, keepEngineOn: boolean): void; /** - * known "killTypes" are: "AR_stealth_kill_knife" and "AR_stealth_kill_a". - */ - export function taskStealthKill(killer: Player | number, target: Player | number, stealthKillActionResultHash: number, desiredMoveBlendRatio: number, stealthFlags: number): void; + * known "killTypes" are: "AR_stealth_kill_knife" and "AR_stealth_kill_a". + */ + export function taskStealthKill(killer: Ped | Player | number, target: Ped | Player | number, stealthKillActionResultHash: number, desiredMoveBlendRatio: number, stealthFlags: number): void; - export function taskPlantBomb(ped: Player | number, x: number, y: number, z: number, heading: number): void; + export function taskPlantBomb(ped: Ped | Player | number, x: number, y: number, z: number, heading: number): void; /** - * If no timeout, set timeout to -1. - */ - export function taskFollowNavMeshToCoord(ped: Player | number, x: number, y: number, z: number, moveBlendRatio: number, time: number, targetRadius: number, flags: number, targetHeading: number): void; + * If no timeout, set timeout to -1. + */ + export function taskFollowNavMeshToCoord(ped: Ped | Player | number, x: number, y: number, z: number, moveBlendRatio: number, time: number, targetRadius: number, flags: number, targetHeading: number): void; - export function taskFollowNavMeshToCoordAdvanced(ped: Player | number, x: number, y: number, z: number, moveBlendRatio: number, time: number, targetRadius: number, flags: number, slideToCoordHeading: number, maxSlopeNavigable: number, clampMaxSearchDistance: number, targetHeading: number): void; + export function taskFollowNavMeshToCoordAdvanced(ped: Ped | Player | number, x: number, y: number, z: number, moveBlendRatio: number, time: number, targetRadius: number, flags: number, slideToCoordHeading: number, maxSlopeNavigable: number, clampMaxSearchDistance: number, targetHeading: number): void; - export function setPedPathCanUseClimbovers(ped: Player | number, Toggle: boolean): void; + export function setPedPathCanUseClimbovers(ped: Ped | Player | number, Toggle: boolean): void; - export function setPedPathCanUseLadders(ped: Player | number, Toggle: boolean): void; + export function setPedPathCanUseLadders(ped: Ped | Player | number, Toggle: boolean): void; - export function setPedPathCanDropFromHeight(ped: Player | number, Toggle: boolean): void; + export function setPedPathCanDropFromHeight(ped: Ped | Player | number, Toggle: boolean): void; /** - * Default modifier is 1.0, minimum is 0.0 and maximum is 10.0. - */ - export function setPedPathClimbCostModifier(ped: Player | number, modifier: number): void; + * Default modifier is 1.0, minimum is 0.0 and maximum is 10.0. + */ + export function setPedPathClimbCostModifier(ped: Ped | Player | number, modifier: number): void; - export function setPedPathMayEnterWater(ped: Player | number, mayEnterWater: boolean): void; + export function setPedPathMayEnterWater(ped: Ped | Player | number, mayEnterWater: boolean): void; - export function setPedPathPreferToAvoidWater(ped: Player | number, avoidWater: boolean): void; + export function setPedPathPreferToAvoidWater(ped: Ped | Player | number, avoidWater: boolean): void; - export function setPedPathAvoidFire(ped: Player | number, avoidFire: boolean): void; + export function setPedPathAvoidFire(ped: Ped | Player | number, avoidFire: boolean): void; /** - * Needs to be looped! And yes, it does work and is not a hash collision. - * Birds will try to reach the given height. - */ + * Needs to be looped! And yes, it does work and is not a hash collision. + * Birds will try to reach the given height. + */ export function setGlobalMinBirdFlightHeight(height: number): void; /** - * Return value of native is the same as GET_NAVMESH_ROUTE_RESULT - * Looks like the native returns an int for the path's state: - * 1 - ??? - * 2 - ??? - * 3 - Finished Generating - * @returns Looks like the last parameter returns true if the path has been calculated, while the first returns the remaining distance to the end of the path. - */ - export function getNavmeshRouteDistanceRemaining(ped: Player | number, distanceRemaining?: number, isPathReady?: boolean): [number, number, boolean]; - - /** - * See GET_NAVMESH_ROUTE_DISTANCE_REMAINING for more details. - */ - export function getNavmeshRouteResult(ped: Player | number): number; - - export function isControlledVehicleUnableToGetToRoad(ped: Player | number): boolean; - - /** - * example from fm_mission_controller - * TASK::TASK_GO_TO_COORD_ANY_MEANS(l_649, sub_f7e86(-1, 0), 1.0, 0, 0, 786603, 0xbf800000); - */ - export function taskGoToCoordAnyMeans(ped: Player | number, x: number, y: number, z: number, moveBlendRatio: number, vehicle: Vehicle | number, useLongRangeVehiclePathing: boolean, drivingFlags: number, maxRangeToShootTargets: number): void; - - export function taskGoToCoordAnyMeansExtraParams(ped: Player | number, x: number, y: number, z: number, moveBlendRatio: number, vehicle: Vehicle | number, useLongRangeVehiclePathing: boolean, drivingFlags: number, maxRangeToShootTargets: number, extraVehToTargetDistToPreferVehicle: number, driveStraightLineDistance: number, extraFlags: number, warpTimerMS: number): void; - - export function taskGoToCoordAnyMeansExtraParamsWithCruiseSpeed(ped: Player | number, x: number, y: number, z: number, moveBlendRatio: number, vehicle: Vehicle | number, useLongRangeVehiclePathing: boolean, drivingFlags: number, maxRangeToShootTargets: number, extraVehToTargetDistToPreferVehicle: number, driveStraightLineDistance: number, extraFlags: number, cruiseSpeed: number, targetArriveDist: number): void; - - /** - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - * float speed > normal speed is 8.0f - * ---------------------- - * float speedMultiplier > multiply the playback speed - * ---------------------- - * int duration: time in millisecond - * ---------------------- - * -1 _ _ _ _ _ _ _> Default (see flag) - * 0 _ _ _ _ _ _ _ > Not play at all - * See NativeDB for reference: http://natives.altv.mp/#/0xEA47FE3719165B94 - */ - export function taskPlayAnim(ped: Player | number, animDictionary: string | null, animationName: string | null, blendInSpeed: number, blendOutSpeed: number, duration: number, flag: number, playbackRate: number, lockX: boolean, lockY: boolean, lockZ: boolean): void; - - /** - * It's similar to TASK_PLAY_ANIM, except the first 6 floats let you specify the initial position and rotation of the task. (Ped gets teleported to the position). - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - */ - export function taskPlayAnimAdvanced(ped: Player | number, animDict: string | null, animName: string | null, posX: number, posY: number, posZ: number, rotX: number, rotY: number, rotZ: number, animEnterSpeed: number, animExitSpeed: number, duration: number, flag: any, animTime: number, rotOrder: number, ikFlags: number): void; - - /** - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - */ - export function stopAnimTask(entity: Entity | number, animDictionary: string | null, animationName: string | null, blendDelta: number): void; - - /** - * From fm_mission_controller.c: - * reserve_network_mission_objects(get_num_reserved_mission_objects(0) + 1); - * vVar28 = {0.094f, 0.02f, -0.005f}; - * vVar29 = {-92.24f, 63.64f, 150.24f}; - * func_253(&uVar30, joaat("prop_ld_case_01"), Global_1592429.imm_34757[iParam1 <268>], 1, 1, 0, 1); - * set_entity_lod_dist(net_to_ent(uVar30), 500); - * attach_entity_to_entity(net_to_ent(uVar30), iParam0, get_ped_bone_index(iParam0, 28422), vVar28, vVar29, 1, 0, 0, 0, 2, 1); - * Var31.imm_4 = 1065353216; - * Var31.imm_5 = 1065353216; - * See NativeDB for reference: http://natives.altv.mp/#/0x126EF75F1E17ABE5 - */ - export function taskScriptedAnimation(ped: Player | number, priorityLowData: number | null, priorityMidData: number | null, priorityHighData: number | null, blendInDelta: number, blendOutDelta: number): [void, number, number, number]; - - export function playEntityScriptedAnim(entity: Entity | number, priorityLowData: number | null, priorityMidData: number | null, priorityHighData: number | null, blendInDelta: number, blendOutDelta: number): [void, number, number, number]; - - /** - * Looks like p1 may be a flag, still need to do some research, though. - */ + * Looks like the last parameter returns true if the path has been calculated, while the first returns the remaining distance to the end of the path. + * Return value of native is the same as GET_NAVMESH_ROUTE_RESULT + * Looks like the native returns an int for the path's state: + * 1 - ??? + * 2 - ??? + * 3 - Finished Generating + */ + export function getNavmeshRouteDistanceRemaining(ped: Ped | Player | number, distanceRemaining?: number, isPathReady?: boolean): [number, number, boolean]; + + /** + * See GET_NAVMESH_ROUTE_DISTANCE_REMAINING for more details. + */ + export function getNavmeshRouteResult(ped: Ped | Player | number): number; + + export function isControlledVehicleUnableToGetToRoad(ped: Ped | Player | number): boolean; + + /** + * example from fm_mission_controller + * TASK::TASK_GO_TO_COORD_ANY_MEANS(l_649, sub_f7e86(-1, 0), 1.0, 0, 0, 786603, 0xbf800000); + */ + export function taskGoToCoordAnyMeans(ped: Ped | Player | number, x: number, y: number, z: number, moveBlendRatio: number, vehicle: Vehicle | number, useLongRangeVehiclePathing: boolean, drivingFlags: number, maxRangeToShootTargets: number): void; + + export function taskGoToCoordAnyMeansExtraParams(ped: Ped | Player | number, x: number, y: number, z: number, moveBlendRatio: number, vehicle: Vehicle | number, useLongRangeVehiclePathing: boolean, drivingFlags: number, maxRangeToShootTargets: number, extraVehToTargetDistToPreferVehicle: number, driveStraightLineDistance: number, extraFlags: number, warpTimerMS: number): void; + + export function taskGoToCoordAnyMeansExtraParamsWithCruiseSpeed(ped: Ped | Player | number, x: number, y: number, z: number, moveBlendRatio: number, vehicle: Vehicle | number, useLongRangeVehiclePathing: boolean, drivingFlags: number, maxRangeToShootTargets: number, extraVehToTargetDistToPreferVehicle: number, driveStraightLineDistance: number, extraFlags: number, cruiseSpeed: number, targetArriveDist: number): void; + + /** + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + * float speed > normal speed is 8.0f + * ---------------------- + * float speedMultiplier > multiply the playback speed + * ---------------------- + * int duration: time in millisecond + * ---------------------- + * -1 _ _ _ _ _ _ _> Default (see flag) + * 0 _ _ _ _ _ _ _ > Not play at all + * Small value _ _ > Slow down animation speed + * Other _ _ _ _ _ > freeze player control until specific time (ms) has + * _ _ _ _ _ _ _ _ _ passed. (No effect if flag is set to be + * _ _ _ _ _ _ _ _ _ controllable.) + * int flag: + * ---------------------- + * enum eAnimationFlags + * { + * ANIM_FLAG_NORMAL = 0, + * ANIM_FLAG_REPEAT = 1, + * ANIM_FLAG_STOP_LAST_FRAME = 2, + * ANIM_FLAG_UPPERBODY = 16, + * ANIM_FLAG_ENABLE_PLAYER_CONTROL = 32, + * ANIM_FLAG_CANCELABLE = 120, + * }; + * Odd number : loop infinitely + * Even number : Freeze at last frame + * Multiple of 4: Freeze at last frame but controllable + * 01 to 15 > Full body + * 10 to 31 > Upper body + * 32 to 47 > Full body > Controllable + * 48 to 63 > Upper body > Controllable + * ... + * 001 to 255 > Normal + * 256 to 511 > Garbled + * ... + * playbackRate: + * values are between 0.0 and 1.0 + * lockX: + * 0 in most cases 1 for rcmepsilonism8 and rcmpaparazzo_3 + * > 1 for mini@sprunk + * lockY: + * 0 in most cases + * 1 for missfam5_yoga, missfra1mcs_2_crew_react + * lockZ: + * 0 for single player + * Can be 1 but only for MP + */ + export function taskPlayAnim(ped: Ped | Player | number, animDictionary: string, animationName: string, blendInSpeed: number, blendOutSpeed: number, duration: number, flag: number, playbackRate: number, lockX: boolean, lockY: boolean, lockZ: boolean): void; + + /** + * It's similar to TASK_PLAY_ANIM, except the first 6 floats let you specify the initial position and rotation of the task. (Ped gets teleported to the position). + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function taskPlayAnimAdvanced(ped: Ped | Player | number, animDict: string, animName: string, posX: number, posY: number, posZ: number, rotX: number, rotY: number, rotZ: number, animEnterSpeed: number, animExitSpeed: number, duration: number, flag: any, animTime: number, rotOrder: number, ikFlags: number): void; + + /** + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function stopAnimTask(entity: Entity | number, animDictionary: string, animationName: string, blendDelta: number): void; + + /** + * From fm_mission_controller.c: + * reserve_network_mission_objects(get_num_reserved_mission_objects(0) + 1); + * vVar28 = {0.094f, 0.02f, -0.005f}; + * vVar29 = {-92.24f, 63.64f, 150.24f}; + * func_253(&uVar30, joaat("prop_ld_case_01"), Global_1592429.imm_34757[iParam1 <268>], 1, 1, 0, 1); + * set_entity_lod_dist(net_to_ent(uVar30), 500); + * attach_entity_to_entity(net_to_ent(uVar30), iParam0, get_ped_bone_index(iParam0, 28422), vVar28, vVar29, 1, 0, 0, 0, 2, 1); + * Var31.imm_4 = 1065353216; + * Var31.imm_5 = 1065353216; + * Var31.imm_9 = 1065353216; + * Var31.imm_10 = 1065353216; + * Var31.imm_14 = 1065353216; + * Var31.imm_15 = 1065353216; + * Var31.imm_17 = 1040187392; + * Var31.imm_18 = 1040187392; + * Var31.imm_19 = -1; + * Var32.imm_4 = 1065353216; + * Var32.imm_5 = 1065353216; + * Var32.imm_9 = 1065353216; + * Var32.imm_10 = 1065353216; + * Var32.imm_14 = 1065353216; + * Var32.imm_15 = 1065353216; + * Var32.imm_17 = 1040187392; + * Var32.imm_18 = 1040187392; + * Var32.imm_19 = -1; + * Var31 = 1; + * Var31.imm_1 = "weapons@misc@jerrycan@mp_male"; + * Var31.imm_2 = "idle"; + * Var31.imm_20 = 1048633; + * Var31.imm_4 = 0.5f; + * Var31.imm_16 = get_hash_key("BONEMASK_ARMONLY_R"); + * task_scripted_animation(iParam0, &Var31, &Var32, &Var32, 0f, 0.25f); + * set_model_as_no_longer_needed(joaat("prop_ld_case_01")); + * remove_anim_dict("anim@heists@biolab@"); + */ + export function taskScriptedAnimation(ped: Ped | Player | number, priorityLowData: number, priorityMidData: number, priorityHighData: number, blendInDelta: number, blendOutDelta: number): [void, number, number, number]; + + export function playEntityScriptedAnim(entity: Entity | number, priorityLowData: number, priorityMidData: number, priorityHighData: number, blendInDelta: number, blendOutDelta: number): [void, number, number, number]; + + /** + * Looks like p1 may be a flag, still need to do some research, though. + */ export function stopAnimPlayback(entity: Entity | number, priority: number, secondary: boolean): void; export function setAnimWeight(entity: Entity | number, weight: number, priority: number, index: number, secondary: boolean): void; @@ -18939,445 +21179,527 @@ declare module "natives" { export function setAnimLooped(entity: Entity | number, looped: boolean, priority: number, secondary: boolean): void; /** - * Example from the scripts: - * TASK::TASK_PLAY_PHONE_GESTURE_ANIMATION(PLAYER::PLAYER_PED_ID(), v_3, v_2, v_4, 0.25, 0.25, 0, 0); - * ========================================================= - * ^^ No offense, but Idk how that would really help anyone. - * As for the animDict & animation, they're both store in a global in all 5 scripts. So if anyone would be so kind as to read that global and comment what strings they use. Thanks. - * Known boneMaskTypes' - * "BONEMASK_HEADONLY" - * "BONEMASK_HEAD_NECK_AND_ARMS" - * "BONEMASK_HEAD_NECK_AND_L_ARM" - * See NativeDB for reference: http://natives.altv.mp/#/0x8FBB6758B3B3E9EC - * @param blendInDuration known args - 0.0f, 0.5f, 0.25f - * @param blendOutDuration known args - 0.0f, 0.25f - * @param isLooping known args - 1 if a global if check is passed. - * @param holdLastFrame known args - 1 if a global if check is passed. - */ - export function taskPlayPhoneGestureAnimation(ped: Player | number, animDict: string | null, animation: string | null, boneMaskType: string | null, blendInDuration: number, blendOutDuration: number, isLooping: boolean, holdLastFrame: boolean): void; - - export function taskStopPhoneGestureAnimation(ped: Player | number, blendOutOverride: number): void; - - export function isPlayingPhoneGestureAnim(ped: Player | number): boolean; - - export function getPhoneGestureAnimCurrentTime(ped: Player | number): number; - - export function getPhoneGestureAnimTotalTime(ped: Player | number): number; - - /** - * Most probably plays a specific animation on vehicle. For example getting chop out of van etc... - * Here's how its used - - * TASK::TASK_VEHICLE_PLAY_ANIM(l_325, "rcmnigel1b", "idle_speedo"); - * TASK::TASK_VEHICLE_PLAY_ANIM(l_556[01], "missfra0_chop_drhome", "InCar_GetOutofBack_Speedo"); - * FYI : Speedo is the name of van in which chop was put in the mission. - */ - export function taskVehiclePlayAnim(vehicle: Vehicle | number, animationSet: string | null, animationName: string | null): void; - - /** - * enum eScriptLookatFlags - * { - * SLF_SLOW_TURN_RATE = 1, // turn the head toward the target slowly - * SLF_FAST_TURN_RATE = 2, // turn the head toward the target quickly - * SLF_EXTEND_YAW_LIMIT = 4, // wide yaw head limits - * SLF_EXTEND_PITCH_LIMIT = 8, // wide pitch head limit - * SLF_WIDEST_YAW_LIMIT = 16, // widest yaw head limit - * SLF_WIDEST_PITCH_LIMIT = 32, // widest pitch head limit - * SLF_NARROW_YAW_LIMIT = 64, // narrow yaw head limits - * See NativeDB for reference: http://natives.altv.mp/#/0x6FA46612594F7973 - */ + * Example from the scripts: + * TASK::TASK_PLAY_PHONE_GESTURE_ANIMATION(PLAYER::PLAYER_PED_ID(), v_3, v_2, v_4, 0.25, 0.25, 0, 0); + * ========================================================= + * ^^ No offense, but Idk how that would really help anyone. + * As for the animDict & animation, they're both store in a global in all 5 scripts. So if anyone would be so kind as to read that global and comment what strings they use. Thanks. + * Known boneMaskTypes' + * "BONEMASK_HEADONLY" + * "BONEMASK_HEAD_NECK_AND_ARMS" + * "BONEMASK_HEAD_NECK_AND_L_ARM" + * "BONEMASK_HEAD_NECK_AND_R_ARM" + * p4 known args - 0.0f, 0.5f, 0.25f + * p5 known args - 0.0f, 0.25f + * p6 known args - 1 if a global if check is passed. + * p7 known args - 1 if a global if check is passed. + * The values found above, I found within the 5 scripts this is ever called in. (fmmc_launcher, fm_deathmatch_controller, fm_impromptu_dm_controller, fm_mission_controller, and freemode). + * ========================================================= + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function taskPlayPhoneGestureAnimation(ped: Ped | Player | number, animDict: string, animation: string, boneMaskType: string, blendInDuration: number, blendOutDuration: number, isLooping: boolean, holdLastFrame: boolean): void; + + export function taskStopPhoneGestureAnimation(ped: Ped | Player | number, blendOutOverride: number): void; + + export function isPlayingPhoneGestureAnim(ped: Ped | Player | number): boolean; + + export function getPhoneGestureAnimCurrentTime(ped: Ped | Player | number): number; + + export function getPhoneGestureAnimTotalTime(ped: Ped | Player | number): number; + + /** + * Most probably plays a specific animation on vehicle. For example getting chop out of van etc... + * Here's how its used - + * TASK::TASK_VEHICLE_PLAY_ANIM(l_325, "rcmnigel1b", "idle_speedo"); + * TASK::TASK_VEHICLE_PLAY_ANIM(l_556[0/*1*\/], "missfra0_chop_drhome", "InCar_GetOutofBack_Speedo"); + * FYI : Speedo is the name of van in which chop was put in the mission. + */ + export function taskVehiclePlayAnim(vehicle: Vehicle | number, animationSet: string, animationName: string): void; + + /** + * enum eScriptLookatFlags + * { + * SLF_SLOW_TURN_RATE = 1, // turn the head toward the target slowly + * SLF_FAST_TURN_RATE = 2, // turn the head toward the target quickly + * SLF_EXTEND_YAW_LIMIT = 4, // wide yaw head limits + * SLF_EXTEND_PITCH_LIMIT = 8, // wide pitch head limit + * SLF_WIDEST_YAW_LIMIT = 16, // widest yaw head limit + * SLF_WIDEST_PITCH_LIMIT = 32, // widest pitch head limit + * SLF_NARROW_YAW_LIMIT = 64, // narrow yaw head limits + * SLF_NARROW_PITCH_LIMIT = 128, // narrow pitch head limit + * SLF_NARROWEST_YAW_LIMIT = 256, // narrowest yaw head limit + * SLF_NARROWEST_PITCH_LIMIT = 512, // narrowest pitch head limit + * SLF_USE_TORSO = 1024, // use the torso aswell as the neck and head (currently disabled) + * SLF_WHILE_NOT_IN_FOV = 2048, // keep tracking the target even if they are not in the hard coded FOV + * SLF_USE_CAMERA_FOCUS = 4096, // use the camera as the target + * SLF_USE_EYES_ONLY = 8192, // only track the target with the eyes + * SLF_USE_LOOK_DIR = 16384, // use information in look dir DOF + * SLF_FROM_SCRIPT = 32768, // internal use only + * SLF_USE_REF_DIR_ABSOLUTE = 65536 // use absolute reference direction mode for solver + * }; + */ export function taskLookAtCoord(entity: Entity | number, x: number, y: number, z: number, duration: number, flags: number, priority: number): void; /** - * For flags, please refer to TASK_LOOK_AT_COORD. - */ - export function taskLookAtEntity(ped: Player | number, lookAt: Entity | number, duration: number, flags: number, priority: number): void; + * For flags, please refer to TASK_LOOK_AT_COORD. + */ + export function taskLookAtEntity(ped: Ped | Player | number, lookAt: Entity | number, duration: number, flags: number, priority: number): void; - export function taskClearLookAt(ped: Player | number): void; + export function taskClearLookAt(ped: Ped | Player | number): void; - export function openSequenceTask(taskSequenceId: number): [void, number]; + export function openSequenceTask(taskSequenceId?: number): [void, number]; export function closeSequenceTask(taskSequenceId: number): void; - export function taskPerformSequence(ped: Player | number, taskSequenceId: number): void; + export function taskPerformSequence(ped: Ped | Player | number, taskSequenceId: number): void; - export function taskPerformSequenceLocally(ped: Player | number, taskSequenceId: number): void; + export function taskPerformSequenceLocally(ped: Ped | Player | number, taskSequenceId: number): void; - export function clearSequenceTask(taskSequenceId: number): [void, number]; + export function clearSequenceTask(taskSequenceId?: number): [void, number]; export function setSequenceToRepeat(taskSequenceId: number, repeat: boolean): void; /** - * returned values: - * 0 to 7 = task that's currently in progress, 0 meaning the first one. - * -1 no task sequence in progress. - */ - export function getSequenceProgress(ped: Player | number): number; + * returned values: + * 0 to 7 = task that's currently in progress, 0 meaning the first one. + * -1 no task sequence in progress. + */ + export function getSequenceProgress(ped: Ped | Player | number): number; /** - * Task index enum: https://alloc8or.re/gta5/doc/enums/eTaskTypeIndex.txt - */ - export function getIsTaskActive(ped: Player | number, taskIndex: number): boolean; + * Task index enum: https://alloc8or.re/gta5/doc/enums/eTaskTypeIndex.txt + */ + export function getIsTaskActive(ped: Ped | Player | number, taskIndex: number): boolean; /** - * Gets the status of a script-assigned task. - * @param taskHash https://alloc8or.re/gta5/doc/enums/eScriptTaskHash.txt - */ - export function getScriptTaskStatus(ped: Player | number, taskHash: number): number; + * Gets the status of a script-assigned task. + * taskHash: https://alloc8or.re/gta5/doc/enums/eScriptTaskHash.txt + */ + export function getScriptTaskStatus(ped: Ped | Player | number, taskHash: number): number; /** - * https://alloc8or.re/gta5/doc/enums/eVehicleMissionType.txt - */ + * https://alloc8or.re/gta5/doc/enums/eVehicleMissionType.txt + */ export function getActiveVehicleMissionType(vehicle: Vehicle | number): number; /** - * @param flags are the same flags used in TASK_LEAVE_VEHICLE - */ - export function taskLeaveAnyVehicle(ped: Player | number, delayTime: number, flags: number): void; + * Flags are the same flags used in TASK_LEAVE_VEHICLE + */ + export function taskLeaveAnyVehicle(ped: Ped | Player | number, delayTime: number, flags: number): void; - export function taskAimGunScripted(ped: Player | number, scriptTask: number, disableBlockingClip: boolean, instantBlendToAim: boolean): void; + export function taskAimGunScripted(ped: Ped | Player | number, scriptTask: number, disableBlockingClip: boolean, instantBlendToAim: boolean): void; - export function taskAimGunScriptedWithTarget(ped: Player | number, target: Player | number, x: number, y: number, z: number, gunTaskType: number, disableBlockingClip: boolean, forceAim: boolean): void; + export function taskAimGunScriptedWithTarget(ped: Ped | Player | number, target: Ped | Player | number, x: number, y: number, z: number, gunTaskType: number, disableBlockingClip: boolean, forceAim: boolean): void; - export function updateTaskAimGunScriptedTarget(ped: Player | number, target: Player | number, x: number, y: number, z: number, disableBlockingClip: boolean): void; + export function updateTaskAimGunScriptedTarget(ped: Ped | Player | number, target: Ped | Player | number, x: number, y: number, z: number, disableBlockingClip: boolean): void; export function getClipSetForScriptedGunTask(gunTaskType: number): string; /** - * @param duration the amount of time in milliseconds to do the task. -1 will keep the task going until either another task is applied, or CLEAR_ALL_TASKS() is called with the ped - */ - export function taskAimGunAtEntity(ped: Player | number, entity: Entity | number, duration: number, instantBlendToAim: boolean): void; + * duration: the amount of time in milliseconds to do the task. -1 will keep the task going until either another task is applied, or CLEAR_ALL_TASKS() is called with the ped + */ + export function taskAimGunAtEntity(ped: Ped | Player | number, entity: Entity | number, duration: number, instantBlendToAim: boolean): void; /** - * @param duration the amount of time in milliseconds to do the task. -1 will keep the task going until either another task is applied, or CLEAR_ALL_TASKS() is called with the ped - */ - export function taskTurnPedToFaceEntity(ped: Player | number, entity: Entity | number, duration: number): void; + * duration: the amount of time in milliseconds to do the task. -1 will keep the task going until either another task is applied, or CLEAR_ALL_TASKS() is called with the ped + */ + export function taskTurnPedToFaceEntity(ped: Ped | Player | number, entity: Entity | number, duration: number): void; - export function taskAimGunAtCoord(ped: Player | number, x: number, y: number, z: number, time: number, instantBlendToAim: boolean, playAnimIntro: boolean): void; + export function taskAimGunAtCoord(ped: Ped | Player | number, x: number, y: number, z: number, time: number, instantBlendToAim: boolean, playAnimIntro: boolean): void; /** - * Firing Pattern Hash Information: https://pastebin.com/Px036isB - */ - export function taskShootAtCoord(ped: Player | number, x: number, y: number, z: number, duration: number, firingPattern: number): void; + * Firing Pattern Hash Information: https://pastebin.com/Px036isB + */ + export function taskShootAtCoord(ped: Ped | Player | number, x: number, y: number, z: number, duration: number, firingPattern: number): void; /** - * Makes the specified ped shuffle to the next vehicle seat. - * The ped MUST be in a vehicle and the vehicle parameter MUST be the ped's current vehicle. - */ - export function taskShuffleToNextVehicleSeat(ped: Player | number, vehicle: Vehicle | number, useAlternateShuffle: boolean): void; + * Makes the specified ped shuffle to the next vehicle seat. + * The ped MUST be in a vehicle and the vehicle parameter MUST be the ped's current vehicle. + */ + export function taskShuffleToNextVehicleSeat(ped: Ped | Player | number, vehicle: Vehicle | number, useAlternateShuffle: boolean): void; - export function clearPedTasks(ped: Player | number): void; + export function clearPedTasks(ped: Ped | Player | number): void; - export function clearPedSecondaryTask(ped: Player | number): void; + export function clearPedSecondaryTask(ped: Ped | Player | number): void; export function taskEveryoneLeaveVehicle(vehicle: Vehicle | number): void; /** - * enum ESEEK_ENTITY_OFFSET_FLAGS - * { - * ESEEK_OFFSET_ORIENTATES_WITH_ENTITY = 0x01, - * ESEEK_KEEP_TO_PAVEMENTS = 0x02 - * }; - */ - export function taskGotoEntityOffset(ped: Player | number, entity: Entity | number, time: number, seekRadius: number, seekAngleDeg: number, moveBlendRatio: number, gotoEntityOffsetFlags: number): void; - - export function taskGotoEntityOffsetXy(ped: Player | number, entity: Entity | number, duration: number, targetRadius: number, offsetX: number, offsetY: number, moveBlendRatio: number, gotoEntityOffsetFlags: number): void; - - /** - * @param duration in milliseconds - */ - export function taskTurnPedToFaceCoord(ped: Player | number, x: number, y: number, z: number, duration: number): void; - - /** - * '1 - brake - * '3 - brake + reverse - * '4 - turn left 90 + braking - * '5 - turn right 90 + braking - * '6 - brake strong (handbrake?) until time ends - * '7 - turn left + accelerate - * '8 - turn right + accelerate - * '9 - weak acceleration - * '10 - turn left + restore wheel pos to center in the end - * See NativeDB for reference: http://natives.altv.mp/#/0xC429DCEEB339E129 - */ - export function taskVehicleTempAction(driver: Player | number, vehicle: Vehicle | number, action: number, time: number): void; - - /** - * @param missionType https://alloc8or.re/gta5/doc/enums/eVehicleMissionType.txt - */ - export function taskVehicleMission(driver: Player | number, vehicle: Vehicle | number, vehicleTarget: Vehicle | number, missionType: number, cruiseSpeed: number, drivingStyle: number, targetReached: number, straightLineDistance: number, DriveAgainstTraffic: boolean): void; - - /** - * See TASK_VEHICLE_MISSION - */ - export function taskVehicleMissionPedTarget(ped: Player | number, vehicle: Vehicle | number, pedTarget: Player | number, missionType: number, maxSpeed: number, drivingStyle: number, minDistance: number, straightLineDistance: number, DriveAgainstTraffic: boolean): void; - - /** - * See TASK_VEHICLE_MISSION - */ - export function taskVehicleMissionCoorsTarget(ped: Player | number, vehicle: Vehicle | number, x: number, y: number, z: number, mission: number, cruiseSpeed: number, drivingStyle: number, targetReached: number, straightLineDistance: number, DriveAgainstTraffic: boolean): void; - - /** - * Makes a ped follow the targetVehicle with in between. - * note: minDistance is ignored if drivingstyle is avoiding traffic, but Rushed is fine. - * -1 = behind - * 0 = ahead - * 1 = left - * 2 = right - * 3 = back left - * 4 = back right - * if the target is closer than noRoadsDistance, the driver will ignore pathing/roads and follow you directly. - * Driving Styles guide: gtaforums.com/topic/822314-guide-driving-styles/ - * @param mode The mode defines the relative position to the targetVehicle. The ped will try to position its vehicle there. - */ - export function taskVehicleEscort(ped: Player | number, vehicle: Vehicle | number, targetVehicle: Vehicle | number, mode: number, speed: number, drivingStyle: number, minDistance: number, minHeightAboveTerrain: number, noRoadsDistance: number): void; - - /** - * Makes a ped in a vehicle follow an entity (ped, vehicle, etc.) - * @param drivingStyle http://gtaforums.com/topic/822314-guide-driving-styles/ - */ - export function taskVehicleFollow(driver: Player | number, vehicle: Vehicle | number, targetEntity: Entity | number, speed: number, drivingStyle: number, minDistance: number): void; - - /** - * chases targetEnt fast and aggressively - * -- - * Makes ped (needs to be in vehicle) chase targetEnt. - */ - export function taskVehicleChase(driver: Player | number, targetEnt: Entity | number): void; - - /** - * 'targetSpeed': The pilot will dip the nose AS MUCH AS POSSIBLE so as to reach this value AS FAST AS POSSIBLE. As such, you'll want to modulate it as opposed to calling it via a hard-wired, constant #. - * 'radius' isn't just "stop within radius of X of target" like with ground vehicles. In this case, the pilot will fly an entire circle around 'radius' and continue to do so. - * @param pilot explanatory. - * @param entityToFollow you can provide a Vehicle entity or a Ped entity, the heli will protect them. - * @param drivingFlags is unused variable in the function. - * @param altitude p7 appears to be a FlyingStyle enum. Still investigating it as of this writing, but playing around with values here appears to result in different -behavior- as opposed to offsetting coordinates, altitude, target speed, etc. - * @returns NOTE: If the pilot finds enemies, it will engage them until it kills them, but will return to protect the ped/vehicle given shortly thereafter. - */ - export function taskVehicleHeliProtect(pilot: Player | number, vehicle: Vehicle | number, entityToFollow: Entity | number, targetSpeed: number, drivingFlags: number, radius: number, altitude: number, heliFlags: number): void; - - /** - * Flag 1: Aggressive ramming of suspect - * Flag 2: Ram attempts - * Flag 32: Stay back from suspect, no tactical contact. Convoy-like. - * Flag 16: Ramming, seems to be slightly less aggressive than 1-2. - * @param flag 8: Medium-aggressive boxing tactic with a bit of PIT - */ - export function setTaskVehicleChaseBehaviorFlag(ped: Player | number, flag: number, set: boolean): void; - - export function setTaskVehicleChaseIdealPursuitDistance(ped: Player | number, distance: number): void; - - /** - * Ped pilot should be in a heli. - * NOTE: If the pilot finds enemies, it will engage them, then remain there idle, not continuing to chase the Entity given. - * @param entityToFollow can be a vehicle or Ped. - * @param x 5.0, it tries to go below (if the EntityToFollow is a heli or plane) - * @param y 5.0, it tries to go below (if the EntityToFollow is a heli or plane) - */ - export function taskHeliChase(pilot: Player | number, entityToFollow: Entity | number, x: number, y: number, z: number): void; - - export function taskPlaneChase(pilot: Player | number, entityToFollow: Entity | number, x: number, y: number, z: number): void; - - export function taskPlaneLand(pilot: Player | number, plane: Vehicle | number, runwayStartX: number, runwayStartY: number, runwayStartZ: number, runwayEndX: number, runwayEndY: number, runwayEndZ: number): void; - - export function clearDefaultPrimaryTask(ped: Player | number): void; - - /** - * This native is very useful when switching the player to a ped inside a vehicle that has a task assigned prior to the player switch. - * It is necessary to clear the ped's tasks AND call this native with the vehicle the player is switching into in order to allow the player to control the vehicle after the player switches. - */ + * enum ESEEK_ENTITY_OFFSET_FLAGS + * { + * ESEEK_OFFSET_ORIENTATES_WITH_ENTITY = 0x01, + * ESEEK_KEEP_TO_PAVEMENTS = 0x02 + * }; + */ + export function taskGotoEntityOffset(ped: Ped | Player | number, entity: Entity | number, time: number, seekRadius: number, seekAngleDeg: number, moveBlendRatio: number, gotoEntityOffsetFlags: number): void; + + export function taskGotoEntityOffsetXy(ped: Ped | Player | number, entity: Entity | number, duration: number, targetRadius: number, offsetX: number, offsetY: number, moveBlendRatio: number, gotoEntityOffsetFlags: number): void; + + /** + * duration in milliseconds + */ + export function taskTurnPedToFaceCoord(ped: Ped | Player | number, x: number, y: number, z: number, duration: number): void; + + /** + * '1 - brake + * '3 - brake + reverse + * '4 - turn left 90 + braking + * '5 - turn right 90 + braking + * '6 - brake strong (handbrake?) until time ends + * '7 - turn left + accelerate + * '8 - turn right + accelerate + * '9 - weak acceleration + * '10 - turn left + restore wheel pos to center in the end + * '11 - turn right + restore wheel pos to center in the end + * '13 - turn left + go reverse + * '14 - turn left + go reverse + * '16 - crash the game after like 2 seconds :) + * '17 - keep actual state, game crashed after few tries + * '18 - game crash + * '19 - strong brake + turn left/right + * '20 - weak brake + turn left then turn right + * '21 - weak brake + turn right then turn left + * '22 - brake + reverse + * '23 - accelerate fast + * '24 - brake + * '25 - brake turning left then when almost stopping it turns left more + * '26 - brake turning right then when almost stopping it turns right more + * '27 - brake until car stop or until time ends + * '28 - brake + strong reverse acceleration + * '30 - performs a burnout (brake until stop + brake and accelerate) + * '31 - accelerate + handbrake + * '32 - accelerate very strong + * Seems to be this: + * Works on NPCs, but overrides their current task. If inside a task sequence (and not being the last task), "time" will work, otherwise the task will be performed forever until tasked with something else + */ + export function taskVehicleTempAction(driver: Ped | Player | number, vehicle: Vehicle | number, action: number, time: number): void; + + /** + * missionType: https://alloc8or.re/gta5/doc/enums/eVehicleMissionType.txt + */ + export function taskVehicleMission(driver: Ped | Player | number, vehicle: Vehicle | number, vehicleTarget: Vehicle | number, missionType: number, cruiseSpeed: number, drivingStyle: number, targetReached: number, straightLineDistance: number, DriveAgainstTraffic: boolean): void; + + /** + * See TASK_VEHICLE_MISSION + */ + export function taskVehicleMissionPedTarget(ped: Ped | Player | number, vehicle: Vehicle | number, pedTarget: Ped | Player | number, missionType: number, maxSpeed: number, drivingStyle: number, minDistance: number, straightLineDistance: number, DriveAgainstTraffic: boolean): void; + + /** + * See TASK_VEHICLE_MISSION + */ + export function taskVehicleMissionCoorsTarget(ped: Ped | Player | number, vehicle: Vehicle | number, x: number, y: number, z: number, mission: number, cruiseSpeed: number, drivingStyle: number, targetReached: number, straightLineDistance: number, DriveAgainstTraffic: boolean): void; + + /** + * Makes a ped follow the targetVehicle with in between. + * note: minDistance is ignored if drivingstyle is avoiding traffic, but Rushed is fine. + * Mode: The mode defines the relative position to the targetVehicle. The ped will try to position its vehicle there. + * -1 = behind + * 0 = ahead + * 1 = left + * 2 = right + * 3 = back left + * 4 = back right + * if the target is closer than noRoadsDistance, the driver will ignore pathing/roads and follow you directly. + * Driving Styles guide: gtaforums.com/topic/822314-guide-driving-styles/ + */ + export function taskVehicleEscort(ped: Ped | Player | number, vehicle: Vehicle | number, targetVehicle: Vehicle | number, mode: number, speed: number, drivingStyle: number, minDistance: number, minHeightAboveTerrain: number, noRoadsDistance: number): void; + + /** + * Makes a ped in a vehicle follow an entity (ped, vehicle, etc.) + * drivingStyle: http://gtaforums.com/topic/822314-guide-driving-styles/ + */ + export function taskVehicleFollow(driver: Ped | Player | number, vehicle: Vehicle | number, targetEntity: Entity | number, speed: number, drivingStyle: number, minDistance: number): void; + + /** + * chases targetEnt fast and aggressively + * -- + * Makes ped (needs to be in vehicle) chase targetEnt. + */ + export function taskVehicleChase(driver: Ped | Player | number, targetEnt: Entity | number): void; + + /** + * pilot, vehicle and altitude are rather self-explanatory. + * p4: is unused variable in the function. + * entityToFollow: you can provide a Vehicle entity or a Ped entity, the heli will protect them. + * 'targetSpeed': The pilot will dip the nose AS MUCH AS POSSIBLE so as to reach this value AS FAST AS POSSIBLE. As such, you'll want to modulate it as opposed to calling it via a hard-wired, constant #. + * 'radius' isn't just "stop within radius of X of target" like with ground vehicles. In this case, the pilot will fly an entire circle around 'radius' and continue to do so. + * NOT CONFIRMED: p7 appears to be a FlyingStyle enum. Still investigating it as of this writing, but playing around with values here appears to result in different -behavior- as opposed to offsetting coordinates, altitude, target speed, etc. + * NOTE: If the pilot finds enemies, it will engage them until it kills them, but will return to protect the ped/vehicle given shortly thereafter. + */ + export function taskVehicleHeliProtect(pilot: Ped | Player | number, vehicle: Vehicle | number, entityToFollow: Entity | number, targetSpeed: number, drivingFlags: number, radius: number, altitude: number, heliFlags: number): void; + + /** + * Flag 8: Medium-aggressive boxing tactic with a bit of PIT + * Flag 1: Aggressive ramming of suspect + * Flag 2: Ram attempts + * Flag 32: Stay back from suspect, no tactical contact. Convoy-like. + * Flag 16: Ramming, seems to be slightly less aggressive than 1-2. + */ + export function setTaskVehicleChaseBehaviorFlag(ped: Ped | Player | number, flag: number, set: boolean): void; + + export function setTaskVehicleChaseIdealPursuitDistance(ped: Ped | Player | number, distance: number): void; + + /** + * Ped pilot should be in a heli. + * EntityToFollow can be a vehicle or Ped. + * x,y,z appear to be how close to the EntityToFollow the heli should be. Scripts use 0.0, 0.0, 80.0. Then the heli tries to position itself 80 units above the EntityToFollow. If you reduce it to -5.0, it tries to go below (if the EntityToFollow is a heli or plane) + * NOTE: If the pilot finds enemies, it will engage them, then remain there idle, not continuing to chase the Entity given. + */ + export function taskHeliChase(pilot: Ped | Player | number, entityToFollow: Entity | number, x: number, y: number, z: number): void; + + export function taskPlaneChase(pilot: Ped | Player | number, entityToFollow: Entity | number, x: number, y: number, z: number): void; + + export function taskPlaneLand(pilot: Ped | Player | number, plane: Vehicle | number, runwayStartX: number, runwayStartY: number, runwayStartZ: number, runwayEndX: number, runwayEndY: number, runwayEndZ: number): void; + + export function clearDefaultPrimaryTask(ped: Ped | Player | number): void; + + /** + * This native is very useful when switching the player to a ped inside a vehicle that has a task assigned prior to the player switch. + * It is necessary to clear the ped's tasks AND call this native with the vehicle the player is switching into in order to allow the player to control the vehicle after the player switches. + */ export function clearPrimaryVehicleTask(vehicle: Vehicle | number): void; export function clearVehicleCrashTask(vehicle: Vehicle | number): void; - export function taskPlaneGotoPreciseVtol(ped: Player | number, vehicle: Vehicle | number, x: number, y: number, z: number, flightHeight: number, minHeightAboveTerrain: number, useDesiredOrientation: boolean, desiredOrientation: number, autopilot: boolean): void; - - /** - * Used in am_vehicle_spawn.ysc and am_mp_submarine.ysc. - * Speed can be set by calling SET_DRIVE_TASK_CRUISE_SPEED after - * @param ped is always 0, p5 is always 1 - * @param submarine is the vehicle handle of the submarine. Submarine must have a driver, but the ped handle is not passed to the native. - */ - export function taskSubmarineGotoAndStop(ped: Player | number, submarine: Vehicle | number, x: number, y: number, z: number, autopilot: boolean): void; - - /** - * Must have targetVehicle, targetPed, OR destination X/Y/Z set - * Will follow targeted vehicle/ped, or fly to destination - * Set whichever is not being used to 0 - * Mission mode type: - * - 4, 7: Forces heli to snap to the heading if set, flies to destination or tracks specified entity (mode 4 only works for coordinates, 7 works for coordinates OR ped/vehicle) - * - 6: Attacks the target ped/vehicle with mounted weapons. If radius is set, will maintain that distance from target. - * - 8: Makes the heli flee from the ped/vehicle/coordinate - * - 9: Circles around target ped/vehicle, snaps to angle if set. Behavior flag (last parameter) of 2048 switches from counter-clockwise to clockwise circling. Does not work with coordinate destination. - * - 10, 11: Follows ped/vehicle target and imitates target heading. Only works with ped/vehicle target, not coord target - * See NativeDB for reference: http://natives.altv.mp/#/0xDAD029E187A2BEB4 - * @param radius affects how closely the heli will follow tracked ped/vehicle, and when circling (mission type 9) sets the radius (in meters) that it will circle the target from - */ - export function taskHeliMission(pilot: Player | number, aircraft: Vehicle | number, targetVehicle: Vehicle | number, targetPed: Player | number, destinationX: number, destinationY: number, destinationZ: number, missionFlag: number, maxSpeed: number, radius: number, targetHeading: number, maxHeight: number, minHeight: number, slowDownDistance: number, behaviorFlags: number): void; - - export function taskHeliEscortHeli(pilot: Player | number, heli1: Vehicle | number, heli2: Vehicle | number, offsetX: number, offsetY: number, offsetZ: number): void; - - /** - * EXAMPLE USAGE: - * Fly around target (Precautiously, keeps high altitude): - * Function.Call(Hash.TASK_PLANE_MISSION, pilot, selectedAirplane, 0, 0, Target.X, Target.Y, Target.Z, 4, 100f, 0f, 90f, 0, 200f); - * Fly around target (Dangerously, keeps VERY low altitude): - * Fly directly into target: - * Function.Call(Hash.TASK_PLANE_MISSION, pilot, selectedAirplane, 0, 0, Target.X, Target.Y, Target.Z, 4, 100f, 0f, 90f, 0, -5000f); - * EXPANDED INFORMATION FOR ADVANCED USAGE (custom pilot) - * 'physicsSpeed': (THIS IS NOT YOUR ORDINARY SPEED PARAMETER: READ!!) - * Think of this -first- as a radius value, not a true speed value. The ACTUAL effective speed of the plane will be that of the maximum speed permissible to successfully fly in a -circle- with a radius of 'physicsSpeed'. This also means that the plane must complete a circle before it can begin its "bombing run", its straight line pass towards the target. p9 appears to influence the angle at which a "bombing run" begins, although I can't confirm yet. - * See NativeDB for reference: http://natives.altv.mp/#/0x23703CD154E83B88 - * @param pilot 500f); - */ - export function taskPlaneMission(pilot: Player | number, aircraft: Vehicle | number, targetVehicle: Vehicle | number, targetPed: Player | number, destinationX: number, destinationY: number, destinationZ: number, missionFlag: number, angularDrag: number, targetReached: number, targetHeading: number, maxZ: number, minZ: number, precise: boolean): void; - - export function taskPlaneTaxi(pilot: Player | number, aircraft: Vehicle | number, x: number, y: number, z: number, cruiseSpeed: number, targetReached: number): void; - - /** - * You need to call PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS after TASK_BOAT_MISSION in order for the task to execute. - * Working example - * float vehicleMaxSpeed = VEHICLE::GET_VEHICLE_ESTIMATED_MAX_SPEED(ENTITY::GET_ENTITY_MODEL(pedVehicle)); - * PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(pedDriver, 1); - * P8 appears to be driving style flag - see gtaforums.com/topic/822314-guide-driving-styles/ for documentation - */ - export function taskBoatMission(pedDriver: Player | number, vehicle: Vehicle | number, targetVehicle: Vehicle | number, targetPed: Player | number, x: number, y: number, z: number, mission: number, maxSpeed: number, drivingStyle: number, targetReached: number, boatFlags: any): void; - - /** - * Example: - * TASK::TASK_DRIVE_BY(l_467[122], PLAYER::PLAYER_PED_ID(), 0, 0.0, 0.0, 2.0, 300.0, 100, 0, ${firing_pattern_burst_fire_driveby}); - * Needs working example. Doesn't seem to do anything. - * I marked p2 as targetVehicle as all these shooting related tasks seem to have that in common. - * I marked p6 as distanceToShoot as if you think of GTA's Logic with the native SET_VEHICLE_SHOOT natives, it won't shoot till it gets within a certain distance of the target. - * I marked p7 as pedAccuracy as it seems it's mostly 100 (Completely Accurate), 75, 90, etc. Although this could be the ammo count within the gun, but I highly doubt it. I will change this comment once I find out if it's ammo count or not. - */ - export function taskDriveBy(driverPed: Player | number, targetPed: Player | number, targetVehicle: Vehicle | number, targetX: number, targetY: number, targetZ: number, distanceToShoot: number, pedAccuracy: number, pushUnderneathDrivingTaskIfDriving: boolean, firingPattern: number): void; - - /** - * For p1 & p2 (Ped, Vehicle). I could be wrong, as the only time this native is called in scripts is once and both are 0, but I assume this native will work like SET_MOUNTED_WEAPON_TARGET in which has the same exact amount of parameters and the 1st and last 3 parameters are right and the same for both natives. - */ - export function setDrivebyTaskTarget(shootingPed: Player | number, targetPed: Player | number, targetVehicle: Vehicle | number, x: number, y: number, z: number): void; - - export function clearDrivebyTaskUnderneathDrivingTask(ped: Player | number): void; - - export function isDrivebyTaskUnderneathDrivingTask(ped: Player | number): boolean; - - /** - * Forces the ped to use the mounted weapon. - * Returns false if task is not possible. - */ - export function controlMountedWeapon(ped: Player | number): boolean; - - /** - * Note: Look in decompiled scripts and the times that p1 and p2 aren't 0. They are filled with vars. If you look through out that script what other natives those vars are used in, you can tell p1 is a ped and p2 is a vehicle. Which most likely means if you want the mounted weapon to target a ped set targetVehicle to 0 or vice-versa. - */ - export function setMountedWeaponTarget(shootingPed: Player | number, targetPed: Player | number, targetVehicle: Vehicle | number, x: number, y: number, z: number, taskMode: number, ignoreTargetVehDeadCheck: boolean): void; - - export function isMountedWeaponTaskUnderneathDrivingTask(ped: Player | number): boolean; - - /** - * Actually has 3 params, not 2. - * @param ped Ped - * @param usePhone int (or bool?) - * @param desiredPhoneMode int - */ - export function taskUseMobilePhone(ped: Player | number, usePhone: boolean, desiredPhoneMode: number): void; - - export function taskUseMobilePhoneTimed(ped: Player | number, duration: number): void; - - /** - * @param flags tend to be 16, 17 or 1 - * @param goToLocationX to p7 tend to be 0.0 - */ - export function taskChatToPed(ped: Player | number, target: Player | number, flags: number, goToLocationX: number, goToLocationY: number, goToLocationZ: number, headingDegs: number, idleTime: number): void; - - /** - * ------------------------------- - * Driver = -1 - * Any = -2 - * Left-Rear = 1 - * Right-Front = 0 - * Right-Rear = 2 - * Extra seats = 3-14(This may differ from vehicle type e.g. Firetruck Rear Stand, Ambulance Rear) - * @param seat Numbers - */ - export function taskWarpPedIntoVehicle(ped: Player | number, vehicle: Vehicle | number, seat: number): void; - - /** - * //this part of the code is to determine at which entity the player is aiming, for example if you want to create a mod where you give orders to peds - * Player player = PLAYER::PLAYER_ID(); - * PLAYER::_GET_AIMED_ENTITY(player, &aimedentity); - * //bg is an array of peds - * TASK::TASK_SHOOT_AT_ENTITY(bg[i], aimedentity, 5000, MISC::GET_HASH_KEY("FIRING_PATTERN_FULL_AUTO")); - * in practical usage, getting the entity the player is aiming at and then task the peds to shoot at the entity, at a button press event would be better. - * Firing Pattern Hash Information: https://pastebin.com/Px036isB - * @param entity aimedentity; - */ + export function taskPlaneGotoPreciseVtol(ped: Ped | Player | number, vehicle: Vehicle | number, x: number, y: number, z: number, flightHeight: number, minHeightAboveTerrain: number, useDesiredOrientation: boolean, desiredOrientation: number, autopilot: boolean): void; + + /** + * Used in am_vehicle_spawn.ysc and am_mp_submarine.ysc. + * p0 is always 0, p5 is always 1 + * p1 is the vehicle handle of the submarine. Submarine must have a driver, but the ped handle is not passed to the native. + * Speed can be set by calling SET_DRIVE_TASK_CRUISE_SPEED after + */ + export function taskSubmarineGotoAndStop(ped: Ped | Player | number, submarine: Vehicle | number, x: number, y: number, z: number, autopilot: boolean): void; + + /** + * Must have targetVehicle, targetPed, OR destination X/Y/Z set + * Will follow targeted vehicle/ped, or fly to destination + * Set whichever is not being used to 0 + * Mission mode type: + * - 4, 7: Forces heli to snap to the heading if set, flies to destination or tracks specified entity (mode 4 only works for coordinates, 7 works for coordinates OR ped/vehicle) + * - 6: Attacks the target ped/vehicle with mounted weapons. If radius is set, will maintain that distance from target. + * - 8: Makes the heli flee from the ped/vehicle/coordinate + * - 9: Circles around target ped/vehicle, snaps to angle if set. Behavior flag (last parameter) of 2048 switches from counter-clockwise to clockwise circling. Does not work with coordinate destination. + * - 10, 11: Follows ped/vehicle target and imitates target heading. Only works with ped/vehicle target, not coord target + * - 19: Heli lands at specified coordinate, ignores heading (lands facing whatever direction it is facing when the task is started) + * - 20: Makes the heli land when near target ped. It won't resume chasing. + * - 21: Emulates a helicopter crash + * - 23: makes the heli circle erratically around ped + * Heli will fly at maxSpeed (up to actual maximum speed defined by the model's handling config) + * You can use SET_DRIVE_TASK_CRUISE_SPEED to modulate the speed based on distance to the target without having to re-invoke the task native. Setting to 8.0 when close to the destination results in a much smoother approach. + * If minHeight and maxHeight are set, heli will fly between those specified elevations, relative to ground level and any obstructions/buildings below. You can specify -1 for either if you only want to specify one. Usually it is easiest to leave maxHeight at -1, and specify a reasonable minHeight to ensure clearance over any obstacles. Note this MUST be passed as an INT, not a FLOAT. + * Radius affects how closely the heli will follow tracked ped/vehicle, and when circling (mission type 9) sets the radius (in meters) that it will circle the target from + * Heading is -1.0 for default behavior, which will point the nose of the helicopter towards the destination. Set a heading and the heli will lock to that direction when near its destination/target, but may still turn towards the destination when flying at higher speed from a further distance. + * Behavior Flags is a bitwise value that modifies the AI behavior. Not clear what all flags do, but here are some guesses/notes: + * 1: Forces heading to face E + * 2: Unknown + * 4: Tight circles around coordinate destination + * 8: Unknown + * 16: Circles around coordinate destination facing towards destination + * 32: Flys to normally, then lands at coordinate destination and stays on the ground (using mission type 4) + * 64: Ignores obstacles when flying, will follow at specified minHeight above ground level but will not avoid buildings, vehicles, etc. + * 128: Unknown + * 256: Unknown + * 512: Unknown + * 1024: Unknown + * 2048: Reverses direction of circling (mission type 9) to clockwise + * 4096: Hugs closer to the ground, maintains minHeight from ground generally, but barely clears buildings and dips down more between buildings instead of taking a more efficient/safe route + * 8192: Unknown + * Unk3 is a float value, you may see -1082130432 for this value in decompiled native scripts, this is the equivalent to -1.0f. Seems to affect acceleration/aggressiveness, but not sure exactly how it works. Higher value seems to result in lower acceleration/less aggressive flying. Almost always -1.0 in native scripts, occasionally 20.0 or 50.0. Setting to 400.0 seems to work well for making the pilot not overshoot the destination when using coordinate destination. + * Notes updated by PNWParksFan, May 2021 + */ + export function taskHeliMission(pilot: Ped | Player | number, aircraft: Vehicle | number, targetVehicle: Vehicle | number, targetPed: Ped | Player | number, destinationX: number, destinationY: number, destinationZ: number, missionFlag: number, maxSpeed: number, radius: number, targetHeading: number, maxHeight: number, minHeight: number, slowDownDistance: number, behaviorFlags: number): void; + + export function taskHeliEscortHeli(pilot: Ped | Player | number, heli1: Vehicle | number, heli2: Vehicle | number, offsetX: number, offsetY: number, offsetZ: number): void; + + /** + * EXAMPLE USAGE: + * Fly around target (Precautiously, keeps high altitude): + * Function.Call(Hash.TASK_PLANE_MISSION, pilot, selectedAirplane, 0, 0, Target.X, Target.Y, Target.Z, 4, 100f, 0f, 90f, 0, 200f); + * Fly around target (Dangerously, keeps VERY low altitude): + * Function.Call(Hash.TASK_PLANE_MISSION, pilot, selectedAirplane, 0, 0, Target.X, Target.Y, Target.Z, 4, 100f, 0f, 90f, 0, -500f); + * Fly directly into target: + * Function.Call(Hash.TASK_PLANE_MISSION, pilot, selectedAirplane, 0, 0, Target.X, Target.Y, Target.Z, 4, 100f, 0f, 90f, 0, -5000f); + * EXPANDED INFORMATION FOR ADVANCED USAGE (custom pilot) + * 'physicsSpeed': (THIS IS NOT YOUR ORDINARY SPEED PARAMETER: READ!!) + * Think of this -first- as a radius value, not a true speed value. The ACTUAL effective speed of the plane will be that of the maximum speed permissible to successfully fly in a -circle- with a radius of 'physicsSpeed'. This also means that the plane must complete a circle before it can begin its "bombing run", its straight line pass towards the target. p9 appears to influence the angle at which a "bombing run" begins, although I can't confirm yet. + * VERY IMPORTANT: A "bombing run" will only occur if a plane can successfully determine a possible navigable route (the slower the value of 'physicsSpeed', the more precise the pilot can be due to less influence of physics on flightpath). Otherwise, the pilot will continue to patrol around Destination (be it a dynamic Entity position vector or a fixed world coordinate vector.) + * 0 = Plane's physics are almost entirely frozen, plane appears to "orbit" around precise destination point + * 1-299 = Blend of "frozen, small radius" vs. normal vs. "accelerated, hyperfast, large radius" + * 300+ = Vehicle behaves entirely like a normal gameplay plane. + * 'patrolBlend' (The lower the value, the more the Destination is treated as a "fly AT" rather than a "fly AROUND point".) + * Scenario: Destination is an Entity on ground level, wide open field + * -5000 = Pilot kamikazes directly into Entity + * -1000 = Pilot flies extremely low -around- Entity, very prone to crashing + * -200 = Pilot flies lower than average around Entity. + * 0 = Pilot flies around Entity, normal altitude + * 200 = Pilot flies an extra eighty units or so higher than 0 while flying around Destination (this doesn't seem to correlate directly into distance units.) + * -- Valid mission types found in the exe: -- + * 0 = None + * 1 = Unk + * 2 = CTaskVehicleRam + * 3 = CTaskVehicleBlock + * 4 = CTaskVehicleGoToPlane + * 5 = CTaskVehicleStop + * 6 = CTaskVehicleAttack + * 7 = CTaskVehicleFollow + * 8 = CTaskVehicleFleeAirborne + * 9= CTaskVehicleCircle + * 10 = CTaskVehicleEscort + * 15 = CTaskVehicleFollowRecording + * 16 = CTaskVehiclePoliceBehaviour + * 17 = CTaskVehicleCrash + */ + export function taskPlaneMission(pilot: Ped | Player | number, aircraft: Vehicle | number, targetVehicle: Vehicle | number, targetPed: Ped | Player | number, destinationX: number, destinationY: number, destinationZ: number, missionFlag: number, angularDrag: number, targetReached: number, targetHeading: number, maxZ: number, minZ: number, precise: boolean): void; + + export function taskPlaneTaxi(pilot: Ped | Player | number, aircraft: Vehicle | number, x: number, y: number, z: number, cruiseSpeed: number, targetReached: number): void; + + /** + * You need to call PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS after TASK_BOAT_MISSION in order for the task to execute. + * Working example + * float vehicleMaxSpeed = VEHICLE::GET_VEHICLE_ESTIMATED_MAX_SPEED(ENTITY::GET_ENTITY_MODEL(pedVehicle)); + * TASK::TASK_BOAT_MISSION(pedDriver, pedVehicle, 0, 0, waypointCoord.x, waypointCoord.y, waypointCoord.z, 4, vehicleMaxSpeed, 786469, -1.0, 7); + * PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(pedDriver, 1); + * P8 appears to be driving style flag - see gtaforums.com/topic/822314-guide-driving-styles/ for documentation + */ + export function taskBoatMission(pedDriver: Ped | Player | number, vehicle: Vehicle | number, targetVehicle: Vehicle | number, targetPed: Ped | Player | number, x: number, y: number, z: number, mission: number, maxSpeed: number, drivingStyle: number, targetReached: number, boatFlags: any): void; + + /** + * Example: + * TASK::TASK_DRIVE_BY(l_467[1/*22*\/], PLAYER::PLAYER_PED_ID(), 0, 0.0, 0.0, 2.0, 300.0, 100, 0, ${firing_pattern_burst_fire_driveby}); + * Needs working example. Doesn't seem to do anything. + * I marked p2 as targetVehicle as all these shooting related tasks seem to have that in common. + * I marked p6 as distanceToShoot as if you think of GTA's Logic with the native SET_VEHICLE_SHOOT natives, it won't shoot till it gets within a certain distance of the target. + * I marked p7 as pedAccuracy as it seems it's mostly 100 (Completely Accurate), 75, 90, etc. Although this could be the ammo count within the gun, but I highly doubt it. I will change this comment once I find out if it's ammo count or not. + */ + export function taskDriveBy(driverPed: Ped | Player | number, targetPed: Ped | Player | number, targetVehicle: Vehicle | number, targetX: number, targetY: number, targetZ: number, distanceToShoot: number, pedAccuracy: number, pushUnderneathDrivingTaskIfDriving: boolean, firingPattern: number): void; + + /** + * For p1 & p2 (Ped, Vehicle). I could be wrong, as the only time this native is called in scripts is once and both are 0, but I assume this native will work like SET_MOUNTED_WEAPON_TARGET in which has the same exact amount of parameters and the 1st and last 3 parameters are right and the same for both natives. + */ + export function setDrivebyTaskTarget(shootingPed: Ped | Player | number, targetPed: Ped | Player | number, targetVehicle: Vehicle | number, x: number, y: number, z: number): void; + + export function clearDrivebyTaskUnderneathDrivingTask(ped: Ped | Player | number): void; + + export function isDrivebyTaskUnderneathDrivingTask(ped: Ped | Player | number): boolean; + + /** + * Forces the ped to use the mounted weapon. + * Returns false if task is not possible. + */ + export function controlMountedWeapon(ped: Ped | Player | number): boolean; + + /** + * Note: Look in decompiled scripts and the times that p1 and p2 aren't 0. They are filled with vars. If you look through out that script what other natives those vars are used in, you can tell p1 is a ped and p2 is a vehicle. Which most likely means if you want the mounted weapon to target a ped set targetVehicle to 0 or vice-versa. + */ + export function setMountedWeaponTarget(shootingPed: Ped | Player | number, targetPed: Ped | Player | number, targetVehicle: Vehicle | number, x: number, y: number, z: number, taskMode: number, ignoreTargetVehDeadCheck: boolean): void; + + export function isMountedWeaponTaskUnderneathDrivingTask(ped: Ped | Player | number): boolean; + + /** + * Actually has 3 params, not 2. + * p0: Ped + * p1: int (or bool?) + * p2: int + */ + export function taskUseMobilePhone(ped: Ped | Player | number, usePhone: boolean, desiredPhoneMode: number): void; + + export function taskUseMobilePhoneTimed(ped: Ped | Player | number, duration: number): void; + + /** + * p2 tend to be 16, 17 or 1 + * p3 to p7 tend to be 0.0 + */ + export function taskChatToPed(ped: Ped | Player | number, target: Ped | Player | number, flags: number, goToLocationX: number, goToLocationY: number, goToLocationZ: number, headingDegs: number, idleTime: number): void; + + /** + * Seat Numbers + * ------------------------------- + * Driver = -1 + * Any = -2 + * Left-Rear = 1 + * Right-Front = 0 + * Right-Rear = 2 + * Extra seats = 3-14(This may differ from vehicle type e.g. Firetruck Rear Stand, Ambulance Rear) + */ + export function taskWarpPedIntoVehicle(ped: Ped | Player | number, vehicle: Vehicle | number, seat: number): void; + + /** + * //this part of the code is to determine at which entity the player is aiming, for example if you want to create a mod where you give orders to peds + * Entity aimedentity; + * Player player = PLAYER::PLAYER_ID(); + * PLAYER::_GET_AIMED_ENTITY(player, &aimedentity); + * //bg is an array of peds + * TASK::TASK_SHOOT_AT_ENTITY(bg[i], aimedentity, 5000, MISC::GET_HASH_KEY("FIRING_PATTERN_FULL_AUTO")); + * in practical usage, getting the entity the player is aiming at and then task the peds to shoot at the entity, at a button press event would be better. + * Firing Pattern Hash Information: https://pastebin.com/Px036isB + */ export function taskShootAtEntity(entity: Entity | number, target: Entity | number, duration: number, firingPattern: number): void; /** - * Climbs or vaults the nearest thing. - * @param usePlayerLaunchForce is unused. - */ - export function taskClimb(ped: Player | number, usePlayerLaunchForce: boolean): void; + * Climbs or vaults the nearest thing. + * usePlayerLaunchForce is unused. + */ + export function taskClimb(ped: Ped | Player | number, usePlayerLaunchForce: boolean): void; - export function taskClimbLadder(ped: Player | number, fast: boolean): void; + export function taskClimbLadder(ped: Ped | Player | number, fast: boolean): void; /** - * Attaches a ped to a rope and allows player control to rappel down a wall. Disables all collisions while on the rope. - * @param p10 Usually 1 in the scripts, clipSet: Clipset to use for the task, minZ: Minimum Z that the player can descend to, ropeHandle: Rope to attach this task to created with ADD_ROPE - */ - export function taskRappelDownWallUsingClipsetOverride(ped: Player | number, x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, minZ: number, ropeHandle: number, clipSet: string | null, p10: any): void; + * Attaches a ped to a rope and allows player control to rappel down a wall. Disables all collisions while on the rope. + * p10: Usually 1 in the scripts, clipSet: Clipset to use for the task, minZ: Minimum Z that the player can descend to, ropeHandle: Rope to attach this task to created with ADD_ROPE + */ + export function taskRappelDownWallUsingClipsetOverride(ped: Ped | Player | number, x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, minZ: number, ropeHandle: number, clipSet: string, p10: any, p11: any): void; - export function getTaskRappelDownWallState(ped: Player | number): number; + export function getTaskRappelDownWallState(ped: Ped | Player | number): number; /** - * Immediately stops the pedestrian from whatever it's doing. They stop fighting, animations, etc. they forget what they were doing. - */ - export function clearPedTasksImmediately(ped: Player | number): void; + * Immediately stops the pedestrian from whatever it's doing. They stop fighting, animations, etc. they forget what they were doing. + */ + export function clearPedTasksImmediately(ped: Ped | Player | number): void; - export function taskPerformSequenceFromProgress(ped: Player | number, taskIndex: number, progress1: number, progress2: number): void; + export function taskPerformSequenceFromProgress(ped: Ped | Player | number, taskIndex: number, progress1: number, progress2: number): void; /** - * This native does absolutely nothing, just a nullsub - * R* Comment: - * SET_NEXT_DESIRED_MOVE_STATE - Function is deprecated - do not use anymore - */ + * This native does absolutely nothing, just a nullsub + * R* Comment: + * SET_NEXT_DESIRED_MOVE_STATE - Function is deprecated - do not use anymore + */ export function setNextDesiredMoveState(nextMoveState: number): void; - export function setPedDesiredMoveBlendRatio(ped: Player | number, newMoveBlendRatio: number): void; + export function setPedDesiredMoveBlendRatio(ped: Ped | Player | number, newMoveBlendRatio: number): void; - export function getPedDesiredMoveBlendRatio(ped: Player | number): number; + export function getPedDesiredMoveBlendRatio(ped: Ped | Player | number): number; /** - * eg - * TASK::TASK_GOTO_ENTITY_AIMING(v_2, PLAYER::PLAYER_PED_ID(), 5.0, 25.0); - * @param ped = Ped you want to perform this task. - * @param target = the Entity they should aim at. - * @param distanceToStopAt = distance from the target, where the ped should stop to aim. - * @param StartAimingDist = distance where the ped should start to aim. - */ - export function taskGotoEntityAiming(ped: Player | number, target: Entity | number, distanceToStopAt: number, StartAimingDist: number): void; + * eg + * TASK::TASK_GOTO_ENTITY_AIMING(v_2, PLAYER::PLAYER_PED_ID(), 5.0, 25.0); + * ped = Ped you want to perform this task. + * target = the Entity they should aim at. + * distanceToStopAt = distance from the target, where the ped should stop to aim. + * StartAimingDist = distance where the ped should start to aim. + */ + export function taskGotoEntityAiming(ped: Ped | Player | number, target: Entity | number, distanceToStopAt: number, StartAimingDist: number): void; /** - * @param decisionMakerId is always GET_HASH_KEY("empty") in scripts, for the rare times this is used - */ - export function taskSetDecisionMaker(ped: Player | number, decisionMakerId: number): void; + * p1 is always GET_HASH_KEY("empty") in scripts, for the rare times this is used + */ + export function taskSetDecisionMaker(ped: Ped | Player | number, decisionMakerId: number): void; - export function taskSetSphereDefensiveArea(ped: Player | number, x: number, y: number, z: number, radius: number): void; + export function taskSetSphereDefensiveArea(ped: Ped | Player | number, x: number, y: number, z: number, radius: number): void; - export function taskClearDefensiveArea(ped: Player | number): void; + export function taskClearDefensiveArea(ped: Ped | Player | number): void; - export function taskPedSlideToCoord(ped: Player | number, x: number, y: number, z: number, heading: number, speed: number): void; + export function taskPedSlideToCoord(ped: Ped | Player | number, x: number, y: number, z: number, heading: number, speed: number): void; - export function taskPedSlideToCoordHdgRate(ped: Player | number, x: number, y: number, z: number, heading: number, speed: number, headingChangeRate: number): void; + export function taskPedSlideToCoordHdgRate(ped: Ped | Player | number, x: number, y: number, z: number, heading: number, speed: number, headingChangeRate: number): void; export function addCoverPoint(x: number, y: number, z: number, direction: number, usage: number, height: number, arc: number, isPriority: boolean): number; export function removeCoverPoint(coverpoint: number): void; /** - * Checks if there is a cover point at position - */ + * Checks if there is a cover point at position + */ export function doesScriptedCoverPointExistAtCoords(x: number, y: number, z: number): boolean; export function getScriptedCoverPointCoords(coverpoint: number): Vector3; @@ -19385,80 +21707,82 @@ declare module "natives" { export function addScriptedCoverArea(x: number, y: number, z: number, radius: number): void; /** - * Makes the specified ped attack the target ped. - * @param combatFlags should be 0 - * @param threatResponseFlags should be 16 - */ - export function taskCombatPed(ped: Player | number, targetPed: Player | number, combatFlags: number, threatResponseFlags: number): void; + * Makes the specified ped attack the target ped. + * p2 should be 0 + * p3 should be 16 + */ + export function taskCombatPed(ped: Ped | Player | number, targetPed: Ped | Player | number, combatFlags: number, threatResponseFlags: number): void; - export function taskCombatPedTimed(ped: Player | number, target: Player | number, time: number, flags: number): void; + export function taskCombatPedTimed(ped: Ped | Player | number, target: Ped | Player | number, time: number, flags: number): void; - export function taskSeekCoverFromPos(ped: Player | number, x: number, y: number, z: number, duration: number, allowPeekingAndFiring: boolean): void; + export function taskSeekCoverFromPos(ped: Ped | Player | number, x: number, y: number, z: number, duration: number, allowPeekingAndFiring: boolean): void; - export function taskSeekCoverFromPed(ped: Player | number, target: Player | number, duration: number, allowPeekingAndFiring: boolean): void; + export function taskSeekCoverFromPed(ped: Ped | Player | number, target: Ped | Player | number, duration: number, allowPeekingAndFiring: boolean): void; /** - * @param time is always -1 - */ - export function taskSeekCoverToCoverPoint(ped: Player | number, coverpoint: number, x: number, y: number, z: number, time: number, allowPeekingAndFiring: boolean): void; + * p5 is always -1 + */ + export function taskSeekCoverToCoverPoint(ped: Ped | Player | number, coverpoint: number, x: number, y: number, z: number, time: number, allowPeekingAndFiring: boolean): void; /** - * from michael2: - * appears to be shorter variation - * from michael3: - * TASK::TASK_SEEK_COVER_TO_COORDS(ped, -2231.011474609375, 263.6326599121094, 173.60195922851562, -1, 0); - * @param shortRoute causes the ped to take the shortest route to the cover position. It may have something to do with navmesh or pathfinding mechanics. - */ - export function taskSeekCoverToCoords(ped: Player | number, x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, timeout: number, shortRoute: boolean): void; + * p8 causes the ped to take the shortest route to the cover position. It may have something to do with navmesh or pathfinding mechanics. + * from michael2: + * TASK::TASK_SEEK_COVER_TO_COORDS(ped, 967.5164794921875, -2121.603515625, 30.479299545288086, 978.94677734375, -2125.84130859375, 29.4752, -1, 1); + * appears to be shorter variation + * from michael3: + * TASK::TASK_SEEK_COVER_TO_COORDS(ped, -2231.011474609375, 263.6326599121094, 173.60195922851562, -1, 0); + */ + export function taskSeekCoverToCoords(ped: Ped | Player | number, x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, timeout: number, shortRoute: boolean): void; - export function taskPutPedDirectlyIntoCover(ped: Player | number, x: number, y: number, z: number, time: number, allowPeekingAndFiring: boolean, blendInDuration: number, forceInitialFacingDirection: boolean, forceFaceLeft: boolean, identifier: number, doEntry: boolean): void; + export function taskPutPedDirectlyIntoCover(ped: Ped | Player | number, x: number, y: number, z: number, time: number, allowPeekingAndFiring: boolean, blendInDuration: number, forceInitialFacingDirection: boolean, forceFaceLeft: boolean, identifier: number, doEntry: boolean): void; - export function taskWarpPedDirectlyIntoCover(ped: Player | number, time: number, allowPeekingAndFiring: boolean, forceInitialFacingDirection: boolean, forceFaceLeft: boolean, identifier: number): void; + export function taskWarpPedDirectlyIntoCover(ped: Ped | Player | number, time: number, allowPeekingAndFiring: boolean, forceInitialFacingDirection: boolean, forceFaceLeft: boolean, identifier: number): void; /** - * @param exitType is 1, 2, or 3 in scripts - */ - export function taskExitCover(ped: Player | number, exitType: number, x: number, y: number, z: number): void; + * p1 is 1, 2, or 3 in scripts + */ + export function taskExitCover(ped: Ped | Player | number, exitType: number, x: number, y: number, z: number): void; /** - * from armenian3.c4 - */ - export function taskPutPedDirectlyIntoMelee(ped: Player | number, meleeTarget: Player | number, blendInDuration: number, timeInMelee: number, strafePhaseSync: number, aiCombatFlags: number): void; + * from armenian3.c4 + * TASK::TASK_PUT_PED_DIRECTLY_INTO_MELEE(PlayerPed, armenianPed, 0.0, -1.0, 0.0, 0); + */ + export function taskPutPedDirectlyIntoMelee(ped: Ped | Player | number, meleeTarget: Ped | Player | number, blendInDuration: number, timeInMelee: number, strafePhaseSync: number, aiCombatFlags: number): void; /** - * used in sequence task - * both parameters seems to be always 0 - */ - export function taskToggleDuck(ped: Player | number, toggleType: number): void; + * used in sequence task + * both parameters seems to be always 0 + */ + export function taskToggleDuck(ped: Ped | Player | number, toggleType: number): void; /** - * From re_prisonvanbreak: - * TASK::TASK_GUARD_CURRENT_POSITION(l_DD, 35.0, 35.0, 1); - */ - export function taskGuardCurrentPosition(ped: Player | number, maxPatrolProximity: number, defensiveAreaRadius: number, setDefensiveArea: boolean): void; + * From re_prisonvanbreak: + * TASK::TASK_GUARD_CURRENT_POSITION(l_DD, 35.0, 35.0, 1); + */ + export function taskGuardCurrentPosition(ped: Ped | Player | number, maxPatrolProximity: number, defensiveAreaRadius: number, setDefensiveArea: boolean): void; - export function taskGuardAssignedDefensiveArea(ped: Player | number, x: number, y: number, z: number, heading: number, maxPatrolProximity: number, timer: number): void; + export function taskGuardAssignedDefensiveArea(ped: Ped | Player | number, x: number, y: number, z: number, heading: number, maxPatrolProximity: number, timer: number): void; - export function taskGuardSphereDefensiveArea(ped: Player | number, defendPositionX: number, defendPositionY: number, defendPositionZ: number, heading: number, maxPatrolProximity: number, time: number, x: number, y: number, z: number, defensiveAreaRadius: number): void; + export function taskGuardSphereDefensiveArea(ped: Ped | Player | number, defendPositionX: number, defendPositionY: number, defendPositionZ: number, heading: number, maxPatrolProximity: number, time: number, x: number, y: number, z: number, defensiveAreaRadius: number): void; /** - * @param scenarioName example: "WORLD_HUMAN_GUARD_STAND" - */ - export function taskStandGuard(ped: Player | number, x: number, y: number, z: number, heading: number, scenarioName: string | null): void; + * scenarioName example: "WORLD_HUMAN_GUARD_STAND" + */ + export function taskStandGuard(ped: Ped | Player | number, x: number, y: number, z: number, heading: number, scenarioName: string): void; - export function setDriveTaskCruiseSpeed(driver: Player | number, cruiseSpeed: number): void; + export function setDriveTaskCruiseSpeed(driver: Ped | Player | number, cruiseSpeed: number): void; - export function setDriveTaskMaxCruiseSpeed(ped: Player | number, speed: number): void; + export function setDriveTaskMaxCruiseSpeed(ped: Ped | Player | number, speed: number): void; /** - * This native is used to set the driving style for specific ped. - * Driving styles id seems to be: - * 786468 - * 262144 - * 786469 - * http://gtaforums.com/topic/822314-guide-driving-styles/ - */ - export function setDriveTaskDrivingStyle(ped: Player | number, drivingStyle: number): void; + * This native is used to set the driving style for specific ped. + * Driving styles id seems to be: + * 786468 + * 262144 + * 786469 + * http://gtaforums.com/topic/822314-guide-driving-styles/ + */ + export function setDriveTaskDrivingStyle(ped: Ped | Player | number, drivingStyle: number): void; export function addCoverBlockingArea(startX: number, startY: number, startZ: number, endX: number, endY: number, endZ: number, blockObjects: boolean, blockVehicles: boolean, blockMap: boolean, blockPlayer: boolean): void; @@ -19469,402 +21793,516 @@ declare module "natives" { export function removeSpecificCoverBlockingAreas(startX: number, startY: number, startZ: number, endX: number, endY: number, endZ: number, blockObjects: boolean, blockVehicles: boolean, blockMap: boolean, blockPlayer: boolean): void; /** - * Plays a scenario on a Ped at their current location. - * ---- - * From "am_hold_up.ysc.c4" at line 339: - * TASK::TASK_START_SCENARIO_IN_PLACE(NETWORK::NET_TO_PED(l_8D._f4), sub_adf(), 0, 1); - * WORLD_HUMAN_SMOKING - * WORLD_HUMAN_HANG_OUT_STREET - * WORLD_HUMAN_STAND_MOBILE - * This makes sense, as these are what I commonly see when going by a liquor store. - * ------------------------- - * See NativeDB for reference: http://natives.altv.mp/#/0x142A02425FF02BD9 - * @param unkDelay - Usually 0 or -1, doesn't seem to have any effect. Might be a delay between sequences. - * @param playEnterAnim - Plays the "Enter" anim if true, otherwise plays the "Exit" anim. Scenarios that don't have any "Enter" anims won't play if this is set to true. - * @returns I'm unsure of what the last two parameters are, however sub_adf() randomly returns 1 of 3 scenarios, those being: - */ - export function taskStartScenarioInPlace(ped: Player | number, scenarioName: string | null, unkDelay: number, playEnterAnim: boolean): void; - - /** - * Full list of ped scenarios by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenariosCompact.json - * Also a few more listed at TASK::TASK_START_SCENARIO_IN_PLACE just above. - * --------------- - * The first parameter in every scenario has always been a Ped of some sort. The second like TASK_START_SCENARIO_IN_PLACE is the name of the scenario. - * The next 4 parameters were harder to decipher. After viewing "hairdo_shop_mp.ysc.c4", and being confused from seeing the case in other scripts, they passed the first three of the arguments as one array from a function, and it looked like it was obviously x, y, and z. - * I haven't seen the sixth parameter go to or over 360, making me believe that it is rotation, but I really can't confirm anything. - * I have no idea what the last 3 parameters are, but I'll try to find out. - * -going on the last 3 parameters, they appear to always be "0, 0, 1" - * @param duration -1 also used in scrips - * @param sittingScenario used for sitting scenarios - * @param teleport teleports ped to position - */ - export function taskStartScenarioAtPosition(ped: Player | number, scenarioName: string | null, x: number, y: number, z: number, heading: number, duration: number, sittingScenario: boolean, teleport: boolean): void; - - /** - * Updated variables - * An alternative to TASK::TASK_USE_NEAREST_SCENARIO_TO_COORD_WARP. Makes the ped walk to the scenario instead. - */ - export function taskUseNearestScenarioToCoord(ped: Player | number, x: number, y: number, z: number, distance: number, duration: number): void; - - export function taskUseNearestScenarioToCoordWarp(ped: Player | number, x: number, y: number, z: number, radius: number, timeToLeave: number): void; - - /** - * @param timeToLeave is always 0 in scripts - */ - export function taskUseNearestScenarioChainToCoord(ped: Player | number, x: number, y: number, z: number, maxRange: number, timeToLeave: number): void; - - /** - * @param timeToLeave is always -1 or 0 in scripts - */ - export function taskUseNearestScenarioChainToCoordWarp(ped: Player | number, x: number, y: number, z: number, radius: number, timeToLeave: number): void; + * Plays a scenario on a Ped at their current location. + * unkDelay - Usually 0 or -1, doesn't seem to have any effect. Might be a delay between sequences. + * playEnterAnim - Plays the "Enter" anim if true, otherwise plays the "Exit" anim. Scenarios that don't have any "Enter" anims won't play if this is set to true. + * ---- + * From "am_hold_up.ysc.c4" at line 339: + * TASK::TASK_START_SCENARIO_IN_PLACE(NETWORK::NET_TO_PED(l_8D._f4), sub_adf(), 0, 1); + * I'm unsure of what the last two parameters are, however sub_adf() randomly returns 1 of 3 scenarios, those being: + * WORLD_HUMAN_SMOKING + * WORLD_HUMAN_HANG_OUT_STREET + * WORLD_HUMAN_STAND_MOBILE + * This makes sense, as these are what I commonly see when going by a liquor store. + * ------------------------- + * List of scenarioNames: https://pastebin.com/6mrYTdQv + * (^ Thank you so fucking much for this) + * Also these: + * WORLD_FISH_FLEE + * DRIVE + * WORLD_HUMAN_HIKER + * WORLD_VEHICLE_ATTRACTOR + * WORLD_VEHICLE_BICYCLE_MOUNTAIN + * WORLD_VEHICLE_BIKE_OFF_ROAD_RACE + * WORLD_VEHICLE_BIKER + * WORLD_VEHICLE_CONSTRUCTION_PASSENGERS + * WORLD_VEHICLE_CONSTRUCTION_SOLO + * WORLD_VEHICLE_DRIVE_PASSENGERS + * WORLD_VEHICLE_DRIVE_SOLO + * WORLD_VEHICLE_EMPTY + * WORLD_VEHICLE_PARK_PARALLEL + * WORLD_VEHICLE_PARK_PERPENDICULAR_NOSE_IN + * WORLD_VEHICLE_POLICE_BIKE + * WORLD_VEHICLE_POLICE_CAR + * WORLD_VEHICLE_POLICE_NEXT_TO_CAR + * WORLD_VEHICLE_SALTON_DIRT_BIKE + * WORLD_VEHICLE_TRUCK_LOGS + * Full list of ped scenarios by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenariosCompact.json + */ + export function taskStartScenarioInPlace(ped: Ped | Player | number, scenarioName: string, unkDelay: number, playEnterAnim: boolean): void; + + /** + * Full list of ped scenarios by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenariosCompact.json + * Also a few more listed at TASK::TASK_START_SCENARIO_IN_PLACE just above. + * --------------- + * The first parameter in every scenario has always been a Ped of some sort. The second like TASK_START_SCENARIO_IN_PLACE is the name of the scenario. + * The next 4 parameters were harder to decipher. After viewing "hairdo_shop_mp.ysc.c4", and being confused from seeing the case in other scripts, they passed the first three of the arguments as one array from a function, and it looked like it was obviously x, y, and z. + * I haven't seen the sixth parameter go to or over 360, making me believe that it is rotation, but I really can't confirm anything. + * I have no idea what the last 3 parameters are, but I'll try to find out. + * -going on the last 3 parameters, they appear to always be "0, 0, 1" + * p6 -1 also used in scrips + * p7 used for sitting scenarios + * p8 teleports ped to position + */ + export function taskStartScenarioAtPosition(ped: Ped | Player | number, scenarioName: string, x: number, y: number, z: number, heading: number, duration: number, sittingScenario: boolean, teleport: boolean): void; + + /** + * Updated variables + * An alternative to TASK::TASK_USE_NEAREST_SCENARIO_TO_COORD_WARP. Makes the ped walk to the scenario instead. + */ + export function taskUseNearestScenarioToCoord(ped: Ped | Player | number, x: number, y: number, z: number, distance: number, duration: number): void; + + export function taskUseNearestScenarioToCoordWarp(ped: Ped | Player | number, x: number, y: number, z: number, radius: number, timeToLeave: number): void; + + /** + * p5 is always 0 in scripts + */ + export function taskUseNearestScenarioChainToCoord(ped: Ped | Player | number, x: number, y: number, z: number, maxRange: number, timeToLeave: number): void; + + /** + * p5 is always -1 or 0 in scripts + */ + export function taskUseNearestScenarioChainToCoordWarp(ped: Ped | Player | number, x: number, y: number, z: number, radius: number, timeToLeave: number): void; export function doesScenarioExistInArea(x: number, y: number, z: number, radius: number, mustBeFree: boolean): boolean; - export function doesScenarioOfTypeExistInArea(x: number, y: number, z: number, scenarioName: string | null, radius: number, mustBeFree: boolean): boolean; + export function doesScenarioOfTypeExistInArea(x: number, y: number, z: number, scenarioName: string, radius: number, mustBeFree: boolean): boolean; export function isScenarioOccupied(x: number, y: number, z: number, maxRange: number, onlyUsersActuallyAtScenario: boolean): boolean; - export function pedHasUseScenarioTask(ped: Player | number): boolean; - - /** - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - */ - export function playAnimOnRunningScenario(ped: Player | number, animDict: string | null, animName: string | null): void; - - /** - * Full list of scenario groups used in scripts by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenarioGroupNames.json - * Occurrences in the b617d scripts: - * "ARMY_GUARD", - * "ARMY_HELI", - * "Cinema_Downtown", - * "Cinema_Morningwood", - * "Cinema_Textile", - * "City_Banks", - * "Countryside_Banks", - * See NativeDB for reference: http://natives.altv.mp/#/0xF9034C136C9E00D3 - */ - export function doesScenarioGroupExist(scenarioGroup: string | null): boolean; - - /** - * Full list of scenario groups used in scripts by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenarioGroupNames.json - * Occurrences in the b617d scripts: - * "ARMY_GUARD", - * "ARMY_HELI", - * "BLIMP", - * "Cinema_Downtown", - * "Cinema_Morningwood", - * "Cinema_Textile", - * "City_Banks", - * See NativeDB for reference: http://natives.altv.mp/#/0x367A09DED4E05B99 - */ - export function isScenarioGroupEnabled(scenarioGroup: string | null): boolean; - - /** - * Full list of scenario groups used in scripts by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenarioGroupNames.json - * Occurrences in the b617d scripts: https://pastebin.com/Tvg2PRHU - */ - export function setScenarioGroupEnabled(scenarioGroup: string | null, enabled: boolean): void; + export function pedHasUseScenarioTask(ped: Ped | Player | number): boolean; + + /** + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function playAnimOnRunningScenario(ped: Ped | Player | number, animDict: string, animName: string): void; + + /** + * Full list of scenario groups used in scripts by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenarioGroupNames.json + * Occurrences in the b617d scripts: + * "ARMY_GUARD", + * "ARMY_HELI", + * "Cinema_Downtown", + * "Cinema_Morningwood", + * "Cinema_Textile", + * "City_Banks", + * "Countryside_Banks", + * "DEALERSHIP", + * "GRAPESEED_PLANES", + * "KORTZ_SECURITY", + * "LOST_BIKERS", + * "LSA_Planes", + * "LSA_Planes", + * "MP_POLICE", + * "Observatory_Bikers", + * "POLICE_POUND1", + * "POLICE_POUND2", + * "POLICE_POUND3", + * "POLICE_POUND4", + * "POLICE_POUND5" + * "QUARRY", + * "SANDY_PLANES", + * "SCRAP_SECURITY", + * "SEW_MACHINE", + * "SOLOMON_GATE", + * "Triathlon_1_Start", + * "Triathlon_2_Start", + * "Triathlon_3_Start" + * Sometimes used with IS_SCENARIO_GROUP_ENABLED: + * if (TASK::DOES_SCENARIO_GROUP_EXIST("Observatory_Bikers") && (!TASK::IS_SCENARIO_GROUP_ENABLED("Observatory_Bikers"))) { + * else if (TASK::IS_SCENARIO_GROUP_ENABLED("BLIMP")) { + */ + export function doesScenarioGroupExist(scenarioGroup: string): boolean; + + /** + * Full list of scenario groups used in scripts by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenarioGroupNames.json + * Occurrences in the b617d scripts: + * "ARMY_GUARD", + * "ARMY_HELI", + * "BLIMP", + * "Cinema_Downtown", + * "Cinema_Morningwood", + * "Cinema_Textile", + * "City_Banks", + * "Countryside_Banks", + * "DEALERSHIP", + * "KORTZ_SECURITY", + * "LSA_Planes", + * "MP_POLICE", + * "Observatory_Bikers", + * "POLICE_POUND1", + * "POLICE_POUND2", + * "POLICE_POUND3", + * "POLICE_POUND4", + * "POLICE_POUND5", + * "Rampage1", + * "SANDY_PLANES", + * "SCRAP_SECURITY", + * "SEW_MACHINE", + * "SOLOMON_GATE" + * Sometimes used with DOES_SCENARIO_GROUP_EXIST: + * if (TASK::DOES_SCENARIO_GROUP_EXIST("Observatory_Bikers") && (!TASK::IS_SCENARIO_GROUP_ENABLED("Observatory_Bikers"))) { + * else if (TASK::IS_SCENARIO_GROUP_ENABLED("BLIMP")) { + */ + export function isScenarioGroupEnabled(scenarioGroup: string): boolean; + + /** + * Full list of scenario groups used in scripts by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenarioGroupNames.json + * Occurrences in the b617d scripts: https://pastebin.com/Tvg2PRHU + */ + export function setScenarioGroupEnabled(scenarioGroup: string, enabled: boolean): void; export function resetScenarioGroupsEnabled(): void; /** - * Full list of scenario groups used in scripts by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenarioGroupNames.json - * Groups found in the scripts used with this native: - * "AMMUNATION", - * "QUARRY", - * "Triathlon_1", - * "Triathlon_2", - * "Triathlon_3" - */ - export function setExclusiveScenarioGroup(scenarioGroup: string | null): void; + * Full list of scenario groups used in scripts by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenarioGroupNames.json + * Groups found in the scripts used with this native: + * "AMMUNATION", + * "QUARRY", + * "Triathlon_1", + * "Triathlon_2", + * "Triathlon_3" + */ + export function setExclusiveScenarioGroup(scenarioGroup: string): void; export function resetExclusiveScenarioGroup(): void; /** - * Full list of scenario types used in scripts by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenariosCompact.json - * Occurrences in the b617d scripts: - * "PROP_HUMAN_SEAT_CHAIR", - * "WORLD_HUMAN_DRINKING", - * "WORLD_HUMAN_HANG_OUT_STREET", - * "WORLD_HUMAN_SMOKING", - * "WORLD_MOUNTAIN_LION_WANDER", - * "WORLD_HUMAN_DRINKING" - * Sometimes used together with MISC::IS_STRING_NULL_OR_EMPTY in the scripts. - * @param scenarioType could be the same as scenarioName, used in for example TASK::TASK_START_SCENARIO_AT_POSITION. - */ - export function isScenarioTypeEnabled(scenarioType: string | null): boolean; - - /** - * Full list of scenario types used in scripts by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenariosCompact.json - * seems to enable/disable specific scenario-types from happening in the game world. - * Here are some scenario types from the scripts: - * "WORLD_MOUNTAIN_LION_REST" - * "WORLD_MOUNTAIN_LION_WANDER" - * "DRIVE" - * "WORLD_VEHICLE_POLICE_BIKE" - * "WORLD_VEHICLE_POLICE_CAR" - * "WORLD_VEHICLE_POLICE_NEXT_TO_CAR" - * See NativeDB for reference: http://natives.altv.mp/#/0xEB47EC4E34FB7EE1 - * @param scenarioType could be the same as scenarioName, used in for example TASK::TASK_START_SCENARIO_AT_POSITION. - */ - export function setScenarioTypeEnabled(scenarioType: string | null, toggle: boolean): void; + * Full list of scenario types used in scripts by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenariosCompact.json + * Occurrences in the b617d scripts: + * "PROP_HUMAN_SEAT_CHAIR", + * "WORLD_HUMAN_DRINKING", + * "WORLD_HUMAN_HANG_OUT_STREET", + * "WORLD_HUMAN_SMOKING", + * "WORLD_MOUNTAIN_LION_WANDER", + * "WORLD_HUMAN_DRINKING" + * Sometimes used together with MISC::IS_STRING_NULL_OR_EMPTY in the scripts. + * scenarioType could be the same as scenarioName, used in for example TASK::TASK_START_SCENARIO_AT_POSITION. + */ + export function isScenarioTypeEnabled(scenarioType: string): boolean; + + /** + * Full list of scenario types used in scripts by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenariosCompact.json + * seems to enable/disable specific scenario-types from happening in the game world. + * Here are some scenario types from the scripts: + * "WORLD_MOUNTAIN_LION_REST" + * "WORLD_MOUNTAIN_LION_WANDER" + * "DRIVE" + * "WORLD_VEHICLE_POLICE_BIKE" + * "WORLD_VEHICLE_POLICE_CAR" + * "WORLD_VEHICLE_POLICE_NEXT_TO_CAR" + * "WORLD_VEHICLE_DRIVE_SOLO" + * "WORLD_VEHICLE_BIKER" + * "WORLD_VEHICLE_DRIVE_PASSENGERS" + * "WORLD_VEHICLE_SALTON_DIRT_BIKE" + * "WORLD_VEHICLE_BICYCLE_MOUNTAIN" + * "PROP_HUMAN_SEAT_CHAIR" + * "WORLD_VEHICLE_ATTRACTOR" + * "WORLD_HUMAN_LEANING" + * "WORLD_HUMAN_HANG_OUT_STREET" + * "WORLD_HUMAN_DRINKING" + * "WORLD_HUMAN_SMOKING" + * "WORLD_HUMAN_GUARD_STAND" + * "WORLD_HUMAN_CLIPBOARD" + * "WORLD_HUMAN_HIKER" + * "WORLD_VEHICLE_EMPTY" + * "WORLD_VEHICLE_BIKE_OFF_ROAD_RACE" + * "WORLD_HUMAN_PAPARAZZI" + * "WORLD_VEHICLE_PARK_PERPENDICULAR_NOSE_IN" + * "WORLD_VEHICLE_PARK_PARALLEL" + * "WORLD_VEHICLE_CONSTRUCTION_SOLO" + * "WORLD_VEHICLE_CONSTRUCTION_PASSENGERS" + * "WORLD_VEHICLE_TRUCK_LOGS" + * scenarioType could be the same as scenarioName, used in for example TASK::TASK_START_SCENARIO_AT_POSITION. + */ + export function setScenarioTypeEnabled(scenarioType: string, toggle: boolean): void; export function resetScenarioTypesEnabled(): void; - export function isPedActiveInScenario(ped: Player | number): boolean; + export function isPedActiveInScenario(ped: Ped | Player | number): boolean; /** - * Used only once (am_mp_property_int) - * Related to CTaskAmbientClips. - * @param ped was PLAYER_PED_ID() - */ - export function isPedPlayingBaseClipInScenario(ped: Player | number): boolean; + * Used only once (am_mp_property_int) + * ped was PLAYER_PED_ID() + * Related to CTaskAmbientClips. + */ + export function isPedPlayingBaseClipInScenario(ped: Ped | Player | number): boolean; /** - * Appears only in fm_mission_controller and used only 3 times. - * @param ped was always PLAYER_PED_ID() - * @param blockIdleClips was always true - * @param removeIdleClipIfPlaying was always true - */ - export function setPedCanPlayAmbientIdles(ped: Player | number, blockIdleClips: boolean, removeIdleClipIfPlaying: boolean): void; + * Appears only in fm_mission_controller and used only 3 times. + * ped was always PLAYER_PED_ID() + * p1 was always true + * p2 was always true + */ + export function setPedCanPlayAmbientIdles(ped: Ped | Player | number, blockIdleClips: boolean, removeIdleClipIfPlaying: boolean): void; /** - * Despite its name, it only attacks ONE hated target. The one closest to the specified position. - */ - export function taskCombatHatedTargetsInArea(ped: Player | number, x: number, y: number, z: number, radius: number, combatFlags: number): void; + * Despite its name, it only attacks ONE hated target. The one closest to the specified position. + */ + export function taskCombatHatedTargetsInArea(ped: Ped | Player | number, x: number, y: number, z: number, radius: number, combatFlags: number): void; /** - * Despite its name, it only attacks ONE hated target. The one closest hated target. - * @param combatFlags seems to be always 0 - */ - export function taskCombatHatedTargetsAroundPed(ped: Player | number, radius: number, combatFlags: number): void; + * Despite its name, it only attacks ONE hated target. The one closest hated target. + * p2 seems to be always 0 + */ + export function taskCombatHatedTargetsAroundPed(ped: Ped | Player | number, radius: number, combatFlags: number): void; - export function taskCombatHatedTargetsAroundPedTimed(ped: Player | number, radius: number, time: number, combatFlags: number): void; + export function taskCombatHatedTargetsAroundPedTimed(ped: Ped | Player | number, radius: number, time: number, combatFlags: number): void; /** - * In every case of this native, I've only seen the first parameter passed as 0, although I believe it's a Ped after seeing tasks around it using 0. That's because it's used in a Sequence Task. - * The last 3 parameters are definitely coordinates after seeing them passed in other scripts, and even being used straight from the player's coordinates. - * --- - * It seems that - in the decompiled scripts - this native was used on a ped who was in a vehicle to throw a projectile out the window at the player. This is something any ped will naturally do if they have a throwable and they are doing driveby-combat (although not very accurately). - * It is possible, however, that this is how SWAT throws smoke grenades at the player when in cover. - * ---------------------------------------------------- - * The first comment is right it definately is the ped as if you look in script finale_heist2b.c line 59628 in Xbox Scripts atleast you will see task_throw_projectile and the first param is Local_559[2 <14>] if you look above it a little bit line 59622 give_weapon_to_ped uses the same exact param Local_559[2 <14>] and we all know the first param of that native is ped. So it guaranteed has to be ped. 0 just may mean to use your ped by default for some reason. - */ - export function taskThrowProjectile(ped: Player | number, x: number, y: number, z: number, ignoreCollisionEntityIndex: number, createInvincibleProjectile: boolean): void; + * In every case of this native, I've only seen the first parameter passed as 0, although I believe it's a Ped after seeing tasks around it using 0. That's because it's used in a Sequence Task. + * The last 3 parameters are definitely coordinates after seeing them passed in other scripts, and even being used straight from the player's coordinates. + * --- + * It seems that - in the decompiled scripts - this native was used on a ped who was in a vehicle to throw a projectile out the window at the player. This is something any ped will naturally do if they have a throwable and they are doing driveby-combat (although not very accurately). + * It is possible, however, that this is how SWAT throws smoke grenades at the player when in cover. + * ---------------------------------------------------- + * The first comment is right it definately is the ped as if you look in script finale_heist2b.c line 59628 in Xbox Scripts atleast you will see task_throw_projectile and the first param is Local_559[2 <14>] if you look above it a little bit line 59622 give_weapon_to_ped uses the same exact param Local_559[2 <14>] and we all know the first param of that native is ped. So it guaranteed has to be ped. 0 just may mean to use your ped by default for some reason. + */ + export function taskThrowProjectile(ped: Ped | Player | number, x: number, y: number, z: number, ignoreCollisionEntityIndex: number, createInvincibleProjectile: boolean): void; - export function taskSwapWeapon(ped: Player | number, drawWeapon: boolean): void; + export function taskSwapWeapon(ped: Ped | Player | number, drawWeapon: boolean): void; /** - * The 2nd param (drawWeapon) is not implemented. - * ----------------------------------------------------------------------- - * The only occurrence I found in a R* script ("assassin_construction.ysc.c4"): - * if (((v_3 < v_4) && (TASK::GET_SCRIPT_TASK_STATUS(PLAYER::PLAYER_PED_ID(), 0x6a67a5cc) != 1)) && (v_5 > v_3)) { - * TASK::TASK_RELOAD_WEAPON(PLAYER::PLAYER_PED_ID(), 1); - * } - */ - export function taskReloadWeapon(ped: Player | number, drawWeapon: boolean): void; + * The 2nd param (drawWeapon) is not implemented. + * ----------------------------------------------------------------------- + * The only occurrence I found in a R* script ("assassin_construction.ysc.c4"): + * if (((v_3 < v_4) && (TASK::GET_SCRIPT_TASK_STATUS(PLAYER::PLAYER_PED_ID(), 0x6a67a5cc) != 1)) && (v_5 > v_3)) { + * TASK::TASK_RELOAD_WEAPON(PLAYER::PLAYER_PED_ID(), 1); + * } + */ + export function taskReloadWeapon(ped: Ped | Player | number, drawWeapon: boolean): void; - export function isPedGettingUp(ped: Player | number): boolean; + export function isPedGettingUp(ped: Ped | Player | number): boolean; /** - * EX: Function.Call(Ped1, Ped2, Time, 0); - * The last parameter is always 0 for some reason I do not know. The first parameter is the pedestrian who will writhe to the pedestrian in the other parameter. The third paremeter is how long until the Writhe task ends. When the task ends, the ped will die. If set to -1, he will not die automatically, and the task will continue until something causes it to end. This can be being touched by an entity, being shot, explosion, going into ragdoll, having task cleared. Anything that ends the current task will kill the ped at this point. - * Third parameter does not appear to be time. The last parameter is not implemented (It's not used, regardless of value). - */ - export function taskWrithe(ped: Player | number, target: Player | number, minFireLoops: number, startState: number, forceShootOnGround: boolean, shootFromGroundTimer: number): void; + * EX: Function.Call(Ped1, Ped2, Time, 0); + * The last parameter is always 0 for some reason I do not know. The first parameter is the pedestrian who will writhe to the pedestrian in the other parameter. The third paremeter is how long until the Writhe task ends. When the task ends, the ped will die. If set to -1, he will not die automatically, and the task will continue until something causes it to end. This can be being touched by an entity, being shot, explosion, going into ragdoll, having task cleared. Anything that ends the current task will kill the ped at this point. + * Third parameter does not appear to be time. The last parameter is not implemented (It's not used, regardless of value). + */ + export function taskWrithe(ped: Ped | Player | number, target: Ped | Player | number, minFireLoops: number, startState: number, forceShootOnGround: boolean, shootFromGroundTimer: number): void; /** - * This native checks if a ped is on the ground, in pain from a (gunshot) wound. - * Returns `true` if the ped is in writhe, `false` otherwise. - */ - export function isPedInWrithe(ped: Player | number): boolean; + * This native checks if a ped is on the ground, in pain from a (gunshot) wound. + * Returns `true` if the ped is in writhe, `false` otherwise. + */ + export function isPedInWrithe(ped: Ped | Player | number): boolean; /** - * patrolRoutes found in the b617d scripts: - * "miss_Ass0", - * "miss_Ass1", - * "miss_Ass2", - * "miss_Ass3", - * "miss_Ass4", - * "miss_Ass5", - * "miss_Ass6", - * "MISS_PATROL_6", - * See NativeDB for reference: http://natives.altv.mp/#/0xA36BFB5EE89F3D82 - */ - export function openPatrolRoute(patrolRoute: string | null): void; + * patrolRoutes found in the b617d scripts: + * "miss_Ass0", + * "miss_Ass1", + * "miss_Ass2", + * "miss_Ass3", + * "miss_Ass4", + * "miss_Ass5", + * "miss_Ass6", + * "MISS_PATROL_6", + * "MISS_PATROL_7", + * "MISS_PATROL_8", + * "MISS_PATROL_9", + * "miss_Tower_01", + * "miss_Tower_02", + * "miss_Tower_03", + * "miss_Tower_04", + * "miss_Tower_05", + * "miss_Tower_06", + * "miss_Tower_07", + * "miss_Tower_08", + * "miss_Tower_10" + */ + export function openPatrolRoute(patrolRoute: string): void; export function closePatrolRoute(): void; /** - * Example: - * TASK::ADD_PATROL_ROUTE_NODE(2, "WORLD_HUMAN_GUARD_STAND", -193.4915, -2378.864990234375, 10.9719, -193.4915, -2378.864990234375, 10.9719, 3000); - * p2, p3 and p4 is only one parameter sometimes in the scripts. Most likely a Vector3 hence p2, p3 and p4 are coordinates. - * Examples: - * TASK::ADD_PATROL_ROUTE_NODE(1, "WORLD_HUMAN_GUARD_STAND", l_739[73], 0.0, 0.0, 0.0, 0); - * TASK::ADD_PATROL_ROUTE_NODE(1, "WORLD_HUMAN_GUARD_STAND", l_B0[1744]._f3, l_B0[1744]._f3, 2000); - * p5, p6 and p7 are for example set to: 1599.0406494140625, 2713.392578125, 44.4309. - * @param nodeId is between 0 and 4 in the scripts. - * @param nodeType is "WORLD_HUMAN_GUARD_STAND" or "StandGuard". - * @param duration is an int, often random set to for example: MISC::GET_RANDOM_INT_IN_RANGE(5000, 10000). - */ - export function addPatrolRouteNode(nodeId: number, nodeType: string | null, posX: number, posY: number, posZ: number, headingX: number, headingY: number, headingZ: number, duration: number): void; + * Example: + * TASK::ADD_PATROL_ROUTE_NODE(2, "WORLD_HUMAN_GUARD_STAND", -193.4915, -2378.864990234375, 10.9719, -193.4915, -2378.864990234375, 10.9719, 3000); + * p0 is between 0 and 4 in the scripts. + * p1 is "WORLD_HUMAN_GUARD_STAND" or "StandGuard". + * p2, p3 and p4 is only one parameter sometimes in the scripts. Most likely a Vector3 hence p2, p3 and p4 are coordinates. + * Examples: + * TASK::ADD_PATROL_ROUTE_NODE(1, "WORLD_HUMAN_GUARD_STAND", l_739[7/*3*\/], 0.0, 0.0, 0.0, 0); + * TASK::ADD_PATROL_ROUTE_NODE(1, "WORLD_HUMAN_GUARD_STAND", l_B0[17/*44*\/]._f3, l_B0[17/*44*\/]._f3, 2000); + * p5, p6 and p7 are for example set to: 1599.0406494140625, 2713.392578125, 44.4309. + * p8 is an int, often random set to for example: MISC::GET_RANDOM_INT_IN_RANGE(5000, 10000). + */ + export function addPatrolRouteNode(nodeId: number, nodeType: string, posX: number, posY: number, posZ: number, headingX: number, headingY: number, headingZ: number, duration: number): void; export function addPatrolRouteLink(nodeId1: number, nodeId2: number): void; export function createPatrolRoute(): void; /** - * From the b617d scripts: - * TASK::DELETE_PATROL_ROUTE("miss_merc0"); - * TASK::DELETE_PATROL_ROUTE("miss_merc1"); - * TASK::DELETE_PATROL_ROUTE("miss_merc2"); - * TASK::DELETE_PATROL_ROUTE("miss_dock"); - */ - export function deletePatrolRoute(patrolRoute: string | null): void; - - export function getPatrolTaskInfo(ped: Player | number, timeLeftAtNode?: number, nodeId?: number): [boolean, number, number]; - - /** - * After looking at some scripts the second parameter seems to be an id of some kind. Here are some I found from some R* scripts: - * "miss_Tower_01" (this went from 01 - 10) - * "miss_Ass0" (0, 4, 6, 3) - * "MISS_PATROL_8" - * I think they're patrol routes, but I'm not sure. And I believe the 3rd parameter is a BOOL, but I can't confirm other than only seeing 0 and 1 being passed. - * As far as I can see the patrol routes names such as "miss_Ass0" have been defined earlier in the scripts. This leads me to believe we can defined our own new patrol routes by following the same approach. - * From the scripts - * TASK::OPEN_PATROL_ROUTE("miss_Ass0"); - * TASK::ADD_PATROL_ROUTE_NODE(0, "WORLD_HUMAN_GUARD_STAND", l_738[03], -139.4076690673828, -993.4732055664062, 26.2754, MISC::GET_RANDOM_INT_IN_RANGE(5000, 10000)); - * See NativeDB for reference: http://natives.altv.mp/#/0xBDA5DF49D080FE4E - */ - export function taskPatrol(ped: Player | number, patrolRouteName: string | null, alertState: number, canChatToPeds: boolean, useHeadLookAt: boolean): void; - - /** - * Makes the ped run to take cover - */ - export function taskStayInCover(ped: Player | number): void; - - /** - * @param x offset in world coords from some entity. - * @param y offset in world coords from some entity. - */ - export function addVehicleSubtaskAttackCoord(ped: Player | number, x: number, y: number, z: number): void; + * From the b617d scripts: + * TASK::DELETE_PATROL_ROUTE("miss_merc0"); + * TASK::DELETE_PATROL_ROUTE("miss_merc1"); + * TASK::DELETE_PATROL_ROUTE("miss_merc2"); + * TASK::DELETE_PATROL_ROUTE("miss_dock"); + */ + export function deletePatrolRoute(patrolRoute: string): void; + + export function getPatrolTaskInfo(ped: Ped | Player | number, timeLeftAtNode?: number, nodeId?: number): [boolean, number, number]; + + /** + * After looking at some scripts the second parameter seems to be an id of some kind. Here are some I found from some R* scripts: + * "miss_Tower_01" (this went from 01 - 10) + * "miss_Ass0" (0, 4, 6, 3) + * "MISS_PATROL_8" + * I think they're patrol routes, but I'm not sure. And I believe the 3rd parameter is a BOOL, but I can't confirm other than only seeing 0 and 1 being passed. + * As far as I can see the patrol routes names such as "miss_Ass0" have been defined earlier in the scripts. This leads me to believe we can defined our own new patrol routes by following the same approach. + * From the scripts + * TASK::OPEN_PATROL_ROUTE("miss_Ass0"); + * TASK::ADD_PATROL_ROUTE_NODE(0, "WORLD_HUMAN_GUARD_STAND", l_738[0/*3*\/], -139.4076690673828, -993.4732055664062, 26.2754, MISC::GET_RANDOM_INT_IN_RANGE(5000, 10000)); + * TASK::ADD_PATROL_ROUTE_NODE(1, "WORLD_HUMAN_GUARD_STAND", l_738[1/*3*\/], -116.1391830444336, -987.4984130859375, 26.38541030883789, MISC::GET_RANDOM_INT_IN_RANGE(5000, 10000)); + * TASK::ADD_PATROL_ROUTE_NODE(2, "WORLD_HUMAN_GUARD_STAND", l_738[2/*3*\/], -128.46847534179688, -979.0340576171875, 26.2754, MISC::GET_RANDOM_INT_IN_RANGE(5000, 10000)); + * TASK::ADD_PATROL_ROUTE_LINK(0, 1); + * TASK::ADD_PATROL_ROUTE_LINK(1, 2); + * TASK::ADD_PATROL_ROUTE_LINK(2, 0); + * TASK::CLOSE_PATROL_ROUTE(); + * TASK::CREATE_PATROL_ROUTE(); + */ + export function taskPatrol(ped: Ped | Player | number, patrolRouteName: string, alertState: number, canChatToPeds: boolean, useHeadLookAt: boolean): void; + + /** + * Makes the ped run to take cover + */ + export function taskStayInCover(ped: Ped | Player | number): void; + + /** + * x, y, z: offset in world coords from some entity. + */ + export function addVehicleSubtaskAttackCoord(ped: Ped | Player | number, x: number, y: number, z: number): void; + + export function addVehicleSubtaskAttackPed(ped: Ped | Player | number, target: Ped | Player | number): void; + + export function taskVehicleShootAtPed(ped: Ped | Player | number, target: Ped | Player | number, fireTolerance: number): void; - export function addVehicleSubtaskAttackPed(ped: Player | number, target: Player | number): void; + export function taskVehicleAimAtPed(ped: Ped | Player | number, target: Ped | Player | number): void; + + export function taskVehicleShootAtCoord(ped: Ped | Player | number, x: number, y: number, z: number, fireTolerance: number): void; - export function taskVehicleShootAtPed(ped: Player | number, target: Player | number, fireTolerance: number): void; - - export function taskVehicleAimAtPed(ped: Player | number, target: Player | number): void; - - export function taskVehicleShootAtCoord(ped: Player | number, x: number, y: number, z: number, fireTolerance: number): void; - - export function taskVehicleAimAtCoord(ped: Player | number, x: number, y: number, z: number): void; + export function taskVehicleAimAtCoord(ped: Ped | Player | number, x: number, y: number, z: number): void; /** - * Differs from TASK_VEHICLE_DRIVE_TO_COORDS in that it will pick the shortest possible road route without taking one-way streets and other "road laws" into consideration. - * WARNING: - * A behaviorFlag value of 0 will result in a clunky, stupid driver! - * Recommended settings: - * If you simply want to have your driver move to a fixed location, call it only once, or, when necessary in the event of interruption. - * If using this to continually follow a Ped who is on foot: You will need to run this in a tick loop. Call it in with the Ped's updated coordinates every 20 ticks or so and you will have one hell of a smart, fast-reacting NPC driver -- provided he doesn't get stuck. If your update frequency is too fast, the Ped may not have enough time to figure his way out of being stuck, and thus, remain stuck. One way around this would be to implement an "anti-stuck" mechanism, which allows the driver to realize he's stuck, temporarily pause the tick, unstuck, then resume the tick. - * EDIT: This is being discussed in more detail at http://gtaforums.com/topic/818504-any-idea-on-how-to-make-peds-clever-and-insanely-fast-c/ - * @param speed = 30.0f, - * @param behaviorFlag = 156, - * @param stoppingRange = 5.0f; - */ - export function taskVehicleGotoNavmesh(ped: Player | number, vehicle: Vehicle | number, x: number, y: number, z: number, speed: number, behaviorFlag: number, stoppingRange: number): void; + * Differs from TASK_VEHICLE_DRIVE_TO_COORDS in that it will pick the shortest possible road route without taking one-way streets and other "road laws" into consideration. + * WARNING: + * A behaviorFlag value of 0 will result in a clunky, stupid driver! + * Recommended settings: + * speed = 30.0f, + * behaviorFlag = 156, + * stoppingRange = 5.0f; + * If you simply want to have your driver move to a fixed location, call it only once, or, when necessary in the event of interruption. + * If using this to continually follow a Ped who is on foot: You will need to run this in a tick loop. Call it in with the Ped's updated coordinates every 20 ticks or so and you will have one hell of a smart, fast-reacting NPC driver -- provided he doesn't get stuck. If your update frequency is too fast, the Ped may not have enough time to figure his way out of being stuck, and thus, remain stuck. One way around this would be to implement an "anti-stuck" mechanism, which allows the driver to realize he's stuck, temporarily pause the tick, unstuck, then resume the tick. + * EDIT: This is being discussed in more detail at http://gtaforums.com/topic/818504-any-idea-on-how-to-make-peds-clever-and-insanely-fast-c/ + */ + export function taskVehicleGotoNavmesh(ped: Ped | Player | number, vehicle: Vehicle | number, x: number, y: number, z: number, speed: number, behaviorFlag: number, stoppingRange: number): void; /** - * movement_speed: mostly 2f, but also 1/1.2f, etc. - * firing_pattern: ${firing_pattern_full_auto}, 0xC6EE6B4C - * @param shoot always false - * @param targetRadius 2f - * @param slowDistance 0.5f - * @param useNavMesh true - * @param navFlags 0 / 512 / 513, etc. - * @param instantBlendToAim 0 - */ - export function taskGoToCoordWhileAimingAtCoord(ped: Player | number, x: number, y: number, z: number, aimAtX: number, aimAtY: number, aimAtZ: number, moveBlendRatio: number, shoot: boolean, targetRadius: number, slowDistance: number, useNavMesh: boolean, navFlags: number, instantBlendToAim: boolean, firingPattern: number): void; + * movement_speed: mostly 2f, but also 1/1.2f, etc. + * p8: always false + * p9: 2f + * p10: 0.5f + * p11: true + * p12: 0 / 512 / 513, etc. + * p13: 0 + * firing_pattern: ${firing_pattern_full_auto}, 0xC6EE6B4C + */ + export function taskGoToCoordWhileAimingAtCoord(ped: Ped | Player | number, x: number, y: number, z: number, aimAtX: number, aimAtY: number, aimAtZ: number, moveBlendRatio: number, shoot: boolean, targetRadius: number, slowDistance: number, useNavMesh: boolean, navFlags: number, instantBlendToAim: boolean, firingPattern: number): void; - export function taskGoToCoordWhileAimingAtEntity(ped: Player | number, x: number, y: number, z: number, aimAtID: Entity | number, moveBlendRatio: number, shoot: boolean, targetRadius: number, slowDistance: number, useNavMesh: boolean, navFlags: number, instantBlendToAim: boolean, firingPattern: number, time: number): void; + export function taskGoToCoordWhileAimingAtEntity(ped: Ped | Player | number, x: number, y: number, z: number, aimAtID: Entity | number, moveBlendRatio: number, shoot: boolean, targetRadius: number, slowDistance: number, useNavMesh: boolean, navFlags: number, instantBlendToAim: boolean, firingPattern: number, time: number): void; /** - * The ped will walk or run towards goToLocation, aiming towards goToLocation or focusLocation (depending on the aimingFlag) and shooting if shootAtEnemies = true to any enemy in his path. - * If the ped is closer than noRoadsDistance, the ped will ignore pathing/navmesh and go towards goToLocation directly. This could cause the ped to get stuck behind tall walls if the goToLocation is on the other side. To avoid this, use 0.0f and the ped will always use pathing/navmesh to reach his destination. - * If the speed is set to 0.0f, the ped will just stand there while aiming, if set to 1.0f he will walk while aiming, 2.0f will run while aiming. - * The ped will stop aiming when he is closer than distanceToStopAt to goToLocation. - * I still can't figure out what unkTrue is used for. I don't notice any difference if I set it to false but in the decompiled scripts is always true. - * I think that unkFlag, like the driving styles, could be a flag that "work as a list of 32 bits converted to a decimal integer. Each bit acts as a flag, and enables or disables a function". What leads me to this conclusion is the fact that in the decompiled scripts, unkFlag takes values like: 0, 1, 5 (101 in binary) and 4097 (4096 + 1 or 1000000000001 in binary). For now, I don't know what behavior enable or disable this possible flag so I leave it at 0. - * Note: After some testing, using unkFlag = 16 (0x10) enables the use of sidewalks while moving towards goToLocation. - * The aimingFlag takes 2 values: 0 to aim at the focusLocation, 1 to aim at where the ped is heading (goToLocation). - * Example: - * See NativeDB for reference: http://natives.altv.mp/#/0xA55547801EB331FC - */ - export function taskGoToCoordAndAimAtHatedEntitiesNearCoord(pedHandle: Player | number, goToLocationX: number, goToLocationY: number, goToLocationZ: number, focusLocationX: number, focusLocationY: number, focusLocationZ: number, speed: number, shootAtEnemies: boolean, distanceToStopAt: number, noRoadsDistance: number, useNavMesh: boolean, navFlags: number, taskFlags: number, firingPattern: number): void; + * The ped will walk or run towards goToLocation, aiming towards goToLocation or focusLocation (depending on the aimingFlag) and shooting if shootAtEnemies = true to any enemy in his path. + * If the ped is closer than noRoadsDistance, the ped will ignore pathing/navmesh and go towards goToLocation directly. This could cause the ped to get stuck behind tall walls if the goToLocation is on the other side. To avoid this, use 0.0f and the ped will always use pathing/navmesh to reach his destination. + * If the speed is set to 0.0f, the ped will just stand there while aiming, if set to 1.0f he will walk while aiming, 2.0f will run while aiming. + * The ped will stop aiming when he is closer than distanceToStopAt to goToLocation. + * I still can't figure out what unkTrue is used for. I don't notice any difference if I set it to false but in the decompiled scripts is always true. + * I think that unkFlag, like the driving styles, could be a flag that "work as a list of 32 bits converted to a decimal integer. Each bit acts as a flag, and enables or disables a function". What leads me to this conclusion is the fact that in the decompiled scripts, unkFlag takes values like: 0, 1, 5 (101 in binary) and 4097 (4096 + 1 or 1000000000001 in binary). For now, I don't know what behavior enable or disable this possible flag so I leave it at 0. + * Note: After some testing, using unkFlag = 16 (0x10) enables the use of sidewalks while moving towards goToLocation. + * The aimingFlag takes 2 values: 0 to aim at the focusLocation, 1 to aim at where the ped is heading (goToLocation). + * Example: + * enum AimFlag + * { + * AimAtFocusLocation, + * AimAtGoToLocation + * }; + * Vector3 goToLocation1 = { 996.2867f, 0, -2143.044f, 0, 28.4763f, 0 }; // remember the padding. + * Vector3 goToLocation2 = { 990.2867f, 0, -2140.044f, 0, 28.4763f, 0 }; // remember the padding. + * Vector3 focusLocation = { 994.3478f, 0, -2136.118f, 0, 29.2463f, 0 }; // the coord z should be a little higher, around +1.0f to avoid aiming at the ground + * // 1st example + * TASK::TASK_GO_TO_COORD_AND_AIM_AT_HATED_ENTITIES_NEAR_COORD(pedHandle, goToLocation1.x, goToLocation1.y, goToLocation1.z, focusLocation.x, focusLocation.y, focusLocation.z, 2.0f /*run*\/, true /*shoot*\/, 3.0f /*stop at*\/, 0.0f /*noRoadsDistance*\/, true /*always true*\/, 0 /*possible flag*\/, AimFlag::AimAtGoToLocation, -957453492 /*FullAuto pattern*\/); + * // 2nd example + * TASK::TASK_GO_TO_COORD_AND_AIM_AT_HATED_ENTITIES_NEAR_COORD(pedHandle, goToLocation2.x, goToLocation2.y, goToLocation2.z, focusLocation.x, focusLocation.y, focusLocation.z, 1.0f /*walk*\/, false /*don't shoot*\/, 3.0f /*stop at*\/, 0.0f /*noRoadsDistance*\/, true /*always true*\/, 0 /*possible flag*\/, AimFlag::AimAtFocusLocation, -957453492 /*FullAuto pattern*\/); + * 1st example: The ped (pedhandle) will run towards goToLocation1. While running and aiming towards goToLocation1, the ped will shoot on sight to any enemy in his path, using "FullAuto" firing pattern. The ped will stop once he is closer than distanceToStopAt to goToLocation1. + * 2nd example: The ped will walk towards goToLocation2. This time, while walking towards goToLocation2 and aiming at focusLocation, the ped will point his weapon on sight to any enemy in his path without shooting. The ped will stop once he is closer than distanceToStopAt to goToLocation2. + */ + export function taskGoToCoordAndAimAtHatedEntitiesNearCoord(pedHandle: Ped | Player | number, goToLocationX: number, goToLocationY: number, goToLocationZ: number, focusLocationX: number, focusLocationY: number, focusLocationZ: number, speed: number, shootAtEnemies: boolean, distanceToStopAt: number, noRoadsDistance: number, useNavMesh: boolean, navFlags: number, taskFlags: number, firingPattern: number): void; - export function taskGoToEntityWhileAimingAtCoord(ped: Player | number, entity: Entity | number, aimX: number, aimY: number, aimZ: number, moveBlendRatio: number, shoot: boolean, targetRadius: number, slowDistance: number, useNavMesh: boolean, instantBlendToAim: boolean, firingPattern: number): void; + export function taskGoToEntityWhileAimingAtCoord(ped: Ped | Player | number, entity: Entity | number, aimX: number, aimY: number, aimZ: number, moveBlendRatio: number, shoot: boolean, targetRadius: number, slowDistance: number, useNavMesh: boolean, instantBlendToAim: boolean, firingPattern: number): void; /** - * If true, peds will shoot at Entity till it is dead. - * If false, peds will just walk till they reach the entity and will cease shooting. - */ - export function taskGoToEntityWhileAimingAtEntity(ped: Player | number, entityToWalkTo: Entity | number, entityToAimAt: Entity | number, speed: number, shootatEntity: boolean, targetRadius: number, slowDistance: number, useNavMesh: boolean, instantBlendToAim: boolean, firingPattern: number): void; + * shootatEntity: + * If true, peds will shoot at Entity till it is dead. + * If false, peds will just walk till they reach the entity and will cease shooting. + */ + export function taskGoToEntityWhileAimingAtEntity(ped: Ped | Player | number, entityToWalkTo: Entity | number, entityToAimAt: Entity | number, speed: number, shootatEntity: boolean, targetRadius: number, slowDistance: number, useNavMesh: boolean, instantBlendToAim: boolean, firingPattern: number): void; /** - * Makes the ped ragdoll like when falling from a great height - */ - export function setHighFallTask(ped: Player | number, minTime: number, maxTime: number, entryType: number): void; + * Makes the ped ragdoll like when falling from a great height + */ + export function setHighFallTask(ped: Ped | Player | number, minTime: number, maxTime: number, entryType: number): void; /** - * Full list of waypoint recordings by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/waypointRecordings.json - * For a full list of the points, see here: goo.gl/wIH0vn - * Max number of loaded recordings is 32. - */ - export function requestWaypointRecording(name: string | null): void; + * Full list of waypoint recordings by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/waypointRecordings.json + * For a full list of the points, see here: goo.gl/wIH0vn + * Max number of loaded recordings is 32. + */ + export function requestWaypointRecording(name: string): void; /** - * Full list of waypoint recordings by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/waypointRecordings.json - */ - export function getIsWaypointRecordingLoaded(name: string | null): boolean; + * Full list of waypoint recordings by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/waypointRecordings.json + */ + export function getIsWaypointRecordingLoaded(name: string): boolean; /** - * Full list of waypoint recordings by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/waypointRecordings.json - */ - export function removeWaypointRecording(name: string | null): void; + * Full list of waypoint recordings by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/waypointRecordings.json + */ + export function removeWaypointRecording(name: string): void; /** - * Full list of waypoint recordings by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/waypointRecordings.json - * @param points goo.gl/wIH0vn - */ - export function waypointRecordingGetNumPoints(name: string | null, points?: number): [boolean, number]; + * Full list of waypoint recordings by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/waypointRecordings.json + * For a full list of the points, see here: goo.gl/wIH0vn + */ + export function waypointRecordingGetNumPoints(name: string, points?: number): [boolean, number]; /** - * Full list of waypoint recordings by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/waypointRecordings.json - * For a full list of the points, see here: goo.gl/wIH0vn - */ - export function waypointRecordingGetCoord(name: string | null, point: number, coord?: Vector3): [boolean, Vector3]; + * Full list of waypoint recordings by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/waypointRecordings.json + * For a full list of the points, see here: goo.gl/wIH0vn + */ + export function waypointRecordingGetCoord(name: string, point: number, coord?: Vector3): [boolean, Vector3]; /** - * Full list of waypoint recordings by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/waypointRecordings.json - */ - export function waypointRecordingGetSpeedAtPoint(name: string | null, point: number): number; + * Full list of waypoint recordings by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/waypointRecordings.json + */ + export function waypointRecordingGetSpeedAtPoint(name: string, point: number): number; /** - * Full list of waypoint recordings by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/waypointRecordings.json - * For a full list of the points, see here: goo.gl/wIH0vn - */ - export function waypointRecordingGetClosestWaypoint(name: string | null, x: number, y: number, z: number, point?: number): [boolean, number]; + * Full list of waypoint recordings by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/waypointRecordings.json + * For a full list of the points, see here: goo.gl/wIH0vn + */ + export function waypointRecordingGetClosestWaypoint(name: string, x: number, y: number, z: number, point?: number): [boolean, number]; - export function taskFollowWaypointRecording(ped: Player | number, name: string | null, p2: number, p3: number, p4: number): void; + export function taskFollowWaypointRecording(ped: Ped | Player | number, name: string, p2: number, p3: number, p4: number): void; - export function isWaypointPlaybackGoingOnForPed(ped: Player | number): boolean; + export function isWaypointPlaybackGoingOnForPed(ped: Ped | Player | number): boolean; - export function getPedWaypointProgress(ped: Player | number): number; + export function getPedWaypointProgress(ped: Ped | Player | number): number; export function getPedWaypointDistance(p0: any): number; - export function setPedWaypointRouteOffset(ped: Player | number, x: number, y: number, z: number): boolean; + export function setPedWaypointRouteOffset(ped: Ped | Player | number, x: number, y: number, z: number): boolean; - export function getWaypointDistanceAlongRoute(name: string | null, point: number): number; + export function getWaypointDistanceAlongRoute(name: string, point: number): number; export function waypointPlaybackGetIsPaused(p0: any): boolean; @@ -19876,43 +22314,43 @@ declare module "natives" { export function waypointPlaybackUseDefaultSpeed(p0: any): void; - export function useWaypointRecordingAsAssistedMovementRoute(name: string | null, p1: boolean, p2: number, p3: number): void; + export function useWaypointRecordingAsAssistedMovementRoute(name: string, p1: boolean, p2: number, p3: number): void; - export function waypointPlaybackStartAimingAtPed(ped: Player | number, target: Player | number, p2: boolean): void; + export function waypointPlaybackStartAimingAtPed(ped: Ped | Player | number, target: Ped | Player | number, p2: boolean): void; - export function waypointPlaybackStartAimingAtCoord(ped: Player | number, x: number, y: number, z: number, p4: boolean): void; + export function waypointPlaybackStartAimingAtCoord(ped: Ped | Player | number, x: number, y: number, z: number, p4: boolean): void; - export function waypointPlaybackStartShootingAtPed(ped: Player | number, ped2: Player | number, p2: boolean, p3: boolean): void; + export function waypointPlaybackStartShootingAtPed(ped: Ped | Player | number, ped2: Ped | Player | number, p2: boolean, p3: boolean): void; - export function waypointPlaybackStartShootingAtCoord(ped: Player | number, x: number, y: number, z: number, p4: boolean, firingPattern: number): void; + export function waypointPlaybackStartShootingAtCoord(ped: Ped | Player | number, x: number, y: number, z: number, p4: boolean, firingPattern: number): void; - export function waypointPlaybackStopAimingOrShooting(ped: Player | number): void; + export function waypointPlaybackStopAimingOrShooting(ped: Ped | Player | number): void; /** - * Routes: "1_FIBStairs", "2_FIBStairs", "3_FIBStairs", "4_FIBStairs", "5_FIBStairs", "5_TowardsFire", "6a_FIBStairs", "7_FIBStairs", "8_FIBStairs", "Aprtmnt_1", "AssAfterLift", "ATM_1", "coroner2", "coroner_stairs", "f5_jimmy1", "fame1", "family5b", "family5c", "Family5d", "family5d", "FIB_Glass1", "FIB_Glass2", "FIB_Glass3", "finaBroute1A", "finalb1st", "finalB1sta", "finalbround", "finalbroute2", "Hairdresser1", "jan_foyet_ft_door", "Jo_3", "Lemar1", "Lemar2", "mansion_1", "Mansion_1", "pols_1", "pols_2", "pols_3", "pols_4", "pols_5", "pols_6", "pols_7", "pols_8", "Pro_S1", "Pro_S1a", "Pro_S2", "Towards_case", "trev_steps", "tunrs1", "tunrs2", "tunrs3", "Wave01457s" - */ - export function assistedMovementRequestRoute(route: string | null): void; + * Routes: "1_FIBStairs", "2_FIBStairs", "3_FIBStairs", "4_FIBStairs", "5_FIBStairs", "5_TowardsFire", "6a_FIBStairs", "7_FIBStairs", "8_FIBStairs", "Aprtmnt_1", "AssAfterLift", "ATM_1", "coroner2", "coroner_stairs", "f5_jimmy1", "fame1", "family5b", "family5c", "Family5d", "family5d", "FIB_Glass1", "FIB_Glass2", "FIB_Glass3", "finaBroute1A", "finalb1st", "finalB1sta", "finalbround", "finalbroute2", "Hairdresser1", "jan_foyet_ft_door", "Jo_3", "Lemar1", "Lemar2", "mansion_1", "Mansion_1", "pols_1", "pols_2", "pols_3", "pols_4", "pols_5", "pols_6", "pols_7", "pols_8", "Pro_S1", "Pro_S1a", "Pro_S2", "Towards_case", "trev_steps", "tunrs1", "tunrs2", "tunrs3", "Wave01457s" + */ + export function assistedMovementRequestRoute(route: string): void; - export function assistedMovementRemoveRoute(route: string | null): void; + export function assistedMovementRemoveRoute(route: string): void; - export function assistedMovementIsRouteLoaded(route: string | null): boolean; + export function assistedMovementIsRouteLoaded(route: string): boolean; - export function assistedMovementSetRouteProperties(route: string | null, props: number): void; + export function assistedMovementSetRouteProperties(route: string, props: number): void; export function assistedMovementOverrideLoadDistanceThisFrame(dist: number): void; /** - * p10 = bool (repeat?) - * p11 = 1073741824 - * Full list of waypoint recordings by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/waypointRecordings.json - * @param WPRecording = Waypoint recording string (found in update\update.rpf\x64\levels\gta5\waypointrec.rpf - * @param p3 = 786468 - * @param p4 = 0 - * @param p5 = 16 - * @param p6 = -1 (angle?) - * @param p7 usually v3.zero - */ - export function taskVehicleFollowWaypointRecording(ped: Player | number, vehicle: Vehicle | number, WPRecording: string | null, p3: number, p4: number, p5: number, p6: number, p7: number, p8: boolean, p9: number): void; + * p2 = Waypoint recording string (found in update\update.rpf\x64\levels\gta5\waypointrec.rpf + * p3 = 786468 + * p4 = 0 + * p5 = 16 + * p6 = -1 (angle?) + * p7/8/9 = usually v3.zero + * p10 = bool (repeat?) + * p11 = 1073741824 + * Full list of waypoint recordings by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/waypointRecordings.json + */ + export function taskVehicleFollowWaypointRecording(ped: Ped | Player | number, vehicle: Vehicle | number, WPRecording: string, p3: number, p4: number, p5: number, p6: number, p7: number, p8: boolean, p9: number): void; export function isWaypointPlaybackGoingOnForVehicle(vehicle: Vehicle | number): boolean; @@ -19929,174 +22367,177 @@ declare module "natives" { export function vehicleWaypointPlaybackOverrideSpeed(vehicle: Vehicle | number, speed: number): void; /** - * I cant believe I have to define this, this is one of the best natives. - * It makes the ped ignore basically all shocking events around it. Occasionally the ped may comment or gesture, but other than that they just continue their daily activities. This includes shooting and wounding the ped. And - most importantly - they do not flee. - * Since it is a task, every time the native is called the ped will stop for a moment. - */ - export function taskSetBlockingOfNonTemporaryEvents(ped: Player | number, toggle: boolean): void; + * I cant believe I have to define this, this is one of the best natives. + * It makes the ped ignore basically all shocking events around it. Occasionally the ped may comment or gesture, but other than that they just continue their daily activities. This includes shooting and wounding the ped. And - most importantly - they do not flee. + * Since it is a task, every time the native is called the ped will stop for a moment. + */ + export function taskSetBlockingOfNonTemporaryEvents(ped: Ped | Player | number, toggle: boolean): void; /** - * [30/03/2017] ins1de : - * See FORCE_PED_MOTION_STATE - * @param forceRestart always false - */ - export function taskForceMotionState(ped: Player | number, state: number, forceRestart: boolean): void; + * p2 always false + * [30/03/2017] ins1de : + * See FORCE_PED_MOTION_STATE + */ + export function taskForceMotionState(ped: Ped | Player | number, state: number, forceRestart: boolean): void; /** - * Example: - * @param task :TASK_MOVE_NETWORK_BY_NAME(PLAYER::PLAYER_PED_ID(), "arm_wrestling_sweep_paired_a_rev3", 0.0f, true, "mini@arm_wrestling", 0); - */ - export function taskMoveNetworkByName(ped: Player | number, task: string | null, multiplier: number, allowOverrideCloneUpdate: boolean, animDict: string | null, flags: number): void; + * Example: + * TASK::TASK_MOVE_NETWORK_BY_NAME(PLAYER::PLAYER_PED_ID(), "arm_wrestling_sweep_paired_a_rev3", 0.0f, true, "mini@arm_wrestling", 0); + */ + export function taskMoveNetworkByName(ped: Ped | Player | number, task: string, multiplier: number, allowOverrideCloneUpdate: boolean, animDict: string, flags: number): void; /** - * Example: - * TASK::TASK_MOVE_NETWORK_ADVANCED_BY_NAME(PLAYER::PLAYER_PED_ID(), "minigame_tattoo_michael_parts", 324.13f, 181.29f, 102.6f, 0.0f, 0.0f, 22.32f, 2, 0, false, 0, 0); - */ - export function taskMoveNetworkAdvancedByName(ped: Player | number, network: string | null, x: number, y: number, z: number, rotX: number, rotY: number, rotZ: number, rotOrder: number, blendDuration: number, allowOverrideCloneUpdate: boolean, animDict: string | null, flags: number): void; + * Example: + * TASK::TASK_MOVE_NETWORK_ADVANCED_BY_NAME(PLAYER::PLAYER_PED_ID(), "minigame_tattoo_michael_parts", 324.13f, 181.29f, 102.6f, 0.0f, 0.0f, 22.32f, 2, 0, false, 0, 0); + */ + export function taskMoveNetworkAdvancedByName(ped: Ped | Player | number, network: string, x: number, y: number, z: number, rotX: number, rotY: number, rotZ: number, rotOrder: number, blendDuration: number, allowOverrideCloneUpdate: boolean, animDict: string, flags: number): void; /** - * Used only once in the scripts (am_mp_nightclub) - */ - export function taskMoveNetworkByNameWithInitParams(ped: Player | number, network: string | null, initialParameters: number | null, blendDuration: number, allowOverrideCloneUpdate: boolean, animDict: string | null, flags: number): [void, number]; + * Used only once in the scripts (am_mp_nightclub) + */ + export function taskMoveNetworkByNameWithInitParams(ped: Ped | Player | number, network: string, initialParameters: number, blendDuration: number, allowOverrideCloneUpdate: boolean, animDict: string, flags: number): [void, number]; - export function taskMoveNetworkAdvancedByNameWithInitParams(ped: Player | number, network: string | null, initialParameters: number | null, x: number, y: number, z: number, rotX: number, rotY: number, rotZ: number, rotOrder: number, blendDuration: number, allowOverrideCloneUpdate: boolean, dictionary: string | null, flags: number): [void, number]; + export function taskMoveNetworkAdvancedByNameWithInitParams(ped: Ped | Player | number, network: string, initialParameters: number, x: number, y: number, z: number, rotX: number, rotY: number, rotZ: number, rotOrder: number, blendDuration: number, allowOverrideCloneUpdate: boolean, dictionary: string, flags: number): [void, number]; - export function isTaskMoveNetworkActive(ped: Player | number): boolean; + export function isTaskMoveNetworkActive(ped: Ped | Player | number): boolean; - export function isTaskMoveNetworkReadyForTransition(ped: Player | number): boolean; + export function isTaskMoveNetworkReadyForTransition(ped: Ped | Player | number): boolean; - export function requestTaskMoveNetworkStateTransition(ped: Player | number, name: string | null): boolean; + export function requestTaskMoveNetworkStateTransition(ped: Ped | Player | number, name: string): boolean; /** - * Used only once in the scripts (fm_mission_controller) like so: - * TASK::SET_EXPECTED_CLONE_NEXT_TASK_MOVE_NETWORK_STATE(iLocal_3160, "Cutting"); - */ - export function setExpectedCloneNextTaskMoveNetworkState(ped: Player | number, state: string | null): boolean; + * Used only once in the scripts (fm_mission_controller) like so: + * TASK::SET_EXPECTED_CLONE_NEXT_TASK_MOVE_NETWORK_STATE(iLocal_3160, "Cutting"); + */ + export function setExpectedCloneNextTaskMoveNetworkState(ped: Ped | Player | number, state: string): boolean; - export function getTaskMoveNetworkState(ped: Player | number): string; + export function getTaskMoveNetworkState(ped: Ped | Player | number): string; - export function setTaskMoveNetworkAnimSet(ped: Player | number, clipSet: number, unkVariableClipSet: number): void; + export function setTaskMoveNetworkAnimSet(ped: Ped | Player | number, clipSet: number, variableClipSet: number): void; /** - * Example: TASK::SET_TASK_MOVE_NETWORK_SIGNAL_FLOAT(PLAYER::PLAYER_PED_ID(), "Phase", 0.5); - * @param signalName - "Phase", "Wobble", "x_axis","y_axis","introphase","speed". - * @param value - From what i can see it goes up to 1f (maybe). - */ - export function setTaskMoveNetworkSignalFloat(ped: Player | number, signalName: string | null, value: number): void; + * signalName - "Phase", "Wobble", "x_axis","y_axis","introphase","speed". + * p2 - From what i can see it goes up to 1f (maybe). + * Example: TASK::SET_TASK_MOVE_NETWORK_SIGNAL_FLOAT(PLAYER::PLAYER_PED_ID(), "Phase", 0.5); + */ + export function setTaskMoveNetworkSignalFloat(ped: Ped | Player | number, signalName: string, value: number): void; - export function setTaskMoveNetworkSignalLocalFloat(ped: Player | number, signalName: string | null, value: number): void; + export function setTaskMoveNetworkSignalLocalFloat(ped: Ped | Player | number, signalName: string, value: number): void; - export function setTaskMoveNetworkSignalFloatLerpRate(ped: Player | number, signalName: string | null, value: number): void; + export function setTaskMoveNetworkSignalFloatLerpRate(ped: Ped | Player | number, signalName: string, value: number): void; - export function setTaskMoveNetworkSignalBool(ped: Player | number, signalName: string | null, value: boolean): void; + export function setTaskMoveNetworkSignalBool(ped: Ped | Player | number, signalName: string, value: boolean): void; - export function getTaskMoveNetworkSignalFloat(ped: Player | number, signalName: string | null): number; + export function getTaskMoveNetworkSignalFloat(ped: Ped | Player | number, signalName: string): number; - export function getTaskMoveNetworkSignalBool(ped: Player | number, signalName: string | null): boolean; + export function getTaskMoveNetworkSignalBool(ped: Ped | Player | number, signalName: string): boolean; - export function getTaskMoveNetworkEvent(ped: Player | number, eventName: string | null): boolean; + export function getTaskMoveNetworkEvent(ped: Ped | Player | number, eventName: string): boolean; /** - * @returns Doesn't actually return anything. - */ - export function setTaskMoveNetworkEnableCollisionOnNetworkCloneWhenFixed(ped: Player | number, enable: boolean): boolean; + * Doesn't actually return anything. + */ + export function setTaskMoveNetworkEnableCollisionOnNetworkCloneWhenFixed(ped: Ped | Player | number, enable: boolean): boolean; + + export function setScriptTaskEnableCollisionOnNetworkCloneWhenFixed(ped: Ped | Player | number, enable: boolean): void; - export function isMoveBlendRatioStill(ped: Player | number): boolean; + export function isMoveBlendRatioStill(ped: Ped | Player | number): boolean; - export function isMoveBlendRatioWalking(ped: Player | number): boolean; + export function isMoveBlendRatioWalking(ped: Ped | Player | number): boolean; - export function isMoveBlendRatioRunning(ped: Player | number): boolean; + export function isMoveBlendRatioRunning(ped: Ped | Player | number): boolean; - export function isMoveBlendRatioSprinting(ped: Player | number): boolean; + export function isMoveBlendRatioSprinting(ped: Ped | Player | number): boolean; - export function isPedStill(ped: Player | number): boolean; + export function isPedStill(ped: Ped | Player | number): boolean; - export function isPedWalking(ped: Player | number): boolean; + export function isPedWalking(ped: Ped | Player | number): boolean; - export function isPedRunning(ped: Player | number): boolean; + export function isPedRunning(ped: Ped | Player | number): boolean; - export function isPedSprinting(ped: Player | number): boolean; + export function isPedSprinting(ped: Ped | Player | number): boolean; /** - * What's strafing? - */ - export function isPedStrafing(ped: Player | number): boolean; + * What's strafing? + */ + export function isPedStrafing(ped: Ped | Player | number): boolean; /** - * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json - */ - export function taskSynchronizedScene(ped: Player | number, scene: number, animDictionary: string | null, animationName: string | null, blendIn: number, blendOut: number, flags: number, ragdollBlockingFlags: number, moverBlendDelta: number, ikFlags: number): void; + * TASK::TASK_SYNCHRONIZED_SCENE(ped, scene, "creatures@rottweiler@in_vehicle@std_car", "get_in", 1000.0, -8.0, 4, 0, 0x447a0000, 0); + * Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json + */ + export function taskSynchronizedScene(ped: Ped | Player | number, scene: number, animDictionary: string, animationName: string, blendIn: number, blendOut: number, flags: number, ragdollBlockingFlags: number, moverBlendDelta: number, ikFlags: number): void; - export function taskAgitatedActionConfrontResponse(ped: Player | number, ped2: Player | number): void; + export function taskAgitatedActionConfrontResponse(ped: Ped | Player | number, ped2: Ped | Player | number): void; /** - * This function is called on peds in vehicles. - * anim: animation name - * p2, p3, p4: "sweep_low", "sweep_med" or "sweep_high" - * @param runtime no idea what it does but is usually -1 - */ - export function taskSweepAimEntity(ped: Player | number, animDict: string | null, lowAnimName: string | null, medAnimName: string | null, hiAnimName: string | null, runtime: number, targetEntity: Entity | number, turnRate: number, blendInDuration: number): void; + * This function is called on peds in vehicles. + * anim: animation name + * p2, p3, p4: "sweep_low", "sweep_med" or "sweep_high" + * p5: no idea what it does but is usually -1 + */ + export function taskSweepAimEntity(ped: Ped | Player | number, animDict: string, lowAnimName: string, medAnimName: string, hiAnimName: string, runtime: number, targetEntity: Entity | number, turnRate: number, blendInDuration: number): void; - export function updateTaskSweepAimEntity(ped: Player | number, entity: Entity | number): void; + export function updateTaskSweepAimEntity(ped: Ped | Player | number, entity: Entity | number): void; - export function taskSweepAimPosition(ped: Player | number, animDict: string | null, lowAnimName: string | null, medAnimName: string | null, hiAnimName: string | null, runtime: number, x: number, y: number, z: number, turnRate: number, blendInDuration: number): void; + export function taskSweepAimPosition(ped: Ped | Player | number, animDict: string, lowAnimName: string, medAnimName: string, hiAnimName: string, runtime: number, x: number, y: number, z: number, turnRate: number, blendInDuration: number): void; - export function updateTaskSweepAimPosition(ped: Player | number, x: number, y: number, z: number): void; + export function updateTaskSweepAimPosition(ped: Ped | Player | number, x: number, y: number, z: number): void; /** - * Example from "me_amanda1.ysc.c4": - * TASK::TASK_ARREST_PED(l_19F This is a Ped , PLAYER::PLAYER_PED_ID()); - * Example from "armenian1.ysc.c4": - * if (!PED::IS_PED_INJURED(l_B18[01])) { - * TASK::TASK_ARREST_PED(l_B18[01], PLAYER::PLAYER_PED_ID()); - * } - * I would love to have time to experiment to see if a player Ped can arrest another Ped. Might make for a good cop mod. - * Looks like only the player can be arrested this way. Peds react and try to arrest you if you task them, but the player charater doesn't do anything if tasked to arrest another ped. - */ - export function taskArrestPed(ped: Player | number, target: Player | number): void; + * Example from "me_amanda1.ysc.c4": + * TASK::TASK_ARREST_PED(l_19F /* This is a Ped *\/ , PLAYER::PLAYER_PED_ID()); + * Example from "armenian1.ysc.c4": + * if (!PED::IS_PED_INJURED(l_B18[0/*1*\/])) { + * TASK::TASK_ARREST_PED(l_B18[0/*1*\/], PLAYER::PLAYER_PED_ID()); + * } + * I would love to have time to experiment to see if a player Ped can arrest another Ped. Might make for a good cop mod. + * Looks like only the player can be arrested this way. Peds react and try to arrest you if you task them, but the player charater doesn't do anything if tasked to arrest another ped. + */ + export function taskArrestPed(ped: Ped | Player | number, target: Ped | Player | number): void; - export function isPedRunningArrestTask(ped: Player | number): boolean; + export function isPedRunningArrestTask(ped: Ped | Player | number): boolean; /** - * @returns This function is hard-coded to always return 0. - */ - export function isPedBeingArrested(ped: Player | number): boolean; + * This function is hard-coded to always return 0. + */ + export function isPedBeingArrested(ped: Ped | Player | number): boolean; - export function uncuffPed(ped: Player | number): void; + export function uncuffPed(ped: Ped | Player | number): void; - export function isPedCuffed(ped: Player | number): boolean; + export function isPedCuffed(ped: Ped | Player | number): boolean; /** - * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json - * @param p7 when set to true allows you to spawn vehicles under -100 z. - */ - export function createVehicle(modelHash: number, x: number, y: number, z: number, heading: number, isNetwork: boolean, bScriptHostVeh: boolean, p7: boolean): number; + * p7 when set to true allows you to spawn vehicles under -100 z. + * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json + */ + export function createVehicle(modelHash: number, x: number, y: number, z: number, heading: number, isNetwork: boolean, bScriptHostVeh: boolean, p7: boolean): Vehicle | number; /** - * Deletes a vehicle. - * eg how to use: - * SET_ENTITY_AS_MISSION_ENTITY(vehicle, true, true); - * DELETE_VEHICLE(&vehicle); - * Deletes the specified vehicle, then sets the handle pointed to by the pointer to NULL. - * @param vehicle SET_ENTITY_AS_MISSION_ENTITY(vehicle, true, true); - */ - export function deleteVehicle(vehicle: Vehicle | number): [void, number]; + * Deletes a vehicle. + * The vehicle must be a mission entity to delete, so call this before deleting: SET_ENTITY_AS_MISSION_ENTITY(vehicle, true, true); + * eg how to use: + * SET_ENTITY_AS_MISSION_ENTITY(vehicle, true, true); + * DELETE_VEHICLE(&vehicle); + * Deletes the specified vehicle, then sets the handle pointed to by the pointer to NULL. + */ + export function deleteVehicle(vehicle?: Vehicle | number): [void, Vehicle | number]; export function setVehicleAllowHomingMissleLockon(vehicle: Vehicle | number, toggle: boolean, p2: boolean): void; export function setVehicleAllowHomingMissleLockonSynced(vehicle: Vehicle | number, canBeLockedOn: boolean, p2: boolean): void; /** - * Makes the vehicle accept no passengers. - */ + * Makes the vehicle accept no passengers. + */ export function setVehicleAllowNoPassengersLockon(veh: Vehicle | number, toggle: boolean): void; /** - * Returns a value depending on the lock-on state of vehicle weapons. - * 0: not locked on - * 1: locking on - * 2: locked on - */ + * Returns a value depending on the lock-on state of vehicle weapons. + * 0: not locked on + * 1: locking on + * 2: locked on + */ export function getVehicleHomingLockonState(vehicle: Vehicle | number): number; export function getVehicleHomingLockedontoState(p0: any): number; @@ -20108,35 +22549,34 @@ declare module "natives" { export function doesScriptVehicleGeneratorExist(vehicleGenerator: number): boolean; /** - * Creates a script vehicle generator at the given coordinates. Most parameters after the model hash are unknown. - * Parameters: - * @param x Generator position - * @param y Generator position - * @param z GET_ENTITY_COORDS(PLAYER_PED_ID(), 0); CREATE_SCRIPT_VEHICLE_GENERATOR(coords.x, coords.y, coords.z, 1.0f, 5.0f, 3.0f, GET_HASH_KEY("adder"), -1. -1, -1, -1, -1, true, false, false, false, true, -1); - * @param heading - Generator heading - * @param p4 - Unknown (always 5.0) - * @param p5 - Unknown (always 3.0) - * @param modelHash - Vehicle model hash - * @param p7 Unknown (always - * @param p11 - Unknown (usually TRUE, only one instance of FALSE) - * @param p12 Unknown (always FALSE) - * @param p14 - Unknown (usally FALSE, only two instances of TRUE) - * @param p15 - Unknown (always TRUE) - * @param p16 - Unknown (always -1) - */ + * Creates a script vehicle generator at the given coordinates. Most parameters after the model hash are unknown. + * Parameters: + * x/y/z - Generator position + * heading - Generator heading + * p4 - Unknown (always 5.0) + * p5 - Unknown (always 3.0) + * modelHash - Vehicle model hash + * p7/8/9/10 - Unknown (always -1) + * p11 - Unknown (usually TRUE, only one instance of FALSE) + * p12/13 - Unknown (always FALSE) + * p14 - Unknown (usally FALSE, only two instances of TRUE) + * p15 - Unknown (always TRUE) + * p16 - Unknown (always -1) + * Vector3 coords = GET_ENTITY_COORDS(PLAYER_PED_ID(), 0); CREATE_SCRIPT_VEHICLE_GENERATOR(coords.x, coords.y, coords.z, 1.0f, 5.0f, 3.0f, GET_HASH_KEY("adder"), -1. -1, -1, -1, -1, true, false, false, false, true, -1); + */ export function createScriptVehicleGenerator(x: number, y: number, z: number, heading: number, p4: number, p5: number, modelHash: number, p7: number, p8: number, p9: number, p10: number, p11: boolean, p12: boolean, p13: boolean, p14: boolean, p15: boolean, p16: number): number; export function deleteScriptVehicleGenerator(vehicleGenerator: number): void; /** - * Only called once in the decompiled scripts. Presumably activates the specified generator. - */ + * Only called once in the decompiled scripts. Presumably activates the specified generator. + */ export function setScriptVehicleGenerator(vehicleGenerator: number, enabled: boolean): void; /** - * When p6 is true, vehicle generators are active. - * @param p7 seems to always be true in story mode scripts, but it's sometimes false in online scripts. - */ + * When p6 is true, vehicle generators are active. + * p7 seems to always be true in story mode scripts, but it's sometimes false in online scripts. + */ export function setAllVehicleGeneratorsActiveInArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, toggle: boolean, p7: boolean): void; export function setAllVehicleGeneratorsActive(): void; @@ -20144,16 +22584,16 @@ declare module "natives" { export function setAllLowPriorityVehicleGeneratorsActive(active: boolean): void; /** - * Related to car generators & CPlayerSwitchMgrLong - */ + * Related to car generators & CPlayerSwitchMgrLong + */ export function setVehicleGeneratorAreaOfInterest(x: number, y: number, z: number, radius: number): void; export function clearVehicleGeneratorAreaOfInterest(): void; /** - * @param vehicle This has an additional param(Vehicle vehicle, float p1) which is always set to 5.0f in the b944 scripts. - * @returns Sets a vehicle on the ground on all wheels. Returns whether or not the operation was successful. - */ + * Sets a vehicle on the ground on all wheels. Returns whether or not the operation was successful. + * sfink: This has an additional param(Vehicle vehicle, float p1) which is always set to 5.0f in the b944 scripts. + */ export function setVehicleOnGroundProperly(vehicle: Vehicle | number, p1: number): boolean; export function setVehicleUseCutsceneWheelCompression(p0: Vehicle | number, p1: boolean, p2: boolean, p3: boolean): boolean; @@ -20165,24 +22605,24 @@ declare module "natives" { export function removeVehicleUpsidedownCheck(vehicle: Vehicle | number): void; /** - * Returns true if the vehicle's current speed is less than, or equal to 0.0025f. - * @returns For some vehicles it returns true if the current speed is <= 0.00039999999. - */ + * Returns true if the vehicle's current speed is less than, or equal to 0.0025f. + * For some vehicles it returns true if the current speed is <= 0.00039999999. + */ export function isVehicleStopped(vehicle: Vehicle | number): boolean; /** - * Gets the number of passengers. - * This native was modified in b2545 to take two additional parameters, allowing you to include the driver or exclude dead passengers. - * To keep it working like before b2545, set includeDriver to false and includeDeadOccupants to true. - */ + * Gets the number of passengers. + * This native was modified in b2545 to take two additional parameters, allowing you to include the driver or exclude dead passengers. + * To keep it working like before b2545, set includeDriver to false and includeDeadOccupants to true. + */ export function getVehicleNumberOfPassengers(vehicle: Vehicle | number, includeDriver: boolean, includeDeadOccupants: boolean): number; export function getVehicleMaxNumberOfPassengers(vehicle: Vehicle | number): number; /** - * Returns max number of passengers (including the driver) for the specified vehicle model. - * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json - */ + * Returns max number of passengers (including the driver) for the specified vehicle model. + * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json + */ export function getVehicleModelNumberOfSeats(modelHash: number): number; export function isSeatWarpOnly(vehicle: Vehicle | number, seatIndex: number): boolean; @@ -20190,16 +22630,16 @@ declare module "natives" { export function isTurretSeat(vehicle: Vehicle | number, seatIndex: number): boolean; /** - * Returns true if the vehicle has the FLAG_ALLOWS_RAPPEL flag set. - */ + * Returns true if the vehicle has the FLAG_ALLOWS_RAPPEL flag set. + */ export function doesVehicleAllowRappel(vehicle: Vehicle | number): boolean; /** - * Use this native inside a looped function. - * Values: - * - `0.0` = no vehicles on streets - * - `1.0` = normal vehicles on streets - */ + * Use this native inside a looped function. + * Values: + * - `0.0` = no vehicles on streets + * - `1.0` = normal vehicles on streets + */ export function setVehicleDensityMultiplierThisFrame(multiplier: number): void; export function setRandomVehicleDensityMultiplierThisFrame(multiplier: number): void; @@ -20215,27 +22655,31 @@ declare module "natives" { export function setNumberOfParkedVehicles(value: number): void; /** - * enum eVehicleLockState - * { - * VEHICLELOCK_NONE, - * VEHICLELOCK_UNLOCKED, - * VEHICLELOCK_LOCKED, - * VEHICLELOCK_LOCKOUT_PLAYER_ONLY, - * VEHICLELOCK_LOCKED_PLAYER_INSIDE, - * VEHICLELOCK_LOCKED_INITIALLY, - * VEHICLELOCK_FORCE_SHUT_DOORS, - * See NativeDB for reference: http://natives.altv.mp/#/0xB664292EAECF7FA6 - */ + * enum eVehicleLockState + * { + * VEHICLELOCK_NONE, + * VEHICLELOCK_UNLOCKED, + * VEHICLELOCK_LOCKED, + * VEHICLELOCK_LOCKOUT_PLAYER_ONLY, + * VEHICLELOCK_LOCKED_PLAYER_INSIDE, + * VEHICLELOCK_LOCKED_INITIALLY, + * VEHICLELOCK_FORCE_SHUT_DOORS, + * VEHICLELOCK_LOCKED_BUT_CAN_BE_DAMAGED, + * VEHICLELOCK_LOCKED_BUT_BOOT_UNLOCKED, + * VEHICLELOCK_LOCKED_NO_PASSENGERS, + * VEHICLELOCK_CANNOT_ENTER + * }; + */ export function setVehicleDoorsLocked(vehicle: Vehicle | number, doorLockStatus: number): void; /** - * @param doorId see SET_VEHICLE_DOOR_SHUT - */ + * doorId: see SET_VEHICLE_DOOR_SHUT + */ export function setVehicleIndividualDoorsLocked(vehicle: Vehicle | number, doorId: number, doorLockStatus: number): void; /** - * If set to true, prevents vehicle sirens from having sound, leaving only the lights. - */ + * If set to true, prevents vehicle sirens from having sound, leaving only the lights. + */ export function setVehicleHasMutedSirens(vehicle: Vehicle | number, toggle: boolean): void; export function setVehicleDoorsLockedForPlayer(vehicle: Vehicle | number, player: Player | number, toggle: boolean): void; @@ -20243,12 +22687,12 @@ declare module "natives" { export function getVehicleDoorsLockedForPlayer(vehicle: Vehicle | number, player: Player | number): boolean; /** - * After some analysis, I've decided that these are what the parameters are. - * We can see this being used in R* scripts such as "am_mp_property_int.ysc.c4": - * l_11A1 = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), 1); - * ... - * @param vehicle :SET_VEHICLE_DOORS_LOCKED_FOR_ALL_PLAYERS(l_11A1, 1); - */ + * After some analysis, I've decided that these are what the parameters are. + * We can see this being used in R* scripts such as "am_mp_property_int.ysc.c4": + * l_11A1 = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), 1); + * ... + * VEHICLE::SET_VEHICLE_DOORS_LOCKED_FOR_ALL_PLAYERS(l_11A1, 1); + */ export function setVehicleDoorsLockedForAllPlayers(vehicle: Vehicle | number, toggle: boolean): void; export function setVehicleDoorsLockedForNonScriptPlayers(vehicle: Vehicle | number, toggle: boolean): void; @@ -20260,20 +22704,28 @@ declare module "natives" { export function setVehicleDontTerminateTaskWhenAchieved(vehicle: Vehicle | number): void; /** - * Explodes a selected vehicle. - * BOOL isAudible = If explosion makes a sound. - * BOOL isInvisible = If the explosion is invisible or not. - * First BOOL does not give any visual explosion, the vehicle just falls apart completely but slowly and starts to burn. - * @param vehicle vehicle = Vehicle you want to explode. - */ + * 0.0f = engine rev minimum + * 1.0f = engine rev limit + */ + export function setVehicleMaxLaunchEngineRevs(vehicle: Vehicle | number, modifier: number): void; + + export function getVehicleThrottle(vehicle: Vehicle | number): number; + + /** + * Explodes a selected vehicle. + * Vehicle vehicle = Vehicle you want to explode. + * BOOL isAudible = If explosion makes a sound. + * BOOL isInvisible = If the explosion is invisible or not. + * First BOOL does not give any visual explosion, the vehicle just falls apart completely but slowly and starts to burn. + */ export function explodeVehicle(vehicle: Vehicle | number, isAudible: boolean, isInvisible: boolean): void; /** - * Tested on the player's current vehicle. Unless you kill the driver, the vehicle doesn't loose control, however, if enabled, explodeOnImpact is still active. The moment you crash, boom. - */ + * Tested on the player's current vehicle. Unless you kill the driver, the vehicle doesn't loose control, however, if enabled, explodeOnImpact is still active. The moment you crash, boom. + */ export function setVehicleOutOfControl(vehicle: Vehicle | number, killDriver: boolean, explodeOnImpact: boolean): void; - export function setVehicleTimedExplosion(vehicle: Vehicle | number, ped: Player | number, toggle: boolean): void; + export function setVehicleTimedExplosion(vehicle: Vehicle | number, ped: Ped | Player | number, toggle: boolean): void; export function addVehiclePhoneExplosiveDevice(vehicle: Vehicle | number): void; @@ -20283,47 +22735,49 @@ declare module "natives" { export function detonateVehiclePhoneExplosiveDevice(): void; + export function haveVehicleRearDoorsBeenBlownOpenByStickybomb(vehicle: Vehicle | number): boolean; + /** - * This is not tested - it's just an assumption. - * - Nac - * Doesn't seem to work. I'll try with an int instead. --JT - * Read the scripts, im dumpass. - * if (!VEHICLE::IS_TAXI_LIGHT_ON(l_115)) { - * VEHICLE::SET_TAXI_LIGHTS(l_115, 1); - * } - */ + * This is not tested - it's just an assumption. + * - Nac + * Doesn't seem to work. I'll try with an int instead. --JT + * Read the scripts, im dumpass. + * if (!VEHICLE::IS_TAXI_LIGHT_ON(l_115)) { + * VEHICLE::SET_TAXI_LIGHTS(l_115, 1); + * } + */ export function setTaxiLights(vehicle: Vehicle | number, state: boolean): void; export function isTaxiLightOn(vehicle: Vehicle | number): boolean; /** - * Full list of garages by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/garages.json - * @param garageName example "Michael - Beverly Hills" - */ - export function isVehicleInGarageArea(garageName: string | null, vehicle: Vehicle | number): boolean; + * garageName example "Michael - Beverly Hills" + * Full list of garages by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/garages.json + */ + export function isVehicleInGarageArea(garageName: string, vehicle: Vehicle | number): boolean; /** - * For a list of valid paint indexes, view: https://pastebin.com/pwHci0xK - * ------------------------------------------------------------------------- - * Note: minimum color index is 0, maximum color index is (numColorIndices - 1) - * Full list of vehicle colors by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicleColors.json - * @param colorPrimary & colorSecondary are the paint index for the vehicle. - */ + * colorPrimary & colorSecondary are the paint index for the vehicle. + * For a list of valid paint indexes, view: https://pastebin.com/pwHci0xK + * ------------------------------------------------------------------------- + * Note: minimum color index is 0, maximum color index is (numColorIndices - 1) + * Full list of vehicle colors by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicleColors.json + */ export function setVehicleColours(vehicle: Vehicle | number, colorPrimary: number, colorSecondary: number): void; /** - * It switch to highbeam when p1 is set to true. - */ + * It switch to highbeam when p1 is set to true. + */ export function setVehicleFullbeam(vehicle: Vehicle | number, toggle: boolean): void; /** - * @param toggle (toggle) was always 1 (true) except in one case in the b678 scripts. - */ + * p1 (toggle) was always 1 (true) except in one case in the b678 scripts. + */ export function setVehicleIsRacing(vehicle: Vehicle | number, toggle: boolean): void; /** - * p1, p2, p3 are RGB values for color (255,0,0 for Red, ect) - */ + * p1, p2, p3 are RGB values for color (255,0,0 for Red, ect) + */ export function setVehicleCustomPrimaryColour(vehicle: Vehicle | number, r: number, g: number, b: number): void; export function getVehicleCustomPrimaryColour(vehicle: Vehicle | number, r?: number, g?: number, b?: number): [void, number, number, number]; @@ -20333,8 +22787,8 @@ declare module "natives" { export function getIsVehiclePrimaryColourCustom(vehicle: Vehicle | number): boolean; /** - * p1, p2, p3 are RGB values for color (255,0,0 for Red, ect) - */ + * p1, p2, p3 are RGB values for color (255,0,0 for Red, ect) + */ export function setVehicleCustomSecondaryColour(vehicle: Vehicle | number, r: number, g: number, b: number): void; export function getVehicleCustomSecondaryColour(vehicle: Vehicle | number, r?: number, g?: number, b?: number): [void, number, number, number]; @@ -20342,28 +22796,28 @@ declare module "natives" { export function clearVehicleCustomSecondaryColour(vehicle: Vehicle | number): void; /** - * Check if Vehicle Secondary is avaliable for customize - */ + * Check if Vehicle Secondary is avaliable for customize + */ export function getIsVehicleSecondaryColourCustom(vehicle: Vehicle | number): boolean; /** - * The parameter fade is a value from 0-1, where 0 is fresh paint. - */ + * The parameter fade is a value from 0-1, where 0 is fresh paint. + */ export function setVehicleEnveffScale(vehicle: Vehicle | number, fade: number): void; /** - * The result is a value from 0-1, where 0 is fresh paint. - */ + * The result is a value from 0-1, where 0 is fresh paint. + */ export function getVehicleEnveffScale(vehicle: Vehicle | number): number; /** - * Hardcoded to not work in multiplayer. - */ + * Hardcoded to not work in multiplayer. + */ export function setCanResprayVehicle(vehicle: Vehicle | number, state: boolean): void; /** - * Used for GTAO CEO/Associate spawned vehicles. - */ + * Used for GTAO CEO/Associate spawned vehicles. + */ export function setGoonBossVehicle(vehicle: Vehicle | number, toggle: boolean): void; export function setOpenRearDoorsOnExplosion(vehicle: Vehicle | number, toggle: boolean): void; @@ -20381,8 +22835,8 @@ declare module "natives" { export function setBoatIgnoreLandProbes(p0: any, p1: any): void; /** - * Use the vehicle bounds (instead of viewport) when deciding if a vehicle is sufficiently above the water (waterheight.dat), bypassing wave simulation checks - */ + * Use the vehicle bounds (instead of viewport) when deciding if a vehicle is sufficiently above the water (waterheight.dat), bypassing wave simulation checks + */ export function setBoundsAffectWaterProbes(vehicle: Vehicle | number, toggle: boolean): void; export function setBoatAnchor(vehicle: Vehicle | number, toggle: boolean): void; @@ -20394,8 +22848,8 @@ declare module "natives" { export function setBoatRemainsAnchoredWhilePlayerIsDriver(vehicle: Vehicle | number, toggle: boolean): void; /** - * No observed effect. - */ + * No observed effect. + */ export function setForceLowLodAnchorMode(vehicle: Vehicle | number, p1: boolean): void; export function setBoatLowLodAnchorDistance(vehicle: Vehicle | number, value: number): void; @@ -20407,8 +22861,8 @@ declare module "natives" { export function setBoatWrecked(vehicle: Vehicle | number): void; /** - * Activate siren on vehicle (Only works if the vehicle has a siren). - */ + * Activate siren on vehicle (Only works if the vehicle has a siren). + */ export function setVehicleSiren(vehicle: Vehicle | number, toggle: boolean): void; export function isVehicleSirenOn(vehicle: Vehicle | number): boolean; @@ -20416,8 +22870,8 @@ declare module "natives" { export function isVehicleSirenAudioOn(vehicle: Vehicle | number): boolean; /** - * If set to true, vehicle will not take crash damage, but is still susceptible to damage from bullets and explosives - */ + * If set to true, vehicle will not take crash damage, but is still susceptible to damage from bullets and explosives + */ export function setVehicleStrong(vehicle: Vehicle | number, toggle: boolean): void; export function removeVehicleStuckCheck(vehicle: Vehicle | number): void; @@ -20425,65 +22879,63 @@ declare module "natives" { export function getVehicleColours(vehicle: Vehicle | number, colorPrimary?: number, colorSecondary?: number): [void, number, number]; /** - * Check if a vehicle seat is free. - * Use GET_VEHICLE_MAX_NUMBER_OF_PASSENGERS(vehicle) - 1 for last seat index. - * @param vehicle on true the function returns already false while a task on the target seat is running (TASK_ENTER_VEHICLE/TASK_SHUFFLE_TO_NEXT_VEHICLE_SEAT) - on false only when a ped is finally sitting in the seat. - * @param seatIndex = -1 being the driver seat. - * @param isTaskRunning = on true the function returns already false while a task on the target seat is running (TASK_ENTER_VEHICLE/TASK_SHUFFLE_TO_NEXT_VEHICLE_SEAT) - on false only when a ped is finally sitting in the seat. - * @returns isTaskRunning = on true the function returns already false while a task on the target seat is running (TASK_ENTER_VEHICLE/TASK_SHUFFLE_TO_NEXT_VEHICLE_SEAT) - on false only when a ped is finally sitting in the seat. - */ + * Check if a vehicle seat is free. + * seatIndex = -1 being the driver seat. + * Use GET_VEHICLE_MAX_NUMBER_OF_PASSENGERS(vehicle) - 1 for last seat index. + * isTaskRunning = on true the function returns already false while a task on the target seat is running (TASK_ENTER_VEHICLE/TASK_SHUFFLE_TO_NEXT_VEHICLE_SEAT) - on false only when a ped is finally sitting in the seat. + */ export function isVehicleSeatFree(vehicle: Vehicle | number, seatIndex: number, isTaskRunning: boolean): boolean; /** - * If there is no ped in the seat, and the game considers the vehicle as ambient population, this will create a random occupant ped in the seat, which may be cleaned up by the game fairly soon if not marked as script-owned mission entity. - * Seat indexes: - * -1 = Driver - * 0 = Front Right Passenger - * 1 = Back Left Passenger - * 2 = Back Right Passenger - * 3 = Further Back Left Passenger (vehicles > 4 seats) - * 4 = Further Back Right Passenger (vehicles > 4 seats) - * etc. - * If p2 is true it uses a different GetOccupant function. - */ - export function getPedInVehicleSeat(vehicle: Vehicle | number, seatIndex: number, p2: boolean): number; + * If there is no ped in the seat, and the game considers the vehicle as ambient population, this will create a random occupant ped in the seat, which may be cleaned up by the game fairly soon if not marked as script-owned mission entity. + * Seat indexes: + * -1 = Driver + * 0 = Front Right Passenger + * 1 = Back Left Passenger + * 2 = Back Right Passenger + * 3 = Further Back Left Passenger (vehicles > 4 seats) + * 4 = Further Back Right Passenger (vehicles > 4 seats) + * etc. + * If p2 is true it uses a different GetOccupant function. + */ + export function getPedInVehicleSeat(vehicle: Vehicle | number, seatIndex: number, p2: boolean): Ped | Player | number; - export function getLastPedInVehicleSeat(vehicle: Vehicle | number, seatIndex: number): number; + export function getLastPedInVehicleSeat(vehicle: Vehicle | number, seatIndex: number): Ped | Player | number; export function getVehicleLightsState(vehicle: Vehicle | number, lightsOn?: boolean, highbeamsOn?: boolean): [boolean, boolean, boolean]; /** - * '0 = wheel_lf / bike, plane or jet front - * '1 = wheel_rf - * '2 = wheel_lm / in 6 wheels trailer, plane or jet is first one on left - * '3 = wheel_rm / in 6 wheels trailer, plane or jet is first one on right - * '4 = wheel_lr / bike rear / in 6 wheels trailer, plane or jet is last one on left - * '5 = wheel_rr / in 6 wheels trailer, plane or jet is last one on right - * '45 = 6 wheels trailer mid wheel left - * '47 = 6 wheels trailer mid wheel right - * @param wheelID used for 4 wheelers seem to be (0, 1, 4, 5) - * @param completely - is to check if tire completely gone from rim. - */ + * wheelID used for 4 wheelers seem to be (0, 1, 4, 5) + * completely - is to check if tire completely gone from rim. + * '0 = wheel_lf / bike, plane or jet front + * '1 = wheel_rf + * '2 = wheel_lm / in 6 wheels trailer, plane or jet is first one on left + * '3 = wheel_rm / in 6 wheels trailer, plane or jet is first one on right + * '4 = wheel_lr / bike rear / in 6 wheels trailer, plane or jet is last one on left + * '5 = wheel_rr / in 6 wheels trailer, plane or jet is last one on right + * '45 = 6 wheels trailer mid wheel left + * '47 = 6 wheels trailer mid wheel right + */ export function isVehicleTyreBurst(vehicle: Vehicle | number, wheelID: number, completely: boolean): boolean; /** - * SCALE: Setting the speed to 30 would result in a speed of roughly 60mph, according to speedometer. - * You can convert meters/s to mph here: - * http://www.calculateme.com/Speed/MetersperSecond/ToMilesperHour.htm - * @param speed is in meters per second - */ + * SCALE: Setting the speed to 30 would result in a speed of roughly 60mph, according to speedometer. + * Speed is in meters per second + * You can convert meters/s to mph here: + * http://www.calculateme.com/Speed/MetersperSecond/ToMilesperHour.htm + */ export function setVehicleForwardSpeed(vehicle: Vehicle | number, speed: number): void; /** - * Seems to be identical to SET_VEHICLE_FORWARD_SPEED - */ + * Seems to be identical to SET_VEHICLE_FORWARD_SPEED + */ export function setVehicleForwardSpeedXy(vehicle: Vehicle | number, speed: number): void; /** - * This native makes the vehicle stop immediately, as happens when we enter a MP garage. - * . distance defines how far it will travel until stopping. Garage doors use 3.0. - * . If killEngine is set to 1, you cannot resume driving the vehicle once it stops. This looks like is a bitmapped integer. - */ + * This native makes the vehicle stop immediately, as happens when we enter a MP garage. + * . distance defines how far it will travel until stopping. Garage doors use 3.0. + * . If killEngine is set to 1, you cannot resume driving the vehicle once it stops. This looks like is a bitmapped integer. + */ export function bringVehicleToHalt(vehicle: Vehicle | number, distance: number, duration: number, p3: boolean): void; export function setVehicleSteerForBuildings(vehicle: Vehicle | number, p1: any): void; @@ -20493,20 +22945,20 @@ declare module "natives" { export function setIgnorePlanesSmallPitchChange(p0: any, p1: any): void; /** - * Stops CTaskBringVehicleToHalt - */ + * Stops CTaskBringVehicleToHalt + */ export function stopBringingVehicleToHalt(vehicle: Vehicle | number): void; /** - * Returns true if vehicle is halted by BRING_VEHICLE_TO_HALT - */ + * Returns true if vehicle is halted by BRING_VEHICLE_TO_HALT + */ export function isVehicleBeingBroughtToHalt(vehicle: Vehicle | number): boolean; export function lowerForkliftForks(forklift: Vehicle | number): void; /** - * 0.0 = Lowest 1.0 = Highest. This is best to be used if you wanna pick-up a car since un-realistically on GTA V forklifts can't pick up much of anything due to vehicle mass. If you put this under a car then set it above 0.0 to a 'lifted-value' it will raise the car with no issue lol - */ + * 0.0 = Lowest 1.0 = Highest. This is best to be used if you wanna pick-up a car since un-realistically on GTA V forklifts can't pick up much of anything due to vehicle mass. If you put this under a car then set it above 0.0 to a 'lifted-value' it will raise the car with no issue lol + */ export function setForkliftForkHeight(vehicle: Vehicle | number, height: number): void; export function isEntityAttachedToHandlerFrame(vehicle: Vehicle | number, entity: Entity | number): boolean; @@ -20514,10 +22966,10 @@ declare module "natives" { export function isAnyEntityAttachedToHandlerFrame(vehicle: Vehicle | number): boolean; /** - * Finds the vehicle that is carrying this entity with a handler frame. - * @returns The model of the entity must be prop_contr_03b_ld or the function will return 0. - */ - export function findHandlerVehicleContainerIsAttachedTo(entity: Entity | number): number; + * Finds the vehicle that is carrying this entity with a handler frame. + * The model of the entity must be prop_contr_03b_ld or the function will return 0. + */ + export function findHandlerVehicleContainerIsAttachedTo(entity: Entity | number): Vehicle | number; export function isHandlerFrameLinedUpWithContainer(vehicle: Vehicle | number, entity: Entity | number): boolean; @@ -20532,39 +22984,40 @@ declare module "natives" { export function isHeliLandingAreaBlocked(vehicle: Vehicle | number): boolean; /** - * Used on helicopters and blimps during the CTaskVehicleLand task. Sets a value on the task to 10f - */ + * Used on helicopters and blimps during the CTaskVehicleLand task. Sets a value on the task to 10f + */ export function setShortSlowdownForLanding(vehicle: Vehicle | number): void; export function setHeliTurbulenceScalar(vehicle: Vehicle | number, p1: number): void; /** - * Initially used in Max Payne 3, that's why we know the name. - */ + * Initially used in Max Payne 3, that's why we know the name. + */ export function setCarBootOpen(vehicle: Vehicle | number): void; /** - * to burst all tyres type it 8 times where p1 = 0 to 7. - * '0 = wheel_lf / bike, plane or jet front - * '1 = wheel_rf - * '2 = wheel_lm / in 6 wheels trailer, plane or jet is first one on left - * '3 = wheel_rm / in 6 wheels trailer, plane or jet is first one on right - * '4 = wheel_lr / bike rear / in 6 wheels trailer, plane or jet is last one on left - * '5 = wheel_rr / in 6 wheels trailer, plane or jet is last one on right - * '45 = 6 wheels trailer mid wheel left - * '47 = 6 wheels trailer mid wheel right - * @param p3 seems to be how much damage it has taken. 0 doesn't deflate them, 1000 completely deflates them. - */ + * "To burst tyres VEHICLE::SET_VEHICLE_TYRE_BURST(vehicle, 0, true, 1000.0) + * to burst all tyres type it 8 times where p1 = 0 to 7. + * p3 seems to be how much damage it has taken. 0 doesn't deflate them, 1000 completely deflates them. + * '0 = wheel_lf / bike, plane or jet front + * '1 = wheel_rf + * '2 = wheel_lm / in 6 wheels trailer, plane or jet is first one on left + * '3 = wheel_rm / in 6 wheels trailer, plane or jet is first one on right + * '4 = wheel_lr / bike rear / in 6 wheels trailer, plane or jet is last one on left + * '5 = wheel_rr / in 6 wheels trailer, plane or jet is last one on right + * '45 = 6 wheels trailer mid wheel left + * '47 = 6 wheels trailer mid wheel right + */ export function setVehicleTyreBurst(vehicle: Vehicle | number, index: number, onRim: boolean, p3: number): void; /** - * Closes all doors of a vehicle: - */ + * Closes all doors of a vehicle: + */ export function setVehicleDoorsShut(vehicle: Vehicle | number, closeInstantly: boolean): void; /** - * Allows you to toggle bulletproof tires. - */ + * Allows you to toggle bulletproof tires. + */ export function setVehicleTyresCanBurst(vehicle: Vehicle | number, toggle: boolean): void; export function getVehicleTyresCanBurst(vehicle: Vehicle | number): boolean; @@ -20572,121 +23025,127 @@ declare module "natives" { export function setVehicleWheelsCanBreak(vehicle: Vehicle | number, enabled: boolean): void; /** - * @param doorId see SET_VEHICLE_DOOR_SHUT - */ + * doorId: see SET_VEHICLE_DOOR_SHUT + */ export function setVehicleDoorOpen(vehicle: Vehicle | number, doorId: number, loose: boolean, openInstantly: boolean): void; /** - * Usually used alongside other vehicle door natives. - * @param doorId see SET_VEHICLE_DOOR_SHUT - */ + * doorId: see SET_VEHICLE_DOOR_SHUT + * Usually used alongside other vehicle door natives. + */ export function setVehicleDoorAutoLock(vehicle: Vehicle | number, doorId: number, toggle: boolean): void; export function setFleeingVehiclesUseSwitchedOffNodes(p0: any): void; /** - * 0 = Front Right Window - * 1 = Front Left Window - * 2 = Back Right Window - * 3 = Back Left Window - * 4 = Unknown - * 5 = Unknown - * 6 = Windscreen - * 7 = Rear Windscreen - */ + * windowIndex: + * 0 = Front Right Window + * 1 = Front Left Window + * 2 = Back Right Window + * 3 = Back Left Window + * 4 = Unknown + * 5 = Unknown + * 6 = Windscreen + * 7 = Rear Windscreen + */ export function removeVehicleWindow(vehicle: Vehicle | number, windowIndex: number): void; /** - * Roll down all the windows of the vehicle passed through the first parameter. - */ + * Roll down all the windows of the vehicle passed through the first parameter. + */ export function rollDownWindows(vehicle: Vehicle | number): void; /** - * 0 = Front Left Window - * 1 = Front Right Window - * 2 = Rear Left Window - * 3 = Rear Right Window - * 4 = Front Windscreen - * 5 = Rear Windscreen - * 6 = Mid Left - * 7 = Mid Right - * 8 = Invalid - */ + * windowIndex: + * 0 = Front Left Window + * 1 = Front Right Window + * 2 = Rear Left Window + * 3 = Rear Right Window + * 4 = Front Windscreen + * 5 = Rear Windscreen + * 6 = Mid Left + * 7 = Mid Right + * 8 = Invalid + */ export function rollDownWindow(vehicle: Vehicle | number, windowIndex: number): void; /** - * 0 = Front Left Window - * 1 = Front Right Window - * 2 = Rear Left Window - * 3 = Rear Right Window - * 4 = Front Windscreen - * 5 = Rear Windscreen - * 6 = Mid Left - * 7 = Mid Right - * 8 = Invalid - */ + * windowIndex: + * 0 = Front Left Window + * 1 = Front Right Window + * 2 = Rear Left Window + * 3 = Rear Right Window + * 4 = Front Windscreen + * 5 = Rear Windscreen + * 6 = Mid Left + * 7 = Mid Right + * 8 = Invalid + */ export function rollUpWindow(vehicle: Vehicle | number, windowIndex: number): void; /** - * 0 = Front Left Window - * 1 = Front Right Window - * 2 = Rear Left Window - * 3 = Rear Right Window - * 4 = Front Windscreen - * 5 = Rear Windscreen - * 6 = Mid Left - * 7 = Mid Right - * 8 = Invalid - */ + * windowIndex: + * 0 = Front Left Window + * 1 = Front Right Window + * 2 = Rear Left Window + * 3 = Rear Right Window + * 4 = Front Windscreen + * 5 = Rear Windscreen + * 6 = Mid Left + * 7 = Mid Right + * 8 = Invalid + */ export function smashVehicleWindow(vehicle: Vehicle | number, windowIndex: number): void; /** - * 0 = Front Left Window - * 1 = Front Right Window - * 2 = Rear Left Window - * 3 = Rear Right Window - * 4 = Front Windscreen - * 5 = Rear Windscreen - * 6 = Mid Left - * 7 = Mid Right - * 8 = Invalid - * See NativeDB for reference: http://natives.altv.mp/#/0x772282EBEB95E682 - */ + * windowIndex: + * 0 = Front Left Window + * 1 = Front Right Window + * 2 = Rear Left Window + * 3 = Rear Right Window + * 4 = Front Windscreen + * 5 = Rear Windscreen + * 6 = Mid Left + * 7 = Mid Right + * 8 = Invalid + * Additional information: FIX_VEHICLE_WINDOW (0x140D0BB88) references an array of bone vehicle indices (0x141D4B3E0) { 2Ah, 2Bh, 2Ch, 2Dh, 2Eh, 2Fh, 28h, 29h } that correspond to: window_lf, window_rf, window_lr, window_rr, window_lm, window_rm, windscreen, windscreen_r. This array is used by most vehwindow natives. + * Also, this function is coded to not work on vehicles of type: CBike, Bmx, CBoat, CTrain, and CSubmarine. + */ export function fixVehicleWindow(vehicle: Vehicle | number, windowIndex: number): void; /** - * Detaches the vehicle's windscreen. - * For further information, see : gtaforums.com/topic/859570-glass/#entry1068894566 - */ + * Detaches the vehicle's windscreen. + * For further information, see : gtaforums.com/topic/859570-glass/#entry1068894566 + */ export function popOutVehicleWindscreen(vehicle: Vehicle | number): void; /** - * Pops off the "roof" bone in the direction of the specified offset from the vehicle. - */ + * Pops off the "roof" bone in the direction of the specified offset from the vehicle. + */ export function popOffVehicleRoofWithImpulse(vehicle: Vehicle | number, x: number, y: number, z: number): void; /** - * set's if the vehicle has lights or not. - * not an on off toggle. - * p1 = 1 ;vehicle doesn't have lights, always off - * p1 = 2 ;vehicle has always on lights - * p1 = 3 ;or even larger like 4,5,... normal lights like =1 - * note1: when using =2 on day it's lowbeam,highbeam - * but at night it's lowbeam,lowbeam,highbeam - * note2: when using =0 it's affected by day or night for highbeams don't exist in daytime. - * @param state = 0 ;vehicle normal lights, off then lowbeams, then highbeams - */ + * set's if the vehicle has lights or not. + * not an on off toggle. + * p1 = 0 ;vehicle normal lights, off then lowbeams, then highbeams + * p1 = 1 ;vehicle doesn't have lights, always off + * p1 = 2 ;vehicle has always on lights + * p1 = 3 ;or even larger like 4,5,... normal lights like =1 + * note1: when using =2 on day it's lowbeam,highbeam + * but at night it's lowbeam,lowbeam,highbeam + * note2: when using =0 it's affected by day or night for highbeams don't exist in daytime. + */ export function setVehicleLights(vehicle: Vehicle | number, state: number): void; export function setVehicleUsePlayerLightSettings(vehicle: Vehicle | number, toggle: boolean): void; /** - * Determines how vehicle lights behave when toggled. - * 0 = Default (Lights can be toggled between off, normal and high beams) - * 1 = Lights Disabled (Lights are fully disabled, cannot be toggled) - * 2 = Always On (Lights can be toggled between normal and high beams) - * @param p1 can be either 0, 1 or 2. - */ + * p1 can be either 0, 1 or 2. + * Determines how vehicle lights behave when toggled. + * 0 = Default (Lights can be toggled between off, normal and high beams) + * 1 = Lights Disabled (Lights are fully disabled, cannot be toggled) + * 2 = Always On (Lights can be toggled between normal and high beams) + */ export function setVehicleHeadlightShadows(vehicle: Vehicle | number, p1: number): void; export function setVehicleAlarm(vehicle: Vehicle | number, state: boolean): void; @@ -20698,23 +23157,23 @@ declare module "natives" { export function setVehicleInteriorlight(vehicle: Vehicle | number, toggle: boolean): void; /** - * Sets some bit of vehicle - */ + * Sets some bit of vehicle + */ export function setVehicleForceInteriorlight(vehicle: Vehicle | number, toggle: boolean): void; /** - * this value isn't capped afaik. - * multiplier = 0.0 no lights - * multiplier = 1.0 default game value - * @param multiplier = brightness of head lights. - */ + * multiplier = brightness of head lights. + * this value isn't capped afaik. + * multiplier = 0.0 no lights + * multiplier = 1.0 default game value + */ export function setVehicleLightMultiplier(vehicle: Vehicle | number, multiplier: number): void; export function attachVehicleToTrailer(vehicle: Vehicle | number, trailer: Vehicle | number, radius: number): void; /** - * This is the proper way of attaching vehicles to the car carrier, it's what Rockstar uses. Video Demo: https://www.youtube.com/watch?v=2lVEIzf7bgo - */ + * This is the proper way of attaching vehicles to the car carrier, it's what Rockstar uses. Video Demo: https://www.youtube.com/watch?v=2lVEIzf7bgo + */ export function attachVehicleOnToTrailer(vehicle: Vehicle | number, trailer: Vehicle | number, offsetX: number, offsetY: number, offsetZ: number, coordsX: number, coordsY: number, coordsZ: number, rotationX: number, rotationY: number, rotationZ: number, disableCollisions: number): void; export function stabiliseEntityAttachedToHeli(vehicle: Vehicle | number, entity: Entity | number, p2: number): void; @@ -20726,100 +23185,107 @@ declare module "natives" { export function setTrailerInverseMassScale(vehicle: Vehicle | number, p1: number): void; /** - * in the decompiled scripts, seems to be always called on the vehicle right after being attached to a trailer. - */ + * in the decompiled scripts, seems to be always called on the vehicle right after being attached to a trailer. + */ export function setTrailerLegsRaised(vehicle: Vehicle | number): void; export function setTrailerLegsLowered(vehicle: Vehicle | number): void; /** - * '0 = wheel_lf / bike, plane or jet front - * '1 = wheel_rf - * '2 = wheel_lm / in 6 wheels trailer, plane or jet is first one on left - * '3 = wheel_rm / in 6 wheels trailer, plane or jet is first one on right - * '4 = wheel_lr / bike rear / in 6 wheels trailer, plane or jet is last one on left - * '5 = wheel_rr / in 6 wheels trailer, plane or jet is last one on right - * '45 = 6 wheels trailer mid wheel left - * '47 = 6 wheels trailer mid wheel right - * @param tyreIndex = 0 to 4 on normal vehicles - */ + * tyreIndex = 0 to 4 on normal vehicles + * '0 = wheel_lf / bike, plane or jet front + * '1 = wheel_rf + * '2 = wheel_lm / in 6 wheels trailer, plane or jet is first one on left + * '3 = wheel_rm / in 6 wheels trailer, plane or jet is first one on right + * '4 = wheel_lr / bike rear / in 6 wheels trailer, plane or jet is last one on left + * '5 = wheel_rr / in 6 wheels trailer, plane or jet is last one on right + * '45 = 6 wheels trailer mid wheel left + * '47 = 6 wheels trailer mid wheel right + */ export function setVehicleTyreFixed(vehicle: Vehicle | number, tyreIndex: number): void; /** - * Sets a vehicle's license plate text. 8 chars maximum. - * Example: - * Ped playerPed = PLAYER::PLAYER_PED_ID(); - * char *plateText = "KING"; - * VEHICLE::SET_VEHICLE_NUMBER_PLATE_TEXT(veh, plateText); - * @param vehicle veh = PED::GET_VEHICLE_PED_IS_USING(playerPed); - */ - export function setVehicleNumberPlateText(vehicle: Vehicle | number, plateText: string | null): void; + * Sets a vehicle's license plate text. 8 chars maximum. + * Example: + * Ped playerPed = PLAYER::PLAYER_PED_ID(); + * Vehicle veh = PED::GET_VEHICLE_PED_IS_USING(playerPed); + * char *plateText = "KING"; + * VEHICLE::SET_VEHICLE_NUMBER_PLATE_TEXT(veh, plateText); + */ + export function setVehicleNumberPlateText(vehicle: Vehicle | number, plateText: string): void; /** - * Returns the license plate text from a vehicle. 8 chars maximum. - */ + * Returns the license plate text from a vehicle. 8 chars maximum. + */ export function getVehicleNumberPlateText(vehicle: Vehicle | number): string; /** - * Returns the number of *types* of licence plates, enumerated below in SET_VEHICLE_NUMBER_PLATE_TEXT_INDEX. - */ + * Returns the number of *types* of licence plates, enumerated below in SET_VEHICLE_NUMBER_PLATE_TEXT_INDEX. + */ export function getNumberOfVehicleNumberPlates(): number; /** - * Plates: - * Blue/White - 0 - * Yellow/black - 1 - * Yellow/Blue - 2 - * Blue/White2 - 3 - * Blue/White3 - 4 - * Yankton - 5 - */ + * Plates: + * Blue/White - 0 + * Yellow/black - 1 + * Yellow/Blue - 2 + * Blue/White2 - 3 + * Blue/White3 - 4 + * Yankton - 5 + */ export function setVehicleNumberPlateTextIndex(vehicle: Vehicle | number, plateIndex: number): void; /** - * Returns the PlateType of a vehicle - * Blue_on_White_1 = 3, - * Blue_on_White_2 = 0, - * Blue_on_White_3 = 4, - * Yellow_on_Blue = 2, - * Yellow_on_Black = 1, - * North_Yankton = 5, - */ + * Returns the PlateType of a vehicle + * Blue_on_White_1 = 3, + * Blue_on_White_2 = 0, + * Blue_on_White_3 = 4, + * Yellow_on_Blue = 2, + * Yellow_on_Black = 1, + * North_Yankton = 5, + */ export function getVehicleNumberPlateTextIndex(vehicle: Vehicle | number): number; export function setRandomTrains(toggle: boolean): void; /** - * Train models HAVE TO be loaded (requested) before you use this. - * For variation 15 - request: - * freight - * freightcar - * freightgrain - * freightcont1 - * freightcont2 - * freighttrailer - */ - export function createMissionTrain(unkVariation: number, x: number, y: number, z: number, direction: boolean, p5: any, p6: any): number; - - /** - * Toggles whether ambient trains can spawn on the specified track or not - * `trackId` is the internal id of the train track to switch. - * `state` is whether ambient trains can spawn or not - * trackIds - * 0 (`trains1.dat`) Main track around SA - * 1 (`trains2.dat`) Davis Quartz Quarry branch - * 2 (`trains3.dat`) Second track alongside live track along Roy Lewenstein Blv. - * 3 (`trains4.dat`) Metro track circuit - * 4 (`trains5.dat`) Branch in Mirror Park Railyard - * See NativeDB for reference: http://natives.altv.mp/#/0xFD813BB7DB977F20 - */ + * Train models HAVE TO be loaded (requested) before you use this. + * For variation 15 - request: + * freight + * freightcar + * freightgrain + * freightcont1 + * freightcont2 + * freighttrailer + */ + export function createMissionTrain(variation: number, x: number, y: number, z: number, direction: boolean, p5: any, p6: any): Vehicle | number; + + /** + * Toggles whether ambient trains can spawn on the specified track or not + * `trackId` is the internal id of the train track to switch. + * `state` is whether ambient trains can spawn or not + * trackIds + * 0 (`trains1.dat`) Main track around SA + * 1 (`trains2.dat`) Davis Quartz Quarry branch + * 2 (`trains3.dat`) Second track alongside live track along Roy Lewenstein Blv. + * 3 (`trains4.dat`) Metro track circuit + * 4 (`trains5.dat`) Branch in Mirror Park Railyard + * 5 (`trains6.dat`) Branch in Mirror Park Railyard + * 6 (`trains7.dat`) LS branch to Mirror Park Railyard + * 7 (`trains8.dat`) Overground part of metro track along Forum Dr. + * 8 (`trains9.dat`) Branch to Mirror Park Railyard + * 9 (`trains10.dat`) Yankton train + * 10 (`trains11.dat`) Part of metro track near mission row + * 11 (`trains12.dat`) Yankton prologue mission train + * Full list of all train tracks + track nodes by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/traintracks.json + */ export function switchTrainTrack(trackId: number, state: boolean): void; /** - * Only called once inside main_persitant with the parameters p0 = 0, p1 = 120000 - * Full list of all train tracks + track nodes by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/traintracks.json - * @param trackIndex 0 - 26 - */ + * Only called once inside main_persitant with the parameters p0 = 0, p1 = 120000 + * trackIndex: 0 - 26 + * Full list of all train tracks + track nodes by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/traintracks.json + */ export function setTrainTrackSpawnFrequency(trackIndex: number, frequency: number): void; export function allowTrainToBeRemovedByPopulation(p0: any): void; @@ -20837,80 +23303,80 @@ declare module "natives" { export function setGarbageTrucks(toggle: boolean): void; /** - * Maximum amount of vehicles with vehicle stuck check appears to be 16. - */ + * Maximum amount of vehicles with vehicle stuck check appears to be 16. + */ export function doesVehicleHaveStuckVehicleCheck(vehicle: Vehicle | number): boolean; /** - * See REQUEST_VEHICLE_RECORDING - */ - export function getVehicleRecordingId(recording: number, script: string | null): number; + * See REQUEST_VEHICLE_RECORDING + */ + export function getVehicleRecordingId(recording: number, script: string): number; /** - * Request the vehicle recording defined by the lowercase format string "%s%03d.yvr". For example, REQUEST_VEHICLE_RECORDING(1, "FBIs1UBER") corresponds to fbis1uber001.yvr. - * For all vehicle recording/playback natives, "script" is a common prefix that usually corresponds to the script/mission the recording is used in, "recording" is its int suffix, and "id" (e.g., in native GET_TOTAL_DURATION_OF_VEHICLE_RECORDING_ID) corresponds to a unique identifier within the recording streaming module. - * Note that only 24 recordings (hardcoded in multiple places) can ever active at a given time before clobbering begins. - */ - export function requestVehicleRecording(recording: number, script: string | null): void; + * Request the vehicle recording defined by the lowercase format string "%s%03d.yvr". For example, REQUEST_VEHICLE_RECORDING(1, "FBIs1UBER") corresponds to fbis1uber001.yvr. + * For all vehicle recording/playback natives, "script" is a common prefix that usually corresponds to the script/mission the recording is used in, "recording" is its int suffix, and "id" (e.g., in native GET_TOTAL_DURATION_OF_VEHICLE_RECORDING_ID) corresponds to a unique identifier within the recording streaming module. + * Note that only 24 recordings (hardcoded in multiple places) can ever active at a given time before clobbering begins. + */ + export function requestVehicleRecording(recording: number, script: string): void; /** - * See REQUEST_VEHICLE_RECORDING - */ - export function hasVehicleRecordingBeenLoaded(recording: number, script: string | null): boolean; + * See REQUEST_VEHICLE_RECORDING + */ + export function hasVehicleRecordingBeenLoaded(recording: number, script: string): boolean; /** - * See REQUEST_VEHICLE_RECORDING - */ - export function removeVehicleRecording(recording: number, script: string | null): void; + * See REQUEST_VEHICLE_RECORDING + */ + export function removeVehicleRecording(recording: number, script: string): void; export function getPositionOfVehicleRecordingIdAtTime(id: number, time: number): Vector3; /** - * This native does no interpolation between pathpoints. The same position will be returned for all times up to the next pathpoint in the recording. - * See REQUEST_VEHICLE_RECORDING - */ - export function getPositionOfVehicleRecordingAtTime(recording: number, time: number, script: string | null): Vector3; + * This native does no interpolation between pathpoints. The same position will be returned for all times up to the next pathpoint in the recording. + * See REQUEST_VEHICLE_RECORDING + */ + export function getPositionOfVehicleRecordingAtTime(recording: number, time: number, script: string): Vector3; export function getRotationOfVehicleRecordingIdAtTime(id: number, time: number): Vector3; /** - * This native does no interpolation between pathpoints. The same rotation will be returned for all times up to the next pathpoint in the recording. - * See REQUEST_VEHICLE_RECORDING - */ - export function getRotationOfVehicleRecordingAtTime(recording: number, time: number, script: string | null): Vector3; + * This native does no interpolation between pathpoints. The same rotation will be returned for all times up to the next pathpoint in the recording. + * See REQUEST_VEHICLE_RECORDING + */ + export function getRotationOfVehicleRecordingAtTime(recording: number, time: number, script: string): Vector3; export function getTotalDurationOfVehicleRecordingId(id: number): number; /** - * See REQUEST_VEHICLE_RECORDING - */ - export function getTotalDurationOfVehicleRecording(recording: number, script: string | null): number; + * See REQUEST_VEHICLE_RECORDING + */ + export function getTotalDurationOfVehicleRecording(recording: number, script: string): number; /** - * Distance traveled in the vehicles current recording. - */ + * Distance traveled in the vehicles current recording. + */ export function getPositionInRecording(vehicle: Vehicle | number): number; /** - * Can be used with GET_TOTAL_DURATION_OF_VEHICLE_RECORDING{_ID} to compute a percentage. - */ + * Can be used with GET_TOTAL_DURATION_OF_VEHICLE_RECORDING{_ID} to compute a percentage. + */ export function getTimePositionInRecording(vehicle: Vehicle | number): number; /** - * See REQUEST_VEHICLE_RECORDING - * @param p3 is some flag related to 'trailers' (invokes CVehicle::GetTrailer). - */ - export function startPlaybackRecordedVehicle(vehicle: Vehicle | number, recording: number, script: string | null, p3: boolean): void; + * p3 is some flag related to 'trailers' (invokes CVehicle::GetTrailer). + * See REQUEST_VEHICLE_RECORDING + */ + export function startPlaybackRecordedVehicle(vehicle: Vehicle | number, recording: number, script: string, p3: boolean): void; /** - * time, often zero and capped at 500, is related to SET_PLAYBACK_TO_USE_AI_TRY_TO_REVERT_BACK_LATER - * @param flags requires further research, e.g., 0x4/0x8 are related to the AI driving task and 0x20 is internally set and interacts with dynamic entity components. - */ - export function startPlaybackRecordedVehicleWithFlags(vehicle: Vehicle | number, recording: number, script: string | null, flags: number, time: number, drivingStyle: number): void; + * flags requires further research, e.g., 0x4/0x8 are related to the AI driving task and 0x20 is internally set and interacts with dynamic entity components. + * time, often zero and capped at 500, is related to SET_PLAYBACK_TO_USE_AI_TRY_TO_REVERT_BACK_LATER + */ + export function startPlaybackRecordedVehicleWithFlags(vehicle: Vehicle | number, recording: number, script: string, flags: number, time: number, drivingStyle: number): void; /** - * Often called after START_PLAYBACK_RECORDED_VEHICLE and SKIP_TIME_IN_PLAYBACK_RECORDED_VEHICLE; similar in use to FORCE_ENTITY_AI_AND_ANIMATION_UPDATE. - */ + * Often called after START_PLAYBACK_RECORDED_VEHICLE and SKIP_TIME_IN_PLAYBACK_RECORDED_VEHICLE; similar in use to FORCE_ENTITY_AI_AND_ANIMATION_UPDATE. + */ export function forcePlaybackRecordedVehicleUpdate(vehicle: Vehicle | number, p1: boolean): void; export function stopPlaybackRecordedVehicle(vehicle: Vehicle | number): void; @@ -20930,24 +23396,24 @@ declare module "natives" { export function setPlaybackSpeed(vehicle: Vehicle | number, speed: number): void; /** - * AI abides by the provided driving style (e.g., stopping at red lights or waiting behind traffic) while executing the specificed vehicle recording. - * FORCE_PLAYBACK_RECORDED_VEHICLE_UPDATE is a related native that deals with the AI physics for such recordings. - */ - export function startPlaybackRecordedVehicleUsingAi(vehicle: Vehicle | number, recording: number, script: string | null, speed: number, drivingStyle: number): void; + * AI abides by the provided driving style (e.g., stopping at red lights or waiting behind traffic) while executing the specificed vehicle recording. + * FORCE_PLAYBACK_RECORDED_VEHICLE_UPDATE is a related native that deals with the AI physics for such recordings. + */ + export function startPlaybackRecordedVehicleUsingAi(vehicle: Vehicle | number, recording: number, script: string, speed: number, drivingStyle: number): void; /** - * SET_TIME_POSITION_IN_RECORDING can be emulated by: desired_time - GET_TIME_POSITION_IN_RECORDING(vehicle) - */ + * SET_TIME_POSITION_IN_RECORDING can be emulated by: desired_time - GET_TIME_POSITION_IN_RECORDING(vehicle) + */ export function skipTimeInPlaybackRecordedVehicle(vehicle: Vehicle | number, time: number): void; /** - * Identical to SET_PLAYBACK_TO_USE_AI_TRY_TO_REVERT_BACK_LATER with 0 as arguments for p1 and p3. - */ + * Identical to SET_PLAYBACK_TO_USE_AI_TRY_TO_REVERT_BACK_LATER with 0 as arguments for p1 and p3. + */ export function setPlaybackToUseAi(vehicle: Vehicle | number, drivingStyle: number): void; /** - * @param time is number of milliseconds before reverting, zero for indefinitely. - */ + * Time is number of milliseconds before reverting, zero for indefinitely. + */ export function setPlaybackToUseAiTryToRevertBackLater(vehicle: Vehicle | number, time: number, drivingStyle: number, p3: boolean): void; export function setAdditionalRotationForRecordedVehiclePlayback(vehicle: Vehicle | number, x: number, y: number, z: number, p4: any): void; @@ -20957,8 +23423,8 @@ declare module "natives" { export function setGlobalPositionOffsetForRecordedVehiclePlayback(vehicle: Vehicle | number, x: number, y: number, z: number): void; /** - * A vehicle recording playback flag only used in jewelry_heist - */ + * A vehicle recording playback flag only used in jewelry_heist + */ export function setShouldLerpFromAiToFullRecording(vehicle: Vehicle | number, p1: boolean): void; export function explodeVehicleInCutscene(vehicle: Vehicle | number, p1: boolean): void; @@ -20966,66 +23432,70 @@ declare module "natives" { export function addVehicleStuckCheckWithWarp(p0: any, p1: number, p2: any, p3: boolean, p4: boolean, p5: boolean, p6: any): void; /** - * Makes the vehicle stop spawning naturally in traffic. Here's an essential example: - * VEHICLE::SET_VEHICLE_MODEL_IS_SUPPRESSED(MISC::GET_HASH_KEY("taco"), true); - * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json - */ + * Makes the vehicle stop spawning naturally in traffic. Here's an essential example: + * VEHICLE::SET_VEHICLE_MODEL_IS_SUPPRESSED(MISC::GET_HASH_KEY("taco"), true); + * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json + */ export function setVehicleModelIsSuppressed(model: number, suppressed: boolean): void; /** - * Gets a random vehicle in a sphere at the specified position, of the specified radius. - * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json - * @param x The X-component of the position of the sphere. - * @param y The Y-component of the position of the sphere. - * @param z The Z-component of the position of the sphere. - * @param radius The radius of the sphere. Max is 9999.9004. - * @param modelHash The vehicle model to limit the selection to. Pass 0 for any model. - * @param flags The bitwise flags that modifies the behaviour of this function. - */ - export function getRandomVehicleInSphere(x: number, y: number, z: number, radius: number, modelHash: number, flags: number): number; - - export function getRandomVehicleFrontBumperInSphere(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number): number; - - export function getRandomVehicleBackBumperInSphere(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number): number; - - /** - * Example usage - * x, y, z: Position to get closest vehicle to. - * radius: Max radius to get a vehicle. - * It seems to return police cars for me, does not seem to return helicopters, planes or boats for some reason - * Only returns non police cars and motorbikes with the flag set to 70 and modelHash to 0. ModelHash seems to always be 0 when not a modelHash in the scripts, as stated above. - * These flags were found in the b617d scripts: 0,2,4,6,7,23,127,260,2146,2175,12294,16384,16386,20503,32768,67590,67711,98309,100359. - * Converted to binary, each bit probably represents a flag as explained regarding another native here: gtaforums.com/topic/822314-guide-driving-styles - * Conversion of found flags to binary: https://pastebin.com/kghNFkRi - * At exactly 16384 which is 0100000000000000 in binary and 4000 in hexadecimal only planes are returned. - * See NativeDB for reference: http://natives.altv.mp/#/0xF73EB622C4F1689B - * @param modelHash Limit to vehicles with this model. 0 for any. - * @param flags The bitwise flags altering the function's behaviour. - * @returns Does not return police cars or helicopters. - */ - export function getClosestVehicle(x: number, y: number, z: number, radius: number, modelHash: number, flags: number): number; - - /** - * Corrected p1. it's basically the 'carriage/trailer number'. So if the train has 3 trailers you'd call the native once with a var or 3 times with 1, 2, 3. - */ - export function getTrainCarriage(train: Vehicle | number, trailerNumber: number): number; + * Gets a random vehicle in a sphere at the specified position, of the specified radius. + * x: The X-component of the position of the sphere. + * y: The Y-component of the position of the sphere. + * z: The Z-component of the position of the sphere. + * radius: The radius of the sphere. Max is 9999.9004. + * modelHash: The vehicle model to limit the selection to. Pass 0 for any model. + * flags: The bitwise flags that modifies the behaviour of this function. + * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json + */ + export function getRandomVehicleInSphere(x: number, y: number, z: number, radius: number, modelHash: number, flags: number): Vehicle | number; + + export function getRandomVehicleFrontBumperInSphere(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number): Vehicle | number; + + export function getRandomVehicleBackBumperInSphere(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number): Vehicle | number; + + /** + * Example usage + * VEHICLE::GET_CLOSEST_VEHICLE(x, y, z, radius, hash, unknown leave at 70) + * x, y, z: Position to get closest vehicle to. + * radius: Max radius to get a vehicle. + * modelHash: Limit to vehicles with this model. 0 for any. + * flags: The bitwise flags altering the function's behaviour. + * Does not return police cars or helicopters. + * It seems to return police cars for me, does not seem to return helicopters, planes or boats for some reason + * Only returns non police cars and motorbikes with the flag set to 70 and modelHash to 0. ModelHash seems to always be 0 when not a modelHash in the scripts, as stated above. + * These flags were found in the b617d scripts: 0,2,4,6,7,23,127,260,2146,2175,12294,16384,16386,20503,32768,67590,67711,98309,100359. + * Converted to binary, each bit probably represents a flag as explained regarding another native here: gtaforums.com/topic/822314-guide-driving-styles + * Conversion of found flags to binary: https://pastebin.com/kghNFkRi + * At exactly 16384 which is 0100000000000000 in binary and 4000 in hexadecimal only planes are returned. + * It's probably more convenient to use worldGetAllVehicles(int *arr, int arrSize) and check the shortest distance yourself and sort if you want by checking the vehicle type with for example VEHICLE::IS_THIS_MODEL_A_BOAT + * ------------------------------------------------------------------------- + * Conclusion: This native is not worth trying to use. Use something like this instead: https://pastebin.com/xiFdXa7h + * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json + */ + export function getClosestVehicle(x: number, y: number, z: number, radius: number, modelHash: number, flags: number): Vehicle | number; + + /** + * Corrected p1. it's basically the 'carriage/trailer number'. So if the train has 3 trailers you'd call the native once with a var or 3 times with 1, 2, 3. + */ + export function getTrainCarriage(train: Vehicle | number, trailerNumber: number): Vehicle | number; export function isMissionTrain(train: Vehicle | number): boolean; - export function deleteMissionTrain(train: Vehicle | number): [void, number]; + export function deleteMissionTrain(train?: Vehicle | number): [void, Vehicle | number]; /** - * @param p1 is always 0 - */ - export function setMissionTrainAsNoLongerNeeded(train: Vehicle | number | null, p1: boolean): [void, number]; + * p1 is always 0 + */ + export function setMissionTrainAsNoLongerNeeded(train: Vehicle | number, p1: boolean): [void, Vehicle | number]; export function setMissionTrainCoords(train: Vehicle | number, x: number, y: number, z: number): void; export function isThisModelABoat(model: number): boolean; /** - * Checks if model is a boat, then checks for FLAG_IS_JETSKI. - */ + * Checks if model is a boat, then checks for FLAG_IS_JETSKI. + */ export function isThisModelAJetski(model: number): boolean; export function isThisModelAPlane(model: number): boolean; @@ -21033,8 +23503,8 @@ declare module "natives" { export function isThisModelAHeli(model: number): boolean; /** - * To check if the model is an amphibious car, use IS_THIS_MODEL_AN_AMPHIBIOUS_CAR. - */ + * To check if the model is an amphibious car, use IS_THIS_MODEL_AN_AMPHIBIOUS_CAR. + */ export function isThisModelACar(model: number): boolean; export function isThisModelATrain(model: number): boolean; @@ -21050,23 +23520,23 @@ declare module "natives" { export function isThisModelAnAmphibiousQuadbike(model: number): boolean; /** - * Equivalent of SET_HELI_BLADES_SPEED(vehicleHandle, 1.0f); - * this native works on planes to? - */ + * Equivalent of SET_HELI_BLADES_SPEED(vehicleHandle, 1.0f); + * this native works on planes to? + */ export function setHeliBladesFullSpeed(vehicle: Vehicle | number): void; /** - * Sets the speed of the helicopter blades in percentage of the full speed. - * vehicleHandle: The helicopter. - * @param speed The speed in percentage, 0.0f being 0% and 1.0f being 100%. - */ + * Sets the speed of the helicopter blades in percentage of the full speed. + * vehicleHandle: The helicopter. + * speed: The speed in percentage, 0.0f being 0% and 1.0f being 100%. + */ export function setHeliBladesSpeed(vehicle: Vehicle | number, speed: number): void; export function forceSubThrottleForTime(vehicle: Vehicle | number, p1: number, p2: number): void; /** - * This has not yet been tested - it's just an assumption of what the types could be. - */ + * This has not yet been tested - it's just an assumption of what the types could be. + */ export function setVehicleCanBeTargetted(vehicle: Vehicle | number, state: boolean): void; export function setDontAllowPlayerToEnterVehicleIfLockedForPlayer(vehicle: Vehicle | number, p1: boolean): void; @@ -21080,34 +23550,34 @@ declare module "natives" { export function setVehicleCanEjectPassengersIfLocked(p0: any, p1: any): void; /** - * Dirt level does not become greater than 15.0 - */ + * Dirt level does not become greater than 15.0 + */ export function getVehicleDirtLevel(vehicle: Vehicle | number): number; /** - * You can't use values greater than 15.0 - * Also, R* does (float)(rand() % 15) to get a random dirt level when generating a vehicle. - */ + * You can't use values greater than 15.0 + * Also, R* does (float)(rand() % 15) to get a random dirt level when generating a vehicle. + */ export function setVehicleDirtLevel(vehicle: Vehicle | number, dirtLevel: number): void; /** - * @returns Appears to return true if the vehicle has any damage, including cosmetically. - */ + * Appears to return true if the vehicle has any damage, including cosmetically. + */ export function getDoesVehicleHaveDamageDecals(vehicle: Vehicle | number): boolean; /** - * @param doorId see SET_VEHICLE_DOOR_SHUT - */ + * doorId: see SET_VEHICLE_DOOR_SHUT + */ export function isVehicleDoorFullyOpen(vehicle: Vehicle | number, doorId: number): boolean; /** - * Starts or stops the engine on the specified vehicle. - * from what I've tested when I do this to a helicopter the propellers turn off after the engine has started. so is there any way to keep the heli propellers on? - * @param vehicle The vehicle to start or stop the engine on. - * @param value true to turn the vehicle on; false to turn it off. - * @param instantly if true, the vehicle will be set to the state immediately; otherwise, the current driver will physically turn on or off the engine. - * @param disableAutoStart If true, the system will prevent the engine from starting when the player got into it. - */ + * Starts or stops the engine on the specified vehicle. + * vehicle: The vehicle to start or stop the engine on. + * value: true to turn the vehicle on; false to turn it off. + * instantly: if true, the vehicle will be set to the state immediately; otherwise, the current driver will physically turn on or off the engine. + * disableAutoStart: If true, the system will prevent the engine from starting when the player got into it. + * from what I've tested when I do this to a helicopter the propellers turn off after the engine has started. so is there any way to keep the heli propellers on? + */ export function setVehicleEngineOn(vehicle: Vehicle | number, value: boolean, instantly: boolean, disableAutoStart: boolean): void; export function setVehicleUndriveable(vehicle: Vehicle | number, toggle: boolean): void; @@ -21115,42 +23585,42 @@ declare module "natives" { export function setVehicleProvidesCover(vehicle: Vehicle | number, toggle: boolean): void; /** - * @param doorId see SET_VEHICLE_DOOR_SHUT - */ + * doorId: see SET_VEHICLE_DOOR_SHUT + */ export function setVehicleDoorControl(vehicle: Vehicle | number, doorId: number, speed: number, angle: number): void; /** - * @param doorId see SET_VEHICLE_DOOR_SHUT - */ + * doorId: see SET_VEHICLE_DOOR_SHUT + */ export function setVehicleDoorLatched(vehicle: Vehicle | number, doorId: number, p2: boolean, p3: boolean, p4: boolean): void; /** - * @param doorId see SET_VEHICLE_DOOR_SHUT - */ + * doorId: see SET_VEHICLE_DOOR_SHUT + */ export function getVehicleDoorAngleRatio(vehicle: Vehicle | number, doorId: number): number; /** - * doorId: see SET_VEHICLE_DOOR_SHUT - */ - export function getPedUsingVehicleDoor(vehicle: Vehicle | number, doord: number): number; + * doorId: see SET_VEHICLE_DOOR_SHUT + */ + export function getPedUsingVehicleDoor(vehicle: Vehicle | number, doord: number): Ped | Player | number; /** - * enum eDoorId - * { - * VEH_EXT_DOOR_INVALID_ID = -1, - * VEH_EXT_DOOR_DSIDE_F, - * VEH_EXT_DOOR_DSIDE_R, - * VEH_EXT_DOOR_PSIDE_F, - * VEH_EXT_DOOR_PSIDE_R, - * VEH_EXT_BONNET, - * VEH_EXT_BOOT - * }; - */ + * enum eDoorId + * { + * VEH_EXT_DOOR_INVALID_ID = -1, + * VEH_EXT_DOOR_DSIDE_F, + * VEH_EXT_DOOR_DSIDE_R, + * VEH_EXT_DOOR_PSIDE_F, + * VEH_EXT_DOOR_PSIDE_R, + * VEH_EXT_BONNET, + * VEH_EXT_BOOT + * }; + */ export function setVehicleDoorShut(vehicle: Vehicle | number, doorId: number, closeInstantly: boolean): void; /** - * @param doorId see SET_VEHICLE_DOOR_SHUT - */ + * doorId: see SET_VEHICLE_DOOR_SHUT + */ export function setVehicleDoorBroken(vehicle: Vehicle | number, doorId: number, deleteDoor: boolean): void; export function setVehicleCanBreak(vehicle: Vehicle | number, toggle: boolean): void; @@ -21164,44 +23634,44 @@ declare module "natives" { export function setCarjackMissionRemovalParameters(p0: any, p1: any): void; /** - * Returns true if MF_IS_BIG (strModelFlags 0x8) handling model flag is set. - */ + * Returns true if MF_IS_BIG (strModelFlags 0x8) handling model flag is set. + */ export function isBigVehicle(vehicle: Vehicle | number): boolean; /** - * Returns the total amount of color combinations found in the vehicle's carvariations.meta entry. - */ + * Returns the total amount of color combinations found in the vehicle's carvariations.meta entry. + */ export function getNumberOfVehicleColours(vehicle: Vehicle | number): number; /** - * Sets the selected vehicle's colors to the specified index of the color combination found in the vehicle's carvariations.meta entry. - */ + * Sets the selected vehicle's colors to the specified index of the color combination found in the vehicle's carvariations.meta entry. + */ export function setVehicleColourCombination(vehicle: Vehicle | number, colorCombination: number): void; /** - * Returns the index of the color combination found in the vehicle's carvariations.meta entry. - */ + * Returns the index of the color combination found in the vehicle's carvariations.meta entry. + */ export function getVehicleColourCombination(vehicle: Vehicle | number): number; /** - * `color`: is the paint index for the vehicle. - * Paint index goes from 0 to 12. - * Be aware that it only works on xenon lights. Example: https://i.imgur.com/yV3cpG9.png - * Full list of all vehicle xenon lights by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicleColors.json - */ + * `color`: is the paint index for the vehicle. + * Paint index goes from 0 to 12. + * Be aware that it only works on xenon lights. Example: https://i.imgur.com/yV3cpG9.png + * Full list of all vehicle xenon lights by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicleColors.json + */ export function setVehicleXenonLightColorIndex(vehicle: Vehicle | number, colorIndex: number): void; /** - * Returns the headlight color index from the vehicle. Value between 0, 12. - * Use SET_VEHICLE_XENON_LIGHT_COLOR_INDEX to set the headlights color for the vehicle. - * Must enable xenon headlights before it'll take affect. - * Returns an int, value between 0-12 or 255 if no color is set. - */ + * Returns the headlight color index from the vehicle. Value between 0, 12. + * Use SET_VEHICLE_XENON_LIGHT_COLOR_INDEX to set the headlights color for the vehicle. + * Must enable xenon headlights before it'll take affect. + * Returns an int, value between 0-12 or 255 if no color is set. + */ export function getVehicleXenonLightColorIndex(vehicle: Vehicle | number): number; /** - * Setting this to false, makes the specified vehicle to where if you press Y your character doesn't even attempt the animation to enter the vehicle. Hence it's not considered aka ignored. - */ + * Setting this to false, makes the specified vehicle to where if you press Y your character doesn't even attempt the animation to enter the vehicle. Hence it's not considered aka ignored. + */ export function setVehicleIsConsideredByPlayer(vehicle: Vehicle | number, toggle: boolean): void; export function setVehicleWillForceOtherVehiclesToStop(vehicle: Vehicle | number, toggle: boolean): void; @@ -21213,39 +23683,39 @@ declare module "natives" { export function setVehicleMayBeUsedByGotoPointAnyMeans(vehicle: Vehicle | number, p1: boolean): void; /** - * Not present in the retail version! It's just a nullsub. - * @param p0 always true (except in one case) - * @param successIndicator 0 if success, -1 if failed - */ + * Not present in the retail version! It's just a nullsub. + * p0 always true (except in one case) + * successIndicator: 0 if success, -1 if failed + */ export function getRandomVehicleModelInMemory(p0: boolean, modelHash?: number, successIndicator?: number): [void, number, number]; /** - * enum VehicleLockStatus = { - * None = 0, - * Unlocked = 1, - * Locked = 2, - * LockedForPlayer = 3, - * StickPlayerInside = 4, -- Doesn't allow players to exit the vehicle with the exit vehicle key. - * CanBeBrokenInto = 7, -- Can be broken into the car. If the glass is broken, the value will be set to 1 - * CanBeBrokenIntoPersist = 8, -- Can be broken into persist - * CannotBeTriedToEnter = 10, -- Cannot be tried to enter (Nothing happens when you press the vehicle enter key). - * } - */ + * enum VehicleLockStatus = { + * None = 0, + * Unlocked = 1, + * Locked = 2, + * LockedForPlayer = 3, + * StickPlayerInside = 4, -- Doesn't allow players to exit the vehicle with the exit vehicle key. + * CanBeBrokenInto = 7, -- Can be broken into the car. If the glass is broken, the value will be set to 1 + * CanBeBrokenIntoPersist = 8, -- Can be broken into persist + * CannotBeTriedToEnter = 10, -- Cannot be tried to enter (Nothing happens when you press the vehicle enter key). + * } + */ export function getVehicleDoorLockStatus(vehicle: Vehicle | number): number; /** - * Returns vehicle door lock state previously set with SET_VEHICLE_INDIVIDUAL_DOORS_LOCKED - */ + * Returns vehicle door lock state previously set with SET_VEHICLE_INDIVIDUAL_DOORS_LOCKED + */ export function getVehicleIndividualDoorLockStatus(vehicle: Vehicle | number, doorId: number): number; /** - * @param doorID starts at 0, not seeming to skip any numbers. Four door vehicles intuitively range from 0 to 3. - */ + * doorID starts at 0, not seeming to skip any numbers. Four door vehicles intuitively range from 0 to 3. + */ export function isVehicleDoorDamaged(veh: Vehicle | number, doorID: number): boolean; /** - * @param doorId see SET_VEHICLE_DOOR_SHUT - */ + * doorId: see SET_VEHICLE_DOOR_SHUT + */ export function setDoorAllowedToBeBrokenOff(vehicle: Vehicle | number, doorId: number, isBreakable: boolean): void; export function isVehicleBumperBouncing(vehicle: Vehicle | number, frontBumper: boolean): boolean; @@ -21253,41 +23723,41 @@ declare module "natives" { export function isVehicleBumperBrokenOff(vehicle: Vehicle | number, frontBumper: boolean): boolean; /** - * Usage: - * public bool isCopInRange(Vector3 Location, float Range) - * { - * } - * @returns return Function.Call(Hash.IS_COP_PED_IN_AREA_3D, Location.X - Range, Location.Y - Range, Location.Z - Range, Location.X + Range, Location.Y + Range, Location.Z + Range); - */ + * Usage: + * public bool isCopInRange(Vector3 Location, float Range) + * { + * return Function.Call(Hash.IS_COP_PED_IN_AREA_3D, Location.X - Range, Location.Y - Range, Location.Z - Range, Location.X + Range, Location.Y + Range, Location.Z + Range); + * } + */ export function isCopVehicleInArea3d(x1: number, x2: number, y1: number, y2: number, z1: number, z2: number): boolean; /** - * Public Function isVehicleOnAllWheels(vh As Vehicle) As Boolean - * End Function - * @returns Return Native.Function.Call(Of Boolean)(Hash.IS_VEHICLE_ON_ALL_WHEELS, vh) - */ + * Public Function isVehicleOnAllWheels(vh As Vehicle) As Boolean + * Return Native.Function.Call(Of Boolean)(Hash.IS_VEHICLE_ON_ALL_WHEELS, vh) + * End Function + */ export function isVehicleOnAllWheels(vehicle: Vehicle | number): boolean; /** - * Returns `nMonetaryValue` from handling.meta for specific model. - */ + * Returns `nMonetaryValue` from handling.meta for specific model. + */ export function getVehicleModelValue(vehicleModel: number): number; /** - * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json - */ + * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json + */ export function getVehicleLayoutHash(vehicle: Vehicle | number): number; export function getInVehicleClipsetHashForSeat(vehicle: Vehicle | number, p1: number): number; /** - * Makes the train all jumbled up and derailed as it moves on the tracks (though that wont stop it from its normal operations) - */ + * Makes the train all jumbled up and derailed as it moves on the tracks (though that wont stop it from its normal operations) + */ export function setRenderTrainAsDerailed(train: Vehicle | number, toggle: boolean): void; /** - * They use the same color indexs as SET_VEHICLE_COLOURS. - */ + * They use the same color indexs as SET_VEHICLE_COLOURS. + */ export function setVehicleExtraColours(vehicle: Vehicle | number, pearlescentColor: number, wheelColor: number): void; export function getVehicleExtraColours(vehicle: Vehicle | number, pearlescentColor?: number, wheelColor?: number): [void, number, number]; @@ -21303,14 +23773,14 @@ declare module "natives" { export function stopAllGarageActivity(): void; /** - * This fixes a vehicle. - * If the vehicle's engine's broken then you cannot fix it with this native. - */ + * This fixes a vehicle. + * If the vehicle's engine's broken then you cannot fix it with this native. + */ export function setVehicleFixed(vehicle: Vehicle | number): void; /** - * This fixes the deformation of a vehicle but the vehicle health doesn't improve - */ + * This fixes the deformation of a vehicle but the vehicle health doesn't improve + */ export function setVehicleDeformationFixed(vehicle: Vehicle | number): void; export function setVehicleCanEngineMissfire(vehicle: Vehicle | number, toggle: boolean): void; @@ -21328,18 +23798,19 @@ declare module "natives" { export function setVehicleLimitSpeedWhenPlayerInactive(vehicle: Vehicle | number, toggle: boolean): void; /** - * sfink: sets bit in vehicle's structure, used by maintransition, fm_mission_controller, mission_race and a couple of other scripts. see dissassembly: - * CVehicle *__fastcall sub_140CDAA10(signed int a1, char a2) - * { - * CVehicle *result; // rax@1 - * result = EntityAsCVehicle(a1); - * if ( result ) - * { - * result->field_886 &= 0xEFu; - * result->field_886 |= 16 * (a2 & 1); - * See NativeDB for reference: http://natives.altv.mp/#/0x6EBFB22D646FFC18 - * @returns return result; - */ + * sfink: sets bit in vehicle's structure, used by maintransition, fm_mission_controller, mission_race and a couple of other scripts. see dissassembly: + * CVehicle *__fastcall sub_140CDAA10(signed int a1, char a2) + * { + * CVehicle *result; // rax@1 + * result = EntityAsCVehicle(a1); + * if ( result ) + * { + * result->field_886 &= 0xEFu; + * result->field_886 |= 16 * (a2 & 1); + * } + * return result; + * } + */ export function setVehicleStopInstantlyWhenPlayerInactive(vehicle: Vehicle | number, toggle: boolean): void; export function setDisablePretendOccupants(vehicle: Vehicle | number, toggle: boolean): void; @@ -21347,30 +23818,30 @@ declare module "natives" { export function removeVehiclesFromGeneratorsInArea(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, p6: any): void; /** - * Locks the vehicle's steering to the desired angle, explained below. - * Requires to be called onTick. Steering is unlocked the moment the function stops being called on the vehicle. - * Steer bias: - * -1.0 = full right - * 0.0 = centered steering - * 1.0 = full left - */ + * Locks the vehicle's steering to the desired angle, explained below. + * Requires to be called onTick. Steering is unlocked the moment the function stops being called on the vehicle. + * Steer bias: + * -1.0 = full right + * 0.0 = centered steering + * 1.0 = full left + */ export function setVehicleSteerBias(vehicle: Vehicle | number, value: number): void; export function isVehicleExtraTurnedOn(vehicle: Vehicle | number, extraId: number): boolean; /** - * Available extraIds are 1-14, however none of the vehicles have extras above 12. - */ + * Available extraIds are 1-14, however none of the vehicles have extras above 12. + */ export function setVehicleExtra(vehicle: Vehicle | number, extraId: number, disable: boolean): void; /** - * Checks via CVehicleModelInfo - */ + * Checks via CVehicleModelInfo + */ export function doesExtraExist(vehicle: Vehicle | number, extraId: number): boolean; /** - * @returns Returns true if specified extra part is broken off. It only works for extras that can break off during collisions, non-breakable extras always return false. Also returns true if the breakable extra is toggled off through script. - */ + * Returns true if specified extra part is broken off. It only works for extras that can break off during collisions, non-breakable extras always return false. Also returns true if the breakable extra is toggled off through script. + */ export function isExtraBrokenOff(vehicle: Vehicle | number, extraId: number): boolean; export function setConvertibleRoof(vehicle: Vehicle | number, p1: boolean): void; @@ -21380,28 +23851,27 @@ declare module "natives" { export function raiseConvertibleRoof(vehicle: Vehicle | number, instantlyRaise: boolean): void; /** - * 0 -> up - * 1 -> lowering down - * 2 -> down - * 3 -> raising up - */ + * 0 -> up + * 1 -> lowering down + * 2 -> down + * 3 -> raising up + */ export function getConvertibleRoofState(vehicle: Vehicle | number): number; /** - * Returns true if the vehicle has a convertible roof. - * @param p1 is false almost always. However, in launcher_carwash/carwash1/carwash2 scripts, p1 is true and is accompanied by DOES_VEHICLE_HAVE_ROOF. If p1 is true, it seems that every single vehicle will return true irrespective of being a convertible. - * @returns p1 is false almost always. However, in launcher_carwash/carwash1/carwash2 scripts, p1 is true and is accompanied by DOES_VEHICLE_HAVE_ROOF. If p1 is true, it seems that every single vehicle will return true irrespective of being a convertible. - */ + * Returns true if the vehicle has a convertible roof. + * p1 is false almost always. However, in launcher_carwash/carwash1/carwash2 scripts, p1 is true and is accompanied by DOES_VEHICLE_HAVE_ROOF. If p1 is true, it seems that every single vehicle will return true irrespective of being a convertible. + */ export function isVehicleAConvertible(vehicle: Vehicle | number, p1: boolean): boolean; /** - * Transforms the `stormberg`/`toreador` to its "submarine" variant. If the vehicle is already in that state then the vehicle transformation audio will still play, but the vehicle won't change at all. - */ + * Transforms the `stormberg`/`toreador` to its "submarine" variant. If the vehicle is already in that state then the vehicle transformation audio will still play, but the vehicle won't change at all. + */ export function transformToSubmarine(vehicle: Vehicle | number, noAnimation: boolean): boolean; /** - * Transforms the `stormberg`/`toreador` to its "road vehicle" variant. If the vehicle is already in that state then the vehicle transformation audio will still play, but the vehicle won't change at all. - */ + * Transforms the `stormberg`/`toreador` to its "road vehicle" variant. If the vehicle is already in that state then the vehicle transformation audio will still play, but the vehicle won't change at all. + */ export function transformToCar(vehicle: Vehicle | number, noAnimation: boolean): void; export function isVehicleInSubmarineMode(vehicle: Vehicle | number): boolean; @@ -21409,80 +23879,92 @@ declare module "natives" { export function isVehicleStoppedAtTrafficLights(vehicle: Vehicle | number): boolean; /** - * Apply damage to vehicle at a location. Location is relative to vehicle model (not world). - * When `focusOnModel` set to `true`, the damage sphere will travel towards the vehicle from the given point, thus guaranteeing an impact - * @param radius of effect damage applied in a sphere at impact location - */ + * Apply damage to vehicle at a location. Location is relative to vehicle model (not world). + * Radius of effect damage applied in a sphere at impact location + * When `focusOnModel` set to `true`, the damage sphere will travel towards the vehicle from the given point, thus guaranteeing an impact + */ export function setVehicleDamage(vehicle: Vehicle | number, xOffset: number, yOffset: number, zOffset: number, damage: number, radius: number, focusOnModel: boolean): void; export function setVehicleOccupantsTakeExplosiveDamage(vehicle: Vehicle | number, toggle: boolean): void; /** - * Returns 1000.0 if the function is unable to get the address of the specified vehicle or if it's not a vehicle. - * Minimum: -4000 - * Maximum: 1000 - * -4000: Engine is destroyed - * 0 and below: Engine catches fire and health rapidly declines - * 300: Engine is smoking and losing functionality - * 1000: Engine is perfect - */ + * Returns 1000.0 if the function is unable to get the address of the specified vehicle or if it's not a vehicle. + * Minimum: -4000 + * Maximum: 1000 + * -4000: Engine is destroyed + * 0 and below: Engine catches fire and health rapidly declines + * 300: Engine is smoking and losing functionality + * 1000: Engine is perfect + */ export function getVehicleEngineHealth(vehicle: Vehicle | number): number; /** - * 1000 is max health - * Begins leaking gas at around 650 health - * Minimum: -4000 - * Maximum: 1000 - * -4000: Engine is destroyed - * 0 and below: Engine catches fire and health rapidly declines - * 300: Engine is smoking and losing functionality - * 1000: Engine is perfect - */ + * 1000 is max health + * Begins leaking gas at around 650 health + * Minimum: -4000 + * Maximum: 1000 + * -4000: Engine is destroyed + * 0 and below: Engine catches fire and health rapidly declines + * 300: Engine is smoking and losing functionality + * 1000: Engine is perfect + */ export function setVehicleEngineHealth(vehicle: Vehicle | number, health: number): void; /** - * Works just like SET_VEHICLE_ENGINE_HEALTH, but only for planes. - */ + * Works just like SET_VEHICLE_ENGINE_HEALTH, but only for planes. + */ export function setPlaneEngineHealth(vehicle: Vehicle | number, health: number): void; /** - * 1000 is max health - * Begins leaking gas at around 650 health - * -999.90002441406 appears to be minimum health, although nothing special occurs - */ + * 1000 is max health + * Begins leaking gas at around 650 health + * -999.90002441406 appears to be minimum health, although nothing special occurs + */ export function getVehiclePetrolTankHealth(vehicle: Vehicle | number): number; /** - * 1000 is max health - * Begins leaking gas at around 650 health - * @param health 999.90002441406 appears to be minimum health, although nothing special occurs - */ + * 1000 is max health + * Begins leaking gas at around 650 health + * -999.90002441406 appears to be minimum health, although nothing special occurs + */ export function setVehiclePetrolTankHealth(vehicle: Vehicle | number, health: number): void; /** - * @param p1 can be anywhere from 0 to 3 in the scripts. - * @param ms being how long in milliseconds the vehicle has been stuck - */ + * p1 can be anywhere from 0 to 3 in the scripts. + * p2 being how long in milliseconds the vehicle has been stuck + */ export function isVehicleStuckTimerUp(vehicle: Vehicle | number, p1: number, ms: number): boolean; /** - * The inner function has a switch on the second parameter. It's the stuck timer index. - * Here's some pseudo code I wrote for the inner function: - * void __fastcall NATIVE_RESET_VEHICLE_STUCK_TIMER_INNER(CUnknown* unknownClassInVehicle, int timerIndex) - * { - * switch (timerIndex) - * { - * case 0: - * unknownClassInVehicle->FirstStuckTimer = (WORD)0u; - * case 1: - * See NativeDB for reference: http://natives.altv.mp/#/0xD7591B0065AFAA7A - */ + * The inner function has a switch on the second parameter. It's the stuck timer index. + * Here's some pseudo code I wrote for the inner function: + * void __fastcall NATIVE_RESET_VEHICLE_STUCK_TIMER_INNER(CUnknown* unknownClassInVehicle, int timerIndex) + * { + * switch (timerIndex) + * { + * case 0: + * unknownClassInVehicle->FirstStuckTimer = (WORD)0u; + * case 1: + * unknownClassInVehicle->SecondStuckTimer = (WORD)0u; + * case 2: + * unknownClassInVehicle->ThirdStuckTimer = (WORD)0u; + * case 3: + * unknownClassInVehicle->FourthStuckTimer = (WORD)0u; + * case 4: + * unknownClassInVehicle->FirstStuckTimer = (WORD)0u; + * unknownClassInVehicle->SecondStuckTimer = (WORD)0u; + * unknownClassInVehicle->ThirdStuckTimer = (WORD)0u; + * unknownClassInVehicle->FourthStuckTimer = (WORD)0u; + * break; + * }; + * } + */ export function resetVehicleStuckTimer(vehicle: Vehicle | number, nullAttributes: number): void; /** - * p1 = check if vehicle is on fire - * @param isOnFireCheck is always 0 in the scripts. - */ + * p1 is always 0 in the scripts. + * p1 = check if vehicle is on fire + */ export function isVehicleDriveable(vehicle: Vehicle | number, isOnFireCheck: boolean): boolean; export function setVehicleHasBeenOwnedByPlayer(vehicle: Vehicle | number, owned: boolean): void; @@ -21494,98 +23976,98 @@ declare module "natives" { export function setPoliceFocusWillTrackVehicle(vehicle: Vehicle | number, toggle: boolean): void; /** - * Sounds the horn for the specified vehicle. - * Note: If a player is in the vehicle, it will only sound briefly. - * @param vehicle The vehicle to activate the horn for. - * @param duration The duration to sound the horn, in milliseconds. - * @param mode The hash of "NORMAL" or "HELDDOWN". Can be 0. - */ + * Sounds the horn for the specified vehicle. + * vehicle: The vehicle to activate the horn for. + * mode: The hash of "NORMAL" or "HELDDOWN". Can be 0. + * duration: The duration to sound the horn, in milliseconds. + * Note: If a player is in the vehicle, it will only sound briefly. + */ export function startVehicleHorn(vehicle: Vehicle | number, duration: number, mode: number, forever: boolean): void; /** - * If set to TRUE, it seems to suppress door noises and doesn't allow the horn to be continuous. - */ + * If set to TRUE, it seems to suppress door noises and doesn't allow the horn to be continuous. + */ export function setVehicleInCarModShop(vehicle: Vehicle | number, toggle: boolean): void; /** - * if true, axles won't bend. - */ + * if true, axles won't bend. + */ export function setVehicleHasStrongAxles(vehicle: Vehicle | number, toggle: boolean): void; /** - * Returns model name of vehicle in all caps. Needs to be displayed through localizing text natives to get proper display name. - * ----------------------------------------------------------------------------------------------------------------------------------------- - * ----------------------------------------------------------------------------------------------------------------------------------------- - * Returns "CARNOTFOUND" if the hash doesn't match a vehicle hash. - * Using HUD::GET_FILENAME_FOR_AUDIO_CONVERSATION, you can get the localized name. - * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json - * @returns While often the case, this does not simply return the model name of the vehicle (which could be hashed to return the model hash). Variations of the same vehicle may also use the same display name. - */ + * Returns model name of vehicle in all caps. Needs to be displayed through localizing text natives to get proper display name. + * ----------------------------------------------------------------------------------------------------------------------------------------- + * While often the case, this does not simply return the model name of the vehicle (which could be hashed to return the model hash). Variations of the same vehicle may also use the same display name. + * ----------------------------------------------------------------------------------------------------------------------------------------- + * Returns "CARNOTFOUND" if the hash doesn't match a vehicle hash. + * Using HUD::GET_FILENAME_FOR_AUDIO_CONVERSATION, you can get the localized name. + * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json + */ export function getDisplayNameFromVehicleModel(modelHash: number): string; /** - * Returns "CARNOTFOUND" if the hash doesn't match a vehicle hash. - * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json - * @returns Will return a vehicle's manufacturer display label. - */ + * Will return a vehicle's manufacturer display label. + * Returns "CARNOTFOUND" if the hash doesn't match a vehicle hash. + * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json + */ export function getMakeNameFromVehicleModel(modelHash: number): string; /** - * The only example I can find of this function in the scripts, is this: - * struct _s = VEHICLE::GET_VEHICLE_DEFORMATION_AT_POS(rPtr((A_0) + 4), 1.21f, 6.15f, 0.3f); - * ----------------------------------------------------------------------------------------------------------------------------------------- - * PC scripts: - * v_5{3} = VEHICLE::GET_VEHICLE_DEFORMATION_AT_POS(a_0._f1, 1.21, 6.15, 0.3); - */ + * The only example I can find of this function in the scripts, is this: + * struct _s = VEHICLE::GET_VEHICLE_DEFORMATION_AT_POS(rPtr((A_0) + 4), 1.21f, 6.15f, 0.3f); + * ----------------------------------------------------------------------------------------------------------------------------------------- + * PC scripts: + * v_5/*{3}*\/ = VEHICLE::GET_VEHICLE_DEFORMATION_AT_POS(a_0._f1, 1.21, 6.15, 0.3); + */ export function getVehicleDeformationAtPos(vehicle: Vehicle | number, offsetX: number, offsetY: number, offsetZ: number): Vector3; export function setVehicleLivery(vehicle: Vehicle | number, livery: number): void; /** - * -1 = no livery - */ + * -1 = no livery + */ export function getVehicleLivery(vehicle: Vehicle | number): number; /** - * Returns -1 if the vehicle has no livery - */ + * Returns -1 if the vehicle has no livery + */ export function getVehicleLiveryCount(vehicle: Vehicle | number): number; /** - * Used to set the secondary livery (the roof on Tornado Custom being one such example.) - * @param livery value is dependent on the amount of liveries present in the vehicle's texture dictionary, for Tornado Custom this would be 0-6. - */ + * Used to set the secondary livery (the roof on Tornado Custom being one such example.) + * Livery value is dependent on the amount of liveries present in the vehicle's texture dictionary, for Tornado Custom this would be 0-6. + */ export function setVehicleLivery2(vehicle: Vehicle | number, livery: number): void; /** - * Returns index of the current vehicle's secondary livery. A getter for SET_VEHICLE_LIVERY2. - */ + * Returns index of the current vehicle's secondary livery. A getter for SET_VEHICLE_LIVERY2. + */ export function getVehicleLivery2(vehicle: Vehicle | number): number; /** - * Returns a number of available secondary liveries, or -1 if vehicle has no secondary liveries available. - */ + * Returns a number of available secondary liveries, or -1 if vehicle has no secondary liveries available. + */ export function getVehicleLivery2Count(vehicle: Vehicle | number): number; /** - * Window indexes: - * 0 = Front Right Window - * 1 = Front Left Window - * 2 = Back Right Window - * 3 = Back Left Window - * Those numbers go on for vehicles that have more than 4 doors with windows. - * @returns This will return false if the window is broken, or rolled down. - */ + * This will return false if the window is broken, or rolled down. + * Window indexes: + * 0 = Front Right Window + * 1 = Front Left Window + * 2 = Back Right Window + * 3 = Back Left Window + * Those numbers go on for vehicles that have more than 4 doors with windows. + */ export function isVehicleWindowIntact(vehicle: Vehicle | number, windowIndex: number): boolean; /** - * @returns Appears to return false if any window is broken. - */ + * Appears to return false if any window is broken. + */ export function areAllVehicleWindowsIntact(vehicle: Vehicle | number): boolean; /** - * Returns false if every seat is occupied. - */ + * Returns false if every seat is occupied. + */ export function areAnyVehicleSeatsFree(vehicle: Vehicle | number): boolean; export function resetVehicleWheels(vehicle: Vehicle | number, toggle: boolean): void; @@ -21593,21 +24075,21 @@ declare module "natives" { export function isHeliPartBroken(vehicle: Vehicle | number, p1: boolean, p2: boolean, p3: boolean): boolean; /** - * Max 1000. - * At 0 the main rotor will stall. - */ + * Max 1000. + * At 0 the main rotor will stall. + */ export function getHeliMainRotorHealth(vehicle: Vehicle | number): number; /** - * Max 1000. - * At 0 the tail rotor will stall. - */ + * Max 1000. + * At 0 the tail rotor will stall. + */ export function getHeliTailRotorHealth(vehicle: Vehicle | number): number; /** - * Max 1000. - * At -100 both helicopter rotors will stall. - */ + * Max 1000. + * At -100 both helicopter rotors will stall. + */ export function getHeliTailBoomHealth(vehicle: Vehicle | number): number; export function setHeliMainRotorHealth(vehicle: Vehicle | number, health: number): void; @@ -21617,13 +24099,13 @@ declare module "natives" { export function setHeliTailBoomCanBreakOff(vehicle: Vehicle | number, toggle: boolean): boolean; /** - * NOTE: Debugging functions are not present in the retail version of the game. - */ - export function setVehicleNameDebug(vehicle: Vehicle | number, name: string | null): void; + * NOTE: Debugging functions are not present in the retail version of the game. + */ + export function setVehicleNameDebug(vehicle: Vehicle | number, name: string): void; /** - * Sets a vehicle to be strongly resistant to explosions. p0 is the vehicle; set p1 to false to toggle the effect on/off. - */ + * Sets a vehicle to be strongly resistant to explosions. p0 is the vehicle; set p1 to false to toggle the effect on/off. + */ export function setVehicleExplodesOnHighExplosionDamage(vehicle: Vehicle | number, toggle: boolean): void; export function setVehicleExplodesOnExplosionDamageAtZeroBodyHealth(vehicle: Vehicle | number, toggle: boolean): void; @@ -21635,41 +24117,49 @@ declare module "natives" { export function getVehicleHasLandingGear(vehicle: Vehicle | number): boolean; /** - * Works for vehicles with a retractable landing gear - * Landing gear states: - * 0: Deployed - * 1: Closing - * 2: Opening - * 3: Retracted - */ + * Works for vehicles with a retractable landing gear + * Landing gear states: + * 0: Deployed + * 1: Closing + * 2: Opening + * 3: Retracted + */ export function controlLandingGear(vehicle: Vehicle | number, state: number): void; /** - * Landing gear states: - * 0: Deployed - * 1: Closing (Retracting) - * 2: (Landing gear state 2 is never used.) - * 3: Opening (Deploying) - * 4: Retracted - * Returns the current state of the vehicles landing gear. - */ + * Landing gear states: + * 0: Deployed + * 1: Closing (Retracting) + * 2: (Landing gear state 2 is never used.) + * 3: Opening (Deploying) + * 4: Retracted + * Returns the current state of the vehicles landing gear. + */ export function getLandingGearState(vehicle: Vehicle | number): number; export function isAnyVehicleNearPoint(x: number, y: number, z: number, radius: number): boolean; export function requestVehicleHighDetailModel(vehicle: Vehicle | number): void; + export function getVehicleModelNumDriveGears(vehicleModel: number): number; + + export function getVehicleMaxDriveGearCount(vehicle: Vehicle | number): number; + + export function getVehicleCurrentDriveGear(vehicle: Vehicle | number): number; + + export function getVehicleCurrentRevRatio(vehicle: Vehicle | number): number; + export function removeVehicleHighDetailModel(vehicle: Vehicle | number): void; export function isVehicleHighDetail(vehicle: Vehicle | number): boolean; /** - * REQUEST_VEHICLE_ASSET(GET_HASH_KEY(cargobob3), 3); - * vehicle found that have asset's: - * cargobob3 - * submersible - * blazer - */ + * REQUEST_VEHICLE_ASSET(GET_HASH_KEY(cargobob3), 3); + * vehicle found that have asset's: + * cargobob3 + * submersible + * blazer + */ export function requestVehicleAsset(vehicleHash: number, vehicleAsset: number): void; export function hasVehicleAssetLoaded(vehicleAsset: number): boolean; @@ -21677,34 +24167,36 @@ declare module "natives" { export function removeVehicleAsset(vehicleAsset: number): void; /** - * Sets how much the crane on the tow truck is raised, where 0.0 is fully lowered and 1.0 is fully raised. - */ + * Sets how much the crane on the tow truck is raised, where 0.0 is fully lowered and 1.0 is fully raised. + */ export function setVehicleTowTruckArmPosition(vehicle: Vehicle | number, position: number): void; + export function setAttachedVehicleToTowTruckArm(towTruck: Vehicle | number, vehicle: Vehicle | number): void; + /** - * HookOffset defines where the hook is attached. leave at 0 for default attachment. - */ + * HookOffset defines where the hook is attached. leave at 0 for default attachment. + */ export function attachVehicleToTowTruck(towTruck: Vehicle | number, vehicle: Vehicle | number, rear: boolean, hookOffsetX: number, hookOffsetY: number, hookOffsetZ: number): void; /** - * First two parameters swapped. Scripts verify that towTruck is the first parameter, not the second. - */ + * First two parameters swapped. Scripts verify that towTruck is the first parameter, not the second. + */ export function detachVehicleFromTowTruck(towTruck: Vehicle | number, vehicle: Vehicle | number): void; export function detachVehicleFromAnyTowTruck(vehicle: Vehicle | number): boolean; /** - * Scripts verify that towTruck is the first parameter, not the second. - */ + * Scripts verify that towTruck is the first parameter, not the second. + */ export function isVehicleAttachedToTowTruck(towTruck: Vehicle | number, vehicle: Vehicle | number): boolean; - export function getEntityAttachedToTowTruck(towTruck: Vehicle | number): number; + export function getEntityAttachedToTowTruck(towTruck: Vehicle | number): Entity | number; - export function setVehicleAutomaticallyAttaches(vehicle: Vehicle | number, p1: boolean, p2: any): number; + export function setVehicleAutomaticallyAttaches(vehicle: Vehicle | number, p1: boolean, p2: any): Entity | number; /** - * Sets the arm position of a bulldozer. Position must be a value between 0.0 and 1.0. Ignored when `p2` is set to false, instead incrementing arm position by 0.1 (or 10%). - */ + * Sets the arm position of a bulldozer. Position must be a value between 0.0 and 1.0. Ignored when `p2` is set to false, instead incrementing arm position by 0.1 (or 10%). + */ export function setVehicleBulldozerArmPosition(vehicle: Vehicle | number, position: number, p2: boolean): void; export function setVehicleTankTurretPosition(vehicle: Vehicle | number, position: number, p2: boolean): void; @@ -21724,41 +24216,41 @@ declare module "natives" { export function getVehicleFlightNozzlePosition(plane: Vehicle | number): number; /** - * True stops vtols from switching modes. Doesn't stop the sound though. - */ + * True stops vtols from switching modes. Doesn't stop the sound though. + */ export function setDisableVerticalFlightModeTransition(vehicle: Vehicle | number, toggle: boolean): void; - export function generateVehicleCreationPosFromPaths(outVec: Vector3 | null, p1: any, outVec1: Vector3 | null, p3: any, p4: any, p5: any, p6: any, p7: any, p8: any): [boolean, Vector3, Vector3]; + export function generateVehicleCreationPosFromPaths(outVec: Vector3, p1: any, outVec1: Vector3, p3: any, p4: any, p5: any, p6: any, p7: any, p8: any): [boolean, Vector3, Vector3]; /** - * On accelerating, spins the driven wheels with the others braked, so you don't go anywhere. - */ + * On accelerating, spins the driven wheels with the others braked, so you don't go anywhere. + */ export function setVehicleBurnout(vehicle: Vehicle | number, toggle: boolean): void; /** - * Returns whether the specified vehicle is currently in a burnout. - * vb.net - * Public Function isVehicleInBurnout(vh As Vehicle) As Boolean - * End Function - * @returns Return Native.Function.Call(Of Boolean)(Hash.IS_VEHICLE_IN_BURNOUT, vh) - */ + * Returns whether the specified vehicle is currently in a burnout. + * vb.net + * Public Function isVehicleInBurnout(vh As Vehicle) As Boolean + * Return Native.Function.Call(Of Boolean)(Hash.IS_VEHICLE_IN_BURNOUT, vh) + * End Function + */ export function isVehicleInBurnout(vehicle: Vehicle | number): boolean; /** - * Reduces grip significantly so it's hard to go anywhere. - */ + * Reduces grip significantly so it's hard to go anywhere. + */ export function setVehicleReduceGrip(vehicle: Vehicle | number, toggle: boolean): void; /** - * Often used in conjunction with: SET_VEHICLE_REDUCE_GRIP - * @param val is 0-3 - */ + * val is 0-3 + * Often used in conjunction with: SET_VEHICLE_REDUCE_GRIP + */ export function setVehicleReduceGripLevel(vehicle: Vehicle | number, val: number): void; /** - * Sets the turn signal enabled for a vehicle. - * Set turnSignal to 1 for left light, 0 for right light. - */ + * Sets the turn signal enabled for a vehicle. + * Set turnSignal to 1 for left light, 0 for right light. + */ export function setVehicleIndicatorLights(vehicle: Vehicle | number, turnSignal: number, toggle: boolean): void; export function setVehicleBrakeLights(vehicle: Vehicle | number, toggle: boolean): void; @@ -21776,20 +24268,20 @@ declare module "natives" { export function networkEnableEmptyCrowdingVehiclesRemoval(toggle: boolean): void; /** - * Default:1000||This sets a value which is used when NETWORK_ENABLE_EMPTY_CROWDING_VEHICLES_REMOVAL(true) is called each frame. - */ + * Default:1000||This sets a value which is used when NETWORK_ENABLE_EMPTY_CROWDING_VEHICLES_REMOVAL(true) is called each frame. + */ export function networkCapEmptyCrowdingVehiclesRemoval(p0: number): void; /** - * Gets the trailer of a vehicle and puts it into the trailer parameter. - */ - export function getVehicleTrailerVehicle(vehicle: Vehicle | number, trailer?: Vehicle | number): [boolean, number]; + * Gets the trailer of a vehicle and puts it into the trailer parameter. + */ + export function getVehicleTrailerVehicle(vehicle: Vehicle | number, trailer?: Vehicle | number): [boolean, Vehicle | number]; - export function getVehicleTrailerParentVehicle(trailer: Vehicle | number): number; + export function getVehicleTrailerParentVehicle(trailer: Vehicle | number): Vehicle | number; /** - * @param vehicle must be a plane - */ + * vehicle must be a plane + */ export function setVehicleUsesLargeRearRamp(vehicle: Vehicle | number, toggle: boolean): void; export function setVehicleRudderBroken(vehicle: Vehicle | number, toggle: boolean): void; @@ -21803,53 +24295,53 @@ declare module "natives" { export function getVehicleMaxTraction(vehicle: Vehicle | number): number; /** - * static - max acceleration - */ + * static - max acceleration + */ export function getVehicleAcceleration(vehicle: Vehicle | number): number; /** - * Returns max speed (without mods) of the specified vehicle model in m/s. - * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json - */ + * Returns max speed (without mods) of the specified vehicle model in m/s. + * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json + */ export function getVehicleModelEstimatedMaxSpeed(modelHash: number): number; /** - * Returns max braking of the specified vehicle model. - * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json - */ + * Returns max braking of the specified vehicle model. + * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json + */ export function getVehicleModelMaxBraking(modelHash: number): number; /** - * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json - */ + * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json + */ export function getVehicleModelMaxBrakingMaxMods(modelHash: number): number; /** - * Returns max traction of the specified vehicle model. - * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json - */ + * Returns max traction of the specified vehicle model. + * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json + */ export function getVehicleModelMaxTraction(modelHash: number): number; /** - * Returns the acceleration of the specified model. - * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json - */ + * Returns the acceleration of the specified model. + * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json + */ export function getVehicleModelAcceleration(modelHash: number): number; /** - * 9.8 * thrust if air vehicle, else 0.38 + drive force? - * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json - */ + * 9.8 * thrust if air vehicle, else 0.38 + drive force? + * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json + */ export function getVehicleModelAccelerationMaxMods(modelHash: number): number; /** - * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json - */ + * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json + */ export function getFlyingVehicleModelAgility(modelHash: number): number; /** - * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json - */ + * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json + */ export function getBoatVehicleModelAgility(modelHash: number): number; export function getVehicleClassEstimatedMaxSpeed(vehicleClass: number): number; @@ -21871,35 +24363,35 @@ declare module "natives" { export function closeBombBayDoors(vehicle: Vehicle | number): void; /** - * Returns true when the bomb bay doors of this plane are open. False if they're closed. - */ + * Returns true when the bomb bay doors of this plane are open. False if they're closed. + */ export function getAreBombBayDoorsOpen(aircraft: Vehicle | number): boolean; /** - * @Author Nac - * @returns Possibly: Returns whether the searchlight (found on police vehicles) is toggled on. - */ + * Possibly: Returns whether the searchlight (found on police vehicles) is toggled on. + * @Author Nac + */ export function isVehicleSearchlightOn(vehicle: Vehicle | number): boolean; /** - * Only works during nighttime. - */ + * Only works during nighttime. + */ export function setVehicleSearchlight(heli: Vehicle | number, toggle: boolean, canBeUsedByAI: boolean): void; export function doesVehicleHaveSearchlight(vehicle: Vehicle | number): boolean; /** - * Use GET_VEHICLE_MAX_NUMBER_OF_PASSENGERS(vehicle) - 1 for last seat index. - * @param seatIndex = -1 being the driver seat. - * @param side = only relevant for bikes/motorcycles to check if the left (false)/right (true) side is blocked. - * @param onEnter = check if you can enter (true) or exit (false) a vehicle. - * @returns Check if a vehicle seat is accessible. If you park your vehicle near a wall and the ped cannot enter/exit this side, the return value toggles from true (not blocked) to false (blocked). - */ - export function isEntryPointForSeatClear(ped: Player | number, vehicle: Vehicle | number, seatIndex: number, side: boolean, onEnter: boolean): boolean; + * Check if a vehicle seat is accessible. If you park your vehicle near a wall and the ped cannot enter/exit this side, the return value toggles from true (not blocked) to false (blocked). + * seatIndex = -1 being the driver seat. + * Use GET_VEHICLE_MAX_NUMBER_OF_PASSENGERS(vehicle) - 1 for last seat index. + * side = only relevant for bikes/motorcycles to check if the left (false)/right (true) side is blocked. + * onEnter = check if you can enter (true) or exit (false) a vehicle. + */ + export function isEntryPointForSeatClear(ped: Ped | Player | number, vehicle: Vehicle | number, seatIndex: number, side: boolean, onEnter: boolean): boolean; /** - * @param doorId see SET_VEHICLE_DOOR_SHUT - */ + * doorId: see SET_VEHICLE_DOOR_SHUT + */ export function getEntryPointPosition(vehicle: Vehicle | number, doorId: number): Vector3; export function canShuffleSeat(vehicle: Vehicle | number, seatIndex: number): boolean; @@ -21907,9 +24399,9 @@ declare module "natives" { export function getNumModKits(vehicle: Vehicle | number): number; /** - * Set modKit to 0 if you plan to call SET_VEHICLE_MOD. That's what the game does. Most body modifications through SET_VEHICLE_MOD will not take effect until this is set to 0. - * Full list of vehicle mod kits and mods by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicleModKits.json - */ + * Set modKit to 0 if you plan to call SET_VEHICLE_MOD. That's what the game does. Most body modifications through SET_VEHICLE_MOD will not take effect until this is set to 0. + * Full list of vehicle mod kits and mods by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicleModKits.json + */ export function setVehicleModKit(vehicle: Vehicle | number, modKit: number): void; export function getVehicleModKit(vehicle: Vehicle | number): number; @@ -21917,70 +24409,82 @@ declare module "natives" { export function getVehicleModKitType(vehicle: Vehicle | number): number; /** - * Returns an int - * Wheel Types: - * 0: Sport - * 1: Muscle - * 2: Lowrider - * 3: SUV - * 4: Offroad - * 5: Tuner - * 6: Bike Wheels - * See NativeDB for reference: http://natives.altv.mp/#/0xB3ED1BFB4BE636DC - */ + * Returns an int + * Wheel Types: + * 0: Sport + * 1: Muscle + * 2: Lowrider + * 3: SUV + * 4: Offroad + * 5: Tuner + * 6: Bike Wheels + * 7: High End + * 8: Benny's Originals + * 9: Benny's Bespoke + * 10: Racing + * 11: Street + * 12: Track + * Tested in Los Santos Customs + */ export function getVehicleWheelType(vehicle: Vehicle | number): number; /** - * 0: Sport - * 1: Muscle - * 2: Lowrider - * 3: SUV - * 4: Offroad - * 5: Tuner - * 6: Bike Wheels - * 7: High End - * 8: Benny's Originals - * See NativeDB for reference: http://natives.altv.mp/#/0x487EB21CC7295BA1 - */ + * 0: Sport + * 1: Muscle + * 2: Lowrider + * 3: SUV + * 4: Offroad + * 5: Tuner + * 6: Bike Wheels + * 7: High End + * 8: Benny's Originals + * 9: Benny's Bespoke + * 10: Racing + * 11: Street + * 12: Track + */ export function setVehicleWheelType(vehicle: Vehicle | number, WheelType: number): void; /** - * 0: Normal - * 1: Metallic - * 2: Pearl - * 3: Matte - * 4: Metal - * 5: Chrome - * 6: Chameleon - */ + * paintType: + * 0: Normal + * 1: Metallic + * 2: Pearl + * 3: Matte + * 4: Metal + * 5: Chrome + * 6: Chameleon + */ export function getNumModColors(paintType: number, p1: boolean): number; /** - * 0: Normal - * 1: Metallic - * 2: Pearl - * 3: Matte - * 4: Metal - * 5: Chrome - * 6: Chameleon - * color: number of the color. - * @param color https - * @param pearlescentColor seems to always be 0. - */ + * paintType: + * 0: Normal + * 1: Metallic + * 2: Pearl + * 3: Matte + * 4: Metal + * 5: Chrome + * 6: Chameleon + * color: number of the color. + * p3 seems to always be 0. + * Full list of vehicle colors and vehicle plates by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicleColors.json + */ export function setVehicleModColor1(vehicle: Vehicle | number, paintType: number, color: number, pearlescentColor: number): void; /** - * Changes the secondary paint type and color - * 0: Normal - * 1: Metallic - * 2: Pearl - * 3: Matte - * 4: Metal - * 5: Chrome - * 6: Chameleon - * color: number of the color - * @param color https - */ + * Changes the secondary paint type and color + * paintType: + * 0: Normal + * 1: Metallic + * 2: Pearl + * 3: Matte + * 4: Metal + * 5: Chrome + * 6: Chameleon + * color: number of the color + * Full list of vehicle colors and vehicle plates by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicleColors.json + */ export function setVehicleModColor2(vehicle: Vehicle | number, paintType: number, color: number): void; export function getVehicleModColor1(vehicle: Vehicle | number, paintType?: number, color?: number, pearlescentColor?: number): [void, number, number, number]; @@ -21988,98 +24492,128 @@ declare module "natives" { export function getVehicleModColor2(vehicle: Vehicle | number, paintType?: number, color?: number): [void, number, number]; /** - * Returns a string which is the codename of the vehicle's currently selected primary color - * @param p1 is always 0 - */ + * Returns a string which is the codename of the vehicle's currently selected primary color + * p1 is always 0 + */ export function getVehicleModColor1Name(vehicle: Vehicle | number, p1: boolean): string; /** - * Returns a string which is the codename of the vehicle's currently selected secondary color - */ + * Returns a string which is the codename of the vehicle's currently selected secondary color + */ export function getVehicleModColor2Name(vehicle: Vehicle | number): string; export function haveVehicleModsStreamedIn(vehicle: Vehicle | number): boolean; /** - * Returns true for any mod part listed in GEN9_EXCLUSIVE_ASSETS_VEHICLES_FILE. - */ + * Returns true for any mod part listed in GEN9_EXCLUSIVE_ASSETS_VEHICLES_FILE. + */ export function isVehicleModGen9Exclusive(vehicle: Vehicle | number, modType: number, modIndex: number): boolean; /** - * In b944, there are 50 (0 - 49) mod types. - * Sets the vehicle mod. - * The vehicle must have a mod kit first. - * Any out of range ModIndex is stock. - * #Mod Type - * Spoilers - 0 - * Front Bumper - 1 - * Rear Bumper - 2 - * Side Skirt - 3 - * See NativeDB for reference: http://natives.altv.mp/#/0x6AF0636DDEDCB6DD - */ + * In b944, there are 50 (0 - 49) mod types. + * Sets the vehicle mod. + * The vehicle must have a mod kit first. + * Any out of range ModIndex is stock. + * #Mod Type + * Spoilers - 0 + * Front Bumper - 1 + * Rear Bumper - 2 + * Side Skirt - 3 + * Exhaust - 4 + * Frame - 5 + * Grille - 6 + * Hood - 7 + * Fender - 8 + * Right Fender - 9 + * Roof - 10 + * Engine - 11 + * Brakes - 12 + * Transmission - 13 + * Horns - 14 (modIndex from 0 to 51) + * Suspension - 15 + * Armor - 16 + * Front Wheels - 23 + * Back Wheels - 24 //only for motocycles + * Plate holders - 25 + * Trim Design - 27 + * Ornaments - 28 + * Dial Design - 30 + * Steering Wheel - 33 + * Shifter Leavers - 34 + * Plaques - 35 + * Hydraulics - 38 + * Livery - 48 + * ENUMS: https://pastebin.com/QzEAn02v + */ export function setVehicleMod(vehicle: Vehicle | number, modType: number, modIndex: number, customTires: boolean): void; /** - * In b944, there are 50 (0 - 49) mod types. See SET_VEHICLE_MOD for the list. - * Returns -1 if the vehicle mod is stock - */ + * In b944, there are 50 (0 - 49) mod types. See SET_VEHICLE_MOD for the list. + * Returns -1 if the vehicle mod is stock + */ export function getVehicleMod(vehicle: Vehicle | number, modType: number): number; /** - * @returns Only used for wheels(ModType = 23/24) Returns true if the wheels are custom wheels - */ + * Only used for wheels(ModType = 23/24) Returns true if the wheels are custom wheels + */ export function getVehicleModVariation(vehicle: Vehicle | number, modType: number): number; /** - * Returns how many possible mods a vehicle has for a given mod type - */ + * Returns how many possible mods a vehicle has for a given mod type + */ export function getNumVehicleMods(vehicle: Vehicle | number, modType: number): number; export function removeVehicleMod(vehicle: Vehicle | number, modType: number): void; /** - * Toggles: - * UNK17 - 17 - * Turbo - 18 - * UNK19 - 19 - * Tire Smoke - 20 - * UNK21 - 21 - * Xenon Headlights - 22 - */ + * Toggles: + * UNK17 - 17 + * Turbo - 18 + * UNK19 - 19 + * Tire Smoke - 20 + * UNK21 - 21 + * Xenon Headlights - 22 + */ export function toggleVehicleMod(vehicle: Vehicle | number, modType: number, toggle: boolean): void; export function isToggleModOn(vehicle: Vehicle | number, modType: number): boolean; /** - * Returns the text label of a mod type for a given vehicle - * Use GET_FILENAME_FOR_AUDIO_CONVERSATION to get the part name in the game's language - */ + * Returns the text label of a mod type for a given vehicle + * Use GET_FILENAME_FOR_AUDIO_CONVERSATION to get the part name in the game's language + */ export function getModTextLabel(vehicle: Vehicle | number, modType: number, modValue: number): string; /** - * Returns the name for the type of vehicle mod(Armour, engine etc) - */ + * Returns the name for the type of vehicle mod(Armour, engine etc) + */ export function getModSlotName(vehicle: Vehicle | number, modType: number): string; /** - * Returns the text label of the vehicle's liveryIndex, as specified by the liveryNames section of the vehicle's modkit data in the carcols file. - * example - * int count = VEHICLE::GET_VEHICLE_LIVERY_COUNT(veh); - * for (int i = 0; i < count; i++) - * { - * const char* LiveryName = VEHICLE::GET_LIVERY_NAME(veh, i); - * } - * this example will work fine to fetch all names - * for example for Sanchez we get - * See NativeDB for reference: http://natives.altv.mp/#/0xB4C7A93837C91A1F - */ + * Returns the text label of the vehicle's liveryIndex, as specified by the liveryNames section of the vehicle's modkit data in the carcols file. + * example + * int count = VEHICLE::GET_VEHICLE_LIVERY_COUNT(veh); + * for (int i = 0; i < count; i++) + * { + * const char* LiveryName = VEHICLE::GET_LIVERY_NAME(veh, i); + * } + * this example will work fine to fetch all names + * for example for Sanchez we get + * SANC_LV1 + * SANC_LV2 + * SANC_LV3 + * SANC_LV4 + * SANC_LV5 + * Use GET_FILENAME_FOR_AUDIO_CONVERSATION, to get the localized livery name. + * Full list of vehicle mod kits and mods by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicleModKits.json + */ export function getLiveryName(vehicle: Vehicle | number, liveryIndex: number): string; export function getVehicleModModifierValue(vehicle: Vehicle | number, modType: number, modIndex: number): number; /** - * Can be used for IS_DLC_VEHICLE_MOD and GET_DLC_VEHICLE_MOD_LOCK_HASH - */ + * Can be used for IS_DLC_VEHICLE_MOD and GET_DLC_VEHICLE_MOD_LOCK_HASH + */ export function getVehicleModIdentifierHash(vehicle: Vehicle | number, modType: number, modIndex: number): number; export function preloadVehicleMod(vehicle: Vehicle | number, modType: number, modIndex: number): void; @@ -22089,29 +24623,30 @@ declare module "natives" { export function releasePreloadMods(vehicle: Vehicle | number): void; /** - * Sets the tire smoke's color of this vehicle. - * Note: setting r,g,b to 0 will give the car the "Patriot" tire smoke. - * @param vehicle The vehicle that is the target of this method. - * @param r The red level in the RGB color code. - * @param g The green level in the RGB color code. - * @param b The blue level in the RGB color code. - */ + * Sets the tire smoke's color of this vehicle. + * vehicle: The vehicle that is the target of this method. + * r: The red level in the RGB color code. + * g: The green level in the RGB color code. + * b: The blue level in the RGB color code. + * Note: setting r,g,b to 0 will give the car the "Patriot" tire smoke. + */ export function setVehicleTyreSmokeColor(vehicle: Vehicle | number, r: number, g: number, b: number): void; export function getVehicleTyreSmokeColor(vehicle: Vehicle | number, r?: number, g?: number, b?: number): [void, number, number, number]; /** - * enum WindowTints - * { - * WINDOWTINT_NONE, - * WINDOWTINT_PURE_BLACK, - * WINDOWTINT_DARKSMOKE, - * WINDOWTINT_LIGHTSMOKE, - * WINDOWTINT_STOCK, - * WINDOWTINT_LIMO, - * WINDOWTINT_GREEN - * See NativeDB for reference: http://natives.altv.mp/#/0x57C51E6BAD752696 - */ + * enum WindowTints + * { + * WINDOWTINT_NONE, + * WINDOWTINT_PURE_BLACK, + * WINDOWTINT_DARKSMOKE, + * WINDOWTINT_LIGHTSMOKE, + * WINDOWTINT_STOCK, + * WINDOWTINT_LIMO, + * WINDOWTINT_GREEN + * }; + * Full list of all vehicle window tints by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicleColors.json + */ export function setVehicleWindowTint(vehicle: Vehicle | number, tint: number): void; export function getVehicleWindowTint(vehicle: Vehicle | number): number; @@ -22119,63 +24654,67 @@ declare module "natives" { export function getNumVehicleWindowTints(): number; /** - * What's this for? Primary and Secondary RGB have their own natives and this one doesn't seem specific. - */ + * What's this for? Primary and Secondary RGB have their own natives and this one doesn't seem specific. + */ export function getVehicleColor(vehicle: Vehicle | number, r?: number, g?: number, b?: number): [void, number, number, number]; /** - * Some kind of flags. - */ + * Some kind of flags. + */ export function getVehicleColoursWhichCanBeSet(vehicle: Vehicle | number): number; /** - * iVar3 = get_vehicle_cause_of_destruction(uLocal_248[iVar2]); - * if (iVar3 == joaat("weapon_stickybomb")) - * { - * func_171(726); - * iLocal_260 = 1; - * } - */ + * iVar3 = get_vehicle_cause_of_destruction(uLocal_248[iVar2]); + * if (iVar3 == joaat("weapon_stickybomb")) + * { + * func_171(726); + * iLocal_260 = 1; + * } + */ export function getVehicleCauseOfDestruction(vehicle: Vehicle | number): number; /** - * Used for helis. - */ + * Used for helis. + */ export function overridePlaneDamageThrehsold(vehicle: Vehicle | number, health: number): void; + export function setTransmissionReducedGearRatio(vehicle: Vehicle | number, toggle: boolean): void; + + export function getVehicleDesiredDriveGear(vehicle: Vehicle | number): number; + /** - * From the driver's perspective, is the left headlight broken. - */ + * From the driver's perspective, is the left headlight broken. + */ export function getIsLeftVehicleHeadlightDamaged(vehicle: Vehicle | number): boolean; /** - * From the driver's perspective, is the right headlight broken. - */ + * From the driver's perspective, is the right headlight broken. + */ export function getIsRightVehicleHeadlightDamaged(vehicle: Vehicle | number): boolean; /** - * Returns true when both headlights are broken. This does not include extralights. - */ + * Returns true when both headlights are broken. This does not include extralights. + */ export function getBothVehicleHeadlightsDamaged(vehicle: Vehicle | number): boolean; export function modifyVehicleTopSpeed(vehicle: Vehicle | number, value: number): void; /** - * To reset the max speed, set the `speed` value to `0.0` or lower. - */ + * To reset the max speed, set the `speed` value to `0.0` or lower. + */ export function setVehicleMaxSpeed(vehicle: Vehicle | number, speed: number): void; /** - * Has something to do with trains. Always precedes SET_MISSION_TRAIN_AS_NO_LONGER_NEEDED. - * May be true that it can be used with trains not sure, but not specifically for trains. Go find Xbox360 decompiled scripts and search for 'func_1333' in freemode.c it isn't used just for trains. Thanks for the info tho. - */ + * Has something to do with trains. Always precedes SET_MISSION_TRAIN_AS_NO_LONGER_NEEDED. + * May be true that it can be used with trains not sure, but not specifically for trains. Go find Xbox360 decompiled scripts and search for 'func_1333' in freemode.c it isn't used just for trains. Thanks for the info tho. + */ export function setVehicleStaysFrozenWhenCleanedUp(vehicle: Vehicle | number, toggle: boolean): void; export function setVehicleActAsIfHighSpeedForFragSmashing(vehicle: Vehicle | number, p1: boolean): void; /** - * Sets some bit and float of vehicle. float is >= 0 - */ + * Sets some bit and float of vehicle. float is >= 0 + */ export function setPedsCanFallOffThisVehicleFromLargeFallDamage(vehicle: Vehicle | number, toggle: boolean, p2: number): void; export function addVehicleCombatAngledAvoidanceArea(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number): number; @@ -22185,32 +24724,32 @@ declare module "natives" { export function isAnyPedRappellingFromHeli(vehicle: Vehicle | number): boolean; /** - * <1.0 - Decreased torque - * =1.0 - Default torque - * >1.0 - Increased torque - * Negative values will cause the vehicle to go backwards instead of forwards while accelerating. - * This needs to be called every frame to take effect. - * @param value - is between 0.2 and 1.8 in the decompiled scripts. - */ + * <1.0 - Decreased torque + * =1.0 - Default torque + * >1.0 - Increased torque + * Negative values will cause the vehicle to go backwards instead of forwards while accelerating. + * value - is between 0.2 and 1.8 in the decompiled scripts. + * This needs to be called every frame to take effect. + */ export function setVehicleCheatPowerIncrease(vehicle: Vehicle | number, value: number): void; export function setVehicleInfluencesWantedLevel(p0: any, p1: boolean): void; /** - * Sets the wanted state of this vehicle. - */ + * Sets the wanted state of this vehicle. + */ export function setVehicleIsWanted(vehicle: Vehicle | number, state: boolean): void; /** - * Sets the boat boom position for the `TR3` trailer. - * To get the current boom position ratio, use GET_BOAT_BOOM_POSITION_RATIO - * @param ratio value is between `0.0` and `1.0`, where `0.0` is 90 degrees to the left of the boat, and `1.0` is just slightly to the right/back of the boat. - */ + * Sets the boat boom position for the `TR3` trailer. + * Ratio value is between `0.0` and `1.0`, where `0.0` is 90 degrees to the left of the boat, and `1.0` is just slightly to the right/back of the boat. + * To get the current boom position ratio, use GET_BOAT_BOOM_POSITION_RATIO + */ export function swingBoatBoomToRatio(vehicle: Vehicle | number, ratio: number): void; /** - * Same call as ALLOW_BOAT_BOOM_TO_ANIMATE - */ + * Same call as ALLOW_BOAT_BOOM_TO_ANIMATE + */ export function swingBoatBoomFreely(vehicle: Vehicle | number, toggle: boolean): void; export function allowBoatBoomToAnimate(vehicle: Vehicle | number, toggle: boolean): void; @@ -22220,19 +24759,19 @@ declare module "natives" { export function disablePlaneAileron(vehicle: Vehicle | number, p1: boolean, p2: boolean): void; /** - * Returns true when in a vehicle, false whilst entering/exiting. - */ + * Returns true when in a vehicle, false whilst entering/exiting. + */ export function getIsVehicleEngineRunning(vehicle: Vehicle | number): boolean; export function setVehicleUseAlternateHandling(vehicle: Vehicle | number, toggle: boolean): void; /** - * Only works on bikes, both X and Y work in the -1 - 1 range. - * Example with X -1/Y 1 - * http://i.imgur.com/TgIuAPJ.jpg - * @param x forces the bike to turn left or right (-1, 1) - * @param y forces the bike to lean to the left or to the right (-1, 1) - */ + * Only works on bikes, both X and Y work in the -1 - 1 range. + * X forces the bike to turn left or right (-1, 1) + * Y forces the bike to lean to the left or to the right (-1, 1) + * Example with X -1/Y 1 + * http://i.imgur.com/TgIuAPJ.jpg + */ export function setBikeOnStand(vehicle: Vehicle | number, x: number, y: number): void; export function setVehicleNotStealableAmbiently(vehicle: Vehicle | number, p1: boolean): void; @@ -22241,7 +24780,7 @@ declare module "natives" { export function setLastDrivenVehicle(vehicle: Vehicle | number): void; - export function getLastDrivenVehicle(): number; + export function getLastDrivenVehicle(): Vehicle | number; export function clearLastDrivenVehicle(): void; @@ -22254,8 +24793,8 @@ declare module "natives" { export function setVehicleCanSaveInGarage(vehicle: Vehicle | number, toggle: boolean): void; /** - * Also includes some "turnOffBones" when vehicle mods are installed. - */ + * Also includes some "turnOffBones" when vehicle mods are installed. + */ export function getVehicleNumOfBrokenOffParts(vehicle: Vehicle | number): number; export function getVehicleNumOfBrokenLoosenParts(vehicle: Vehicle | number): number; @@ -22263,13 +24802,13 @@ declare module "natives" { export function setForceVehicleEngineDamageByBullet(p0: any, p1: boolean): void; /** - * Allows creation of CEventShockingPlaneFlyby, CEventShockingHelicopterOverhead, and other(?) Shocking events - */ + * Allows creation of CEventShockingPlaneFlyby, CEventShockingHelicopterOverhead, and other(?) Shocking events + */ export function setVehicleGeneratesEngineShockingEvents(vehicle: Vehicle | number, toggle: boolean): void; /** - * Copies sourceVehicle's damage (broken bumpers, broken lights, etc.) to targetVehicle. - */ + * Copies sourceVehicle's damage (broken bumpers, broken lights, etc.) to targetVehicle. + */ export function copyVehicleDamages(sourceVehicle: Vehicle | number, targetVehicle: Vehicle | number): void; export function disableVehicleExplosionBreakOffParts(): void; @@ -22277,12 +24816,12 @@ declare module "natives" { export function setLightsCutoffDistanceTweak(distance: number): void; /** - * Commands the driver of an armed vehicle (p0) to shoot its weapon at a target (p1). p3, p4 and p5 are the coordinates of the target. Example: - * WEAPON::SET_CURRENT_PED_VEHICLE_WEAPON(pilot,MISC::GET_HASH_KEY("VEHICLE_WEAPON_PLANE_ROCKET")); VEHICLE::SET_VEHICLE_SHOOT_AT_TARGET(pilot, target, targPos.x, targPos.y, targPos.z); - */ - export function setVehicleShootAtTarget(driver: Player | number, entity: Entity | number, xTarget: number, yTarget: number, zTarget: number): void; + * Commands the driver of an armed vehicle (p0) to shoot its weapon at a target (p1). p3, p4 and p5 are the coordinates of the target. Example: + * WEAPON::SET_CURRENT_PED_VEHICLE_WEAPON(pilot,MISC::GET_HASH_KEY("VEHICLE_WEAPON_PLANE_ROCKET")); VEHICLE::SET_VEHICLE_SHOOT_AT_TARGET(pilot, target, targPos.x, targPos.y, targPos.z); + */ + export function setVehicleShootAtTarget(driver: Ped | Player | number, entity: Entity | number, xTarget: number, yTarget: number, zTarget: number): void; - export function getVehicleLockOnTarget(vehicle: Vehicle | number, entity?: Entity | number): [boolean, number]; + export function getVehicleLockOnTarget(vehicle: Vehicle | number, entity?: Entity | number): [boolean, Entity | number]; export function setForceHdVehicle(vehicle: Vehicle | number, toggle: boolean): void; @@ -22291,35 +24830,35 @@ declare module "natives" { export function getVehiclePlateType(vehicle: Vehicle | number): number; /** - * in script hook .net - * Function.Call(Hash.TRACK_VEHICLE_VISIBILITY, v.Handle); - * @param vehicle v = ...; - */ + * in script hook .net + * Vehicle v = ...; + * Function.Call(Hash.TRACK_VEHICLE_VISIBILITY, v.Handle); + */ export function trackVehicleVisibility(vehicle: Vehicle | number): void; /** - * must be called after TRACK_VEHICLE_VISIBILITY - * it's not instant so probabilly must pass an 'update' to see correct result. - */ + * must be called after TRACK_VEHICLE_VISIBILITY + * it's not instant so probabilly must pass an 'update' to see correct result. + */ export function isVehicleVisible(vehicle: Vehicle | number): boolean; export function setVehicleGravity(vehicle: Vehicle | number, toggle: boolean): void; /** - * Enable/Disables global slipstream physics - */ + * Enable/Disables global slipstream physics + */ export function setEnableVehicleSlipstreaming(toggle: boolean): void; export function setVehicleSlipstreamingShouldTimeOut(toggle: boolean): void; /** - * Returns a float value between 0.0 and 3.0 related to its slipstream draft (boost/speedup). - */ + * Returns a float value between 0.0 and 3.0 related to its slipstream draft (boost/speedup). + */ export function getVehicleCurrentTimeInSlipStream(vehicle: Vehicle | number): number; /** - * Returns true if the vehicle is being slipstreamed by another vehicle - */ + * Returns true if the vehicle is being slipstreamed by another vehicle + */ export function isVehicleProducingSlipStream(vehicle: Vehicle | number): boolean; export function setVehicleInactiveDuringPlayback(vehicle: Vehicle | number, toggle: boolean): void; @@ -22327,21 +24866,21 @@ declare module "natives" { export function setVehicleActiveDuringPlayback(vehicle: Vehicle | number, toggle: boolean): void; /** - * Returns false if the vehicle has the FLAG_NO_RESPRAY flag set. - */ + * Returns false if the vehicle has the FLAG_NO_RESPRAY flag set. + */ export function isVehicleSprayable(vehicle: Vehicle | number): boolean; export function setVehicleEngineCanDegrade(vehicle: Vehicle | number, toggle: boolean): void; /** - * Adds some kind of shadow to the vehicle. - * @param p1 and p2 use values from 0-255 and both make the shadow darker the lower the value is. -1 disables the effect. - */ + * Adds some kind of shadow to the vehicle. + * p1 and p2 use values from 0-255 and both make the shadow darker the lower the value is. -1 disables the effect. + */ export function disableVehcileDynamicAmbientScales(vehicle: Vehicle | number, p1: number, p2: number): void; /** - * Remove the weird shadow applied by DISABLE_VEHCILE_DYNAMIC_AMBIENT_SCALES. - */ + * Remove the weird shadow applied by DISABLE_VEHCILE_DYNAMIC_AMBIENT_SCALES. + */ export function enableVehicleDynamicAmbientScales(vehicle: Vehicle | number): void; export function isPlaneLandingGearIntact(plane: Vehicle | number): boolean; @@ -22353,26 +24892,26 @@ declare module "natives" { export function setVehicleCanDeformWheels(vehicle: Vehicle | number, toggle: boolean): void; /** - * @returns Only returns true if the vehicle was marked as stolen with SET_VEHICLE_IS_STOLEN. - */ + * Only returns true if the vehicle was marked as stolen with SET_VEHICLE_IS_STOLEN. + */ export function isVehicleStolen(vehicle: Vehicle | number): boolean; export function setVehicleIsStolen(vehicle: Vehicle | number, isStolen: boolean): void; /** - * This native sets the turbulence multiplier. It only works for planes. - * 0.0 = no turbulence at all. - * 1.0 = heavy turbulence. - * Works by just calling it once, does not need to be called every tick. - */ + * This native sets the turbulence multiplier. It only works for planes. + * 0.0 = no turbulence at all. + * 1.0 = heavy turbulence. + * Works by just calling it once, does not need to be called every tick. + */ export function setPlaneTurbulenceMultiplier(vehicle: Vehicle | number, multiplier: number): void; export function areWingsOfPlaneIntact(plane: Vehicle | number): boolean; /** - * This native doesn't seem to do anything, might be a debug-only native. - * Confirmed, it is a debug native. - */ + * This native doesn't seem to do anything, might be a debug-only native. + * Confirmed, it is a debug native. + */ export function allowAmbientVehiclesToAvoidAdverseConditions(vehicle: Vehicle | number): void; export function detachVehicleFromCargobob(vehicle: Vehicle | number, cargobob: Vehicle | number): void; @@ -22384,19 +24923,19 @@ declare module "natives" { export function isVehicleAttachedToCargobob(cargobob: Vehicle | number, vehicleAttached: Vehicle | number): boolean; /** - * Returns attached vehicle (Vehicle in parameter must be cargobob) - */ - export function getVehicleAttachedToCargobob(cargobob: Vehicle | number): number; + * Returns attached vehicle (Vehicle in parameter must be cargobob) + */ + export function getVehicleAttachedToCargobob(cargobob: Vehicle | number): Vehicle | number; - export function getEntityAttachedToCargobob(p0: any): number; + export function getEntityAttachedToCargobob(p0: any): Entity | number; - export function attachVehicleToCargobob(vehicle: Vehicle | number, cargobob: Vehicle | number, p2: number, x: number, y: number, z: number): void; + export function attachVehicleToCargobob(cargobob: Vehicle | number, vehicle: Vehicle | number, p2: number, x: number, y: number, z: number): void; export function attachEntityToCargobob(p0: any, p1: any, p2: any, p3: any, p4: any, p5: any): void; /** - * Stops cargobob from being able to detach the attached vehicle. - */ + * Stops cargobob from being able to detach the attached vehicle. + */ export function setCargobobForceDontDetachVehicle(cargobob: Vehicle | number, toggle: boolean): void; export function setCargobobExcludeFromPickupEntity(p0: any, p1: any): void; @@ -22404,35 +24943,35 @@ declare module "natives" { export function canCargobobPickUpEntity(p0: any, p1: any): boolean; /** - * Gets the position of the cargobob hook, in world coords. - */ + * Gets the position of the cargobob hook, in world coords. + */ export function getAttachedPickUpHookPosition(cargobob: Vehicle | number): Vector3; /** - * @returns Returns true only when the hook is active, will return false if the magnet is active - */ + * Returns true only when the hook is active, will return false if the magnet is active + */ export function doesCargobobHavePickUpRope(cargobob: Vehicle | number): boolean; /** - * Drops the Hook/Magnet on a cargobob - * state - * enum eCargobobHook - * { - * CARGOBOB_HOOK = 0, - * CARGOBOB_MAGNET = 1, - * }; - */ + * Drops the Hook/Magnet on a cargobob + * state + * enum eCargobobHook + * { + * CARGOBOB_HOOK = 0, + * CARGOBOB_MAGNET = 1, + * }; + */ export function createPickUpRopeForCargobob(cargobob: Vehicle | number, state: number): void; /** - * Retracts the hook on the cargobob. - * Note: after you retract it the natives for dropping the hook no longer work - */ + * Retracts the hook on the cargobob. + * Note: after you retract it the natives for dropping the hook no longer work + */ export function removePickUpRopeForCargobob(cargobob: Vehicle | number): void; /** - * min: 1.9f, max: 100.0f - */ + * min: 1.9f, max: 100.0f + */ export function setPickupRopeLengthForCargobob(cargobob: Vehicle | number, length1: number, length2: number, p3: boolean): void; export function setPickupRopeLengthWithoutCreatingRopeForCargobob(p0: any, p1: any, p2: any): void; @@ -22442,13 +24981,13 @@ declare module "natives" { export function setCargobobPickupRopeType(p0: any, p1: any): void; /** - * @returns Returns true only when the magnet is active, will return false if the hook is active - */ + * Returns true only when the magnet is active, will return false if the hook is active + */ export function doesCargobobHavePickupMagnet(cargobob: Vehicle | number): boolean; /** - * Won't attract or magnetize to any helicopters or planes of course, but that's common sense. - */ + * Won't attract or magnetize to any helicopters or planes of course, but that's common sense. + */ export function setCargobobPickupMagnetActive(cargobob: Vehicle | number, isActive: boolean): void; export function setCargobobPickupMagnetStrength(cargobob: Vehicle | number, strength: number): void; @@ -22474,40 +25013,56 @@ declare module "natives" { export function setVehicleWillTellOthersToHurry(vehicle: Vehicle | number, p1: boolean): void; /** - * Full list of weapons by DurtyFree (Search for VEHICLE_*): https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function disableVehicleWeapon(disabled: boolean, weaponHash: number, vehicle: Vehicle | number, owner: Player | number): void; + * Full list of weapons by DurtyFree (Search for VEHICLE_*): https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function disableVehicleWeapon(disabled: boolean, weaponHash: number, vehicle: Vehicle | number, owner: Ped | Player | number): void; /** - * Full list of weapons by DurtyFree (Search for VEHICLE_*): https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function isVehicleWeaponDisabled(weaponHash: number, vehicle: Vehicle | number, owner: Player | number): boolean; + * Full list of weapons by DurtyFree (Search for VEHICLE_*): https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function isVehicleWeaponDisabled(weaponHash: number, vehicle: Vehicle | number, owner: Ped | Player | number): boolean; export function setVehicleUsedForPilotSchool(vehicle: Vehicle | number, toggle: boolean): void; export function setVehicleActiveForPedNavigation(vehicle: Vehicle | number, toggle: boolean): void; /** - * Returns an int - * 0: Compacts - * 1: Sedans - * 2: SUVs - * 3: Coupes - * 4: Muscle - * 5: Sports Classics - * 6: Sports - * 7: Super - * See NativeDB for reference: http://natives.altv.mp/#/0x29439776AAA00A62 - * @param vehicle Classes: - */ + * Returns an int + * Vehicle Classes: + * 0: Compacts + * 1: Sedans + * 2: SUVs + * 3: Coupes + * 4: Muscle + * 5: Sports Classics + * 6: Sports + * 7: Super + * 8: Motorcycles + * 9: Off-road + * 10: Industrial + * 11: Utility + * 12: Vans + * 13: Cycles + * 14: Boats + * 15: Helicopters + * 16: Planes + * 17: Service + * 18: Emergency + * 19: Military + * 20: Commercial + * 21: Trains + * char buffer[128]; + * std::sprintf(buffer, "VEH_CLASS_%i", VEHICLE::GET_VEHICLE_CLASS(vehicle)); + * const char* className = HUD::GET_FILENAME_FOR_AUDIO_CONVERSATION(buffer); + */ export function getVehicleClass(vehicle: Vehicle | number): number; /** - * char buffer[128]; - * std::sprintf(buffer, "VEH_CLASS_%i", VEHICLE::GET_VEHICLE_CLASS_FROM_NAME (hash)); - * const char* className = HUD::GET_FILENAME_FOR_AUDIO_CONVERSATION(buffer); - * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json - */ + * char buffer[128]; + * std::sprintf(buffer, "VEH_CLASS_%i", VEHICLE::GET_VEHICLE_CLASS_FROM_NAME (hash)); + * const char* className = HUD::GET_FILENAME_FOR_AUDIO_CONVERSATION(buffer); + * Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json + */ export function getVehicleClassFromName(modelHash: number): number; export function setPlayersLastVehicle(vehicle: Vehicle | number): void; @@ -22517,39 +25072,39 @@ declare module "natives" { export function setAircraftPilotSkillNoiseScalar(vehicle: Vehicle | number, p1: number): void; /** - * Money pickups are created around cars when they explode. Only works when the vehicle model is a car. A single pickup is between 1 and 18 dollars in size. All car models seem to give the same amount of money. - * youtu.be/3arlUxzHl5Y - * i.imgur.com/WrNpYFs.jpg - */ + * Money pickups are created around cars when they explode. Only works when the vehicle model is a car. A single pickup is between 1 and 18 dollars in size. All car models seem to give the same amount of money. + * youtu.be/3arlUxzHl5Y + * i.imgur.com/WrNpYFs.jpg + */ export function setVehicleDropsMoneyWhenBlownUp(vehicle: Vehicle | number, toggle: boolean): void; export function setVehicleKeepEngineOnWhenAbandoned(vehicle: Vehicle | number, toggle: boolean): void; /** - * Seems to copy some values in vehicle - */ + * Seems to copy some values in vehicle + */ export function setVehicleImpatienceTimer(vehicle: Vehicle | number, p1: any): void; /** - * Use the "AIHandling" string found in handling.meta - */ + * Use the "AIHandling" string found in handling.meta + */ export function setVehicleHandlingOverride(vehicle: Vehicle | number, hash: number): void; /** - * Max value is 32767 - */ + * Max value is 32767 + */ export function setVehicleExtendedRemovalRange(vehicle: Vehicle | number, range: number): void; export function setVehicleSteeringBiasScalar(p0: any, p1: number): void; /** - * value between 0.0 and 1.0 - */ + * value between 0.0 and 1.0 + */ export function setHeliControlLaggingRateScalar(helicopter: Vehicle | number, multiplier: number): void; /** - * Seems to be related to the metal parts, not tyres (like i was expecting lol) - */ + * Seems to be related to the metal parts, not tyres (like i was expecting lol) + */ export function setVehicleFrictionOverride(vehicle: Vehicle | number, friction: number): void; export function setVehicleWheelsCanBreakOffWhenBlowUp(vehicle: Vehicle | number, toggle: boolean): void; @@ -22562,29 +25117,29 @@ declare module "natives" { export function clearVehicleRouteHistory(vehicle: Vehicle | number): void; - export function doesVehicleExistWithDecorator(decorator: string | null): number; + export function doesVehicleExistWithDecorator(decorator: string): Vehicle | number; /** - * Used to be incorrectly named SET_VEHICLE_EXCLUSIVE_DRIVER - * Toggles a flag related to SET_VEHICLE_EXCLUSIVE_DRIVER, however, doesn't enable that feature (or trigger script events related to it). - */ + * Used to be incorrectly named SET_VEHICLE_EXCLUSIVE_DRIVER + * Toggles a flag related to SET_VEHICLE_EXCLUSIVE_DRIVER, however, doesn't enable that feature (or trigger script events related to it). + */ export function setVehicleAiCanUseExclusiveSeats(vehicle: Vehicle | number, toggle: boolean): void; /** - * Used to be incorrectly named _SET_VEHICLE_EXCLUSIVE_DRIVER_2 - * @param index 0 - 1 - */ - export function setVehicleExclusiveDriver(vehicle: Vehicle | number, ped: Player | number, index: number): void; + * index: 0 - 1 + * Used to be incorrectly named _SET_VEHICLE_EXCLUSIVE_DRIVER_2 + */ + export function setVehicleExclusiveDriver(vehicle: Vehicle | number, ped: Ped | Player | number, index: number): void; - export function isPedExclusiveDriverOfVehicle(ped: Player | number, vehicle: Vehicle | number, outIndex?: number): [boolean, number]; + export function isPedExclusiveDriverOfVehicle(ped: Ped | Player | number, vehicle: Vehicle | number, outIndex?: number): [boolean, number]; export function disableIndividualPlanePropeller(vehicle: Vehicle | number, propeller: number): void; export function setVehicleForceAfterburner(vehicle: Vehicle | number, toggle: boolean): void; /** - * R* used it to "remove" vehicle windows when "nightshark" had some mod, which adding some kind of armored windows. When enabled, you can't break vehicles glass. All your bullets wiil shoot through glass. You also will not able to break the glass with any other way (hitting and etc) - */ + * R* used it to "remove" vehicle windows when "nightshark" had some mod, which adding some kind of armored windows. When enabled, you can't break vehicles glass. All your bullets wiil shoot through glass. You also will not able to break the glass with any other way (hitting and etc) + */ export function setDontProcessVehicleGlass(vehicle: Vehicle | number, toggle: boolean): void; export function setDisableWantedConesResponse(vehicle: Vehicle | number, toggle: boolean): void; @@ -22596,43 +25151,43 @@ declare module "natives" { export function setVehicleReadyForCleanup(p0: any): void; /** - * Toggles to render distant vehicles. They may not be vehicles but images to look like vehicles. - */ + * Toggles to render distant vehicles. They may not be vehicles but images to look like vehicles. + */ export function setDistantCarsEnabled(toggle: boolean): void; /** - * Sets the color of the neon lights of the specified vehicle. - */ + * Sets the color of the neon lights of the specified vehicle. + */ export function setVehicleNeonColour(vehicle: Vehicle | number, r: number, g: number, b: number): void; /** - * @param index references CVehicleModelColor - */ + * Index references CVehicleModelColor + */ export function setVehicleNeonIndexColour(vehicle: Vehicle | number, index: number): void; /** - * Gets the color of the neon lights of the specified vehicle. - * See SET_VEHICLE_NEON_COLOUR (0x8E0A582209A62695) for more information - */ + * Gets the color of the neon lights of the specified vehicle. + * See SET_VEHICLE_NEON_COLOUR (0x8E0A582209A62695) for more information + */ export function getVehicleNeonColour(vehicle: Vehicle | number, r?: number, g?: number, b?: number): [void, number, number, number]; /** - * Sets the neon lights of the specified vehicle on/off. - * Indices: - * 0 = Left - * 1 = Right - * 2 = Front - * 3 = Back - */ + * Sets the neon lights of the specified vehicle on/off. + * Indices: + * 0 = Left + * 1 = Right + * 2 = Front + * 3 = Back + */ export function setVehicleNeonEnabled(vehicle: Vehicle | number, index: number, toggle: boolean): void; /** - * indices: - * 0 = Left - * 1 = Right - * 2 = Front - * 3 = Back - */ + * indices: + * 0 = Left + * 1 = Right + * 2 = Front + * 3 = Back + */ export function getVehicleNeonEnabled(vehicle: Vehicle | number, index: number): boolean; export function setAmbientVehicleNeonEnabled(p0: boolean): void; @@ -22644,30 +25199,30 @@ declare module "natives" { export function requestVehicleDial(vehicle: Vehicle | number): void; /** - * Seems related to vehicle health, like the one in IV. - * Max 1000, min 0. - * @param vehicle does not necessarily explode or become undrivable at 0. - */ + * Seems related to vehicle health, like the one in IV. + * Max 1000, min 0. + * Vehicle does not necessarily explode or become undrivable at 0. + */ export function getVehicleBodyHealth(vehicle: Vehicle | number): number; /** - * p2 often set to 1000.0 in the decompiled scripts. - */ + * p2 often set to 1000.0 in the decompiled scripts. + */ export function setVehicleBodyHealth(vehicle: Vehicle | number, value: number): void; /** - * Outputs 2 Vector3's. - * Scripts check if out2.x - out1.x > someshit.x - * Could be suspension related, as in max suspension height and min suspension height, considering the natives location. - */ + * Outputs 2 Vector3's. + * Scripts check if out2.x - out1.x > someshit.x + * Could be suspension related, as in max suspension height and min suspension height, considering the natives location. + */ export function getVehicleSize(vehicle: Vehicle | number, out1?: Vector3, out2?: Vector3): [void, Vector3, Vector3]; /** - * Gets the height of the vehicle's suspension. - * The higher the value the lower the suspension. Each 0.002 corresponds with one more level lowered. - * 0.000 is the stock suspension. - * 0.008 is Ultra Suspension. - */ + * Gets the height of the vehicle's suspension. + * The higher the value the lower the suspension. Each 0.002 corresponds with one more level lowered. + * 0.000 is the stock suspension. + * 0.008 is Ultra Suspension. + */ export function getFakeSuspensionLoweringAmount(vehicle: Vehicle | number): number; export function setCarHighSpeedBumpSeverityMultiplier(multiplier: number): void; @@ -22675,26 +25230,31 @@ declare module "natives" { export function getNumberOfVehicleDoors(vehicle: Vehicle | number): number; /** - * If false, lowers hydraulics (if raised) and disables hydraulics controls. If true, raises hydraulics and enables hydraulics controls. - * Only used once in each carmod script, on a car that does not have hydraulics to begin with. - */ + * If false, lowers hydraulics (if raised) and disables hydraulics controls. If true, raises hydraulics and enables hydraulics controls. + * Only used once in each carmod script, on a car that does not have hydraulics to begin with. + */ export function setHydraulicsControl(vehicle: Vehicle | number, toggle: boolean): void; export function setCanAdjustGroundClearance(vehicle: Vehicle | number, p1: boolean): void; /** - * 0 min 100 max - * starts at 100 - * Seams to have health zones - * Front of vehicle when damaged goes from 100-50 and stops at 50. - * Rear can be damaged from 100-0 - * Only tested with two cars. - * any idea how this differs from the first one? - * -- - * example: - * See NativeDB for reference: http://natives.altv.mp/#/0xB8EF61207C2393A9 - * @returns May return the vehicle health on a scale of 0.0 - 100.0 (needs to be confirmed) - */ + * 0 min 100 max + * starts at 100 + * Seams to have health zones + * Front of vehicle when damaged goes from 100-50 and stops at 50. + * Rear can be damaged from 100-0 + * Only tested with two cars. + * any idea how this differs from the first one? + * -- + * May return the vehicle health on a scale of 0.0 - 100.0 (needs to be confirmed) + * example: + * v_F = ENTITY::GET_ENTITY_MODEL(v_3); + * if (((v_F == ${tanker}) || (v_F == ${armytanker})) || (v_F == ${tanker2})) { + * if (VEHICLE::GET_VEHICLE_HEALTH_PERCENTAGE(v_3) <= 1.0) { + * NETWORK::NETWORK_EXPLODE_VEHICLE(v_3, 1, 1, -1); + * } + * } + */ export function getVehicleHealthPercentage(vehicle: Vehicle | number, maxEngineHealth: number, maxPetrolTankHealth: number, maxBodyHealth: number, maxMainRotorHealth: number, maxTailRotorHealth: number, maxUnkHealth: number): number; export function getVehicleIsMercenary(vehicle: Vehicle | number): boolean; @@ -22704,8 +25264,8 @@ declare module "natives" { export function setVehicleKersAllowed(vehicle: Vehicle | number, toggle: boolean): void; /** - * Returns true if the vehicle has a HF_HAS_KERS (strHandlingFlags 0x4) handing flag set, for instance the lectro/vindicator bikes or the open wheelers. - */ + * Returns true if the vehicle has a HF_HAS_KERS (strHandlingFlags 0x4) handing flag set, for instance the lectro/vindicator bikes or the open wheelers. + */ export function getVehicleHasKers(vehicle: Vehicle | number): boolean; export function setPlaneResistToExplosion(vehicle: Vehicle | number, toggle: boolean): void; @@ -22715,8 +25275,8 @@ declare module "natives" { export function setDisableBmxExtraTrickForces(p0: any): void; /** - * Works only on vehicles that support hydraulics. - */ + * Works only on vehicles that support hydraulics. + */ export function setHydraulicSuspensionRaiseFactor(vehicle: Vehicle | number, wheelId: number, value: number): void; export function getHydraulicSuspensionRaiseFactor(vehicle: Vehicle | number, wheelId: number): number; @@ -22724,19 +25284,19 @@ declare module "natives" { export function setCanUseHydraulics(vehicle: Vehicle | number, toggle: boolean): void; /** - * States: - * 4 = raise - * 5 = lower - * 6 = jump - */ + * States: + * 4 = raise + * 5 = lower + * 6 = jump + */ export function setHydraulicVehicleState(vehicle: Vehicle | number, state: number): void; /** - * Sets vehicle wheel hydraulic states transition. Known states: - * 0 - reset - * 1 - raise wheel (uses value arg, works just like _SET_VEHICLE_HYDRAULIC_WHEEL_VALUE) - * 2 - jump using wheel - */ + * Sets vehicle wheel hydraulic states transition. Known states: + * 0 - reset + * 1 - raise wheel (uses value arg, works just like _SET_VEHICLE_HYDRAULIC_WHEEL_VALUE) + * 2 - jump using wheel + */ export function setHydraulicWheelState(vehicle: Vehicle | number, wheelId: number, state: number, value: number, p4: any): void; export function hasVehiclePetroltankSetOnFireByEntity(p0: any, p1: any): boolean; @@ -22744,9 +25304,9 @@ declare module "natives" { export function clearVehiclePetroltankFireCulprit(vehicle: Vehicle | number): void; /** - * Controls how fast bobbleheads and tsurikawas move on each axis. - * @param p2 is probably z, but changing that value didn't seem to have a noticeable effect. - */ + * Controls how fast bobbleheads and tsurikawas move on each axis. + * p2 is probably z, but changing that value didn't seem to have a noticeable effect. + */ export function setVehicleBobbleheadVelocity(x: number, y: number, p2: number): void; export function getVehicleIsDummy(p0: any): boolean; @@ -22760,31 +25320,31 @@ declare module "natives" { export function setVehicleUsesMpPlayerDamageMultiplier(p0: any, p1: any): void; /** - * When enabled, the player won't fall off the bike when landing from large heights. - */ + * When enabled, the player won't fall off the bike when landing from large heights. + */ export function setBikeEasyToLand(vehicle: Vehicle | number, toggle: boolean): void; /** - * Inverts vehicle's controls. So INPUT_VEH_ACCELERATE will be INPUT_VEH_BRAKE and vise versa (same for A/D controls) - * Doesn't work for planes/helis. - */ + * Inverts vehicle's controls. So INPUT_VEH_ACCELERATE will be INPUT_VEH_BRAKE and vise versa (same for A/D controls) + * Doesn't work for planes/helis. + */ export function setInvertVehicleControls(vehicle: Vehicle | number, state: boolean): void; /** - * Disables the screen effects and sound effects when driving over a speed boost pad. - */ + * Disables the screen effects and sound effects when driving over a speed boost pad. + */ export function setSpeedBoostEffectDisabled(disabled: boolean): void; /** - * Disables the screen effects and sound effects when driving over a slowdown pad. - */ + * Disables the screen effects and sound effects when driving over a slowdown pad. + */ export function setSlowDownEffectDisabled(disabled: boolean): void; export function setFormationLeader(vehicle: Vehicle | number, x: number, y: number, z: number, p4: number): void; /** - * Resets the effect of SET_FORMATION_LEADER - */ + * Resets the effect of SET_FORMATION_LEADER + */ export function resetFormationLeader(): void; export function getIsBoatCapsized(vehicle: Vehicle | number): boolean; @@ -22794,8 +25354,8 @@ declare module "natives" { export function setScriptRampImpulseScale(vehicle: Vehicle | number, impulseScale: number): void; /** - * @param doorId see SET_VEHICLE_DOOR_SHUT - */ + * doorId: see SET_VEHICLE_DOOR_SHUT + */ export function getIsDoorValid(vehicle: Vehicle | number, doorId: number): boolean; export function setScriptRocketBoostRechargeTime(vehicle: Vehicle | number, seconds: number): void; @@ -22815,22 +25375,22 @@ declare module "natives" { export function setWheelsRetractedInstantly(vehicle: Vehicle | number): void; /** - * Returns true if the vehicle has the FLAG_JUMPING_CAR flag set. - */ + * Returns true if the vehicle has the FLAG_JUMPING_CAR flag set. + */ export function getCarHasJump(vehicle: Vehicle | number): boolean; /** - * Allows vehicles with the FLAG_JUMPING_CAR flag to jump higher (i.e. Ruiner 2000). - */ + * Allows vehicles with the FLAG_JUMPING_CAR flag to jump higher (i.e. Ruiner 2000). + */ export function setUseHigherCarJump(vehicle: Vehicle | number, toggle: boolean): void; export function setClearFreezeWaitingOnCollisionOncePlayerEnters(vehicle: Vehicle | number, toggle: boolean): void; /** - * Set vehicle's primary mounted weapon 2 ammo. For example, use it on APC. - * For example, you can "remove" any vehicle weapon from any vehicle. - * ammoAmount -1 = infinite ammo (default value for any spawned vehicle tho) - */ + * Set vehicle's primary mounted weapon 2 ammo. For example, use it on APC. + * For example, you can "remove" any vehicle weapon from any vehicle. + * ammoAmount -1 = infinite ammo (default value for any spawned vehicle tho) + */ export function setVehicleWeaponRestrictedAmmo(vehicle: Vehicle | number, weaponIndex: number, capacity: number): void; export function getVehicleWeaponRestrictedAmmo(vehicle: Vehicle | number, weaponIndex: number): number; @@ -22854,29 +25414,31 @@ declare module "natives" { export function setVehicleWeaponCanTargetObjects(vehicle: Vehicle | number, toggle: boolean): void; /** - * Used for blazer5. Changes the quadbike-jetski transformation input from raise/lower convertible roof (hold H by default) to horn (press E by default.) - */ + * Used for blazer5. Changes the quadbike-jetski transformation input from raise/lower convertible roof (hold H by default) to horn (press E by default.) + */ export function setVehicleUseBoostButtonForWheelRetract(toggle: boolean): void; + export function setVehicleUseHornButtonForNitrous(toggle: boolean): void; + /** - * Parachute models: - * - sr_prop_specraces_para_s_01 - * - imp_prop_impexp_para_s (SecuroServ; Default) - * Plus, many more props can be used as vehicle parachutes, like umbrellas (prop_beach_parasol_03), and unlike SET_PLAYER_PARACHUTE_MODEL_OVERRIDE, you won't get stuck mid-air when using an umbrella. - */ + * Parachute models: + * - sr_prop_specraces_para_s_01 + * - imp_prop_impexp_para_s (SecuroServ; Default) + * Plus, many more props can be used as vehicle parachutes, like umbrellas (prop_beach_parasol_03), and unlike SET_PLAYER_PARACHUTE_MODEL_OVERRIDE, you won't get stuck mid-air when using an umbrella. + */ export function vehicleSetParachuteModelOverride(vehicle: Vehicle | number, modelHash: number): void; /** - * Variations available for the generic parachute (sr_prop_specraces_para_s_01): - * - 0: Rainbow - * - 1: Red - * - 2: White, blue, yellow - * - 3: Black, red, white - * - 4: Red, white, blue - * - 5: Blue - * - 6: Black - * - 7: Black, yellow - */ + * Variations available for the generic parachute (sr_prop_specraces_para_s_01): + * - 0: Rainbow + * - 1: Red + * - 2: White, blue, yellow + * - 3: Black, red, white + * - 4: Red, white, blue + * - 5: Blue + * - 6: Black + * - 7: Black, yellow + */ export function vehicleSetParachuteModelTintIndex(vehicle: Vehicle | number, textureVariation: number): void; export function vehicleSetOverrideExtenableSideRatio(p0: any, p1: any): number; @@ -22885,15 +25447,15 @@ declare module "natives" { export function vehicleSetOverrideSideRatio(p0: any, p1: any): number; - export function getAllVehicles(vehsStruct: any): [number, any]; + export function getAllVehicles(vehsStruct?: any): [number, any]; export function setCargobobExtaPickupRange(p0: any, p1: any): void; export function setOverrideVehicleDoorTorque(p0: any, p1: any, p2: any): void; /** - * Enables/disables the ability to wheelie on motorcycles. - */ + * Enables/disables the ability to wheelie on motorcycles. + */ export function setWheelieEnabled(vehicle: Vehicle | number, enabled: boolean): void; export function setDisableHeliExplodeFromBodyDamage(p0: any, p1: any): void; @@ -22905,13 +25467,13 @@ declare module "natives" { export function setRocketBoostFill(vehicle: Vehicle | number, percentage: number): void; /** - * Set state to true to extend the wings, false to retract them. - */ + * Set state to true to extend the wings, false to retract them. + */ export function setGliderActive(vehicle: Vehicle | number, state: boolean): void; /** - * Resets the vehicle's turret to its default position in scripted cameras. Doesn't seem to affect turrets that are occupied by a ped. - */ + * Resets the vehicle's turret to its default position in scripted cameras. Doesn't seem to affect turrets that are occupied by a ped. + */ export function setShouldResetTurretInScriptedCameras(vehicle: Vehicle | number, shouldReset: boolean): void; export function setVehicleDisableCollisionUponCreation(vehicle: Vehicle | number, disable: boolean): void; @@ -22919,11 +25481,11 @@ declare module "natives" { export function setGroundEffectReducesDrag(toggle: boolean): void; /** - * Disables collision for this vehicle (maybe it also supports other entities, not sure). - * Only world/building/fixed world objects will have their collisions disabled, props, peds, or any other entity still collides with the vehicle. - * Example: https://streamable.com/6n45d5 - * Not sure if there is a native (and if so, which one) that resets the collisions. - */ + * Disables collision for this vehicle (maybe it also supports other entities, not sure). + * Only world/building/fixed world objects will have their collisions disabled, props, peds, or any other entity still collides with the vehicle. + * Example: https://streamable.com/6n45d5 + * Not sure if there is a native (and if so, which one) that resets the collisions. + */ export function setDisableMapCollision(vehicle: Vehicle | number): void; export function setDisablePedStandOnTop(vehicle: Vehicle | number, toggle: boolean): void; @@ -22933,144 +25495,148 @@ declare module "natives" { export function setPlaneSectionDamageScale(vehicle: Vehicle | number, p1: any, p2: any): void; /** - * Stops the cargobob from being able to attach any vehicle - */ + * Stops the cargobob from being able to attach any vehicle + */ export function setHeliCanPickupEntityThatHasPickUpDisabled(vehicle: Vehicle | number, toggle: boolean): void; /** - * Sets the amount of bombs that this vehicle has. As far as I know, this does _not_ impact vehicle weapons or the ammo of those weapons in any way, it is just a way to keep track of the amount of bombs in a specific plane. - */ + * Sets the amount of bombs that this vehicle has. As far as I know, this does _not_ impact vehicle weapons or the ammo of those weapons in any way, it is just a way to keep track of the amount of bombs in a specific plane. + */ export function setVehicleBombAmmo(vehicle: Vehicle | number, bombCount: number): void; /** - * Gets the amount of bombs that this vehicle has. As far as I know, this does _not_ impact vehicle weapons or the ammo of those weapons in any way, it is just a way to keep track of the amount of bombs in a specific plane. - */ + * Gets the amount of bombs that this vehicle has. As far as I know, this does _not_ impact vehicle weapons or the ammo of those weapons in any way, it is just a way to keep track of the amount of bombs in a specific plane. + */ export function getVehicleBombAmmo(vehicle: Vehicle | number): number; /** - * Similar to SET_VEHICLE_BOMB_AMMO, this sets the amount of countermeasures that are present on this vehicle. - * Use GET_VEHICLE_BOMB_AMMO to get the current amount. - */ + * Similar to SET_VEHICLE_BOMB_AMMO, this sets the amount of countermeasures that are present on this vehicle. + * Use GET_VEHICLE_BOMB_AMMO to get the current amount. + */ export function setVehicleCountermeasureAmmo(vehicle: Vehicle | number, counterMeasureCount: number): void; /** - * Similar to `GET_VEHICLE_BOMB_AMMO`, this gets the amount of countermeasures that are present on this vehicle. - * Use SET_VEHICLE_COUNTERMEASURE_AMMO to set the current amount. - */ + * Similar to `GET_VEHICLE_BOMB_AMMO`, this gets the amount of countermeasures that are present on this vehicle. + * Use SET_VEHICLE_COUNTERMEASURE_AMMO to set the current amount. + */ export function getVehicleCountermeasureAmmo(vehicle: Vehicle | number): number; export function setHeliCombatOffset(vehicle: Vehicle | number, x: number, y: number, z: number): void; /** - * Used in decompiled scripts in combination with GET_VEHICLE_SIZE - * @param p7 is usually 2 - * @param p8 is usually 1 - */ + * Used in decompiled scripts in combination with GET_VEHICLE_SIZE + * p7 is usually 2 + * p8 is usually 1 + */ export function getCanVehicleBePlacedHere(vehicle: Vehicle | number, x: number, y: number, z: number, rotX: number, rotY: number, rotZ: number, p7: number, p8: any): boolean; /** - * Sets a flag on heli and another vehicle type. - */ + * Sets a flag on heli and another vehicle type. + */ export function setDisableAutomaticCrashTask(vehicle: Vehicle | number, toggle: boolean): void; /** - * Used in conjunction with SET_SPECIAL_FLIGHT_MODE_TARGET_RATIO, in Rockstar's scripts. Using this will instantly transform the vehicle into hover mode starting from the given ratio (ranging from 0.0 to 1.0, values greater than 1.0 will put the vehicle into a glitched state.) If this is not used alongside SET_SPECIAL_FLIGHT_MODE_TARGET_RATIO, the vehicle will automatically transform back into car mode. - * Usable only with the deluxo and other vehicles with deluxo-like hover mode toggle, modded or otherwise. Does nothing when used on oppressor2. - * Example: - * Ped playerPed = PLAYER::PLAYER_PED_ID(); - * VEHICLE::SET_SPECIAL_FLIGHT_MODE_RATIO(veh, 0.7f); - * VEHICLE::SET_SPECIAL_FLIGHT_MODE_TARGET_RATIO(veh, 1.0f); - * @param vehicle veh = PED::GET_VEHICLE_PED_IS_USING(playerPed); - */ + * Used in conjunction with SET_SPECIAL_FLIGHT_MODE_TARGET_RATIO, in Rockstar's scripts. Using this will instantly transform the vehicle into hover mode starting from the given ratio (ranging from 0.0 to 1.0, values greater than 1.0 will put the vehicle into a glitched state.) If this is not used alongside SET_SPECIAL_FLIGHT_MODE_TARGET_RATIO, the vehicle will automatically transform back into car mode. + * Usable only with the deluxo and other vehicles with deluxo-like hover mode toggle, modded or otherwise. Does nothing when used on oppressor2. + * Example: + * Ped playerPed = PLAYER::PLAYER_PED_ID(); + * Vehicle veh = PED::GET_VEHICLE_PED_IS_USING(playerPed); + * VEHICLE::SET_SPECIAL_FLIGHT_MODE_RATIO(veh, 0.7f); + * VEHICLE::SET_SPECIAL_FLIGHT_MODE_TARGET_RATIO(veh, 1.0f); + */ export function setSpecialFlightModeRatio(vehicle: Vehicle | number, ratio: number): void; /** - * Used in conjunction with SET_SPECIAL_FLIGHT_MODE_RATIO, in Rockstar's scripts. The vehicle will transform into the given targetRatio, starting from the vehicle's current hover mode transform ratio (which can also be manually set by SET_SPECIAL_FLIGHT_MODE_RATIO,) i.e. setting targetRatio to 0.0 while the vehicle is in hover mode will transform the vehicle into car mode, likewise setting targetRatio to 1.0 while the vehicle is in car mode will transform the vehicle into hover mode, and if the current transform ratio is set to 0.7 while targetRatio is 1.0 the vehicle will transform into hover mode starting from being already partially transformed. - * Usable only with the deluxo and other vehicles with deluxo-like hover mode toggle, modded or otherwise. Does nothing when used on oppressor2. - * Example: - * Ped playerPed = PLAYER::PLAYER_PED_ID(); - * VEHICLE::SET_SPECIAL_FLIGHT_MODE_RATIO(veh, 0.7f); - * VEHICLE::SET_SPECIAL_FLIGHT_MODE_TARGET_RATIO(veh, 1.0f); - * @param vehicle veh = PED::GET_VEHICLE_PED_IS_USING(playerPed); - * @param targetRatio is recommended to always be 0.0 or 1.0, otherwise the vehicle will transform into a glitched state. - */ + * Used in conjunction with SET_SPECIAL_FLIGHT_MODE_RATIO, in Rockstar's scripts. The vehicle will transform into the given targetRatio, starting from the vehicle's current hover mode transform ratio (which can also be manually set by SET_SPECIAL_FLIGHT_MODE_RATIO,) i.e. setting targetRatio to 0.0 while the vehicle is in hover mode will transform the vehicle into car mode, likewise setting targetRatio to 1.0 while the vehicle is in car mode will transform the vehicle into hover mode, and if the current transform ratio is set to 0.7 while targetRatio is 1.0 the vehicle will transform into hover mode starting from being already partially transformed. + * targetRatio is recommended to always be 0.0 or 1.0, otherwise the vehicle will transform into a glitched state. + * Usable only with the deluxo and other vehicles with deluxo-like hover mode toggle, modded or otherwise. Does nothing when used on oppressor2. + * Example: + * Ped playerPed = PLAYER::PLAYER_PED_ID(); + * Vehicle veh = PED::GET_VEHICLE_PED_IS_USING(playerPed); + * VEHICLE::SET_SPECIAL_FLIGHT_MODE_RATIO(veh, 0.7f); + * VEHICLE::SET_SPECIAL_FLIGHT_MODE_TARGET_RATIO(veh, 1.0f); + */ export function setSpecialFlightModeTargetRatio(vehicle: Vehicle | number, targetRatio: number): void; /** - * It will override the ability to transform deluxo. For oppressor it will work just like SET_DISABLE_HOVER_MODE_FLIGHT - */ + * It will override the ability to transform deluxo. For oppressor it will work just like SET_DISABLE_HOVER_MODE_FLIGHT + */ export function setSpecialFlightModeAllowed(vehicle: Vehicle | number, toggle: boolean): void; /** - * Disables "wings" for some flying vehicles. Works only for oppressor _2_ and deluxo. - * For deluxo it just immediately removes vehicle's "wings" and you will be not able to fly up. - * For oppressor 2 it will remove wings right after you land. And you will not able to fly up anymore too. - * But for opressor 2 you still can fly if you somehow get back in the air. - */ + * Disables "wings" for some flying vehicles. Works only for oppressor _2_ and deluxo. + * For deluxo it just immediately removes vehicle's "wings" and you will be not able to fly up. + * For oppressor 2 it will remove wings right after you land. And you will not able to fly up anymore too. + * But for opressor 2 you still can fly if you somehow get back in the air. + */ export function setDisableHoverModeFlight(vehicle: Vehicle | number, toggle: boolean): void; /** - * Checks if Chernobog's stabilizers are deployed or not. - * These are the metal supports that allow it to fire. - * This native only applies to the Chernobog. - */ + * Checks if Chernobog's stabilizers are deployed or not. + * These are the metal supports that allow it to fire. + * This native only applies to the Chernobog. + */ export function getOutriggersDeployed(vehicle: Vehicle | number): boolean; /** - * Native is significantly more complicated than simply generating a random vector & length. - * The 'point' is either 400.0 or 250.0 units away from the Ped's current coordinates; and paths into functions like rage::grcViewport___IsSphereVisible - */ - export function findSpawnCoordinatesForHeli(ped: Player | number): Vector3; + * Native is significantly more complicated than simply generating a random vector & length. + * The 'point' is either 400.0 or 250.0 units away from the Ped's current coordinates; and paths into functions like rage::grcViewport___IsSphereVisible + */ + export function findSpawnCoordinatesForHeli(ped: Ped | Player | number): Vector3; /** - * Only used with the "akula" and "annihilator2" in the decompiled native scripts. - */ + * Only used with the "akula" and "annihilator2" in the decompiled native scripts. + */ export function setDeployFoldingWings(vehicle: Vehicle | number, deploy: boolean, p2: boolean): void; /** - * Only used with the "akula" and "annihilator2" in the decompiled native scripts. - */ + * Only used with the "akula" and "annihilator2" in the decompiled native scripts. + */ export function areFoldingWingsDeployed(vehicle: Vehicle | number): boolean; + export function setDeployMissileBays(vehicle: Vehicle | number, deploy: boolean): void; + + export function areMissileBaysDeployed(vehicle: Vehicle | number): boolean; + export function setDipStraightDownWhenCrashingPlane(vehicle: Vehicle | number, toggle: boolean): void; /** - * Toggles specific flag on turret - */ + * Toggles specific flag on turret + */ export function setTurretHidden(vehicle: Vehicle | number, index: number, toggle: boolean): void; export function setHoverModeWingRatio(vehicle: Vehicle | number, ratio: number): void; /** - * Disables turret movement when called in a loop. You can still fire and aim. You cannot shoot backwards though. - */ + * Disables turret movement when called in a loop. You can still fire and aim. You cannot shoot backwards though. + */ export function setDisableTurretMovement(vehicle: Vehicle | number, turretId: number): void; export function setForceFixLinkMatrices(vehicle: Vehicle | number): void; /** - * Affects the playback speed of the submarine car conversion animations. Does not affect hardcoded animations such as the wheels being retracted. - */ + * Affects the playback speed of the submarine car conversion animations. Does not affect hardcoded animations such as the wheels being retracted. + */ export function setTransformRateForAnimation(vehicle: Vehicle | number, transformRate: number): void; /** - * When set to true, the key to transform a car to submarine mode changes from raise/lower convertible roof (hold H by default) to special vehicle transform (press X by default.) - */ + * When set to true, the key to transform a car to submarine mode changes from raise/lower convertible roof (hold H by default) to special vehicle transform (press X by default.) + */ export function setTransformToSubmarineUsesAlternateInput(vehicle: Vehicle | number, toggle: boolean): void; /** - * Does nothing. It's a nullsub. - */ + * Does nothing. It's a nullsub. + */ export function setVehicleCombatMode(toggle: boolean): void; /** - * Does nothing. It's a nullsub. - */ + * Does nothing. It's a nullsub. + */ export function setVehicleDetonationMode(toggle: boolean): void; /** - * Does nothing. It's a nullsub. - */ + * Does nothing. It's a nullsub. + */ export function setVehicleShuntOnStick(toggle: boolean): void; export function getIsVehicleShunting(vehicle: Vehicle | number): boolean; @@ -23078,124 +25644,149 @@ declare module "natives" { export function getHasVehicleBeenHitByShunt(vehicle: Vehicle | number): boolean; /** - * Returns last vehicle that was rammed by the given vehicle using the shunt boost. - */ - export function getLastShuntVehicle(vehicle: Vehicle | number): number; + * Returns last vehicle that was rammed by the given vehicle using the shunt boost. + */ + export function getLastShuntVehicle(vehicle: Vehicle | number): Vehicle | number; export function setDisableVehicleExplosionsDamage(toggle: boolean): void; export function setOverrideNitrousLevel(vehicle: Vehicle | number, toggle: boolean, level: number, power: number, rechargeTime: number, disableSound: boolean): void; + export function setNitrousIsActive(vehicle: Vehicle | number, enabled: boolean): void; + + export function setOverrideTractionLossMultiplier(vehicle: Vehicle | number, modifier: number): void; + + /** + * First two floats relate to rumble, the last is a threshold + */ + export function setDriftSlipAngleLimits(vehicle: Vehicle | number, durationScalar: number, amplitudeScalar: number, slipAngleLimit: number): void; + + export function setMinimumTimeBetweenGearShifts(vehicle: Vehicle | number, time: number): void; + + export function fullyChargeNitrous(vehicle: Vehicle | number): void; + + export function getRemainingNitrousDuration(vehicle: Vehicle | number): number; + + export function isNitrousActive(vehicle: Vehicle | number): boolean; + + export function clearNitrous(vehicle: Vehicle | number): void; + export function setIncreaseWheelCrushDamage(vehicle: Vehicle | number, toggle: boolean): void; /** - * Sets some global vehicle related bool - */ + * Sets some global vehicle related bool + */ export function setDisableWeaponBladeForces(toggle: boolean): void; /** - * Changes the car jump control to require a double-tap to activate. - */ + * Changes the car jump control to require a double-tap to activate. + */ export function setUseDoubleClickForCarJump(toggle: boolean): void; /** - * @returns Returns true only if the "tombstone" bone is attached to the vehicle, irrespective of "FLAG_HAS_TOMBSTONE" being present or not. Detaching the tombstone will return false. - */ + * Returns true only if the "tombstone" bone is attached to the vehicle, irrespective of "FLAG_HAS_TOMBSTONE" being present or not. Detaching the tombstone will return false. + */ export function getDoesVehicleHaveTombstone(vehicle: Vehicle | number): boolean; /** - * Disables detachable bumber from domnator4, dominator5, dominator6, see https://gfycat.com/SecondUnluckyGosling - */ + * Disables detachable bumber from domnator4, dominator5, dominator6, see https://gfycat.com/SecondUnluckyGosling + */ export function hideTombstone(vehicle: Vehicle | number, toggle: boolean): void; + export function applyEmpEffect(vehicle: Vehicle | number): void; + /** - * Returns whether this vehicle is currently disabled by an EMP mine. - */ + * Returns whether this vehicle is currently disabled by an EMP mine. + */ export function getIsVehicleDisabledByEmp(vehicle: Vehicle | number): boolean; export function setDisableRetractingWeaponBlades(toggle: boolean): void; /** - * Usable wheels: - * 0: wheel_lf - * 1: wheel_rf - * 2: wheel_lm1 - * 3: wheel_rm1 - * 4: wheel_lr - * 5: wheel_rr - */ + * Usable wheels: + * 0: wheel_lf + * 1: wheel_rf + * 2: wheel_lm1 + * 3: wheel_rm1 + * 4: wheel_lr + * 5: wheel_rr + */ export function getTyreHealth(vehicle: Vehicle | number, wheelIndex: number): number; /** - * SET_TYRE_WEAR_RATE must be active, otherwise values set to <1000.0f will default to 350.0f - * Usable wheels: - * 0: wheel_lf - * 1: wheel_rf - * 2: wheel_lm1 - * 3: wheel_rm1 - * 4: wheel_lr - * 5: wheel_rr - */ + * SET_TYRE_WEAR_RATE must be active, otherwise values set to <1000.0f will default to 350.0f + * Usable wheels: + * 0: wheel_lf + * 1: wheel_rf + * 2: wheel_lm1 + * 3: wheel_rm1 + * 4: wheel_lr + * 5: wheel_rr + */ export function setTyreHealth(vehicle: Vehicle | number, wheelIndex: number, health: number): void; /** - * Returns the multiplier value from SET_TYRE_WEAR_RATE - * Usable wheels: - * 0: wheel_lf - * 1: wheel_rf - * 2: wheel_lm1 - * 3: wheel_rm1 - * 4: wheel_lr - * 5: wheel_rr - */ + * Returns the multiplier value from SET_TYRE_WEAR_RATE + * Usable wheels: + * 0: wheel_lf + * 1: wheel_rf + * 2: wheel_lm1 + * 3: wheel_rm1 + * 4: wheel_lr + * 5: wheel_rr + */ export function getTyreWearRate(vehicle: Vehicle | number, wheelIndex: number): number; /** - * Needs to be run for tire wear to work. Multiplier affects the downforce and how fast the tires will wear out, higher values essentially make the vehicle slower on straights and its tires will wear down quicker when cornering. Value must be >0f. - * Default value in Rockstar's Open Wheel Race JSON's ("owrtws", "owrtwm", "owrtwh") is 1.0 - * Usable wheels: - * 0: wheel_lf - * 1: wheel_rf - * 2: wheel_lm1 - * 3: wheel_rm1 - * 4: wheel_lr - * 5: wheel_rr - */ + * Needs to be run for tire wear to work. Multiplier affects the downforce and how fast the tires will wear out, higher values essentially make the vehicle slower on straights and its tires will wear down quicker when cornering. Value must be >0f. + * Default value in Rockstar's Open Wheel Race JSON's ("owrtws", "owrtwm", "owrtwh") is 1.0 + * Usable wheels: + * 0: wheel_lf + * 1: wheel_rf + * 2: wheel_lm1 + * 3: wheel_rm1 + * 4: wheel_lr + * 5: wheel_rr + */ export function setTyreWearRate(vehicle: Vehicle | number, wheelIndex: number, multiplier: number): void; /** - * Controls how fast the tires wear out. - * Default values from Rockstar's Open Wheel Race JSON's: - * "owrtss" (Soft): 2.2 - * "owrtsm" (Medium): 1.7 - * "owrtsh" (Hard): 1.2 - * Usable wheels: - * 0: wheel_lf - * 1: wheel_rf - * 2: wheel_lm1 - * See NativeDB for reference: http://natives.altv.mp/#/0x392183BB9EA57697 - */ + * Controls how fast the tires wear out. + * Default values from Rockstar's Open Wheel Race JSON's: + * "owrtss" (Soft): 2.2 + * "owrtsm" (Medium): 1.7 + * "owrtsh" (Hard): 1.2 + * Usable wheels: + * 0: wheel_lf + * 1: wheel_rf + * 2: wheel_lm1 + * 3: wheel_rm1 + * 4: wheel_lr + * 5: wheel_rr + */ export function setTyreWearRateScale(vehicle: Vehicle | number, wheelIndex: number, multiplier: number): void; /** - * Controls how much traction the wheel loses. - * Default values from Rockstar's Open Wheel Race JSON's: - * "owrtds" (Soft): 0.05 - * "owrtdm" (Medium): 0.45 - * "owrtdh" (Hard): 0.8 - * Usable wheels: - * 0: wheel_lf - * 1: wheel_rf - * 2: wheel_lm1 - * See NativeDB for reference: http://natives.altv.mp/#/0xC970D0E0FC31D768 - */ + * Controls how much traction the wheel loses. + * Default values from Rockstar's Open Wheel Race JSON's: + * "owrtds" (Soft): 0.05 + * "owrtdm" (Medium): 0.45 + * "owrtdh" (Hard): 0.8 + * Usable wheels: + * 0: wheel_lf + * 1: wheel_rf + * 2: wheel_lm1 + * 3: wheel_rm1 + * 4: wheel_lr + * 5: wheel_rr + */ export function setTyreMaximumGripDifferenceDueToWearRate(vehicle: Vehicle | number, wheelIndex: number, multiplier: number): void; export function setAircraftIgnoreHightmapOptimisation(vehicle: Vehicle | number, p1: number): void; /** - * Lowers the vehicle's stance. Only works for vehicles that have strAdvancedFlags 0x8000 and 0x4000000 set. - */ + * Lowers the vehicle's stance. Only works for vehicles that have strAdvancedFlags 0x8000 and 0x4000000 set. + */ export function setReducedSuspensionForce(vehicle: Vehicle | number, enable: boolean): void; export function setDriftTyres(vehicle: Vehicle | number, toggle: boolean): void; @@ -23203,20 +25794,31 @@ declare module "natives" { export function getDriftTyresSet(vehicle: Vehicle | number): boolean; /** - * Implemented only for trains. - */ + * Implemented only for trains. + */ export function networkUseHighPrecisionTrainBlending(vehicle: Vehicle | number, toggle: boolean): void; /** - * Only used in R* Script fm_content_cargo - */ + * Only used in R* Script fm_content_cargo + */ export function setCheckForEnoughRoomForPed(vehicle: Vehicle | number, p1: boolean): void; /** - * This function set height to the value of z-axis of the water surface. - * note: seems to return true when you are in water - * @returns This function works with sea and lake. However it does not work with shallow rivers (e.g. raton canyon will return -100000.0f) - */ + * _SET_ALLOW_R* - _SET_ALLOW_V* + */ + export function setAllowCollisionWhenInVehicle(vehicle: Vehicle | number, toggle: boolean): void; + + export function isVehicleGen9ExclusiveModel(vehicleModel: number): boolean; + + export function getVehicleMaxExhaustBoneCount(): number; + + export function getVehicleExhaustBone(vehicle: Vehicle | number, index: number, boneIndex?: number, axisX?: boolean): [boolean, number, boolean]; + + /** + * This function set height to the value of z-axis of the water surface. + * This function works with sea and lake. However it does not work with shallow rivers (e.g. raton canyon will return -100000.0f) + * note: seems to return true when you are in water + */ export function getWaterHeight(x: number, y: number, z: number, height?: number): [boolean, number]; export function getWaterHeightNoWaves(x: number, y: number, z: number, height?: number): [boolean, number]; @@ -23224,63 +25826,63 @@ declare module "natives" { export function testProbeAgainstWater(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, result?: Vector3): [boolean, Vector3]; /** - * enum eScriptWaterTestResult - * { - * SCRIPT_WATER_TEST_RESULT_NONE, - * SCRIPT_WATER_TEST_RESULT_WATER, - * SCRIPT_WATER_TEST_RESULT_BLOCKED, - * }; - */ + * enum eScriptWaterTestResult + * { + * SCRIPT_WATER_TEST_RESULT_NONE, + * SCRIPT_WATER_TEST_RESULT_WATER, + * SCRIPT_WATER_TEST_RESULT_BLOCKED, + * }; + */ export function testProbeAgainstAllWater(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, flags: number, waterHeight?: number): [number, number]; /** - * See TEST_PROBE_AGAINST_ALL_WATER. - */ + * See TEST_PROBE_AGAINST_ALL_WATER. + */ export function testVerticalProbeAgainstAllWater(x: number, y: number, z: number, flags: number, waterHeight?: number): [number, number]; /** - * Sets the water height for a given position and radius. - */ + * Sets the water height for a given position and radius. + */ export function modifyWater(x: number, y: number, radius: number, height: number): void; export function addExtraCalmingQuad(xLow: number, yLow: number, xHigh: number, yHigh: number, height: number): number; /** - * @param calmingQuad is the handle returned from ADD_EXTRA_CALMING_QUAD - */ + * p0 is the handle returned from ADD_EXTRA_CALMING_QUAD + */ export function removeExtraCalmingQuad(calmingQuad: number): void; /** - * Sets a value that determines how aggressive the ocean waves will be. Values of 2.0 or more make for very aggressive waves like you see during a thunderstorm. - * Works only ~200 meters around the player. - */ + * Sets a value that determines how aggressive the ocean waves will be. Values of 2.0 or more make for very aggressive waves like you see during a thunderstorm. + * Works only ~200 meters around the player. + */ export function setDeepOceanScaler(intensity: number): void; /** - * Gets the aggressiveness factor of the ocean waves. - */ + * Gets the aggressiveness factor of the ocean waves. + */ export function getDeepOceanScaler(): number; export function setCalmedWaveHeightScaler(height: number): void; /** - * Sets the waves intensity back to original (1.0 in most cases). - */ + * Sets the waves intensity back to original (1.0 in most cases). + */ export function resetDeepOceanScaler(): void; /** - * Enables laser sight on any weapon. - * It doesn't work. Neither on tick nor OnKeyDown - */ + * Enables laser sight on any weapon. + * It doesn't work. Neither on tick nor OnKeyDown + */ export function enableLaserSightRendering(toggle: boolean): void; export function getWeaponComponentTypeModel(componentHash: number): number; /** - * Returns the model of any weapon. - * Can also take an ammo hash? - * sub_6663a(&l_115B, WEAPON::GET_WEAPONTYPE_MODEL(${ammo_rpg})); - */ + * Returns the model of any weapon. + * Can also take an ammo hash? + * sub_6663a(&l_115B, WEAPON::GET_WEAPONTYPE_MODEL(${ammo_rpg})); + */ export function getWeapontypeModel(weaponHash: number): number; export function getWeapontypeSlot(weaponHash: number): number; @@ -23288,329 +25890,332 @@ declare module "natives" { export function getWeapontypeGroup(weaponHash: number): number; /** - * Returns the amount of extra components the specified component has. - * Returns -1 if the component isn't of type CWeaponComponentVariantModel. - */ + * Returns the amount of extra components the specified component has. + * Returns -1 if the component isn't of type CWeaponComponentVariantModel. + */ export function getWeaponComponentVariantExtraCount(componentHash: number): number; /** - * Returns the model hash of the extra component at specified index. - */ + * Returns the model hash of the extra component at specified index. + */ export function getWeaponComponentVariantExtraModel(componentHash: number, extraComponentIndex: number): number; /** - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function setCurrentPedWeapon(ped: Player | number, weaponHash: number, bForceInHand: boolean): void; + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function setCurrentPedWeapon(ped: Ped | Player | number, weaponHash: number, bForceInHand: boolean): void; /** - * p2 is not implemented - * disassembly said that? - * @param p2 seems to be 1 most of the time. - * @returns The return value seems to indicate returns true if the hash of the weapon object weapon equals the weapon hash. - */ - export function getCurrentPedWeapon(ped: Player | number, weaponHash: number | null, p2: boolean): [boolean, number]; + * The return value seems to indicate returns true if the hash of the weapon object weapon equals the weapon hash. + * p2 seems to be 1 most of the time. + * p2 is not implemented + * disassembly said that? + */ + export function getCurrentPedWeapon(ped: Ped | Player | number, weaponHash: number, p2: boolean): [boolean, number]; - export function getCurrentPedWeaponEntityIndex(ped: Player | number, p1: any): number; + export function getCurrentPedWeaponEntityIndex(ped: Ped | Player | number, p1: any): Entity | number; /** - * @param p1 is always 0 in the scripts. - */ - export function getBestPedWeapon(ped: Player | number, p1: boolean): number; + * p1 is always 0 in the scripts. + */ + export function getBestPedWeapon(ped: Ped | Player | number, p1: boolean): number; /** - * Full list of weapons by DurtyFree (Search for VEHICLE_*): https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function setCurrentPedVehicleWeapon(ped: Player | number, weaponHash: number): boolean; + * Full list of weapons by DurtyFree (Search for VEHICLE_*): https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function setCurrentPedVehicleWeapon(ped: Ped | Player | number, weaponHash: number): boolean; /** - * Example in VB - * Public Shared Function GetVehicleCurrentWeapon(Ped As Ped) As Integer - * Dim arg As New OutputArgument() - * Native.Function.Call(Hash.GET_CURRENT_PED_VEHICLE_WEAPON, Ped, arg) - * End Function - * Usage: - * If GetVehicleCurrentWeapon(Game.Player.Character) = -821520672 Then ...Do something - * Note: -821520672 = VEHICLE_WEAPON_PLANE_ROCKET - * @returns Return arg.GetResult(Of Integer)() - */ - export function getCurrentPedVehicleWeapon(ped: Player | number, weaponHash?: number): [boolean, number]; + * Example in VB + * Public Shared Function GetVehicleCurrentWeapon(Ped As Ped) As Integer + * Dim arg As New OutputArgument() + * Native.Function.Call(Hash.GET_CURRENT_PED_VEHICLE_WEAPON, Ped, arg) + * Return arg.GetResult(Of Integer)() + * End Function + * Usage: + * If GetVehicleCurrentWeapon(Game.Player.Character) = -821520672 Then ...Do something + * Note: -821520672 = VEHICLE_WEAPON_PLANE_ROCKET + */ + export function getCurrentPedVehicleWeapon(ped: Ped | Player | number, weaponHash?: number): [boolean, number]; - export function setPedCycleVehicleWeaponsOnly(ped: Player | number): void; + export function setPedCycleVehicleWeaponsOnly(ped: Ped | Player | number): void; /** - * Checks if the ped is currently equipped with a weapon matching a bit specified using a bitwise-or in typeFlags. - * Type flag bit values: - * 1 = Melee weapons - * 2 = Explosive weapons - * 4 = Any other weapons - * Not specifying any bit will lead to the native *always* returning 'false', and for example specifying '4 | 2' will check for any weapon except fists and melee weapons. - * 6 returns true if you are equipped with any weapon except melee weapons. - * 5 returns true if you are equipped with any weapon except the Explosives weapon group. - * 4 returns true if you are equipped with any weapon except Explosives weapon group AND melee weapons. - * See NativeDB for reference: http://natives.altv.mp/#/0x475768A975D5AD17 - * @returns 7 returns true if you are equipped with any weapon except your fists. - */ - export function isPedArmed(ped: Player | number, typeFlags: number): boolean; + * Checks if the ped is currently equipped with a weapon matching a bit specified using a bitwise-or in typeFlags. + * Type flag bit values: + * 1 = Melee weapons + * 2 = Explosive weapons + * 4 = Any other weapons + * Not specifying any bit will lead to the native *always* returning 'false', and for example specifying '4 | 2' will check for any weapon except fists and melee weapons. + * 7 returns true if you are equipped with any weapon except your fists. + * 6 returns true if you are equipped with any weapon except melee weapons. + * 5 returns true if you are equipped with any weapon except the Explosives weapon group. + * 4 returns true if you are equipped with any weapon except Explosives weapon group AND melee weapons. + * 3 returns true if you are equipped with either Explosives or Melee weapons (the exact opposite of 4). + * 2 returns true only if you are equipped with any weapon from the Explosives weapon group. + * 1 returns true only if you are equipped with any Melee weapon. + * 0 never returns true. + * Note: When I say "Explosives weapon group", it does not include the Jerry can and Fire Extinguisher. + */ + export function isPedArmed(ped: Ped | Player | number, typeFlags: number): boolean; /** - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ export function isWeaponValid(weaponHash: number): boolean; /** - * Bool does not check if the weapon is current equipped, unfortunately. - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - * @param p2 should be FALSE, otherwise it seems to always return FALSE - * @returns p2 should be FALSE, otherwise it seems to always return FALSE - */ - export function hasPedGotWeapon(ped: Player | number, weaponHash: number, p2: boolean): boolean; + * p2 should be FALSE, otherwise it seems to always return FALSE + * Bool does not check if the weapon is current equipped, unfortunately. + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function hasPedGotWeapon(ped: Ped | Player | number, weaponHash: number, p2: boolean): boolean; - export function isPedWeaponReadyToShoot(ped: Player | number): boolean; + export function isPedWeaponReadyToShoot(ped: Ped | Player | number): boolean; - export function getPedWeapontypeInSlot(ped: Player | number, weaponSlot: number): number; + export function getPedWeapontypeInSlot(ped: Ped | Player | number, weaponSlot: number): number; /** - * WEAPON::GET_AMMO_IN_PED_WEAPON(PLAYER::PLAYER_PED_ID(), a_0) - * From decompiled scripts - * Returns total ammo in weapon - * GTALua Example : - * natives.WEAPON.GET_AMMO_IN_PED_WEAPON(plyPed, WeaponHash) - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function getAmmoInPedWeapon(ped: Player | number, weaponhash: number): number; + * WEAPON::GET_AMMO_IN_PED_WEAPON(PLAYER::PLAYER_PED_ID(), a_0) + * From decompiled scripts + * Returns total ammo in weapon + * GTALua Example : + * natives.WEAPON.GET_AMMO_IN_PED_WEAPON(plyPed, WeaponHash) + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function getAmmoInPedWeapon(ped: Ped | Player | number, weaponhash: number): number; /** - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function addAmmoToPed(ped: Player | number, weaponHash: number, ammo: number): void; + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function addAmmoToPed(ped: Ped | Player | number, weaponHash: number, ammo: number): void; /** - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function setPedAmmo(ped: Player | number, weaponHash: number, ammo: number, p3: boolean): void; + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function setPedAmmo(ped: Ped | Player | number, weaponHash: number, ammo: number, p3: boolean): void; /** - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function setPedInfiniteAmmo(ped: Player | number, toggle: boolean, weaponHash: number): void; + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function setPedInfiniteAmmo(ped: Ped | Player | number, toggle: boolean, weaponHash: number): void; - export function setPedInfiniteAmmoClip(ped: Player | number, toggle: boolean): void; + export function setPedInfiniteAmmoClip(ped: Ped | Player | number, toggle: boolean): void; export function setPedStunGunFiniteAmmo(p0: any, p1: any): void; /** - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function giveWeaponToPed(ped: Player | number, weaponHash: number, ammoCount: number, isHidden: boolean, bForceInHand: boolean): void; + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function giveWeaponToPed(ped: Ped | Player | number, weaponHash: number, ammoCount: number, isHidden: boolean, bForceInHand: boolean): void; /** - * Gives a weapon to PED with a delay, example: - * WEAPON::GIVE_DELAYED_WEAPON_TO_PED(PED::PLAYER_PED_ID(), MISC::GET_HASH_KEY("WEAPON_PISTOL"), 1000, false) - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function giveDelayedWeaponToPed(ped: Player | number, weaponHash: number, ammoCount: number, bForceInHand: boolean): void; + * Gives a weapon to PED with a delay, example: + * WEAPON::GIVE_DELAYED_WEAPON_TO_PED(PED::PLAYER_PED_ID(), MISC::GET_HASH_KEY("WEAPON_PISTOL"), 1000, false) + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function giveDelayedWeaponToPed(ped: Ped | Player | number, weaponHash: number, ammoCount: number, bForceInHand: boolean): void; /** - * setting the last params to false it does that same so I would suggest its not a toggle - */ - export function removeAllPedWeapons(ped: Player | number, p1: boolean): void; + * setting the last params to false it does that same so I would suggest its not a toggle + */ + export function removeAllPedWeapons(ped: Ped | Player | number, p1: boolean): void; /** - * This native removes a specified weapon from your selected ped. - * Example: - * C#: - * Function.Call(Hash.REMOVE_WEAPON_FROM_PED, Game.Player.Character, 0x99B507EA); - * C++: - * WEAPON::REMOVE_WEAPON_FROM_PED(PLAYER::PLAYER_PED_ID(), 0x99B507EA); - * The code above removes the knife from the player. - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function removeWeaponFromPed(ped: Player | number, weaponHash: number): void; + * This native removes a specified weapon from your selected ped. + * Example: + * C#: + * Function.Call(Hash.REMOVE_WEAPON_FROM_PED, Game.Player.Character, 0x99B507EA); + * C++: + * WEAPON::REMOVE_WEAPON_FROM_PED(PLAYER::PLAYER_PED_ID(), 0x99B507EA); + * The code above removes the knife from the player. + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function removeWeaponFromPed(ped: Ped | Player | number, weaponHash: number): void; /** - * Hides the players weapon during a cutscene. - */ - export function hidePedWeaponForScriptedCutscene(ped: Player | number, toggle: boolean): void; + * Hides the players weapon during a cutscene. + */ + export function hidePedWeaponForScriptedCutscene(ped: Ped | Player | number, toggle: boolean): void; /** - * Has 5 parameters since latest patches. - */ - export function setPedCurrentWeaponVisible(ped: Player | number, visible: boolean, deselectWeapon: boolean, p3: boolean, p4: boolean): void; + * Has 5 parameters since latest patches. + */ + export function setPedCurrentWeaponVisible(ped: Ped | Player | number, visible: boolean, deselectWeapon: boolean, p3: boolean, p4: boolean): void; - export function setPedDropsWeaponsWhenDead(ped: Player | number, toggle: boolean): void; + export function setPedDropsWeaponsWhenDead(ped: Ped | Player | number, toggle: boolean): void; /** - * It determines what weapons caused damage: - * If you want to define only a specific weapon, second parameter=weapon hash code, third parameter=0 - * If you want to define any melee weapon, second parameter=0, third parameter=1. - * If you want to identify any weapon (firearms, melee, rockets, etc.), second parameter=0, third parameter=2. - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function hasPedBeenDamagedByWeapon(ped: Player | number, weaponHash: number, weaponType: number): boolean; + * It determines what weapons caused damage: + * If you want to define only a specific weapon, second parameter=weapon hash code, third parameter=0 + * If you want to define any melee weapon, second parameter=0, third parameter=1. + * If you want to identify any weapon (firearms, melee, rockets, etc.), second parameter=0, third parameter=2. + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function hasPedBeenDamagedByWeapon(ped: Ped | Player | number, weaponHash: number, weaponType: number): boolean; /** - * Does NOT seem to work with HAS_PED_BEEN_DAMAGED_BY_WEAPON. Use CLEAR_ENTITY_LAST_WEAPON_DAMAGE and HAS_ENTITY_BEEN_DAMAGED_BY_WEAPON instead. - */ - export function clearPedLastWeaponDamage(ped: Player | number): void; + * Does NOT seem to work with HAS_PED_BEEN_DAMAGED_BY_WEAPON. Use CLEAR_ENTITY_LAST_WEAPON_DAMAGE and HAS_ENTITY_BEEN_DAMAGED_BY_WEAPON instead. + */ + export function clearPedLastWeaponDamage(ped: Ped | Player | number): void; /** - * It determines what weapons caused damage: - * If you want to define only a specific weapon, second parameter=weapon hash code, third parameter=0 - * If you want to define any melee weapon, second parameter=0, third parameter=1. - * If you want to identify any weapon (firearms, melee, rockets, etc.), second parameter=0, third parameter=2. - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ + * It determines what weapons caused damage: + * If you want to define only a specific weapon, second parameter=weapon hash code, third parameter=0 + * If you want to define any melee weapon, second parameter=0, third parameter=1. + * If you want to identify any weapon (firearms, melee, rockets, etc.), second parameter=0, third parameter=2. + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ export function hasEntityBeenDamagedByWeapon(entity: Entity | number, weaponHash: number, weaponType: number): boolean; export function clearEntityLastWeaponDamage(entity: Entity | number): void; - export function setPedDropsWeapon(ped: Player | number): void; + export function setPedDropsWeapon(ped: Ped | Player | number): void; /** - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function setPedDropsInventoryWeapon(ped: Player | number, weaponHash: number, xOffset: number, yOffset: number, zOffset: number, ammoCount: number): void; + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function setPedDropsInventoryWeapon(ped: Ped | Player | number, weaponHash: number, xOffset: number, yOffset: number, zOffset: number, ammoCount: number): void; /** - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - * @param p2 is mostly 1 in the scripts. - */ - export function getMaxAmmoInClip(ped: Player | number, weaponHash: number, p2: boolean): number; + * p2 is mostly 1 in the scripts. + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function getMaxAmmoInClip(ped: Ped | Player | number, weaponHash: number, p2: boolean): number; /** - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function getAmmoInClip(ped: Player | number, weaponHash: number, ammo?: number): [boolean, number]; + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function getAmmoInClip(ped: Ped | Player | number, weaponHash: number, ammo?: number): [boolean, number]; /** - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function setAmmoInClip(ped: Player | number, weaponHash: number, ammo: number): boolean; + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function setAmmoInClip(ped: Ped | Player | number, weaponHash: number, ammo: number): boolean; /** - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function getMaxAmmo(ped: Player | number, weaponHash: number, ammo?: number): [boolean, number]; + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function getMaxAmmo(ped: Ped | Player | number, weaponHash: number, ammo?: number): [boolean, number]; /** - * Returns the max ammo for an ammo type. Ammo types: https://gist.github.com/root-cause/faf41f59f7a6d818b7db0b839bd147c1 - */ - export function getMaxAmmoByType(ped: Player | number, ammoTypeHash: number, ammo?: number): [boolean, number]; + * Returns the max ammo for an ammo type. Ammo types: https://gist.github.com/root-cause/faf41f59f7a6d818b7db0b839bd147c1 + */ + export function getMaxAmmoByType(ped: Ped | Player | number, ammoTypeHash: number, ammo?: number): [boolean, number]; /** - * @param ammo types: https://gist.github.com/root-cause/faf41f59f7a6d818b7db0b839bd147c1 - */ - export function addPedAmmoByType(ped: Player | number, ammoTypeHash: number, ammo: number): void; + * Ammo types: https://gist.github.com/root-cause/faf41f59f7a6d818b7db0b839bd147c1 + */ + export function addPedAmmoByType(ped: Ped | Player | number, ammoTypeHash: number, ammo: number): void; /** - * @param ammo types: https://gist.github.com/root-cause/faf41f59f7a6d818b7db0b839bd147c1 - */ - export function setPedAmmoByType(ped: Player | number, ammoTypeHash: number, ammo: number): void; + * Ammo types: https://gist.github.com/root-cause/faf41f59f7a6d818b7db0b839bd147c1 + */ + export function setPedAmmoByType(ped: Ped | Player | number, ammoTypeHash: number, ammo: number): void; - export function getPedAmmoByType(ped: Player | number, ammoTypeHash: number): number; + export function getPedAmmoByType(ped: Ped | Player | number, ammoTypeHash: number): number; - export function setPedAmmoToDrop(ped: Player | number, p1: number): void; + export function setPedAmmoToDrop(ped: Ped | Player | number, p1: number): void; export function setPickupAmmoAmountScaler(p0: number): void; /** - * Returns the current ammo type of the specified ped's specified weapon. - * Use 0xF489B44DD5AF4BD9 if you always want AMMO_PISTOL. - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - * @returns MkII magazines will change the return value, like Pistol MkII returning AMMO_PISTOL without any components and returning AMMO_PISTOL_TRACER after Tracer Rounds component is attached. - */ - export function getPedAmmoTypeFromWeapon(ped: Player | number, weaponHash: number): number; + * Returns the current ammo type of the specified ped's specified weapon. + * MkII magazines will change the return value, like Pistol MkII returning AMMO_PISTOL without any components and returning AMMO_PISTOL_TRACER after Tracer Rounds component is attached. + * Use 0xF489B44DD5AF4BD9 if you always want AMMO_PISTOL. + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function getPedAmmoTypeFromWeapon(ped: Ped | Player | number, weaponHash: number): number; /** - * Returns the base/default ammo type of the specified ped's specified weapon. - * Use GET_PED_AMMO_TYPE_FROM_WEAPON if you want current ammo type (like AMMO_MG_INCENDIARY/AMMO_MG_TRACER while using MkII magazines) and use this if you want base ammo type. (AMMO_MG) - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function getPedOriginalAmmoTypeFromWeapon(ped: Player | number, weaponHash: number): number; + * Returns the base/default ammo type of the specified ped's specified weapon. + * Use GET_PED_AMMO_TYPE_FROM_WEAPON if you want current ammo type (like AMMO_MG_INCENDIARY/AMMO_MG_TRACER while using MkII magazines) and use this if you want base ammo type. (AMMO_MG) + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function getPedOriginalAmmoTypeFromWeapon(ped: Ped | Player | number, weaponHash: number): number; /** - * Pass ped. Pass address of Vector3. - * The coord will be put into the Vector3. - * @returns The return will determine whether there was a coord found or not. - */ - export function getPedLastWeaponImpactCoord(ped: Player | number, coords?: Vector3): [boolean, Vector3]; + * Pass ped. Pass address of Vector3. + * The coord will be put into the Vector3. + * The return will determine whether there was a coord found or not. + */ + export function getPedLastWeaponImpactCoord(ped: Ped | Player | number, coords?: Vector3): [boolean, Vector3]; /** - * p1/gadgetHash was always 0xFBAB5776 ("GADGET_PARACHUTE"). - * @param p2 is always true. - */ - export function setPedGadget(ped: Player | number, gadgetHash: number, p2: boolean): void; + * p1/gadgetHash was always 0xFBAB5776 ("GADGET_PARACHUTE"). + * p2 is always true. + */ + export function setPedGadget(ped: Ped | Player | number, gadgetHash: number, p2: boolean): void; /** - * @param gadgetHash - was always 0xFBAB5776 ("GADGET_PARACHUTE"). - */ - export function getIsPedGadgetEquipped(ped: Player | number, gadgetHash: number): boolean; + * gadgetHash - was always 0xFBAB5776 ("GADGET_PARACHUTE"). + */ + export function getIsPedGadgetEquipped(ped: Ped | Player | number, gadgetHash: number): boolean; /** - * Returns the hash of the weapon. - * var num7 = WEAPON::GET_SELECTED_PED_WEAPON(num4); - * sub_27D3(num7); - * switch (num7) - * { - * case 0x24B17070: - * Also see WEAPON::GET_CURRENT_PED_WEAPON. Difference? - * ------------------------------------------------------------------------- - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - * @returns The difference is that GET_SELECTED_PED_WEAPON simply returns the ped's current weapon hash but GET_CURRENT_PED_WEAPON also checks the weapon object and returns true if the hash of the weapon object equals the weapon hash - */ - export function getSelectedPedWeapon(ped: Player | number): number; + * Returns the hash of the weapon. + * var num7 = WEAPON::GET_SELECTED_PED_WEAPON(num4); + * sub_27D3(num7); + * switch (num7) + * { + * case 0x24B17070: + * Also see WEAPON::GET_CURRENT_PED_WEAPON. Difference? + * ------------------------------------------------------------------------- + * The difference is that GET_SELECTED_PED_WEAPON simply returns the ped's current weapon hash but GET_CURRENT_PED_WEAPON also checks the weapon object and returns true if the hash of the weapon object equals the weapon hash + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function getSelectedPedWeapon(ped: Ped | Player | number): number; /** - * WEAPON::EXPLODE_PROJECTILES(PLAYER::PLAYER_PED_ID(), func_221(0x00000003), 0x00000001); - */ - export function explodeProjectiles(ped: Player | number, weaponHash: number, p2: boolean): void; + * WEAPON::EXPLODE_PROJECTILES(PLAYER::PLAYER_PED_ID(), func_221(0x00000003), 0x00000001); + */ + export function explodeProjectiles(ped: Ped | Player | number, weaponHash: number, p2: boolean): void; /** - * If `explode` true, then removal is done through exploding the projectile. Basically the same as EXPLODE_PROJECTILES but without defining the owner ped. - */ + * If `explode` true, then removal is done through exploding the projectile. Basically the same as EXPLODE_PROJECTILES but without defining the owner ped. + */ export function removeAllProjectilesOfType(weaponHash: number, explode: boolean): void; - export function getLockonDistanceOfCurrentPedWeapon(ped: Player | number): number; + export function getLockonDistanceOfCurrentPedWeapon(ped: Ped | Player | number): number; - export function getMaxRangeOfCurrentPedWeapon(ped: Player | number): number; + export function getMaxRangeOfCurrentPedWeapon(ped: Ped | Player | number): number; /** - * Fourth Parameter = unsure, almost always -1 - */ - export function hasVehicleGotProjectileAttached(driver: Player | number, vehicle: Vehicle | number, weaponHash: number, p3: any): boolean; + * Fourth Parameter = unsure, almost always -1 + */ + export function hasVehicleGotProjectileAttached(driver: Ped | Player | number, vehicle: Vehicle | number, weaponHash: number, p3: any): boolean; /** - * Full list of weapons & components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function giveWeaponComponentToPed(ped: Player | number, weaponHash: number, componentHash: number): void; + * Full list of weapons & components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function giveWeaponComponentToPed(ped: Ped | Player | number, weaponHash: number, componentHash: number): void; /** - * Full list of weapons & components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function removeWeaponComponentFromPed(ped: Player | number, weaponHash: number, componentHash: number): void; + * Full list of weapons & components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function removeWeaponComponentFromPed(ped: Ped | Player | number, weaponHash: number, componentHash: number): void; /** - * Full list of weapons & components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function hasPedGotWeaponComponent(ped: Player | number, weaponHash: number, componentHash: number): boolean; + * Full list of weapons & components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function hasPedGotWeaponComponent(ped: Ped | Player | number, weaponHash: number, componentHash: number): boolean; /** - * Full list of weapons & components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function isPedWeaponComponentActive(ped: Player | number, weaponHash: number, componentHash: number): boolean; + * Full list of weapons & components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function isPedWeaponComponentActive(ped: Ped | Player | number, weaponHash: number, componentHash: number): boolean; - export function refillAmmoInstantly(ped: Player | number): boolean; + export function refillAmmoInstantly(ped: Ped | Player | number): boolean; /** - * Forces a ped to reload only if they are able to; if they have a full magazine, they will not reload. - */ - export function makePedReload(ped: Player | number): boolean; + * Forces a ped to reload only if they are able to; if they have a full magazine, they will not reload. + */ + export function makePedReload(ped: Ped | Player | number): boolean; /** - * Nearly every instance of p1 I found was 31. Nearly every instance of p2 I found was 0. - * REQUEST_WEAPON_ASSET(iLocal_1888, 31, 26); - */ + * Nearly every instance of p1 I found was 31. Nearly every instance of p2 I found was 0. + * REQUEST_WEAPON_ASSET(iLocal_1888, 31, 26); + */ export function requestWeaponAsset(weaponHash: number, p1: number, p2: number): void; export function hasWeaponAssetLoaded(weaponHash: number): boolean; @@ -23618,243 +26223,339 @@ declare module "natives" { export function removeWeaponAsset(weaponHash: number): void; /** - * Now has 8 params. - */ - export function createWeaponObject(weaponHash: number, ammoCount: number, x: number, y: number, z: number, showWorldModel: boolean, scale: number, p7: any, p8: any, p9: any): number; + * Now has 8 params. + */ + export function createWeaponObject(weaponHash: number, ammoCount: number, x: number, y: number, z: number, showWorldModel: boolean, scale: number, p7: any, p8: any, p9: any): Object; /** - * (use WEAPON::GET_WEAPON_COMPONENT_TYPE_MODEL() to get hash value) - * ${component_at_ar_flsh}, ${component_at_ar_supp}, ${component_at_pi_flsh}, ${component_at_scope_large}, ${component_at_ar_supp_02} - */ - export function giveWeaponComponentToWeaponObject(weaponObject: number, componentHash: number): void; + * componentHash: + * (use WEAPON::GET_WEAPON_COMPONENT_TYPE_MODEL() to get hash value) + * ${component_at_ar_flsh}, ${component_at_ar_supp}, ${component_at_pi_flsh}, ${component_at_scope_large}, ${component_at_ar_supp_02} + */ + export function giveWeaponComponentToWeaponObject(weaponObject: Object, componentHash: number): void; /** - * see DOES_WEAPON_TAKE_WEAPON_COMPONENT for full list of weapons & components - */ - export function removeWeaponComponentFromWeaponObject(object: number, componentHash: number): void; + * see DOES_WEAPON_TAKE_WEAPON_COMPONENT for full list of weapons & components + */ + export function removeWeaponComponentFromWeaponObject(object: Object, componentHash: number): void; /** - * see DOES_WEAPON_TAKE_WEAPON_COMPONENT for full list of weapons & components - */ - export function hasWeaponGotWeaponComponent(weapon: number, componentHash: number): boolean; + * see DOES_WEAPON_TAKE_WEAPON_COMPONENT for full list of weapons & components + */ + export function hasWeaponGotWeaponComponent(weapon: Object, componentHash: number): boolean; - export function giveWeaponObjectToPed(weaponObject: number, ped: Player | number): void; + export function giveWeaponObjectToPed(weaponObject: Object, ped: Ped | Player | number): void; /** - * Full list of weapons & components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ + * Full list of weapons & components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ export function doesWeaponTakeWeaponComponent(weaponHash: number, componentHash: number): boolean; /** - * Unknown behavior when unarmed. - * @returns Drops the current weapon and returns the object - */ - export function getWeaponObjectFromPed(ped: Player | number, p1: boolean): number; + * Drops the current weapon and returns the object + * Unknown behavior when unarmed. + */ + export function getWeaponObjectFromPed(ped: Ped | Player | number, p1: boolean): Object; /** - * Gives the specified loadout to the specified ped. - * Loadouts are defined in common.rpf\data\ai\loadouts.meta - */ - export function giveLoadoutToPed(ped: Player | number, loadoutHash: number): void; + * Gives the specified loadout to the specified ped. + * Loadouts are defined in common.rpf\data\ai\loadouts.meta + */ + export function giveLoadoutToPed(ped: Ped | Player | number, loadoutHash: number): void; /** - * 0 - Normal - * 1 - Green - * 2 - Gold - * 3 - Pink - * 4 - Army - * 5 - LSPD - * 6 - Orange - * 7 - Platinum - * Full list of weapons, components & tint indexes by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - * @param tintIndex can be the following: - */ - export function setPedWeaponTintIndex(ped: Player | number, weaponHash: number, tintIndex: number): void; + * tintIndex can be the following: + * 0 - Normal + * 1 - Green + * 2 - Gold + * 3 - Pink + * 4 - Army + * 5 - LSPD + * 6 - Orange + * 7 - Platinum + * Full list of weapons, components & tint indexes by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function setPedWeaponTintIndex(ped: Ped | Player | number, weaponHash: number, tintIndex: number): void; /** - * Full list of weapons, components & tint indexes by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function getPedWeaponTintIndex(ped: Player | number, weaponHash: number): number; + * Full list of weapons, components & tint indexes by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function getPedWeaponTintIndex(ped: Ped | Player | number, weaponHash: number): number; /** - * Full list of weapons, components & tint indexes by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function setWeaponObjectTintIndex(weapon: number, tintIndex: number): void; + * Full list of weapons, components & tint indexes by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function setWeaponObjectTintIndex(weapon: Object, tintIndex: number): void; - export function getWeaponObjectTintIndex(weapon: number): number; + export function getWeaponObjectTintIndex(weapon: Object): number; /** - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ export function getWeaponTintCount(weaponHash: number): number; /** - * Colors: - * 0 = Gray - * 1 = Dark Gray - * 2 = Black - * 3 = White - * 4 = Blue - * 5 = Cyan - * 6 = Aqua - * 7 = Cool Blue - * See NativeDB for reference: http://natives.altv.mp/#/0x9FE5633880ECD8ED - */ - export function setPedWeaponComponentTintIndex(ped: Player | number, weaponHash: number, camoComponentHash: number, colorIndex: number): void; - - /** - * Returns -1 if camoComponentHash is invalid/not attached to the weapon. - * Full list of weapons, components, tint indexes & weapon liveries by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function getPedWeaponComponentTintIndex(ped: Player | number, weaponHash: number, camoComponentHash: number): number; - - /** - * Colors: - * 0 = Gray - * 1 = Dark Gray - * 2 = Black - * 3 = White - * 4 = Blue - * 5 = Cyan - * 6 = Aqua - * 7 = Cool Blue - * See NativeDB for reference: http://natives.altv.mp/#/0x5DA825A85D0EA6E6 - */ - export function setWeaponObjectComponentTintIndex(weaponObject: number, camoComponentHash: number, colorIndex: number): void; - - /** - * Returns -1 if camoComponentHash is invalid/not attached to the weapon object. - * Full list of weapons, components, tint indexes & weapon liveries by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function getWeaponObjectComponentTintIndex(weaponObject: number, camoComponentHash: number): number; - - export function getPedWeaponCamoIndex(ped: Player | number, weaponHash: number): number; - - export function setWeaponObjectCamoIndex(weaponObject: number, p1: number): void; - - /** - * struct WeaponHudStatsData - * { - * BYTE hudDamage; // 0x0000 - * char _0x0001[0x7]; // 0x0001 - * BYTE hudSpeed; // 0x0008 - * char _0x0009[0x7]; // 0x0009 - * BYTE hudCapacity; // 0x0010 - * char _0x0011[0x7]; // 0x0011 - * BYTE hudAccuracy; // 0x0018 - * See NativeDB for reference: http://natives.altv.mp/#/0xD92C739EE34C9EBA - */ + * Colors: + * 0 = Gray + * 1 = Dark Gray + * 2 = Black + * 3 = White + * 4 = Blue + * 5 = Cyan + * 6 = Aqua + * 7 = Cool Blue + * 8 = Dark Blue + * 9 = Royal Blue + * 10 = Plum + * 11 = Dark Purple + * 12 = Purple + * 13 = Red + * 14 = Wine Red + * 15 = Magenta + * 16 = Pink + * 17 = Salmon + * 18 = Hot Pink + * 19 = Rust Orange + * 20 = Brown + * 21 = Earth + * 22 = Orange + * 23 = Light Orange + * 24 = Dark Yellow + * 25 = Yellow + * 26 = Light Brown + * 27 = Lime Green + * 28 = Olive + * 29 = Moss + * 30 = Turquoise + * 31 = Dark Green + * Full list of weapons, components, tint indexes & weapon liveries by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function setPedWeaponComponentTintIndex(ped: Ped | Player | number, weaponHash: number, camoComponentHash: number, colorIndex: number): void; + + /** + * Returns -1 if camoComponentHash is invalid/not attached to the weapon. + * Full list of weapons, components, tint indexes & weapon liveries by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function getPedWeaponComponentTintIndex(ped: Ped | Player | number, weaponHash: number, camoComponentHash: number): number; + + /** + * Colors: + * 0 = Gray + * 1 = Dark Gray + * 2 = Black + * 3 = White + * 4 = Blue + * 5 = Cyan + * 6 = Aqua + * 7 = Cool Blue + * 8 = Dark Blue + * 9 = Royal Blue + * 10 = Plum + * 11 = Dark Purple + * 12 = Purple + * 13 = Red + * 14 = Wine Red + * 15 = Magenta + * 16 = Pink + * 17 = Salmon + * 18 = Hot Pink + * 19 = Rust Orange + * 20 = Brown + * 21 = Earth + * 22 = Orange + * 23 = Light Orange + * 24 = Dark Yellow + * 25 = Yellow + * 26 = Light Brown + * 27 = Lime Green + * 28 = Olive + * 29 = Moss + * 30 = Turquoise + * 31 = Dark Green + * Full list of weapons, components, tint indexes & weapon liveries by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function setWeaponObjectComponentTintIndex(weaponObject: Object, camoComponentHash: number, colorIndex: number): void; + + /** + * Returns -1 if camoComponentHash is invalid/not attached to the weapon object. + * Full list of weapons, components, tint indexes & weapon liveries by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function getWeaponObjectComponentTintIndex(weaponObject: Object, camoComponentHash: number): number; + + export function getPedWeaponCamoIndex(ped: Ped | Player | number, weaponHash: number): number; + + export function setWeaponObjectCamoIndex(weaponObject: Object, p1: number): void; + + /** + * struct WeaponHudStatsData + * { + * BYTE hudDamage; // 0x0000 + * char _0x0001[0x7]; // 0x0001 + * BYTE hudSpeed; // 0x0008 + * char _0x0009[0x7]; // 0x0009 + * BYTE hudCapacity; // 0x0010 + * char _0x0011[0x7]; // 0x0011 + * BYTE hudAccuracy; // 0x0018 + * char _0x0019[0x7]; // 0x0019 + * BYTE hudRange; // 0x0020 + * }; + * Usage: + * WeaponHudStatsData data; + * if (GET_WEAPON_HUD_STATS(weaponHash, (int *)&data)) + * { + * // BYTE damagePercentage = data.hudDamage and so on + * } + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ export function getWeaponHudStats(weaponHash: number, outData?: any): [boolean, any]; export function getWeaponComponentHudStats(componentHash: number, outData?: any): [boolean, any]; /** - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - * @returns This native does not return damages of weapons from the melee and explosive group. - */ + * This native does not return damages of weapons from the melee and explosive group. + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ export function getWeaponDamage(weaponHash: number, componentHash: number): number; /** - * Use it like this: - * char cClipSize[32]; - * Hash cur; - * if (WEAPON::GET_CURRENT_PED_WEAPON(playerPed, &cur, 1)) - * { - * if (WEAPON::IS_WEAPON_VALID(cur)) - * { - * int iClipSize = WEAPON::GET_WEAPON_CLIP_SIZE(cur); - * sprintf_s(cClipSize, "ClipSize: %.d", iClipSize); - * See NativeDB for reference: http://natives.altv.mp/#/0x583BE370B1EC6EB4 - * @returns // Returns the size of the default weapon component clip. - */ + * // Returns the size of the default weapon component clip. + * Use it like this: + * char cClipSize[32]; + * Hash cur; + * if (WEAPON::GET_CURRENT_PED_WEAPON(playerPed, &cur, 1)) + * { + * if (WEAPON::IS_WEAPON_VALID(cur)) + * { + * int iClipSize = WEAPON::GET_WEAPON_CLIP_SIZE(cur); + * sprintf_s(cClipSize, "ClipSize: %.d", iClipSize); + * vDrawString(cClipSize, 0.5f, 0.5f); + * } + * } + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ export function getWeaponClipSize(weaponHash: number): number; /** - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ export function getWeaponTimeBetweenShots(weaponHash: number): number; - export function setPedChanceOfFiringBlanks(ped: Player | number, xBias: number, yBias: number): void; + export function setPedChanceOfFiringBlanks(ped: Ped | Player | number, xBias: number, yBias: number): void; /** - * Returns handle of the projectile. - */ - export function setPedShootOrdnanceWeapon(ped: Player | number, p1: number): number; + * Returns handle of the projectile. + */ + export function setPedShootOrdnanceWeapon(ped: Ped | Player | number, p1: number): Object; export function requestWeaponHighDetailModel(weaponObject: Entity | number): void; + export function setWeaponPedDamageModifier(weapon: number, damageModifier: number): void; + /** - * Changes the weapon damage output by the given multiplier value. Must be run every frame. - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ + * Changes the weapon damage output by the given multiplier value. Must be run every frame. + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ export function setWeaponDamageModifier(weaponHash: number, damageMultiplier: number): void; export function setWeaponAoeModifier(weaponHash: number, multiplier: number): void; /** - * ex, WEAPON::SET_WEAPON_EFFECT_DURATION_MODIFIER(joaat("vehicle_weapon_mine_slick"), 1.0); - */ + * ex, WEAPON::SET_WEAPON_EFFECT_DURATION_MODIFIER(joaat("vehicle_weapon_mine_slick"), 1.0); + */ export function setWeaponEffectDurationModifier(p0: number, p1: number): void; /** - * @param ped ped = The ped whose weapon you want to check. - * @returns This native returns a true or false value. - */ - export function isPedCurrentWeaponSilenced(ped: Player | number): boolean; + * This native returns a true or false value. + * Ped ped = The ped whose weapon you want to check. + */ + export function isPedCurrentWeaponSilenced(ped: Ped | Player | number): boolean; - export function isFlashLightOn(ped: Player | number): boolean; + export function isFlashLightOn(ped: Ped | Player | number): boolean; export function setFlashLightFadeDistance(distance: number): boolean; /** - * Enables/disables flashlight on ped's weapon. - */ - export function setFlashLightActiveHistory(ped: Player | number, toggle: boolean): void; - - /** - * Changes the selected ped aiming animation style. - * Note : You must use GET_HASH_KEY! - * Strings to use with GET_HASH_KEY : - * "Ballistic", - * "Default", - * "Fat", - * "Female", - * "FirstPerson", - * "FirstPersonAiming", - * See NativeDB for reference: http://natives.altv.mp/#/0x1055AC3A667F09D9 - */ - export function setWeaponAnimationOverride(ped: Player | number, animStyle: number): void; - - /** - * enum class eDamageType - * { - * UNKNOWN = 0, - * NONE = 1, - * MELEE = 2, - * BULLET = 3, - * BULLET_RUBBER = 4, - * EXPLOSIVE = 5, - * FIRE = 6, - * See NativeDB for reference: http://natives.altv.mp/#/0x3BE0BB12D25FB305 - */ + * Enables/disables flashlight on ped's weapon. + */ + export function setFlashLightActiveHistory(ped: Ped | Player | number, toggle: boolean): void; + + /** + * Changes the selected ped aiming animation style. + * Note : You must use GET_HASH_KEY! + * Strings to use with GET_HASH_KEY : + * "Ballistic", + * "Default", + * "Fat", + * "Female", + * "FirstPerson", + * "FirstPersonAiming", + * "FirstPersonFranklin", + * "FirstPersonFranklinAiming", + * "FirstPersonFranklinRNG", + * "FirstPersonFranklinScope", + * "FirstPersonMPFemale", + * "FirstPersonMichael", + * "FirstPersonMichaelAiming", + * "FirstPersonMichaelRNG", + * "FirstPersonMichaelScope", + * "FirstPersonRNG", + * "FirstPersonScope", + * "FirstPersonTrevor", + * "FirstPersonTrevorAiming", + * "FirstPersonTrevorRNG", + * "FirstPersonTrevorScope", + * "Franklin", + * "Gang", + * "Gang1H", + * "GangFemale", + * "Hillbilly", + * "MP_F_Freemode", + * "Michael", + * "SuperFat", + * "Trevor" + */ + export function setWeaponAnimationOverride(ped: Ped | Player | number, animStyle: number): void; + + /** + * enum class eDamageType + * { + * UNKNOWN = 0, + * NONE = 1, + * MELEE = 2, + * BULLET = 3, + * BULLET_RUBBER = 4, + * EXPLOSIVE = 5, + * FIRE = 6, + * COLLISION = 7, + * FALL = 8, + * DROWN = 9, + * ELECTRIC = 10, + * BARBED_WIRE = 11, + * FIRE_EXTINGUISHER = 12, + * SMOKE = 13, + * WATER_CANNON = 14, + * TRANQUILIZER = 15, + * }; + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ export function getWeaponDamageType(weaponHash: number): number; - export function setEqippedWeaponStartSpinningAtFullSpeed(ped: Player | number): void; + export function setEqippedWeaponStartSpinningAtFullSpeed(ped: Ped | Player | number): void; /** - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - * @returns this returns if you can use the weapon while using a parachute - */ + * this returns if you can use the weapon while using a parachute + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ export function canUseWeaponOnParachute(weaponHash: number): boolean; /** - * Both coordinates are from objects in the decompiled scripts. Native related to 0xECDC202B25E5CF48 p1 value. The only weapon hash used in the decompiled scripts is weapon_air_defence_gun. These two natives are used by the yacht script, decompiled scripts suggest it and the weapon hash used (valkyrie's rockets) are also used by yachts. - */ + * Both coordinates are from objects in the decompiled scripts. Native related to 0xECDC202B25E5CF48 p1 value. The only weapon hash used in the decompiled scripts is weapon_air_defence_gun. These two natives are used by the yacht script, decompiled scripts suggest it and the weapon hash used (valkyrie's rockets) are also used by yachts. + */ export function createAirDefenceSphere(x: number, y: number, z: number, radius: number, p4: number, p5: number, p6: number, weaponHash: number): number; /** - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ export function createAirDefenceAngledArea(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number, p7: number, p8: number, radius: number, weaponHash: number): number; export function removeAirDefenceSphere(zoneId: number): boolean; @@ -23870,86 +26571,246 @@ declare module "natives" { export function doesAirDefenceSphereExist(zoneId: number): boolean; /** - * Disables selecting the given weapon. Ped isn't forced to put the gun away. However you can't reselect the weapon if you holster then unholster. Weapon is also grayed out on the weapon wheel. - * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json - */ - export function setCanPedSelectInventoryWeapon(ped: Player | number, weaponHash: number, toggle: boolean): void; + * Disables selecting the given weapon. Ped isn't forced to put the gun away. However you can't reselect the weapon if you holster then unholster. Weapon is also grayed out on the weapon wheel. + * Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json + */ + export function setCanPedSelectInventoryWeapon(ped: Ped | Player | number, weaponHash: number, toggle: boolean): void; /** - * Disable all weapons. Does the same as 0xB4771B9AAF4E68E4 except for all weapons. - */ - export function setCanPedSelectAllWeapons(ped: Player | number, toggle: boolean): void; + * Disable all weapons. Does the same as 0xB4771B9AAF4E68E4 except for all weapons. + */ + export function setCanPedSelectAllWeapons(ped: Ped | Player | number, toggle: boolean): void; export function getZoneAtCoords(x: number, y: number, z: number): number; /** - * 'zoneName' corresponds to an entry in 'popzone.ipl'. - * AIRP = Los Santos International Airport - * ALAMO = Alamo Sea - * ALTA = Alta - * ARMYB = Fort Zancudo - * BANHAMC = Banham Canyon Dr - * BANNING = Banning - * BEACH = Vespucci Beach - * BHAMCA = Banham Canyon - * See NativeDB for reference: http://natives.altv.mp/#/0x98CD1D2934B76CC1 - */ - export function getZoneFromNameId(zoneName: string | null): number; + * 'zoneName' corresponds to an entry in 'popzone.ipl'. + * AIRP = Los Santos International Airport + * ALAMO = Alamo Sea + * ALTA = Alta + * ARMYB = Fort Zancudo + * BANHAMC = Banham Canyon Dr + * BANNING = Banning + * BEACH = Vespucci Beach + * BHAMCA = Banham Canyon + * BRADP = Braddock Pass + * BRADT = Braddock Tunnel + * BURTON = Burton + * CALAFB = Calafia Bridge + * CANNY = Raton Canyon + * CCREAK = Cassidy Creek + * CHAMH = Chamberlain Hills + * CHIL = Vinewood Hills + * CHU = Chumash + * CMSW = Chiliad Mountain State Wilderness + * CYPRE = Cypress Flats + * DAVIS = Davis + * DELBE = Del Perro Beach + * DELPE = Del Perro + * DELSOL = La Puerta + * DESRT = Grand Senora Desert + * DOWNT = Downtown + * DTVINE = Downtown Vinewood + * EAST_V = East Vinewood + * EBURO = El Burro Heights + * ELGORL = El Gordo Lighthouse + * ELYSIAN = Elysian Island + * GALFISH = Galilee + * GOLF = GWC and Golfing Society + * GRAPES = Grapeseed + * GREATC = Great Chaparral + * HARMO = Harmony + * HAWICK = Hawick + * HORS = Vinewood Racetrack + * HUMLAB = Humane Labs and Research + * JAIL = Bolingbroke Penitentiary + * KOREAT = Little Seoul + * LACT = Land Act Reservoir + * LAGO = Lago Zancudo + * LDAM = Land Act Dam + * LEGSQU = Legion Square + * LMESA = La Mesa + * LOSPUER = La Puerta + * MIRR = Mirror Park + * MORN = Morningwood + * MOVIE = Richards Majestic + * MTCHIL = Mount Chiliad + * MTGORDO = Mount Gordo + * MTJOSE = Mount Josiah + * MURRI = Murrieta Heights + * NCHU = North Chumash + * NOOSE = N.O.O.S.E + * OCEANA = Pacific Ocean + * PALCOV = Paleto Cove + * PALETO = Paleto Bay + * PALFOR = Paleto Forest + * PALHIGH = Palomino Highlands + * PALMPOW = Palmer-Taylor Power Station + * PBLUFF = Pacific Bluffs + * PBOX = Pillbox Hill + * PROCOB = Procopio Beach + * RANCHO = Rancho + * RGLEN = Richman Glen + * RICHM = Richman + * ROCKF = Rockford Hills + * RTRAK = Redwood Lights Track + * SANAND = San Andreas + * SANCHIA = San Chianski Mountain Range + * SANDY = Sandy Shores + * SKID = Mission Row + * SLAB = Stab City + * STAD = Maze Bank Arena + * STRAW = Strawberry + * TATAMO = Tataviam Mountains + * TERMINA = Terminal + * TEXTI = Textile City + * TONGVAH = Tongva Hills + * TONGVAV = Tongva Valley + * VCANA = Vespucci Canals + * VESP = Vespucci + * VINE = Vinewood + * WINDF = Ron Alternates Wind Farm + * WVINE = West Vinewood + * ZANCUDO = Zancudo River + * ZP_ORT = Port of South Los Santos + * ZQ_UAR = Davis Quartz + * Full list of zones by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/zones.json + */ + export function getZoneFromNameId(zoneName: string): number; export function getZonePopschedule(zoneId: number): number; /** - * AIRP = Los Santos International Airport - * ALAMO = Alamo Sea - * ALTA = Alta - * ARMYB = Fort Zancudo - * BANHAMC = Banham Canyon Dr - * BANNING = Banning - * BEACH = Vespucci Beach - * BHAMCA = Banham Canyon - * BRADP = Braddock Pass - * See NativeDB for reference: http://natives.altv.mp/#/0xCD90657D4C30E1CA - */ + * AIRP = Los Santos International Airport + * ALAMO = Alamo Sea + * ALTA = Alta + * ARMYB = Fort Zancudo + * BANHAMC = Banham Canyon Dr + * BANNING = Banning + * BEACH = Vespucci Beach + * BHAMCA = Banham Canyon + * BRADP = Braddock Pass + * BRADT = Braddock Tunnel + * BURTON = Burton + * CALAFB = Calafia Bridge + * CANNY = Raton Canyon + * CCREAK = Cassidy Creek + * CHAMH = Chamberlain Hills + * CHIL = Vinewood Hills + * CHU = Chumash + * CMSW = Chiliad Mountain State Wilderness + * CYPRE = Cypress Flats + * DAVIS = Davis + * DELBE = Del Perro Beach + * DELPE = Del Perro + * DELSOL = La Puerta + * DESRT = Grand Senora Desert + * DOWNT = Downtown + * DTVINE = Downtown Vinewood + * EAST_V = East Vinewood + * EBURO = El Burro Heights + * ELGORL = El Gordo Lighthouse + * ELYSIAN = Elysian Island + * GALFISH = Galilee + * GOLF = GWC and Golfing Society + * GRAPES = Grapeseed + * GREATC = Great Chaparral + * HARMO = Harmony + * HAWICK = Hawick + * HORS = Vinewood Racetrack + * HUMLAB = Humane Labs and Research + * JAIL = Bolingbroke Penitentiary + * KOREAT = Little Seoul + * LACT = Land Act Reservoir + * LAGO = Lago Zancudo + * LDAM = Land Act Dam + * LEGSQU = Legion Square + * LMESA = La Mesa + * LOSPUER = La Puerta + * MIRR = Mirror Park + * MORN = Morningwood + * MOVIE = Richards Majestic + * MTCHIL = Mount Chiliad + * MTGORDO = Mount Gordo + * MTJOSE = Mount Josiah + * MURRI = Murrieta Heights + * NCHU = North Chumash + * NOOSE = N.O.O.S.E + * OCEANA = Pacific Ocean + * PALCOV = Paleto Cove + * PALETO = Paleto Bay + * PALFOR = Paleto Forest + * PALHIGH = Palomino Highlands + * PALMPOW = Palmer-Taylor Power Station + * PBLUFF = Pacific Bluffs + * PBOX = Pillbox Hill + * PROCOB = Procopio Beach + * RANCHO = Rancho + * RGLEN = Richman Glen + * RICHM = Richman + * ROCKF = Rockford Hills + * RTRAK = Redwood Lights Track + * SANAND = San Andreas + * SANCHIA = San Chianski Mountain Range + * SANDY = Sandy Shores + * SKID = Mission Row + * SLAB = Stab City + * STAD = Maze Bank Arena + * STRAW = Strawberry + * TATAMO = Tataviam Mountains + * TERMINA = Terminal + * TEXTI = Textile City + * TONGVAH = Tongva Hills + * TONGVAV = Tongva Valley + * VCANA = Vespucci Canals + * VESP = Vespucci + * VINE = Vinewood + * WINDF = Ron Alternates Wind Farm + * WVINE = West Vinewood + * ZANCUDO = Zancudo River + * ZP_ORT = Port of South Los Santos + * ZQ_UAR = Davis Quartz + * Full list of zones by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/zones.json + */ export function getNameOfZone(x: number, y: number, z: number): string; export function setZoneEnabled(zoneId: number, toggle: boolean): void; /** - * cellphone range 1- 5 used for signal bar in iFruit phone - */ + * cellphone range 1- 5 used for signal bar in iFruit phone + */ export function getZoneScumminess(zoneId: number): number; /** - * Only used once in the decompiled scripts. Seems to be related to scripted vehicle generators. - * Modified example from "am_imp_exp.c4", line 6406: - * popSchedules[0] = ZONE::GET_ZONE_POPSCHEDULE(ZONE::GET_ZONE_AT_COORDS(891.3, 807.9, 188.1)); - * etc. - * - * ZONE::OVERRIDE_POPSCHEDULE_VEHICLE_MODEL(popSchedules[index], vehicleHash); - * STREAMING::REQUEST_MODEL(vehicleHash); - */ + * Only used once in the decompiled scripts. Seems to be related to scripted vehicle generators. + * Modified example from "am_imp_exp.c4", line 6406: + * /* popSchedules[0] = ZONE::GET_ZONE_POPSCHEDULE(ZONE::GET_ZONE_AT_COORDS(891.3, 807.9, 188.1)); + * etc. + * *\/ + * ZONE::OVERRIDE_POPSCHEDULE_VEHICLE_MODEL(popSchedules[index], vehicleHash); + * STREAMING::REQUEST_MODEL(vehicleHash); + */ export function overridePopscheduleVehicleModel(scheduleId: number, vehicleHash: number): void; /** - * Only used once in the decompiled scripts. Seems to be related to scripted vehicle generators. - * Modified example from "am_imp_exp.c4", line 6418: - * popSchedules[0] = ZONE::GET_ZONE_POPSCHEDULE(ZONE::GET_ZONE_AT_COORDS(891.3, 807.9, 188.1)); - * etc. - * - * STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(vehicleHash); - * ZONE::CLEAR_POPSCHEDULE_OVERRIDE_VEHICLE_MODEL(popSchedules[index]); - */ + * Only used once in the decompiled scripts. Seems to be related to scripted vehicle generators. + * Modified example from "am_imp_exp.c4", line 6418: + * /* popSchedules[0] = ZONE::GET_ZONE_POPSCHEDULE(ZONE::GET_ZONE_AT_COORDS(891.3, 807.9, 188.1)); + * etc. + * *\/ + * STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(vehicleHash); + * ZONE::CLEAR_POPSCHEDULE_OVERRIDE_VEHICLE_MODEL(popSchedules[index]); + */ export function clearPopscheduleOverrideVehicleModel(scheduleId: number): void; /** - * Returns a hash representing which part of the map the given coords are located. - * (Hash of) city -> -289320599 - * (Hash of) countryside -> 2072609373 - * C# Example : - * Ped player = Game.Player.Character; - * @param x Function.Call(Hash.GET_HASH_OF_MAP_AREA_AT_COORDS, player.Position.X, player.Position.Y, player.Position.Z); - * @param y Function.Call(Hash.GET_HASH_OF_MAP_AREA_AT_COORDS, player.Position.X, player.Position.Y, player.Position.Z); - * @returns Possible return values: - */ + * Returns a hash representing which part of the map the given coords are located. + * Possible return values: + * (Hash of) city -> -289320599 + * (Hash of) countryside -> 2072609373 + * C# Example : + * Ped player = Game.Player.Character; + * Hash h = Function.Call(Hash.GET_HASH_OF_MAP_AREA_AT_COORDS, player.Position.X, player.Position.Y, player.Position.Z); + */ export function getHashOfMapAreaAtCoords(x: number, y: number, z: number): number; } From 63e77afd31e0ee90b50357974168e898bf9ae04b Mon Sep 17 00:00:00 2001 From: xshady <54737754+xxshady@users.noreply.github.com> Date: Fri, 29 Dec 2023 08:32:41 +0300 Subject: [PATCH 3/9] fix(client): move steeringAngle property to Vehicle class (#294) --- client/index.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/client/index.d.ts b/client/index.d.ts index 2e982faa..d7b92f0d 100644 --- a/client/index.d.ts +++ b/client/index.d.ts @@ -1688,6 +1688,11 @@ declare module "alt-client" { */ public resetDashboardLights(): void; + /** + * @remarks Setter needs to be called in everytick and engine must be off. + */ + public steeringAngle: number; + // normal meta public setMeta(key: K, value: shared.InterfaceValueByKey): void; @@ -4354,11 +4359,6 @@ declare module "alt-client" { */ public oilLevel: number; - /** - * @remarks Setter needs to be called in everytick and engine must be off. - */ - public steeringAngle: number; - public suspensionHeight: number; } From 6a30e2729636737acb30c5622dc8f98ca88c4397 Mon Sep 17 00:00:00 2001 From: xLuxy <67131061+xLuxy@users.noreply.github.com> Date: Fri, 29 Dec 2023 06:36:24 +0100 Subject: [PATCH 4/9] feat(server): Add Vehicle.setBadge --- server/index.d.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/server/index.d.ts b/server/index.d.ts index c5dae865..12f5ea74 100644 --- a/server/index.d.ts +++ b/server/index.d.ts @@ -232,6 +232,16 @@ declare module "alt-server" { VerifyFailed, } + export interface VehicleBadgePosition { + active: boolean; + alpha: number; + size: number; + boneIndex: number; + offset: shared.Vector3; + direction: shared.Vector3; + side: shared.Vector3; + } + export interface IConnectionInfo { readonly name: string; readonly socialID: string; @@ -2456,6 +2466,8 @@ declare module "alt-server" { public setWeaponCapacity(weaponIndex: number, capacity: number): void; + setBadge(textureDictionary: number, texture: number, pos: VehicleBadgePosition, pos2?: VehicleBadgePosition, pos3?: VehicleBadgePosition, pos4?: VehicleBadgePosition): void; + public hybridExtraActive: boolean; public hybridExtraState: number; From e7cf0b685c465c5da53bc5e9692cc4db17be2028 Mon Sep 17 00:00:00 2001 From: xshady <54737754+xxshady@users.noreply.github.com> Date: Thu, 14 Mar 2024 14:14:23 +0300 Subject: [PATCH 5/9] chore: add package.json to first resource article (#302) --- docs/articles/create-your-first-resource.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/articles/create-your-first-resource.md b/docs/articles/create-your-first-resource.md index cd8b3d0f..99a11d92 100644 --- a/docs/articles/create-your-first-resource.md +++ b/docs/articles/create-your-first-resource.md @@ -20,6 +20,23 @@ server/ ├── server.toml ``` +Before creating an example resource we need to create package.json in the root with the following content so we can use ES6 modules on serverside. +```json +{ + "type": "module" +} +``` + +So in the end our server folder structure should look like this: +``` +server/ +... +├── altv-server.exe +├── libnode.dll +├── server.toml +├── package.json // <--------- here +``` + Let's create an example resource. ``` From c0b990406d10d7b06cb7bb31b9cd1c1cf85fcad7 Mon Sep 17 00:00:00 2001 From: xshady <54737754+xxshady@users.noreply.github.com> Date: Fri, 15 Mar 2024 01:43:18 +0300 Subject: [PATCH 6/9] chore(server): remove outdated inspector property from IServerConfig (#308) --- server/index.d.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/server/index.d.ts b/server/index.d.ts index cdefa1fe..e3c2aebe 100644 --- a/server/index.d.ts +++ b/server/index.d.ts @@ -644,10 +644,6 @@ declare module "alt-server" { }; readonly "js-module"?: { - readonly inspector?: { - readonly host?: string; - readonly port?: number; - }; readonly "source-maps"?: boolean; readonly "heap-profiler"?: boolean; readonly profiler?: boolean; From beeedc21c629dae20ced2aa14398e1d1a892dd9f Mon Sep 17 00:00:00 2001 From: xshady <54737754+xxshady@users.noreply.github.com> Date: Wed, 3 Apr 2024 16:11:23 +0300 Subject: [PATCH 7/9] chore: update altv-pkg link (#311) --- docs/articles/create-your-first-resource.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/articles/create-your-first-resource.md b/docs/articles/create-your-first-resource.md index 882d9527..365bcd08 100644 --- a/docs/articles/create-your-first-resource.md +++ b/docs/articles/create-your-first-resource.md @@ -252,4 +252,4 @@ Followed by setting up a whole server with basic fundamentals! Keep in mind that... - alt:V uses ES6 modules -- the server does not automatically update, you can use something like [altv-pkg](https://github.com/Stuyk/altv-pkg) (unofficial) to easily update server files +- the server does not automatically update, you can use something like [altv-pkg](https://github.com/altmp/altv-pkg) to easily update server files From 4f8118b94554c6b25b0f7e09599778841543d4f6 Mon Sep 17 00:00:00 2001 From: xshady <54737754+xxshady@users.noreply.github.com> Date: Wed, 3 Apr 2024 18:20:57 +0300 Subject: [PATCH 8/9] chore: improve getClosestEntities description (#310) --- server/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/index.d.ts b/server/index.d.ts index 53f2fea0..1df02b58 100644 --- a/server/index.d.ts +++ b/server/index.d.ts @@ -3268,8 +3268,8 @@ declare module "alt-server" { * ``` * * @param position - * @param range - * @param dimension + * @param range Can be set to `0` to get entities in any range. + * @param dimension Can be set to {@link "alt-shared".globalDimension} to get entities in any dimension. * @param limit How many entities to return if there are more entities in the specified range, dimension. (`-1` to disable). * @param allowedTypes * From dff5910529994c6ad4a93fb5d04ee6f108b9e5df Mon Sep 17 00:00:00 2001 From: DevPanda <49129501+devpanda0@users.noreply.github.com> Date: Tue, 28 May 2024 21:53:15 +0200 Subject: [PATCH 9/9] Update requirements list --- docs/articles/setup.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/articles/setup.md b/docs/articles/setup.md index 87ff5b57..ef594ea2 100644 --- a/docs/articles/setup.md +++ b/docs/articles/setup.md @@ -9,6 +9,7 @@ This article will explain how to setup an alt:V server with the JS module. - Basic knowledge of command prompts - VC Redist Latest Version installed - Windows 10+ or Linux (For running the server) +- On Linux you need the package libatomic1 `apt-get install libatomic1` ## Summary