|
1 | 1 | # 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 |
2 | 48 | server: |
3 | 49 | name: fadeCamera |
4 | 50 | description: This function will fade a player's camera to a color or back to normal |
5 | 51 | over a specified time period. This will also affect the sound volume for the player |
6 | 52 | (50% faded \= 50% volume, full fade \= no sound). For clientside scripts you can |
7 | 53 | perform 2 fade ins or fade outs in a row, but for serverside scripts you must |
8 | 54 | 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' |
10 | 82 | examples: |
11 | 83 | - path: examples/fadeCamera-1.lua |
12 | 84 | description: When a player gets damaged, place a quick fade-to-red effect on his |
13 | 85 | screen. |
14 | 86 | 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 |
18 | 95 | requires_review: true |
0 commit comments