Skip to content

Commit

Permalink
pr cleanup (#567)
Browse files Browse the repository at this point in the history
Closes #481
Closes #482
Closes #488
Closes #491
Closes #510
Closes #511
Closes #518
Closes #521
Closes #522
Closes #524
Closes #528
Closes #529
Closes #530
Closes #533
Closes #536
Closes #541
Closes #542
Closes #543
Closes #545
Closes #547
Closes #548
Closes #552
Closes #554
  • Loading branch information
gottfriedleibniz authored Sep 23, 2021
1 parent ad40857 commit 4e48fd0
Show file tree
Hide file tree
Showing 44 changed files with 310 additions and 300 deletions.
6 changes: 3 additions & 3 deletions CAM/PlaySynchronizedCamAnim.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ns: CAM

```c
// 0xE32EFE9AB4A9AA0C 0x9458459E
BOOL PLAY_SYNCHRONIZED_CAM_ANIM(Any p0, Any p1, char* animName, char* animDictionary);
BOOL PLAY_SYNCHRONIZED_CAM_ANIM(Cam camera, int scene, char* animName, char* animDictionary);
```
```
Expand All @@ -17,8 +17,8 @@ CAM::PLAY_SYNCHRONIZED_CAM_ANIM(l_F0D[7/*1*/], l_F4D[15/*1*/], "ah3b_attackheli_
[Animations list](https://alexguirre.github.io/animations-list/)
## Parameters
* **p0**:
* **p1**:
* **camera**:
* **scene**:
* **animName**:
* **animDictionary**:
Expand Down
22 changes: 19 additions & 3 deletions CAM/SetCamParams.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ns: CAM

```c
// 0xBFD8727AEA3CCEBA 0x2167CEBF
void SET_CAM_PARAMS(Cam cam, float posX, float posY, float posZ, float rotX, float rotY, float rotZ, float fieldOfView, Any p8, int p9, int p10, int p11);
void SET_CAM_PARAMS(Cam cam, float posX, float posY, float posZ, float rotX, float rotY, float rotZ, float fieldOfView, int transitionSpeed, int p9, int p10, int rotationOrder);
```
Expand All @@ -18,8 +18,24 @@ void SET_CAM_PARAMS(Cam cam, float posX, float posY, float posZ, float rotX, flo
* **rotY**:
* **rotZ**:
* **fieldOfView**:
* **p8**:
* **transitionSpeed**: The speed of transition/interpolation to these new values
* **p9**:
* **p10**:
* **p11**:
* **rotationOrder**: The order of rotation, see [`GET_ENTITY_ROTATION`](#_0xAFBD61CC738D9EB9)
### Examples
```lua
-- This is recreating the above mentioned heli transition from finale_heist2a.c
local cam = CreateCameraWithParams('DEFAULT_SCRIPTED_CAMERA', -1659.574, -707.8544, 29.23778, -7.422939, 0.059666, -117.3886, 43.0557, false, 2)
SetCamActive(cam, true)
RenderScriptCams(true, false, 3000, true, false, false)
SetCamParams(cam, -1660.919, -710.7487, 28.88381, -7.50235, 0.059666, -111.7328, 43.0557, 9100, 0, 0, 2);
```

```js
// This is recreating the above mentioned heli transition from finale_heist2a.c
let cam = CreateCameraWithParams('DEFAULT_SCRIPTED_CAMERA', -1659.574, -707.8544, 29.23778, -7.422939, 0.059666, -117.3886, 43.0557, false, 2)
SetCamActive(cam, true)
RenderScriptCams(true, false, 3000, true, false, false)
SetCamParams(cam, -1660.919, -710.7487, 28.88381, -7.50235, 0.059666, -111.7328, 43.0557, 9100, 0, 0, 2);
```
8 changes: 4 additions & 4 deletions GRAPHICS/CreateCheckpoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ ns: GRAPHICS

```c
// 0x0134F0835AB6BFCB 0xF541B690
int CREATE_CHECKPOINT(int type, float posX1, float posY1, float posZ1, float posX2, float posY2, float posZ2, float radius, int red, int green, int blue, int alpha, int reserved);
int CREATE_CHECKPOINT(int type, float posX1, float posY1, float posZ1, float posX2, float posY2, float posZ2, float diameter, int red, int green, int blue, int alpha, int reserved);
```
```
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.
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.
* diameter - The diameter 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 (prior to game build 2189):
Expand Down Expand Up @@ -55,7 +55,7 @@ If using type 42-44, reserved sets number / number and shape to display
* **posX2**:
* **posY2**:
* **posZ2**:
* **radius**:
* **diameter**:
* **red**:
* **green**:
* **blue**:
Expand Down
17 changes: 15 additions & 2 deletions HUD/AddTextComponentFloat.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,21 @@ ns: HUD
void ADD_TEXT_COMPONENT_FLOAT(float value, int decimalPlaces);
```
Adds a float to a text component placeholder, replacing `~1~` in the current text command's text label.
![Example output](https://i.imgur.com/jvuQ0II.png)
## Parameters
* **value**:
* **decimalPlaces**:
* **value**: The number to substitute in the label.
* **decimalPlaces**: How many decimal places to add
## Examples
```lua
-- on initialization
AddTextEntry('TEST_LABEL', 'Label: ~1~')
-- when drawing
BeginTextCommandThefeedPost('TEST_LABEL')
AddTextComponentFloat(1000.0, 2)
EndTextCommandThefeedPostTicker(false, true)
```
16 changes: 14 additions & 2 deletions HUD/AddTextComponentFormattedInteger.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@ void ADD_TEXT_COMPONENT_FORMATTED_INTEGER(int value, BOOL commaSeparated);
## Parameters
* **value**:
* **commaSeparated**:
* **value**: The integer to add to the string
* **commaSeparated**: Whether or not to add comma seperators. So if true 1000 would become 1,000.
Adds a formatted integer as a text component placeholder, replacing ~a~ in the current text command's text label.
## Examples
```lua
-- on initialization
AddTextEntry('TEST_LABEL', '€~a~')
-- when drawing
BeginTextCommandThefeedPost('TEST_LABEL')
AddTextComponentFormattedInteger(1000, true)
EndTextCommandThefeedPostTicker(false, true)
```
8 changes: 4 additions & 4 deletions HUD/DisplayCash.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ ns: HUD

```c
// 0x96DEC8D5430208B7 0x0049DF83
void DISPLAY_CASH(BOOL toggle);
void DISPLAY_CASH(BOOL display);
```
```
"DISPLAY_CASH(false);" makes the cash amount render on the screen when appropriate
"DISPLAY_CASH(true);" disables cash amount rendering
"DISPLAY_CASH(true);" makes the cash amount render on the screen when appropriate
"DISPLAY_CASH(false);" disables cash amount rendering
```
## Parameters
* **toggle**:
* **display**:
2 changes: 1 addition & 1 deletion HUD/SetBigmapActive.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ void SET_BIGMAP_ACTIVE(BOOL toggleBigMap, BOOL showFullMap);
Toggles the big minimap state like in GTA:Online.
To get the current state of the minimap, use [`GetBigmapActive`](#_0xF6AE18A7).
To get the current state of the minimap, use [`IS_BIGMAP_ACTIVE`](#_0xFFF65C63).
## Parameters
* **toggleBigMap**: Enable or disable the expanded minimap.
Expand Down
46 changes: 1 addition & 45 deletions HUD/SetBlipColour.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,51 +8,7 @@ ns: HUD
void SET_BLIP_COLOUR(Blip blip, int color);
```
```
(Hex code are approximate)
0: White (#fefefe)
1: Red (#e03232)
2: Green (#71cb71)
3: Blue (#5db6e5)
4: White (#fefefe)
5: Taxi Yellow (#eec64e)
6: Light Red (#c25050)
7: Violet (#9c6eaf)
8: Pink (#fe7ac3)
9: Light Orange (#f59d79)
10: Light Brown (#b18f83)
11: Light Green (#8dcea7)
12: Light Blue (Teal) (#70a8ae)
13: Very Light Purple (#d3d1e7)
14: Dark Purple (#8f7e98)
15: Cyan (#6ac4bf)
16: Light Yellow (#d5c398)
17: Orange (#ea8e50)
18: Light Blue (#97cae9)
19: Dark Pink (#b26287)
20: Dark Yellow (#8f8d79)
21: Dark Orange (#a6755e)
22: Light Gray (#afa8a8)
23: Light Pink (#e78d9a)
24: Lemon Green (#bbd65b)
25: Forest Green (#0c7b56)
26: Electric Blue (#7ac3fe)
27: Bright Purple (#ab3ce6)
28: Dark Taxi Yellow (#cda80c)
29: Dark Blue (#4561ab)
30: Dark Cyan (#29a5b8)
31: Light Brown (#b89b7b)
32: Very Light Blue (#c8e0fe)
33: Light Yellow (#f0f096)
34: Light Pink (#ed8ca1)
35: Light Red (#f98a8a)
36: Light Yellow (#fbeea5)
37: White (#fefefe)
38: Blue (#2c6db8)
39: Light Gray (#9a9a9a)
40: Dark Gray (#4c4c4c)
Certainly a lot more remaining.
```
See https://docs.fivem.net/docs/game-references/blips/#BlipColors
## Parameters
* **blip**:
Expand Down
24 changes: 21 additions & 3 deletions HUD/SetBlipFlashInterval.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,29 @@ ns: HUD

```c
// 0xAA51DB313C010A7E 0xEAF67377
void SET_BLIP_FLASH_INTERVAL(Blip blip, Any p1);
void SET_BLIP_FLASH_INTERVAL(Blip blip, int interval);
```
Sets the interval in milliseconds before flashing the blip.
## Parameters
* **blip**:
* **p1**:
* **blip**: The blip to change flashing interval
* **interval**: Interval in milliseconds before flashing the blip
## Examples
```lua
local blip = AddBlipForCoord(0, 0, 0)
SetBlipFlashes(blip, true)
-- flash the blip every 50ms
SetBlipFlashInterval(blip, 50)
```
```js
const blip = AddBlipForCoord(0, 0, 0)

SetBlipFlashes(blip, true)

// flash the blip every 50ms
SetBlipFlashInterval(blip, 50)
```
22 changes: 17 additions & 5 deletions HUD/SetBlipFlashTimer.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,23 @@ ns: HUD
void SET_BLIP_FLASH_TIMER(Blip blip, int duration);
```
```
Adds up after viewing multiple R* scripts. I believe that the duration is in miliseconds.
```
Flashes blip for time in milliseconds before stopping.
## Parameters
* **blip**:
* **duration**:
* **blip**: The blip to start flashing
* **duration**: Time in milliseconds to flash the blip before stopping
## Examples
```lua
local blip = AddBlipForCoord(0, 0, 0)
-- flash blip for seven seconds then stop
SetBlipFlashTimer(blip, 7000)
```

```js
const blip = AddBlipForCoord(0, 0, 0)

//flash blip for seven seconds then stop
SetBlipFlashTimer(blip, 7000)
```
19 changes: 0 additions & 19 deletions NETWORK/N_0xcae55f48d3d7875c.md

This file was deleted.

16 changes: 16 additions & 0 deletions NETWORK/NetworkAddSynchronisedSceneCamera.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
ns: NETWORK
aliases: ["0xCF8BD3B0BD6D42D7","_NETWORK_FORCE_LOCAL_USE_OF_SYNCED_SCENE_CAMERA"]
---
## NETWORK_ADD_SYNCHRONISED_SCENE_CAMERA

```c
// 0xCF8BD3B0BD6D42D7 0xBFFE8B5C
void NETWORK_ADD_SYNCHRONISED_SCENE_CAMERA(int netScene, char* animDict, char* animName);
```
## Parameters
* **netScene**:
* **animDict**:
* **animName**:
19 changes: 0 additions & 19 deletions NETWORK/NetworkConvertSynchronisedSceneToSynchronizedScene.md

This file was deleted.

17 changes: 0 additions & 17 deletions NETWORK/NetworkForceLocalUseOfSyncedSceneCamera.md

This file was deleted.

15 changes: 15 additions & 0 deletions NETWORK/NetworkGetLocalSceneFromNetworkId.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
ns: NETWORK
aliases: ["0x02C40BF885C567B6","_NETWORK_UNLINK_NETWORKED_SYNCHRONISED_SCENE","_NETWORK_CONVERT_SYNCHRONISED_SCENE_TO_SYNCHRONIZED_SCENE"]
---
## NETWORK_GET_LOCAL_SCENE_FROM_NETWORK_ID

```c
// 0x02C40BF885C567B6 0x16AED87B
int NETWORK_GET_LOCAL_SCENE_FROM_NETWORK_ID(int netId);
```
## Parameters
* **netId**:
## Return value
14 changes: 14 additions & 0 deletions NETWORK/NetworkSessionAddActiveMatchmakingGroup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
ns: NETWORK
aliases: ["0xCAE55F48D3D7875C"]
---
## NETWORK_SESSION_ADD_ACTIVE_MATCHMAKING_GROUP

```c
// 0xCAE55F48D3D7875C 0x5BE529F7
void NETWORK_SESSION_ADD_ACTIVE_MATCHMAKING_GROUP(int groupId);
```
## Parameters
* **groupId**: An identifier value between zero and four
4 changes: 2 additions & 2 deletions NETWORK/SetEntityLocallyVisible.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ Sets the provided entity visible for yourself for the current frame.
CreateThread(function()
-- Any random entity should work
local entity = GetVehiclePedIsIn(PlayerPedId(), false)
-- Sets the entity not visible to other players
SetEntityVisible(entity, false)
while true do
Wait(0)
-- Sets the entity not visible to other players
SetEntityVisible(entity, false, false)
-- Sets the entity as visible for yourself
SetEntityLocallyVisible(entity)
end
Expand Down
Loading

0 comments on commit 4e48fd0

Please sign in to comment.