Skip to content

Commit 36fd039

Browse files
Add auto-parsed functions all marked as needing review
1 parent c86d7c2 commit 36fd039

File tree

1,199 files changed

+22957
-2388
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,199 files changed

+22957
-2388
lines changed

functions/Camera/fadeCamera.yaml

Lines changed: 81 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,95 @@
11
# Scraped from: https://wiki.multitheftauto.com/wiki/FadeCamera
2+
client:
3+
name: fadeCamera
4+
description: This function will fade a player's camera to a color or back to normal
5+
over a specified time period. This will also affect the sound volume for the player
6+
(50% faded \= 50% volume, full fade \= no sound). For clientside scripts you can
7+
perform 2 fade ins or fade outs in a row, but for serverside scripts you must
8+
use one then the other.
9+
parameters:
10+
- name: fadeIn
11+
type: bool
12+
description: Should the camera be faded in our out? Pass true to fade the camera
13+
in, false to fade it out to a color.
14+
- name: timeToFade
15+
type: float
16+
description: The number of seconds it should take to fade.
17+
default: '1.0'
18+
- name: red
19+
type: int
20+
description: The amount of red in the color that the camera fades out to (0 -
21+
255). Not required for fading in.
22+
default: '0'
23+
- name: green
24+
type: int
25+
description: The amount of green in the color that the camera fades out to (0
26+
- 255). Not required for fading in.
27+
default: '0'
28+
- name: blue
29+
type: int
30+
description: The amount of blue in the color that the camera fades out to (0 -
31+
255). Not required for fading in.
32+
default: '0'
33+
examples: []
34+
returns:
35+
values:
36+
- type: bool
37+
name: value
38+
description: Returns true if the camera was faded successfully, false if invalid
39+
arguments were passed to the function.
40+
oop: &id001
41+
element: player
42+
method: fadeCamera
43+
static: false
44+
notes: &id002
45+
- type: info
46+
content: The speed of the effect depends directly on the current gamespeed.
47+
requires_review: true
248
server:
349
name: fadeCamera
450
description: This function will fade a player's camera to a color or back to normal
551
over a specified time period. This will also affect the sound volume for the player
652
(50% faded \= 50% volume, full fade \= no sound). For clientside scripts you can
753
perform 2 fade ins or fade outs in a row, but for serverside scripts you must
854
use one then the other.
9-
parameters: []
55+
parameters:
56+
- name: thePlayer
57+
type: player
58+
description: The player whose camera you wish to fade.
59+
- name: fadeIn
60+
type: bool
61+
description: Should the camera be faded in or out? Pass true to fade the camera
62+
in, false to fade it out to a color.
63+
- name: timeToFade
64+
type: float
65+
description: The number of seconds it should take to fade.
66+
default: '1.0'
67+
- name: red
68+
type: int
69+
description: The amount of red in the color that the camera fades out to (0 -
70+
255). Not required for fading in.
71+
default: '0'
72+
- name: green
73+
type: int
74+
description: The amount of green in the color that the camera fades out to (0
75+
- 255). Not required for fading in.
76+
default: '0'
77+
- name: blue
78+
type: int
79+
description: The amount of blue in the color that the camera fades out to (0 -
80+
255). Not required for fading in.
81+
default: '0'
1082
examples:
1183
- path: examples/fadeCamera-1.lua
1284
description: When a player gets damaged, place a quick fade-to-red effect on his
1385
screen.
1486
side: server
15-
notes:
16-
- type: info
17-
content: The speed of the effect depends directly on the current gamespeed.
87+
returns:
88+
values:
89+
- type: bool
90+
name: value
91+
description: Returns true if the camera was faded successfully, false if invalid
92+
arguments were passed to the function.
93+
oop: *id001
94+
notes: *id002
1895
requires_review: true

functions/Camera/getCamera.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Scraped from: https://wiki.multitheftauto.com/wiki/GetCamera
2-
client:
2+
shared:
33
name: getCamera
44
description: This function returns an [element](/wiki/Element "Element") that corresponds
55
to the game camera
@@ -8,6 +8,11 @@ client:
88
- path: examples/getCamera-1.lua
99
description: This example attaches (fixes) the camera to a vehicle.
1010
side: client
11+
returns:
12+
values:
13+
- type: element
14+
name: value
15+
description: Returns an element that corresponds to the game camera
1116
notes:
1217
- type: info
1318
content: Using attachElements with the camera and the main player can interfere
Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Scraped from: https://wiki.multitheftauto.com/wiki/GetCameraClip
2-
client:
2+
shared:
33
name: getCameraClip
44
description: This function checks if the camera will "collide" with any objects
55
or vehicles in its way. Read more about this [here](/wiki/SetCameraClip "SetCameraClip").
@@ -8,5 +8,16 @@ client:
88
- path: examples/getCameraClip-1.lua
99
description: This function checks the clip status.
1010
side: client
11+
returns:
12+
values:
13+
- type: bool
14+
name: value1
15+
- type: bool
16+
name: value2
17+
description: This function checks the clip status.
18+
oop:
19+
element: Camera
20+
method: )
21+
static: true
1122
pair: setCameraClip
1223
requires_review: true

functions/Camera/getCameraDrunkLevel.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Scraped from: https://wiki.multitheftauto.com/wiki/GetCameraDrunkLevel
2-
client:
2+
shared:
33
name: getCameraDrunkLevel
44
description: This function gets the camera drunk level set by [setCameraDrunkLevel](/wiki/SetCameraDrunkLevel
55
"SetCameraDrunkLevel"). This function was renamed from [getCameraShakeLevel](/wiki/GetCameraShakeLevel
@@ -10,4 +10,13 @@ client:
1010
description: This example checks for changes in the camera drunk level of any
1111
player every frame and outputs different messages according to it.
1212
side: client
13+
returns:
14+
values:
15+
- type: int
16+
name: value
17+
description: Returns an integer representing the camera drunk level, from 0 (no
18+
drunk effect) to 255 (maximum drunk effect). By default, the camera has no drunk
19+
effect. Drunk effect is a wavy motion of the camera depicting the player being
20+
drunk. This function used to be called getCameraShakeLevel which has since been
21+
deprecated.
1322
requires_review: true
Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,28 @@
11
# Scraped from: https://wiki.multitheftauto.com/wiki/GetCameraFieldOfView
2-
client:
2+
shared:
33
name: getCameraFieldOfView
44
description: This function returns the field of view of the *dynamic camera* as
55
set by [setCameraFieldOfView](/wiki/SetCameraFieldOfView "SetCameraFieldOfView").
6-
parameters: []
6+
parameters:
7+
- name: cameraMode
8+
type: string
9+
description: 'the camera mode to get the field of view of: "player": whilst walking/running
10+
"vehicle": whilst in vehicle "vehicle_max": the max the field of view can go
11+
to when the vehicle is moving at a high speed (must be higher than "vehicle")'
712
examples:
813
- path: examples/getCameraFieldOfView-1.lua
914
description: In this example, the field of view is output to the chat whenever
1015
the /getfov command is written
1116
side: client
17+
returns:
18+
values:
19+
- type: float
20+
name: value
21+
description: Returns one float - the field of view angle
22+
oop:
23+
element: Camera
24+
method: getFieldOfView
25+
variable: fov
26+
static: true
1227
pair: setCameraFieldOfView
1328
requires_review: true

functions/Camera/getCameraGoggleEffect.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Scraped from: https://wiki.multitheftauto.com/wiki/GetCameraGoggleEffect
2-
client:
2+
shared:
33
name: getCameraGoggleEffect
44
description: This function returns what goggle effect is currently affecting the
55
camera.
@@ -9,5 +9,16 @@ client:
99
description: This example adds a command to enable or disable the nightvision
1010
effect.
1111
side: client
12+
returns:
13+
values:
14+
- type: string
15+
name: value
16+
description: This example adds a command to enable or disable the nightvision
17+
effect.
18+
oop:
19+
element: Camera
20+
method: getGoggleEffect
21+
variable: goggleEffect
22+
static: true
1223
pair: setCameraGoggleEffect
1324
requires_review: true

functions/Camera/getCameraInterior.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ server:
88
- path: examples/getCameraInterior-1.lua
99
description: ''
1010
side: server
11+
oop:
12+
element: player
13+
method: getCameraInterior
14+
variable: cameraInterior
15+
static: false
1116
pair: setCameraInterior
12-
requires_review: true
1317
meta:
1418
- needs_checking: 'This function was partially migrated from the old wiki. Please
1519
review manually:
@@ -19,3 +23,4 @@ server:
1923
- Missing section: Object-oriented
2024
2125
'
26+
requires_review: true
Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,41 @@
11
# Scraped from: https://wiki.multitheftauto.com/wiki/GetCameraTarget
2-
server:
2+
client:
33
name: getCameraTarget
44
description: This function returns an [element](/wiki/Element "Element") that corresponds
55
to the current target of the specified player's camera (i.e. what it is following).
66
parameters: []
7+
examples: []
8+
returns:
9+
values:
10+
- type: element
11+
name: value
12+
description: This example checks whether a player's camera's target is another
13+
player, and returns true or false accordingly.
14+
oop: &id001
15+
element: player
16+
method: getCameraTarget
17+
variable: cameraTarget
18+
static: false
19+
pair: setCameraTarget
20+
requires_review: true
21+
server:
22+
name: getCameraTarget
23+
description: This function returns an [element](/wiki/Element "Element") that corresponds
24+
to the current target of the specified player's camera (i.e. what it is following).
25+
parameters:
26+
- name: thePlayer
27+
type: player
28+
description: The player whose camera you wish to receive the target of.
729
examples:
830
- path: examples/getCameraTarget-1.lua
931
description: ''
1032
side: server
33+
returns:
34+
values:
35+
- type: element
36+
name: value
37+
description: This example checks whether a player's camera's target is another
38+
player, and returns true or false accordingly.
39+
oop: *id001
1140
pair: setCameraTarget
1241
requires_review: true

functions/Camera/getCameraViewMode.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Scraped from: https://wiki.multitheftauto.com/wiki/GetCameraViewMode
2-
client:
2+
shared:
33
name: getCameraViewMode
44
description: This function allows you to get the active camera view modes. This
55
indicates at what distance the camera will follow the player or vehicle.
@@ -9,5 +9,18 @@ client:
99
description: This example tells the player their current camera view when they
1010
change it
1111
side: client
12+
returns:
13+
values:
14+
- type: int
15+
name: value1
16+
- type: int
17+
name: value2
18+
description: Returns two ints indicating the current vehicle and ped camera view
19+
mode respectively. Their meanings can be seen below.
20+
oop:
21+
element: Camera
22+
method: getCameraViewMode
23+
variable: viewMode
24+
static: true
1225
pair: setCameraViewMode
1326
requires_review: true
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Scraped from: https://wiki.multitheftauto.com/wiki/ResetShakeCamera
2-
client:
2+
shared:
33
name: resetShakeCamera
44
description: This function cancels the shaking effect caused by **shakeCamera**
55
parameters: []
@@ -8,4 +8,9 @@ client:
88
description: This example allows you to trigger huge camera shake effect near
99
you and then cancels the effect after 5 seconds.
1010
side: client
11+
returns:
12+
values:
13+
- type: bool
14+
name: value
15+
description: Always returns true .
1116
requires_review: true

0 commit comments

Comments
 (0)