From a0362527520b1a8b51944c3806538020e239ad2e Mon Sep 17 00:00:00 2001 From: AvarianKnight Date: Fri, 23 Aug 2024 20:49:33 -0500 Subject: [PATCH] tweak: assortment of styling/coding fixes --- CAM/CreateCamera.md | 13 +++-- CAM/HardAttachCamToEntity.md | 20 +++++--- CAM/HardAttachCamToPedBone.md | 22 +++++---- FILES/GetTattooShopDlcItemData.md | 47 +++++++++++-------- HUD/N_0xf83d0febe75e62c9.md | 9 ++-- HUD/SetMouseCursorStyle.md | 40 +++++----------- MISC/DisplayOnscreenKeyboard.md | 10 ++-- ...eyboardResultWillDisplayUsingTheseFonts.md | 4 +- NETWORK/NetworkConcealPlayer.md | 9 ++-- PED/SetIkTarget.md | 45 +++++++++++------- TASK/SetDriveTaskDrivingStyle.md | 9 ++-- TASK/TaskBoatMission.md | 9 ++-- TASK/TaskHeliMission.md | 9 ++-- TASK/TaskVehicleMission.md | 9 ++-- TASK/TaskVehicleMissionCoorsTarget.md | 7 ++- TASK/TaskVehicleMissionPedTarget.md | 6 ++- VEHICLE/GetIsVehicleElectric.md | 4 +- 17 files changed, 153 insertions(+), 119 deletions(-) diff --git a/CAM/CreateCamera.md b/CAM/CreateCamera.md index 5f0f0790c..0070060c2 100644 --- a/CAM/CreateCamera.md +++ b/CAM/CreateCamera.md @@ -7,7 +7,7 @@ ns: CAM // 0x5E3CF89C6BCCA67D 0x5D6739AE Cam CREATE_CAMERA(Hash camHash, BOOL active); ``` -Creates a camera with the specified camera hash, You can use `SET_CAM_` natives to manipulate the camera. +Creates a camera with the specified camera hash, You can use `SET_CAM_` natives to manipulate the camera. Make sure to call [RENDER_SCRIPT_CAMS](#_0x07E5B515DB0636FC) once the camera is created, or this won't have any visible effect. Take a look at [CREATE_CAM](#_0xC3981DCE61D9E13F) if you would like to see the available camera names. @@ -27,21 +27,24 @@ A camera handle referencing the camera that was created. ## Examples ```lua -local cam = CreateCamera(GetHashKey("DEFAULT_SCRIPTED_CAMERA"), true) -- creates a camera with the "DEFAULT_SCRIPTED_CAMERA" type +-- creates a camera with the "DEFAULT_SCRIPTED_CAMERA" type +local cam = CreateCamera(GetHashKey("DEFAULT_SCRIPTED_CAMERA"), true) RenderScriptCams(true, false, 0, true, true) ``` ```js -const cam = CreateCamera(GetHashKey("DEFAULT_SCRIPTED_CAMERA"), true); // creates a camera with the "DEFAULT_SCRIPTED_CAMERA" type +// creates a camera with the "DEFAULT_SCRIPTED_CAMERA" type +const cam = CreateCamera(GetHashKey("DEFAULT_SCRIPTED_CAMERA"), true); RenderScriptCams(true, false, 0, true, true) ``` ```cs using static CitizenFX.Core.Native.API; -// ... -int cam = CreateCamera(GetHashKey("DEFAULT_SCRIPTED_CAMERA"), true); // creates a camera with the "DEFAULT_SCRIPTED_CAMERA" type + +// creates a camera with the "DEFAULT_SCRIPTED_CAMERA" type +int cam = CreateCamera(GetHashKey("DEFAULT_SCRIPTED_CAMERA"), true); RenderScriptCams(true, false, 0, true, true); ``` diff --git a/CAM/HardAttachCamToEntity.md b/CAM/HardAttachCamToEntity.md index 1ff345aeb..c3e215356 100644 --- a/CAM/HardAttachCamToEntity.md +++ b/CAM/HardAttachCamToEntity.md @@ -31,9 +31,11 @@ NativeDB Introduced: v2189 -- assuming that the obj variable was created earlier in the script local cam = CreateCam("DEFAULT_SCRIPTED_CAMERA", true) -HardAttachCamToEntity(cam, obj, 0.0, 0.0, 90.0, 10.0, 0.0, 0.0, true) -- attaches the camera to the object rotated 90 degrees and offset 10 x values +-- attaches the camera to the object rotated 90 degrees and offset 10 x values +HardAttachCamToEntity(cam, obj, 0.0, 0.0, 90.0, 10.0, 0.0, 0.0, true) -RenderScriptCams(true, false, 0, true, true) -- renders the camera +-- renders the camera +RenderScriptCams(true, false, 0, true, true) ``` @@ -41,9 +43,11 @@ RenderScriptCams(true, false, 0, true, true) -- renders the camera // assuming that the obj variable was created earlier in the script const cam = CreateCam("DEFAULT_SCRIPTED_CAMERA", true) -HardAttachCamToEntity(cam, obj, 0.0, 0.0, 90.0, 10.0, 0.0, 0.0, true) // attaches the camera to the object rotated 90 degrees and offset 10 x values +// attaches the camera to the object rotated 90 degrees and offset 10 x values +HardAttachCamToEntity(cam, obj, 0.0, 0.0, 90.0, 10.0, 0.0, 0.0, true) -RenderScriptCams(true, false, 0, true, true) // renders the camera +// renders the camera +RenderScriptCams(true, false, 0, true, true) ``` ```cs @@ -52,7 +56,9 @@ using static CitizenFX.Core.Native.API; // assuming that the obj variable was created earlier in the script int cam = CreateCam("DEFAULT_SCRIPTED_CAMERA", true); -HardAttachCamToEntity(cam, obj, 0.0f, 0.0f, 90.0f, 10.0f, 0.0f, 0.0f, true); // attaches the camera to the object rotated 90 degrees and offset 10 x values +// attaches the camera to the object rotated 90 degrees and offset 10 x values +HardAttachCamToEntity(cam, obj, 0.0f, 0.0f, 90.0f, 10.0f, 0.0f, 0.0f, true); -RenderScriptCams(true, false, 0, true, true); // renders the camera -``` \ No newline at end of file +// renders the camera +RenderScriptCams(true, false, 0, true, true); +``` diff --git a/CAM/HardAttachCamToPedBone.md b/CAM/HardAttachCamToPedBone.md index 72f42736d..b43a07e6a 100644 --- a/CAM/HardAttachCamToPedBone.md +++ b/CAM/HardAttachCamToPedBone.md @@ -19,7 +19,7 @@ NativeDB Introduced: v1180 ## Parameters * **cam**: The camera handle. * **ped**: The ped handle. -* **boneIndex**: This is different to boneID, use ['GET_PED_BONE_INDEX'](#_0x3F428D08BE5AAE31) to get the index from the ID. use the index for attaching to specific bones. `cam` will be attached to the center of `ped` if bone index given doesn't correspond to bone indexes for that entity type. +* **boneIndex**: This is different to boneID, use [`GET_PED_BONE_INDEX`](#_0x3F428D08BE5AAE31) to get the index from the ID. use the index for attaching to specific bones. `cam` will be attached to the center of `ped` if bone index given doesn't correspond to bone indexes for that entity type. * **xRot**: X-axis rotation. * **yRot**: Y-axis rotation. * **zRot**: Z-axis rotation. @@ -35,9 +35,11 @@ local ped = PlayerPedId() local cam = CreateCam("DEFAULT_SCRIPTED_CAMERA", true) local BONETAG_L_FINGER01 = 4089 -HardAttachCamToPedBone(cam, ped, BONETAG_L_FINGER01, 90.0, 0.0, 0.0, 0.0, 0.0, 0.0, true) -- attach it to a finger on the left hand and rotates it 90 degrees on the X-axis +-- attach it to a finger on the left hand and rotates it 90 degrees on the X-axis +HardAttachCamToPedBone(cam, ped, BONETAG_L_FINGER01, 90.0, 0.0, 0.0, 0.0, 0.0, 0.0, true) -RenderScriptCams(true, false, 0, true, true) -- renders the camera +-- renders the camera +RenderScriptCams(true, false, 0, true, true) ``` @@ -46,9 +48,11 @@ const ped = PlayerPedId() const cam = CreateCam("DEFAULT_SCRIPTED_CAMERA", true) const BONETAG_L_FINGER01= 4089 -HardAttachCamToPedBone(cam, ped, BONETAG_L_FINGER01, 90.0, 0.0, 0.0, 0.0, 0.0, 0.0, true) // attach it to a finger on the left hand and rotates it 90 degrees on the X-axis +// attach it to a finger on the left hand and rotates it 90 degrees on the X-axis +HardAttachCamToPedBone(cam, ped, BONETAG_L_FINGER01, 90.0, 0.0, 0.0, 0.0, 0.0, 0.0, true) -RenderScriptCams(true, false, 0, true, true) // renders the camera +// renders the camera +RenderScriptCams(true, false, 0, true, true) ``` ```cs @@ -58,7 +62,9 @@ int ped = PlayerPedId(); int cam = CreateCam("DEFAULT_SCRIPTED_CAMERA", true); int BONETAG_L_FINGER01 = 4089; -HardAttachCamToPedBone(cam, ped, BONETAG_L_FINGER01, 90.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, true); // attach it to a finger on the left hand and rotates it 90 degrees on the X-axis +// attach it to a finger on the left hand and rotates it 90 degrees on the X-axis +HardAttachCamToPedBone(cam, ped, BONETAG_L_FINGER01, 90.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, true); -RenderScriptCams(true, false, 0, true, true); // renders the camera -``` \ No newline at end of file +// renders the camera +RenderScriptCams(true, false, 0, true, true); +``` diff --git a/FILES/GetTattooShopDlcItemData.md b/FILES/GetTattooShopDlcItemData.md index 3d8562717..576271133 100644 --- a/FILES/GetTattooShopDlcItemData.md +++ b/FILES/GetTattooShopDlcItemData.md @@ -27,14 +27,22 @@ Returned struct properties: ```c struct sTattooShopItemValues { - int LockHash; // Lock hash, used with IS_CONTENT_ITEM_LOCKED - int Index; // Unique ID of this slot. It can also be 0. - int CollectionHash; // Collection hash of this tattoo - int PresetHash; // Preset hash of this tattoo - int Cost; // Cost of this tattoo in shops. - int eFacing; // Secondary placement of this tattoo. - int UpdateGroup; // Location of this tattoo on the body (for example, for torso there would be chest upper, stomach, etc) - const char* NameTextLabel; // This tattoo's name in the form of a text label. + // Lock hash, used with IS_CONTENT_ITEM_LOCKED + int LockHash; + // Unique ID of this slot. It can also be 0. + int Index; + // Collection hash of this tattoo + int CollectionHash; + // Preset hash of this tattoo + int PresetHash; + // Cost of this tattoo in shops. + int Cost; + // Secondary placement of this tattoo. + int eFacing; + // Location of this tattoo on the body (for example, for torso there would be chest upper, stomach, etc) + int UpdateGroup; + // This tattoo's name in the form of a text label. + const char* NameTextLabel; }; ``` @@ -48,17 +56,6 @@ struct sTattooShopItemValues A bool indicating that the tattoo data exists in the files. ## Examples -```js -var characterType = 4; // MPFemale. -var tattooIndex = 0; // Value between 0 and GetNumDecorations(characterType). - -var structArray = new Uint32Array(new ArrayBuffer(10 * 8)); - -if (Citizen.invokeNative("0xFF56381874F82086", characterType, tattooIndex, structArray)) -{ - Console.Log(JSON.stringify(structArray)); -} -``` ```lua local function TattooBlobToTable(blob) local LockHash = string.unpack('