File tree Expand file tree Collapse file tree 3 files changed +61
-16
lines changed Expand file tree Collapse file tree 3 files changed +61
-16
lines changed Original file line number Diff line number Diff line change @@ -13,13 +13,6 @@ shared: &shared
13
13
values :
14
14
- type : ' float'
15
15
name : ' health'
16
- examples :
17
- - path : ' examples/getElementHealth-1.lua'
18
- description : |
19
- This example outputs the player and vehicle health (if player is in a vehicle) to chatbox using /health command:
20
- - path : ' examples/getElementHealth-2.lua'
21
- description : |
22
- This example heals the player to 100 HP using /healme command if he's at 50 HP or lower:
23
16
issues :
24
17
- id : 3791
25
18
description : ' setPedArmor and setElementHealth synchronization problems from Client to Server'
@@ -32,4 +25,11 @@ server:
32
25
<< : *shared
33
26
34
27
client :
35
- << : *shared
28
+ << : *shared
29
+ examples :
30
+ - path : ' examples/getElementHealth-1.lua'
31
+ description : |
32
+ This example outputs the player and vehicle health (if player is in a vehicle) to chatbox using /health command:
33
+ - path : ' examples/getElementHealth-2.lua'
34
+ description : |
35
+ This example heals the player to 100 HP using /healme command if he's at 50 HP or lower:
Original file line number Diff line number Diff line change @@ -15,19 +15,19 @@ shared: &shared
15
15
- *450:* white steam 100%, black smoke 50%
16
16
- *250:* white steam 0%, black smoke 100%
17
17
- *249:* fire with big black smoke
18
+ parameters :
19
+ - name : ' theElement'
20
+ type : ' element'
21
+ description : ' The player, ped, vehicle or object element whose health you want to set.'
22
+ - name : ' newHealth'
23
+ type : ' float'
24
+ description : ' A float indicating the new health to set for the element.'
18
25
returns :
19
26
description : |
20
27
Returns *true* if the new health was set successfully, *false* otherwise.
21
28
values :
22
29
- type : ' bool'
23
30
name : ' result'
24
- examples :
25
- - path : ' examples/setElementHealth-1.lua'
26
- description : |
27
- This example changes the player health to new specified value using /sethealth <value> command:
28
- - path : ' examples/setElementHealth-2.lua'
29
- description : |
30
- This example heals the player vehicle using the command /repairvehicle if it's below 1000 HP:
31
31
issues :
32
32
- id : 3807
33
33
description : ' hpbar on hud is not compatible visually with MAX_HEALTH stat'
@@ -42,6 +42,14 @@ shared: &shared
42
42
43
43
server :
44
44
<< : *shared
45
+ examples :
46
+ - path : ' examples/setElementHealth-1.lua'
47
+ description : |
48
+ This example changes the player health to new specified value using /sethealth <value> command:
45
49
46
50
client :
47
- << : *shared
51
+ << : *shared
52
+ examples :
53
+ - path : ' examples/setElementHealth-2.lua'
54
+ description : |
55
+ This example heals the player vehicle using the command /repairvehicle if it's below 1000 HP:
Original file line number Diff line number Diff line change @@ -13,6 +13,43 @@ <h1 style="border-bottom: 3px solid #FF7F00; margin-bottom: 0.1em;">{{ function.
13
13
< p style ="margin-top: 1em; "> {{ function['server'].description }}</ p >
14
14
{% endif %}
15
15
16
+ <!-- Syntax -->
17
+ {% for type_name in ['shared', 'client', 'server'] %}
18
+ {% if function[type_name] %}
19
+ {% if function[type_name].parameters %}
20
+ < h2 > Syntax</ h2 >
21
+ < p > {{ function[type_name].parameters.description }}</ p >
22
+
23
+ < pre > < code class ="language-lua "> {{ function[type_name].name }}(todo :mreow:)</ code > </ pre >
24
+
25
+ < ul >
26
+ {% for item in function[type_name].parameters %}
27
+ < li style ="margin-bottom: 1em; ">
28
+ < p > {{ item.name }} : {{ item.description }}</ p >
29
+ </ li >
30
+ {% endfor %}
31
+ </ ul >
32
+ {% endif %}
33
+ {% endif %}
34
+ {% endfor %}
35
+
36
+ <!-- Returns -->
37
+ {% for type_name in ['shared', 'client', 'server'] %}
38
+ {% if function[type_name] %}
39
+ {% if function[type_name].returns %}
40
+ < h2 > Returns</ h2 >
41
+ < p > {{ function[type_name].returns.description }}</ p >
42
+ < ul >
43
+ {% for item in function[type_name].returns["values"] %}
44
+ < li style ="margin-bottom: 1em; ">
45
+ < p > {{ item.type }} {{ item.name }}</ p >
46
+ </ li >
47
+ {% endfor %}
48
+ </ ul >
49
+ {% endif %}
50
+ {% endif %}
51
+ {% endfor %}
52
+
16
53
<!-- Preview Images -->
17
54
{% for type_name in ['shared', 'client', 'server'] %}
18
55
{% if function[type_name] %}
You can’t perform that action at this time.
0 commit comments