Skip to content

Commit 5082e04

Browse files
Fix incomplete events
1 parent 1eba631 commit 5082e04

8 files changed

+87
-54
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
addEventHandler("onClientBrowserInputFocusChanged", root, function(gainedFocus)
2+
iprint(source, "gainedFocus:", gainedFocus)
3+
end)

events/Browser/onClientBrowserInputFocusChanged.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@ parameters:
99
- name: gainedFocus
1010
type: bool
1111
description: true if an input field has been focused, false if it has lost focus.
12-
examples: []
12+
examples:
13+
- path: examples/onClientBrowserInputFocusChanged-1.lua
14+
description: ''
15+
side: client

events/Input/onClientCursorMove.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,15 @@ parameters:
2626
top of the screen.
2727
- name: worldX
2828
type: float
29-
description: MISSING_PARAM_DESC
29+
description: the 3D in-game world X coordinate that the cursor is pointing at.
3030
- name: worldY
3131
type: float
32-
description: MISSING_PARAM_DESC
32+
description: the 3D in-game world Y coordinate that the cursor is pointing at.
3333
- name: worldZ
3434
type: float
35-
description: MISSING_PARAM_DESC
35+
description: the 3D in-game world Z coordinate that the cursor is pointing at.
3636
examples:
3737
- path: examples/onClientCursorMove-1.lua
3838
description: This example creates a text label at the bottom of the screen which
3939
displays the mouse position in pixels.
4040
side: client
41-
incomplete: true

events/Ped/onClientPedWeaponFire.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ parameters:
1818
description: an int ammount of ammo left for this weapon type in clip.
1919
- name: hitX
2020
type: float
21-
description: float world coordinates representing a hit point.
21+
description: float world X coordinate representing the hit point.
2222
- name: hitY
2323
type: float
24-
description: MISSING_PARAM_DESC
24+
description: float world Y coordinate representing the hit point.
2525
- name: hitZ
2626
type: float
27-
description: MISSING_PARAM_DESC
27+
description: float world Z coordinate representing the hit point.
2828
- name: hitElement
2929
type: element
3030
description: an element which was hit by a shot.
@@ -35,4 +35,3 @@ examples:
3535
notes:
3636
- type: info
3737
content: This event is only triggered for peds that are streamed in
38-
incomplete: true

events/Player/onClientPlayerWeaponFire.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,26 @@ parameters:
1919
description: an int amount of ammo left for this weapon type in clip.
2020
- name: hitX
2121
type: float
22-
description: float world coordinates representing a hit point.
22+
description: float world X coordinate representing the hit point.
2323
- name: hitY
2424
type: float
25-
description: MISSING_PARAM_DESC
25+
description: float world Y coordinate representing the hit point.
2626
- name: hitZ
2727
type: float
28-
description: MISSING_PARAM_DESC
28+
description: float world Z coordinate representing the hit point.
2929
- name: hitElement
3030
type: element
3131
description: an element which was hit by a shot.
3232
- name: startX
3333
type: float
34-
description: 'float world coordinates representing the start of the bullet. Note:
34+
description: 'float world X coordinate representing the start of the bullet. Note:
3535
This is not the gun muzzle.'
3636
- name: startY
3737
type: float
38-
description: MISSING_PARAM_DESC
38+
description: float world Y coordinate representing the start of the bullet.
3939
- name: startZ
4040
type: float
41-
description: MISSING_PARAM_DESC
41+
description: float world Z coordinate representing the start of the bullet.
4242
examples:
4343
- path: examples/onClientPlayerWeaponFire-1.lua
4444
description: This example implements custom gunshot sounds.
@@ -56,4 +56,3 @@ notes:
5656
- type: info
5757
content: This does not trigger for any player's melee weapons or for remote player's
5858
projectile weapons or cameras
59-
incomplete: true

events/Player/onPlayerWeaponFire.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,32 @@ source_element:
77
description: This event is called when a player fires a weapon. This does not trigger
88
for projectiles, melee weapons, or camera.
99
parameters:
10-
- name: weapon
10+
- name: weaponID
1111
type: int
1212
description: an int representing weapon used for making a shot.
1313
- name: endX
1414
type: float
15-
description: float world coordinates representing an end point.
15+
description: float world X coordinate representing the end point.
1616
- name: endY
1717
type: float
18-
description: MISSING_PARAM_DESC
18+
description: float world Y coordinate representing the end point.
1919
- name: endZ
2020
type: float
21-
description: MISSING_PARAM_DESC
21+
description: float world Z coordinate representing the end point.
2222
- name: hitElement
2323
type: element
2424
description: 'an element which was hit by a shot. Currently this can be only another
2525
player. Note: hitElement could be incorrect and should not be relied upon.'
2626
- name: startX
2727
type: float
28-
description: 'float world coordinates representing the start of the bullet. Note:
28+
description: 'float world X coordinate representing the start of the bullet. Note:
2929
This is not the gun muzzle.'
3030
- name: startY
3131
type: float
32-
description: MISSING_PARAM_DESC
32+
description: float world Y coordinate representing the start of the bullet.
3333
- name: startZ
3434
type: float
35-
description: MISSING_PARAM_DESC
35+
description: float world Z coordinate representing the start of the bullet.
3636
examples:
3737
- path: examples/onPlayerWeaponFire-1.lua
3838
description: This code creates explosions when the source players shoots.
@@ -41,4 +41,3 @@ notes:
4141
- type: info
4242
content: This event works only with weapons which have enabled bullet sync. See
4343
Weapons for more information.
44-
incomplete: true

events/Vehicle/onClientVehicleCollision.yaml

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,49 @@ parameters:
1717
of this see below)'
1818
- name: bodyPart
1919
type: int
20-
description: the bodypart that hit the other element
20+
description: 'the bodypart that hit the other element
21+
22+
0: Frame
23+
24+
2: Trunk
25+
26+
3: Hood
27+
28+
4: Rear
29+
30+
5: Front left door
31+
32+
6: Front right door
33+
34+
7: Rear left door
35+
36+
8: Rear right door
37+
38+
13: Front Left tyre
39+
40+
14: Front Right tyre
41+
42+
15: Back Left tyre
43+
44+
16: Back Right tyre'
2145
- name: collisionX
2246
type: float
23-
description: MISSING_PARAM_DESC
47+
description: the X coordinate of the position the collision took place
2448
- name: collisionY
2549
type: float
26-
description: MISSING_PARAM_DESC
50+
description: the Y coordinate of the position the collision took place
2751
- name: collisionZ
2852
type: float
29-
description: MISSING_PARAM_DESC
53+
description: the Z coordinate of the position the collision took place
3054
- name: normalX
3155
type: float
32-
description: MISSING_PARAM_DESC
56+
description: the X coordinate of the surface normal of the hit object
3357
- name: normalY
3458
type: float
35-
description: MISSING_PARAM_DESC
59+
description: the Y coordinate of the surface normal of the hit object
3660
- name: normalZ
3761
type: float
38-
description: MISSING_PARAM_DESC
62+
description: the Z coordinate of the surface normal of the hit object
3963
- name: hitElementForce
4064
type: float
4165
description: 0 for non vehicles or the force of the other vehicle
@@ -53,4 +77,3 @@ examples:
5377
notes:
5478
- type: info
5579
content: This event is only triggered for vehicles that are streamed in
56-
incomplete: true

web/src/pages/Incomplete_Pages.astro

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,41 @@ const unfinishedEvents = getUnfinishedPages('events');
1717
class="guidelines-link">Contribution guidelines</a></p>
1818

1919
<h3>Unfinished Function Pages</h3>
20-
<p>These functions (part of the MTA Lua API) are <strong>missing documentation or code examples</strong>:</p>
2120
<section>
22-
<details>
23-
<summary>Total: {unfinishedFunctions.length}</summary>
24-
<ul>
25-
{unfinishedFunctions.map((func) => (
26-
<li>
27-
<a href={`/reference/${func}`}>{func}</a>
28-
</li>
29-
))}
30-
</ul>
31-
</details>
21+
{unfinishedFunctions.length === 0 ? (
22+
<p>There are currently no unfinished function pages 😄</p>
23+
) : (
24+
<p>These functions (part of the MTA Lua API) are <strong>missing documentation or code examples</strong>:</p>
25+
<details>
26+
<summary>Total: {unfinishedFunctions.length}</summary>
27+
<ul>
28+
{unfinishedFunctions.map((func) => (
29+
<li>
30+
<a href={`/reference/${func}`}>{func}</a>
31+
</li>
32+
))}
33+
</ul>
34+
</details>
35+
)}
3236
</section>
3337

3438
<h3>Unfinished Event Pages</h3>
35-
<p>These events (part of the MTA Lua API) are <strong>missing documentation or code examples</strong>:</p>
3639
<section>
37-
<details>
38-
<summary>Total: {unfinishedEvents.length}</summary>
39-
<ul>
40-
{unfinishedEvents.map((event) => (
41-
<li>
42-
<a href={`/reference/${event}`}>{event}</a>
43-
</li>
44-
))}
45-
</ul>
46-
</details>
40+
{unfinishedEvents.length === 0 ? (
41+
<p>There are currently no unfinished event pages 😄</p>
42+
) : (
43+
<p>These events (part of the MTA Lua API) are <strong>missing documentation or code examples</strong>:</p>
44+
<details>
45+
<summary>Total: {unfinishedEvents.length}</summary>
46+
<ul>
47+
{unfinishedEvents.map((event) => (
48+
<li>
49+
<a href={`/reference/${event}`}>{event}</a>
50+
</li>
51+
))}
52+
</ul>
53+
</details>
54+
)}
4755
</section>
4856

4957
</StarlightPage>

0 commit comments

Comments
 (0)