From cf1e1400e47fd4e48a46e139a8ef997e2ed76903 Mon Sep 17 00:00:00 2001 From: DerDevHD <59358798+DerDevHD@users.noreply.github.com> Date: Fri, 27 Jan 2023 19:00:53 +0100 Subject: [PATCH 1/7] Done some research on the parameters --- HUD/SetFloatingHelpTextStyle.md | 45 ++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/HUD/SetFloatingHelpTextStyle.md b/HUD/SetFloatingHelpTextStyle.md index f2c7e542b..ba077934b 100644 --- a/HUD/SetFloatingHelpTextStyle.md +++ b/HUD/SetFloatingHelpTextStyle.md @@ -6,14 +6,45 @@ aliases: ["0x788E7FD431BD67F1"] ```c // 0x788E7FD431BD67F1 0x97852A82 -void SET_FLOATING_HELP_TEXT_STYLE(int hudIndex, int p1, int p2, int p3, int p4, int p5); +void SET_FLOATING_HELP_TEXT_STYLE(int hudIndex, int style, int hudColor, int p3, int arrowPosition, int boxOffset); ``` +Needs to be called every frame + +## Arrow Positions +0 = OFF +1 = TOP +2 = LEFT +3 = BOTTOM +4 = RIGHT + +Note: anything above 4 will result in a right arrow + +## Example +```lua +function DisplayHelpText(string) + BeginTextCommandDisplayHelp("STRING") + AddTextComponentSubstringPlayerName(string) + EndTextCommandDisplayHelp(1, 0, 0, 0) +end + +CreateThread(function() + while true do + Wait(0) + + local Ped = PlayerPedId() + + DisplayHelpText('Example Text') + SetFloatingHelpTextStyle(0, 2, 2, 0, 3, 0) + SetFloatingHelpTextToEntity(0, Ped, 0, 0) + end +end) +``` +![](https://derdevhd.live/media/example.png) ## Parameters * **hudIndex**: -* **p1**: -* **p2**: -* **p3**: -* **p4**: -* **p5**: - +* **style**: 0: No arrow at all. 1, 2 and -2 are all the same and displaying a arrow (if specified) +* **hudColor**: https://docs.fivem.net/docs/game-references/hud-colors/ +* **p3**: No use case. Always 191 in R* scripts +* **arrowPosition**: Used to set the arrow positon. Default is off +* **boxOffset**: Offset for the floating help box. Important: Arrow stays fixed on its position From 04c76edf11485edeb1a491ac4e1ea9fc39394eee Mon Sep 17 00:00:00 2001 From: DerDevHD <59358798+DerDevHD@users.noreply.github.com> Date: Fri, 27 Jan 2023 19:06:43 +0100 Subject: [PATCH 2/7] Update SetFloatingHelpTextStyle.md --- HUD/SetFloatingHelpTextStyle.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/HUD/SetFloatingHelpTextStyle.md b/HUD/SetFloatingHelpTextStyle.md index ba077934b..007a23c85 100644 --- a/HUD/SetFloatingHelpTextStyle.md +++ b/HUD/SetFloatingHelpTextStyle.md @@ -8,7 +8,14 @@ aliases: ["0x788E7FD431BD67F1"] // 0x788E7FD431BD67F1 0x97852A82 void SET_FLOATING_HELP_TEXT_STYLE(int hudIndex, int style, int hudColor, int p3, int arrowPosition, int boxOffset); ``` -Needs to be called every frame + +## Parameters +* **hudIndex**: +* **style**: 0: No arrow at all. 1, 2 and -2 are all the same and displaying a arrow (if specified) +* **hudColor**: https://docs.fivem.net/docs/game-references/hud-colors/ +* **p3**: No use case. Always 191 in R* scripts +* **arrowPosition**: Used to set the arrow positon. Default is off +* **boxOffset**: Offset for the floating help box. Important: Arrow stays fixed on its position ## Arrow Positions 0 = OFF @@ -19,6 +26,9 @@ Needs to be called every frame Note: anything above 4 will result in a right arrow +## Important +Needs to be called every frame + ## Example ```lua function DisplayHelpText(string) @@ -40,11 +50,3 @@ CreateThread(function() end) ``` ![](https://derdevhd.live/media/example.png) - -## Parameters -* **hudIndex**: -* **style**: 0: No arrow at all. 1, 2 and -2 are all the same and displaying a arrow (if specified) -* **hudColor**: https://docs.fivem.net/docs/game-references/hud-colors/ -* **p3**: No use case. Always 191 in R* scripts -* **arrowPosition**: Used to set the arrow positon. Default is off -* **boxOffset**: Offset for the floating help box. Important: Arrow stays fixed on its position From e54b8fcb35ae35824ad1e90d8df83cb6a957ce70 Mon Sep 17 00:00:00 2001 From: DerDevHD Date: Sun, 23 Jul 2023 18:36:23 +0200 Subject: [PATCH 3/7] Update SetFloatingHelpTextStyle.md --- HUD/SetFloatingHelpTextStyle.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/HUD/SetFloatingHelpTextStyle.md b/HUD/SetFloatingHelpTextStyle.md index 007a23c85..d83dbcc6f 100644 --- a/HUD/SetFloatingHelpTextStyle.md +++ b/HUD/SetFloatingHelpTextStyle.md @@ -10,21 +10,22 @@ void SET_FLOATING_HELP_TEXT_STYLE(int hudIndex, int style, int hudColor, int p3, ``` ## Parameters -* **hudIndex**: -* **style**: 0: No arrow at all. 1, 2 and -2 are all the same and displaying a arrow (if specified) +* **hudIndex**: The hud index for the floating help message +* **style**: Value 0 won't show an arrow at all. Values 1, 2 and -2 will display an arrow. * **hudColor**: https://docs.fivem.net/docs/game-references/hud-colors/ * **p3**: No use case. Always 191 in R* scripts -* **arrowPosition**: Used to set the arrow positon. Default is off -* **boxOffset**: Offset for the floating help box. Important: Arrow stays fixed on its position +* **arrowPosition**: Used to set the arrow positon. No value will hide the arrow +* **boxOffset**: Offset for the floating help box. Note: Arrow stays fixed ## Arrow Positions -0 = OFF -1 = TOP -2 = LEFT -3 = BOTTOM -4 = RIGHT +* 0 = Off / No arrow +* 1 = Top +* 2 = Left +* 3 = Bottom +* 4 = Right -Note: anything above 4 will result in a right arrow +### Note +Any numeric value greater than 4 will result in a right arrow (Index 4) ## Important Needs to be called every frame @@ -34,7 +35,7 @@ Needs to be called every frame function DisplayHelpText(string) BeginTextCommandDisplayHelp("STRING") AddTextComponentSubstringPlayerName(string) - EndTextCommandDisplayHelp(1, 0, 0, 0) + EndTextCommandDisplayHelp(1, false, false, 0) end CreateThread(function() @@ -49,4 +50,4 @@ CreateThread(function() end end) ``` -![](https://derdevhd.live/media/example.png) +![](todo) From a81e9a50789bcd5cdd8b093b0cd33a3682eb01ab Mon Sep 17 00:00:00 2001 From: DerDevHD Date: Tue, 17 Oct 2023 20:53:25 +0200 Subject: [PATCH 4/7] Made requested changes Thanks for reaching out to me --- HUD/SetFloatingHelpTextStyle.md | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/HUD/SetFloatingHelpTextStyle.md b/HUD/SetFloatingHelpTextStyle.md index d83dbcc6f..446f33464 100644 --- a/HUD/SetFloatingHelpTextStyle.md +++ b/HUD/SetFloatingHelpTextStyle.md @@ -6,18 +6,18 @@ aliases: ["0x788E7FD431BD67F1"] ```c // 0x788E7FD431BD67F1 0x97852A82 -void SET_FLOATING_HELP_TEXT_STYLE(int hudIndex, int style, int hudColor, int p3, int arrowPosition, int boxOffset); +void SET_FLOATING_HELP_TEXT_STYLE(int hudIndex, int style, int hudColor, int alpha, int arrowPosition, int boxOffset); ``` ## Parameters * **hudIndex**: The hud index for the floating help message * **style**: Value 0 won't show an arrow at all. Values 1, 2 and -2 will display an arrow. * **hudColor**: https://docs.fivem.net/docs/game-references/hud-colors/ -* **p3**: No use case. Always 191 in R* scripts +* **alpha**: Value for the help box opacity, from 0-255. Anything greater will simply ignore the alpha value. Always 191 in R* scripts. * **arrowPosition**: Used to set the arrow positon. No value will hide the arrow * **boxOffset**: Offset for the floating help box. Note: Arrow stays fixed -## Arrow Positions +### Arrow Positions * 0 = Off / No arrow * 1 = Top * 2 = Left @@ -27,10 +27,10 @@ void SET_FLOATING_HELP_TEXT_STYLE(int hudIndex, int style, int hudColor, int p3, ### Note Any numeric value greater than 4 will result in a right arrow (Index 4) -## Important +### Important Needs to be called every frame -## Example +## Examples ```lua function DisplayHelpText(string) BeginTextCommandDisplayHelp("STRING") @@ -50,4 +50,20 @@ CreateThread(function() end end) ``` -![](todo) + +```js +function DisplayHelpText(string) { + BeginTextCommandDisplayHelp("STRING") + AddTextComponentSubstringPlayerName(string) + EndTextCommandDisplayHelp(1, false, false, 0) +} + +setTick(() => { + const Ped = PlayerPedId() + + DisplayHelpText('Example Text') + SetFloatingHelpTextStyle(0, 2, 2, 0, 3, 0) + SetFloatingHelpTextToEntity(0, Ped, 0, 0) +}) +``` +![Preview of the example above](https://i.ibb.co/9p7VWDW/image.png) From 920429ba94fe9b983fbe5b0e6851e5f251711b9b Mon Sep 17 00:00:00 2001 From: DerDevHD Date: Tue, 17 Oct 2023 20:58:13 +0200 Subject: [PATCH 5/7] Lower the resolution for the preview image --- HUD/SetFloatingHelpTextStyle.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HUD/SetFloatingHelpTextStyle.md b/HUD/SetFloatingHelpTextStyle.md index 446f33464..4de1b3f78 100644 --- a/HUD/SetFloatingHelpTextStyle.md +++ b/HUD/SetFloatingHelpTextStyle.md @@ -66,4 +66,4 @@ setTick(() => { SetFloatingHelpTextToEntity(0, Ped, 0, 0) }) ``` -![Preview of the example above](https://i.ibb.co/9p7VWDW/image.png) +![Preview of the example above](https://i.ibb.co/G97hPn7/Image.png) From d2bd23c6041a8298b85f8c8f4714551d60e32344 Mon Sep 17 00:00:00 2001 From: DerDevHD Date: Wed, 18 Oct 2023 21:11:40 +0200 Subject: [PATCH 6/7] Update SetFloatingHelpTextStyle.md --- HUD/SetFloatingHelpTextStyle.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/HUD/SetFloatingHelpTextStyle.md b/HUD/SetFloatingHelpTextStyle.md index 4de1b3f78..1d06495c7 100644 --- a/HUD/SetFloatingHelpTextStyle.md +++ b/HUD/SetFloatingHelpTextStyle.md @@ -9,14 +9,6 @@ aliases: ["0x788E7FD431BD67F1"] void SET_FLOATING_HELP_TEXT_STYLE(int hudIndex, int style, int hudColor, int alpha, int arrowPosition, int boxOffset); ``` -## Parameters -* **hudIndex**: The hud index for the floating help message -* **style**: Value 0 won't show an arrow at all. Values 1, 2 and -2 will display an arrow. -* **hudColor**: https://docs.fivem.net/docs/game-references/hud-colors/ -* **alpha**: Value for the help box opacity, from 0-255. Anything greater will simply ignore the alpha value. Always 191 in R* scripts. -* **arrowPosition**: Used to set the arrow positon. No value will hide the arrow -* **boxOffset**: Offset for the floating help box. Note: Arrow stays fixed - ### Arrow Positions * 0 = Off / No arrow * 1 = Top @@ -30,6 +22,16 @@ Any numeric value greater than 4 will result in a right arrow (Index 4) ### Important Needs to be called every frame +![Preview of the provided example code](https://i.ibb.co/G97hPn7/Image.png) + +## Parameters +* **hudIndex**: The hud index for the floating help message +* **style**: Value 0 won't show an arrow at all. Values 1, 2 and -2 will display an arrow. +* **hudColor**: https://docs.fivem.net/docs/game-references/hud-colors/ +* **alpha**: Value for the help box opacity, from 0-255. Anything greater will simply ignore the alpha value. Always 191 in R* scripts. +* **arrowPosition**: Used to set the arrow positon. No value will hide the arrow +* **boxOffset**: Offset for the floating help box. Note: Arrow stays fixed + ## Examples ```lua function DisplayHelpText(string) @@ -66,4 +68,3 @@ setTick(() => { SetFloatingHelpTextToEntity(0, Ped, 0, 0) }) ``` -![Preview of the example above](https://i.ibb.co/G97hPn7/Image.png) From f283e64342f40e6db830d240764f0a128b53b430 Mon Sep 17 00:00:00 2001 From: DerDevHD Date: Wed, 18 Oct 2023 21:14:07 +0200 Subject: [PATCH 7/7] Upload the image to the forums --- HUD/SetFloatingHelpTextStyle.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HUD/SetFloatingHelpTextStyle.md b/HUD/SetFloatingHelpTextStyle.md index 1d06495c7..d1d0a4523 100644 --- a/HUD/SetFloatingHelpTextStyle.md +++ b/HUD/SetFloatingHelpTextStyle.md @@ -22,7 +22,7 @@ Any numeric value greater than 4 will result in a right arrow (Index 4) ### Important Needs to be called every frame -![Preview of the provided example code](https://i.ibb.co/G97hPn7/Image.png) +![Preview of the provided example code](https://forum.cfx.re/uploads/default/original/4X/7/f/3/7f319bc93c3a00b8829bd4ac8dddc235fbf3a9ef.png) ## Parameters * **hudIndex**: The hud index for the floating help message