From 17699483e4c937b1d8bb159f5d51baa686f6a1ef Mon Sep 17 00:00:00 2001 From: Beckam White Date: Wed, 6 Nov 2024 04:19:18 +1100 Subject: [PATCH] Updated lots of natives --- AUDIO/PlaySoundFrontend.md | 6 +- AUDIO/SetAudioFlag.md | 184 +++++++++-------------- DECORATOR/DecorSetInt.md | 13 +- ENTITY/ApplyForceToEntity.md | 66 +++++--- ENTITY/AttachEntityToEntityPhysically.md | 49 +++--- ENTITY/SetEntityLoadCollisionFlag.md | 16 +- ENTITY/SetEntityLodDist.md | 8 +- ENTITY/SetEntityProofs.md | 26 ++-- GRAPHICS/StartParticleFxLoopedAtCoord.md | 34 +++-- HUD/SetMinimapComponent.md | 44 ++++-- OBJECT/AddExtendedPickupProbeArea.md | 31 ++++ OBJECT/N_0xd4a7a435b3710d05.md | 24 --- OBJECT/SetObjectPhysicsParams.md | 31 ++-- PATHFIND/GetRandomVehicleNode.md | 22 +-- TASK/TaskCombatPed.md | 27 +++- 15 files changed, 305 insertions(+), 276 deletions(-) create mode 100644 OBJECT/AddExtendedPickupProbeArea.md delete mode 100644 OBJECT/N_0xd4a7a435b3710d05.md diff --git a/AUDIO/PlaySoundFrontend.md b/AUDIO/PlaySoundFrontend.md index f06c98ae0..d418a4a5e 100644 --- a/AUDIO/PlaySoundFrontend.md +++ b/AUDIO/PlaySoundFrontend.md @@ -5,9 +5,11 @@ ns: AUDIO ```c // 0x67C540AA08E4A6F5 0x2E458F74 -void PLAY_SOUND_FRONTEND(int soundId, char* audioName, char* audioRef, BOOL p3); +void PLAY_SOUND_FRONTEND(int soundId, char* audioName, char* audioRef, BOOL enableOnReplay); ``` +Plays back a sound "frontend" - at full volume, panned centrally. Optionally can specify a sound set which contains the sound. + ``` List: https://pastebin.com/DCeRiaLJ All occurrences as of Cayo Perico Heist DLC (b2189), sorted alphabetically and identical lines removed: https://git.io/JtLxM @@ -17,5 +19,5 @@ All occurrences as of Cayo Perico Heist DLC (b2189), sorted alphabetically and i * **soundId**: * **audioName**: * **audioRef**: -* **p3**: +* **enableOnReplay**: diff --git a/AUDIO/SetAudioFlag.md b/AUDIO/SetAudioFlag.md index aaa61a568..0b2fe6e59 100644 --- a/AUDIO/SetAudioFlag.md +++ b/AUDIO/SetAudioFlag.md @@ -5,123 +5,85 @@ ns: AUDIO ```c // 0xB9EFD5C25018725A 0x1C09C9E0 -void SET_AUDIO_FLAG(char* flagName, BOOL toggle); +void SET_AUDIO_FLAG(char* flagName, BOOL enabled); ``` Generic interface to toggle audio functionality, with auto-reset on script termination and support for multiple script threads -Flags used in game scripts: -| Flag Name | Description of Usage | -| ----- | -------- | -| ActivateSwitchWheelAudio | | -| AllowAmbientSpeechInSlowMo | | -| AllowCutsceneOverScreenFade | | -| AllowForceRadioAfterRetune | | -| AllowPainAndAmbientSpeechToPlayDuringCutscene | | -| AllowPlayerAIOnMission | | -| AllowPoliceScannerWhenPlayerHasNoControl | | -| AllowRadioDuringSwitch | | -| AllowRadioOverScreenFade | | -| AllowScoreAndRadio | | -| AllowScriptedSpeechInSlowMo | | -| AvoidMissionCompleteDelay | | -| DisableAbortConversationForDeathAndInjury | | -| DisableAbortConversationForRagdoll | | -| DisableBarks | | -| DisableFlightMusic | | -| DisableNPCHeadsetSpeechAttenuation | | -| DisableReplayScriptStreamRecording | | -| EnableHeadsetBeep | | -| EnableMissileLockWarningForAllVehicles | | -| ForceConversationInterrupt | | -| ForceSeamlessRadioSwitch | | -| ForceSniperAudio | | -| FrontendRadioDisabled | | -| HoldMissionCompleteWhenPrepared | | -| IsDirectorModeActive | Allows you to play speech infinitely without any pauses like in Director Mode. | -| IsPlayerOnMissionForSpeech | | -| ListenerReverbDisabled | | -| LoadMPData | | -| MobileRadioInGame | | -| OnlyAllowScriptTriggerPoliceScanner | | -| PlayerOnDLCHeist4Island | | -| PlayMenuMusic | | -| PoliceScannerDisabled | | -| ScriptedConvListenerMaySpeak | | -| SpeechDucksScore | | -| SuppressPlayerScubaBreathing | | -| UseQuietSceneSoftVersion | | -| WantedMusicDisabled | | -| WantedMusicOnMission | | - ``` -All flag IDs and hashes: -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 +All flag names and hashes: +Name: RadioOverlapDisabled | Hash: 0xFED7A7F +Name: AggressiveHorns | Hash: 0x20A7858F +Name: CarsStartFirstTime | Hash: 0xA11C2259 +Name: BoostPlayerCarVolume | Hash: 0x8DE4700 +Name: UserRadioControlDisabled | Hash: 0x989F652F +Name: FrontendRadioDisabled | Hash: 0x3C9E76BA +Name: MobileRadioInGame | Hash: 0xA805FEB0 +Name: ForceSeamlessRadioSwitch | Hash: 0x4B94EA26 +Name: AllowScoreAndRadio | Hash: 0x803ACD34 +Name: PoliceScannerDisabled | Hash: 0x7C741226 +Name: OnlyAllowScriptTriggerPoliceScanner | Hash: 0x31DB9EBD +Name: AllowPoliceScannerWhenPlayerHasNoControl | Hash: 0xDF386F18 +Name: DisableAbortConversationForRagdoll | Hash: 0x669CED42 +Name: DisableAbortConversationForOnFire | Hash: 0x51F22743 +Name: DisableAbortConversationForDeathAndInjury | Hash: 0x2052B35C +Name: LimitAmbientRadioStations | Hash: 0x71472DC +Name: SpeechDucksScore | Hash: 0xF9928BCC +Name: ListenerReverbDisabled | Hash: 0x7ADBDD48 +Name: ScriptedSpeechDuckingDisabled | Hash: 0xA959BA1A +Name: ScriptedConvListenerMaySpeak | Hash: 0xBBE89B60 +Name: OnlyAllowCombatSay | Hash: 0x87A08871 +Name: AllowPlayerAIOnMission | Hash: 0xED1057CE +Name: AllowBuddyAIOnMission | Hash: 0x1584AD7A +Name: GroupShootout | Hash: 0x8582cfcb +Name: TrevorRageIsOverriden | Hash: 0x7E5E2FB0 +Name: UnderWaterStreamOverriden | Hash: 0xAE4F72DB +Name: WantedMusicDisabled | Hash: 0x5D16D1FA +Name: DisablePlayerBreathing | Hash: 0x6B2F4B8 +Name: WantedMusicOnMission | Hash: 0x5D4CDC96 +Name: DisableSniperAudio | Hash: 0x8B5A48BA +Name: ForceSniperAudio | Hash: 0x98FBD539 +Name: OverridePlayerGroundMaterial | Hash: 0xD8CB0473 +Name: ScriptForceMicPosition | Hash: 0x5CBB4874 +Name: ScriptForceGunfightConductorIntensity | Hash: 0x2E9F93A9 +Name: DisableFlightMusic | Hash: 0xD93BEA86 +Name: DoNotBlipScriptedSpeech | Hash: 0x92109B7D +Name: DisableBarks | Hash: 0xB7EC9E4D +Name: RepeatLineForRagdolling | Hash: 0xCABDBB1D +Name: DontRepeatLineForPlayerRagdolling | Hash: 0xB3FD4A52 +Name: OverrideElevationWind | Hash: 0x370D94E5 +Name: HoldMissionCompleteWhenPrepared | Hash: 0xA0F7938F +Name: AvoidMissionCompleteDelay | Hash: 0xCBE1CE81 +Name: AllowScriptedSpeechInSlowMo | Hash: 0xC27F1271 +Name: ActivateSwitchWheelAudio | Hash: 0x9E3258EB +Name: AllowAmbientSpeechInSlowMo | Hash: 0x551CDA5B +Name: AllowRadioOverScreenFade | Hash: 0xCB6D663C +Name: ScriptPlayingDistantSiren | Hash: 0x7DACE87F +Name: AllowRadioDuringSwitch | Hash: 0xF9DE416F +Name: LoadMPData | Hash: 0x882E6E9E +Name: UseQuietSceneSoftVersion | Hash: 0x16B447E7 +Name: PlayMenuMusic | Hash: 0xBD867739 +Name: OverrideMicrophoneSettings | Hash: 0xA3A58604 +Name: SuppressPlayerScubaBreathing | Hash: 0x7E046BBC +Name: IsPlayerOnMissionForSpeech | Hash: 0xD95FDB98 +Name: AllowPainAndAmbientSpeechToPlayDuringCutscene | Hash: 0x5842C0ED +Name: ForceConversationInterrupt | Hash: 0x285FECC6 +Name: DisableReplayScriptStreamRecording | Hash: 0x9351AC43 +Name: DisableReplayScriptFrontendStreamRecording | Hash:0x50032E75 +Name: AllowForceRadioAfterRetune | Hash: 0xAE6D0D59 +Name: IsDirectorModeActive | Hash: 0xD6351785 +Name: EnableHeadsetBeep | Hash: 0xD25D71BC +Name: DisableHeadsetOnBeep | Hash: 0x1F7F6423 +Name: DisableHeadsetOffBeep | Hash: 0xE24C3AA6 +Name: AllowCutsceneOverScreenFade | Hash: 0xBFFDD2B7 +Name: SuppressRadioSwitchBeep | Hash: 0x3FCC2ABF +Name: EnableGameplayCriticalMusicEmitters | Hash: 0x2EB25AD0 +Name: EnableMissileLockWarningForAllVehicles | Hash: 0x2B56D9D0 +Name: PlayerOnDLCHeist4Island | Hash: 0xAE6A6DE9 +Name: DisableNPCHeadsetSpeechAttenuation | Hash: 0x49D479E5 ``` ## Parameters -* **flagName**: -* **toggle**: +* **flagName**: name of the flag +* **enabled**: whether flag is enabler or not diff --git a/DECORATOR/DecorSetInt.md b/DECORATOR/DecorSetInt.md index 4f7e39d91..221fddf34 100644 --- a/DECORATOR/DecorSetInt.md +++ b/DECORATOR/DecorSetInt.md @@ -5,16 +5,15 @@ ns: DECORATOR ```c // 0x0CE3AA5E1CA19E10 0xDB718B21 -BOOL DECOR_SET_INT(Entity entity, char* propertyName, int value); +BOOL DECOR_SET_INT(Entity entity, char* decoratorName, int value); ``` -``` -Sets property to int. -``` +Add or update a INT decorator on an object ## Parameters -* **entity**: -* **propertyName**: -* **value**: +* **entity**: object to remove decorators from +* **decoratorName**: Name of the decorator +* **value**: value of the decorator ## Return value +* **BOOL** true if completed successfuly else false \ No newline at end of file diff --git a/ENTITY/ApplyForceToEntity.md b/ENTITY/ApplyForceToEntity.md index 65e944f97..96506f92c 100644 --- a/ENTITY/ApplyForceToEntity.md +++ b/ENTITY/ApplyForceToEntity.md @@ -5,7 +5,7 @@ ns: ENTITY ```c // 0xC5F68BE9613E2D18 0xC1C0855A -void APPLY_FORCE_TO_ENTITY(Entity entity, int forceType, float x, float y, float z, float offX, float offY, float offZ, int boneIndex, BOOL isDirectionRel, BOOL ignoreUpVec, BOOL isForceRel, BOOL p12, BOOL p13); +void APPLY_FORCE_TO_ENTITY(Entity entity, int forceType, float x, float y, float z, float offX, float offY, float offZ, int component, BOOL localForce, BOOL localOffset, BOOL scaleByMass, BOOL triggerAudio, BOOL scaleByTimeWarp); ``` Applies a force to the specified entity. @@ -20,6 +20,33 @@ enum eForceType ForceNoRot = 4, ForceRotPlusForce = 5 } + +enum RagdollComponent +{ + RAGDOLL_INVALID = -1, //-1 Invalid + RAGDOLL_BUTTOCKS = 0, //0 Buttocks + RAGDOLL_THIGH_LEFT, //1 Thigh_Left + RAGDOLL_SHIN_LEFT, //2 Shin_Left + RAGDOLL_FOOT_LEFT, //3 Foot_Left + RAGDOLL_THIGH_RIGHT, //4 Thigh_Right + RAGDOLL_SHIN_RIGHT, //5 Shin_Right + RAGDOLL_FOOT_RIGHT, //6 Foot_Right + RAGDOLL_SPINE0, //7 Spine0 + RAGDOLL_SPINE1, //8 Spine1 + RAGDOLL_SPINE2, //9 Spine2 + RAGDOLL_SPINE3, //10 Spine3 + RAGDOLL_CLAVICLE_LEFT, //11 Clavicle_Left + RAGDOLL_UPPER_ARM_LEFT, //12 Upper_Arm_Left + RAGDOLL_LOWER_ARM_LEFT, //13 Lower_Arm_Left + RAGDOLL_HAND_LEFT, //14 Hand_Left + RAGDOLL_CLAVICLE_RIGHT, //15 Clavicle_Right + RAGDOLL_UPPER_ARM_RIGHT, //16 Upper_Arm_Right + RAGDOLL_LOWER_ARM_RIGHT, //17 Lower_Arm_Right + RAGDOLL_HAND_RIGHT, //18 Hand_Right + RAGDOLL_NECK, //19 Neck + RAGDOLL_HEAD //20 Head +} + ``` 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/). @@ -34,12 +61,13 @@ Research/documentation on the gtaforums can be found [here](https://gtaforums.co * **offX**: Rotation/offset force (X) * **offY**: Rotation/offset force (Y) * **offZ**: Rotation/offset force (Z) -* **boneIndex**: (Often 0) Entity bone index -* **isDirectionRel**: (Usually false) Vector defined in local (body-fixed) coordinate frame -* **ignoreUpVec**: (Usually true) -* **isForceRel**: (Usually true) When true, force gets multiplied with the objects mass and different objects will have the same acceleration -* **p12**: (Usually false) -* **p13**: (Usually true) +* **component**: Component of the entity to apply the force too - only matters for breakable or articulated (ragdoll) physics. 0 means the root or parent component. Reger to `RagdollComponent` +If the command is being called on a ped, the component passed in is one returned from GET_PED_RAGDOLL_BONE_INDEX, not GET_PED_BONE_INDEX +* **localForce**: Specifies whether the force vector passed in is in local or world coordinates. Local coordinates (TRUE) means the force will get automatically transformed into world space before being applied. +* **localOffset**: Specifies whether the offset passed in is in local or world coordinates. +* **scaleByMass**: When true, force gets multiplied with the objects mass and different objects will have the same acceleration +* **triggerAudio**: Specifies whether to play audio events related to the force being applied. The audio will depend on the entity type. Currently vehicles are the only entity types supported, and will play a suspension squeal depending on the magnitude of the force +* **scaleByTimeWarp**: (Usually true) ## Examples @@ -58,23 +86,23 @@ local forceType = forceTypes.MaxForceRot2 -- sends the entity straight up into the sky: local direction = vector3(0.0, 0.0, 15.0) local rotation = vector3(0.0, 0.0, 0.0) -local boneIndex = 0 -local isDirectionRel = false -local ignoreUpVec = true -local isForceRel = true -local p12 = false -local p13 = true +local component = 0 +local localForce = false +local localOffset = true +local scaleByMass = true +local triggerAudio = false +local scaleByTimeWarp = true ApplyForceToEntity( entity, forceType, direction, rotation, - boneIndex, - isDirectionRel, - ignoreUpVec, - isForceRel, - p12, - p13 + component, + localForce, + localOffset, + scaleByMass, + triggerAudio, + scaleByTimeWarp ) ``` diff --git a/ENTITY/AttachEntityToEntityPhysically.md b/ENTITY/AttachEntityToEntityPhysically.md index 86cd4dc48..0d0a1da07 100644 --- a/ENTITY/AttachEntityToEntityPhysically.md +++ b/ENTITY/AttachEntityToEntityPhysically.md @@ -5,36 +5,41 @@ ns: ENTITY ```c // 0xC3675780C92F90F9 0x0547417F -void ATTACH_ENTITY_TO_ENTITY_PHYSICALLY(Entity entity1, Entity entity2, int boneIndex1, int boneIndex2, float xPos1, float yPos1, float zPos1, float xPos2, float yPos2, float zPos2, float xRot, float yRot, float zRot, float breakForce, BOOL fixedRot, BOOL p15, BOOL collision, BOOL teleport, int p18); +void ATTACH_ENTITY_TO_ENTITY_PHYSICALLY(Entity entity1, Entity entity2, int boneIndex1, int boneIndex2, float xPos1, float yPos1, float zPos1, float xPos2, float yPos2, float zPos2, float xRot, float yRot, float zRot, float physicalStrength, BOOL constrainRotation, BOOL doInitialWarp, BOOL collision, BOOL addInitialSeperation, int rotOrder); ``` -``` -breakForce is the amount of force required to break the bond. -p14 - is always 1 in scripts -p15 - is 1 or 0 in scripts - unknown 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. +Attaches an entity to another entity using a physical attachment + +```c +enum EulerRotOrder +{ + EULER_XYZ = 0, + EULER_XZY, + EULER_YXZ, + EULER_YZX, + EULER_ZXY, + EULER_ZYX +} ``` ## Parameters * **entity1**: * **entity2**: -* **boneIndex1**: -* **boneIndex2**: -* **xPos1**: -* **yPos1**: -* **zPos1**: -* **xPos2**: -* **yPos2**: -* **zPos2**: +* **boneIndex1**: refers to the bone on the first entity which is being attached +* **boneIndex2**: refers to the bone on the second entity that you're attaching the first entity to +* **xPos1**: the x offset from the root of the bone on the the first entity +* **yPos1**: the y offset from the root of the bone on the the first entity +* **zPos1**: the z offset from the root of the bone on the the first entity +* **xPos2**: the x offset from the root of the bone on the the second entity +* **yPos2**: the y offset from the root of the bone on the the second entity +* **zPos2**: the z offset from the root of the bone on the the second entity * **xRot**: * **yRot**: * **zRot**: -* **breakForce**: -* **fixedRot**: -* **p15**: -* **collision**: -* **teleport**: -* **p18**: +* **physicalStrength**: +* **constrainRotation**: specifies whether you wish to constrain rotation as well as position. usually yes, unless you want to have a hanging/swinging thing. +* **doInitialWarp**: specifies whether to warp the object to the specified attach point. If not, then the initial seperation will be used as an allowed give in the attachment (e.g. a rope length) +* **collision**: if set the two entities will collide with each other once attached +* **addInitialSeperation**: +* **rotOrder**: euler order of rotation angles diff --git a/ENTITY/SetEntityLoadCollisionFlag.md b/ENTITY/SetEntityLoadCollisionFlag.md index af9920915..f622375ca 100644 --- a/ENTITY/SetEntityLoadCollisionFlag.md +++ b/ENTITY/SetEntityLoadCollisionFlag.md @@ -5,18 +5,12 @@ ns: ENTITY ```c // 0x0DC7CABAB1E9B67E 0xC52F295B -void SET_ENTITY_LOAD_COLLISION_FLAG(Entity entity, BOOL toggle); +void SET_ENTITY_LOAD_COLLISION_FLAG(Entity entity, BOOL loadCollisionFlag, BOOL doDeadCheck); ``` -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. - -``` -NativeDB Added Parameter 3: Any p2 -``` +Sets the collision around the entity to load. ## Parameters -* **entity**: -* **toggle**: - +* **entity**: entity to load collisions around for +* **loadCollisionFlag**: flags to load collisions or not +* **doDeadCheck**: check if entity is dead. if arg true and entity is dead, the collisions will not be loaded diff --git a/ENTITY/SetEntityLodDist.md b/ENTITY/SetEntityLodDist.md index 7edec59fc..5051ff510 100644 --- a/ENTITY/SetEntityLodDist.md +++ b/ENTITY/SetEntityLodDist.md @@ -8,11 +8,9 @@ ns: ENTITY void SET_ENTITY_LOD_DIST(Entity entity, int value); ``` -``` -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). -``` +Set the fading distance for the entity identified by the given entity index ## Parameters -* **entity**: -* **value**: +* **entity**: The entity to set LOD distance on +* **value**: The distance for this entity to fade out at diff --git a/ENTITY/SetEntityProofs.md b/ENTITY/SetEntityProofs.md index c5843cfe9..16619919c 100644 --- a/ENTITY/SetEntityProofs.md +++ b/ENTITY/SetEntityProofs.md @@ -5,23 +5,19 @@ ns: ENTITY ```c // 0xFAEE099C6F890BB8 0x7E9EAB66 -void SET_ENTITY_PROOFS(Entity entity, BOOL bulletProof, BOOL fireProof, BOOL explosionProof, BOOL collisionProof, BOOL meleeProof, BOOL steamProof, BOOL p7, BOOL drownProof); +void SET_ENTITY_PROOFS(Entity entity, BOOL bulletProof, BOOL fireProof, BOOL explosionProof, BOOL collisionProof, BOOL meleeProof, BOOL steamProof, BOOL dontResetDamageFlagsOnCleanupMissionState, BOOL smokeProof); ``` -``` -Enable / disable each type of damage. --------------- -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); -``` +Enable/disable damage of each type ## Parameters -* **entity**: -* **bulletProof**: -* **fireProof**: -* **explosionProof**: -* **collisionProof**: -* **meleeProof**: -* **steamProof**: -* **p7**: -* **drownProof**: +* **entity**: entity to apply flags to +* **bulletProof**: whether or not the entity is bulletproof +* **fireProof**: whether or not the entity is fireproof +* **explosionProof**: whether or not the entity is explosion proof +* **collisionProof**: whether or not the entity is collision proof +* **meleeProof**: whether or not the entity is melee proof +* **steamProof**: whether or not the entity is steam proof +* **dontResetDamageFlagsOnCleanupMissionState**: whether or not to reset the damage flags after mission cleanup +* **smokeProof**: whether or not the entity is smoke proof diff --git a/GRAPHICS/StartParticleFxLoopedAtCoord.md b/GRAPHICS/StartParticleFxLoopedAtCoord.md index b38d77e96..298bd0847 100644 --- a/GRAPHICS/StartParticleFxLoopedAtCoord.md +++ b/GRAPHICS/StartParticleFxLoopedAtCoord.md @@ -5,26 +5,28 @@ ns: GRAPHICS ```c // 0xE184F4F0DC5910E7 0xD348E3E6 -int START_PARTICLE_FX_LOOPED_AT_COORD(char* effectName, float x, float y, float z, float xRot, float yRot, float zRot, float scale, BOOL xAxis, BOOL yAxis, BOOL zAxis, BOOL p11); +int START_PARTICLE_FX_LOOPED_AT_COORD(char* effectName, float x, float y, float z, float xRot, float yRot, float zRot, float scale, BOOL invertXAxis, BOOL invertYAxis, BOOL invertZAxis, BOOL localOnly); ``` -``` -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 -``` +Start a looped particle effect at a world position and orientation. +This should only be used with infinitely looping particle effects. +The particle effect will then start playing and will need to be stopped by calling STOP_PTFX. +The returned id of the particle effect needs to be passed into any other function that needs to be called on it. ## Parameters * **effectName**: -* **x**: -* **y**: -* **z**: -* **xRot**: -* **yRot**: -* **zRot**: -* **scale**: -* **xAxis**: -* **yAxis**: -* **zAxis**: -* **p11**: +* **x**: the x position to play the particle effect at +* **y**: the y position to play the particle effect at +* **z**: the z position to play the particle effect at +* **xRot**: the x offset rotation of the particle effect +* **yRot**: the y offset rotation of the particle effect +* **zRot**: the z offset rotation of the particle effect +* **scale**: size scale of the effect (default size = 1.0) +* **invertXAxis**: +* **invertYAxis**: +* **invertZAxis**: +* **localOnly**: ## Return value + +* **INT**: the id of the created particle effect - this will be 0 if creation fails diff --git a/HUD/SetMinimapComponent.md b/HUD/SetMinimapComponent.md index 93832486d..fcc466e7d 100644 --- a/HUD/SetMinimapComponent.md +++ b/HUD/SetMinimapComponent.md @@ -8,25 +8,51 @@ ns: HUD int SET_MINIMAP_COMPONENT(int componentID, BOOL toggle, int hudColor); ``` -This native is used to colorize/toggle certain map components like the army base. +Sets a component on the minimap on/off -Component IDs 6 through 14 are used by the freemode event King of the Castle in GTA Online. +```c +enum eMINIMAP_COMPONENT +{ + MINIMAP_COMPONENT_RUNWAY_1 = 0, + MINIMAP_COMPONENT_RUNWAY_2, + MINIMAP_COMPONENT_RUNWAY_3, + MINIMAP_COMPONENT_RUNWAY_4, + MINIMAP_COMPONENT_PRISON_GROUNDS, + MINIMAP_COMPONENT_DEBUG_MAP_AREAS, + MINIMAP_COMPONENT_KING_HILL_1, + MINIMAP_COMPONENT_KING_HILL_2, + MINIMAP_COMPONENT_KING_HILL_3, + MINIMAP_COMPONENT_KING_HILL_4, + MINIMAP_COMPONENT_KING_HILL_5, + MINIMAP_COMPONENT_KING_HILL_6, + MINIMAP_COMPONENT_KING_HILL_7, + MINIMAP_COMPONENT_KING_HILL_8, + MINIMAP_COMPONENT_KING_HILL_9, + MINIMAP_COMPONENT_KING_HILL_10, + MINIMAP_COMPONENT_KING_HILL_11, + MINIMAP_COMPONENT_KING_HILL_12, + MINIMAP_COMPONENT_KING_HILL_13 +} +``` ### An incomplete list of component IDs: * **0**: Los Santos International Airport yellow runway markers * **1**: Sandy Shores Airfield yellow runway markers * **2**: McKenzie Field yellow runway markers +* **3**: Military base +* **4**: Prison interior +* **5**: debug coloured map areas * **6**: Vespucci Beach lifeguard building * **7**: Top level zone of Alien Camp (Hippy Camp) * **8**: Paleto Bay fire station drill tower -* **9** Land Act Dam tower -* **10** Pala Springs Aerial Tramway -* **11** Galileo Observatory power unit -* **12** Small zone (empty "interior") near Central Los Santos Medical Center -* **13** Richman Mansion grotto -* **14** 2 Alien Camp (Hippy Camp) circles -* **15** Fort Zancudo +* **9**: Land Act Dam tower +* **10**: Pala Springs Aerial Tramway +* **11**: Galileo Observatory power unit +* **12**: Small zone (empty "interior") near Central Los Santos Medical Center +* **13**: Richman Mansion grotto +* **14**: 2 Alien Camp (Hippy Camp) circles +* **15**: Fort Zancudo ## Parameters * **componentID**: The component ID to change. diff --git a/OBJECT/AddExtendedPickupProbeArea.md b/OBJECT/AddExtendedPickupProbeArea.md new file mode 100644 index 000000000..7580672aa --- /dev/null +++ b/OBJECT/AddExtendedPickupProbeArea.md @@ -0,0 +1,31 @@ +--- +ns: OBJECT +aliases: ["_0xD4A7A435B3710D05"] +--- +## ADD_EXTENDED_PICKUP_PROBE_AREA + +```c +// AddExtendedPickupProbeArea +void ADD_EXTENDED_PICKUP_PROBE_AREA(float x, float y, float z, float radius); +``` + +Adds an area of the map where the portable pickups will use extended probe when dropped + +## Parameters +* **x**: X position of extended probe area +* **y**: Y position of extended probe area +* **z**: Z position of extended probe area +* **radius**: radius of extended probe area + + + +## Examples + +```lua + +local position = vector3(-323.59, -757.83, 53.25) +local radius = 25.0 + +AddExtendedPickupProbeArea(position.x, position.y, position.z, radius) + +``` \ No newline at end of file diff --git a/OBJECT/N_0xd4a7a435b3710d05.md b/OBJECT/N_0xd4a7a435b3710d05.md deleted file mode 100644 index 29603f36c..000000000 --- a/OBJECT/N_0xd4a7a435b3710d05.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -ns: OBJECT ---- -## _0xD4A7A435B3710D05 - -```c -// 0xD4A7A435B3710D05 -void _0xD4A7A435B3710D05(float x, float y, float z, float radius); -``` - -``` -Adds an area that seems to be related to pickup physics behavior. -Max amount of areas is 10. Only works in multiplayer. - -ADD_* - -NativeDB Introduced: v1290 -``` - -## Parameters -* **x**: -* **y**: -* **z**: -* **radius**: diff --git a/OBJECT/SetObjectPhysicsParams.md b/OBJECT/SetObjectPhysicsParams.md index d06994f0a..49710089c 100644 --- a/OBJECT/SetObjectPhysicsParams.md +++ b/OBJECT/SetObjectPhysicsParams.md @@ -5,25 +5,22 @@ ns: OBJECT ```c // 0xF6DF6E90DE7DF90F 0xE8D11C58 -void SET_OBJECT_PHYSICS_PARAMS(Object object, float mass, float gravityFactor, float linearC, float linearV, float linearV2, float angularC, float angularV, float angularV2, float p9, float maxAngSpeed, float buoyancyFactor); +void SET_OBJECT_PHYSICS_PARAMS(Object object, float mass, float gravityFactor, float linearX, float linearY, float linearZ, float angularX, float angularY, float angularZ, float fCollisionMargin, float fMaxAngularSpeed, float fBuoyancyFactor); ``` -``` -rage::phArchetypeDamp -p9: Some phBoundGeometry margin value, limited to (0.0, 0.1) exclusive. -``` +Set physics parameters on this instance of an object ## Parameters -* **object**: -* **mass**: -* **gravityFactor**: -* **linearC**: -* **linearV**: -* **linearV2**: -* **angularC**: -* **angularV**: -* **angularV2**: -* **p9**: -* **maxAngSpeed**: -* **buoyancyFactor**: +* **object**: object id +* **mass**: object mass (rotational inertia is calculated from new mass and volume) +* **gravityFactor**: the gravity affecting this object can be modified (default is 1.0) +* **linearX**: constant friction (doesn't depend on speed) +* **linearY**: speed dependent friction (multiplied by speed) +* **linearZ**: aerodynamic drag (multiplied by speed squared) +* **angularX**: constant friction (doesn't depend on speed) +* **angularY**: speed dependent friction (multiplied by speed) +* **angularZ**: aerodynamic drag (multiplied by speed squared) +* **fCollisionMargin**: set to thinnist part of object. Default is 10cm +* **fMaxAngularSpeed**: increase for objects which are likely to spin fast, e.g. small spheres. Default is 2*PI +* **fBuoyancyFactor**: scaling of an object's buoyancy in water. diff --git a/PATHFIND/GetRandomVehicleNode.md b/PATHFIND/GetRandomVehicleNode.md index 56992256e..ff32cdc11 100644 --- a/PATHFIND/GetRandomVehicleNode.md +++ b/PATHFIND/GetRandomVehicleNode.md @@ -5,19 +5,21 @@ ns: PATHFIND ```c // 0x93E0DB8440B73A7D 0xAD1476EA -BOOL GET_RANDOM_VEHICLE_NODE(float x, float y, float z, float radius, BOOL p4, BOOL p5, BOOL p6, Vector3* outPosition, int* nodeId); +BOOL GET_RANDOM_VEHICLE_NODE(float x, float y, float z, float radius, int minLanes, BOOL bAvoidDeadEnds, BOOL bAvoidHighways, Vector3* outPosition, int* nodeId); ``` ## Parameters -* **x**: -* **y**: -* **z**: -* **radius**: -* **p4**: -* **p5**: -* **p6**: -* **outPosition**: -* **nodeId**: +* **x**: X position of the circle to be considered +* **y**: Y position of the circle to be considered +* **z**: Z position of the circle to be considered +* **radius**: radius of the circle to be considered +* **minLanes**: unused +* **bAvoidDeadEnds**: avoids nodes that lead to a dead end +* **bAvoidHighways**: avoids nodes that exist on a highway +* **outPosition**: if the command returns TRUE then this will be filled in with the coords of the node found +* **nodeId**: if the command returns TRUE then this will contain a value that can be used in GET_SPAWN_COORDS_FOR_VEHICLE_NODE ## Return value +* **TRUE**: if the command finds a vehicle node within the defined circle +* **FALSE**: if the command fails to find a vehicle node \ No newline at end of file diff --git a/TASK/TaskCombatPed.md b/TASK/TaskCombatPed.md index 8cc5bff33..930438dd8 100644 --- a/TASK/TaskCombatPed.md +++ b/TASK/TaskCombatPed.md @@ -5,18 +5,29 @@ ns: TASK ```c // 0xF166E48407BAC484 0xCB0D8932 -void TASK_COMBAT_PED(Ped ped, Ped targetPed, int p2, int p3); +void TASK_COMBAT_PED(Ped ped, Ped targetPed, int combatFlags, int taskThreatResponseFlags); ``` -``` Makes the specified ped attack the target ped. -p2 should be 0 -p3 should be 16 + +```c +enum TaskCombatPedFlags +{ + COMBAT_PED_NONE = 0, + COMBAT_PED_PREVENT_CHANGING_TARGET = 67108864, + COMBAT_PED_DISABLE_AIM_INTRO = 134217728 +} + +enum TaskThreatResponseFlags +{ + TASK_THREAT_RESPONSE_NONE = 0, + TASK_THREAT_RESPONSE_CAN_FIGHT_ARMED_PEDS_WHEN_NOT_ARMED = 16 +} ``` ## Parameters -* **ped**: -* **targetPed**: -* **p2**: -* **p3**: +* **ped**: the ped to combat the target ped +* **targetPed**: the target ped +* **combatFlags**: flags determining how the ped will combat the target ped (usually 0) +* **taskThreatResponseFlags**: flags determining how the ped will respond to threats from the target ped (usually 16)