SHOW:
|
|
- or go back to the newest paste.
1 | - | issue: |
1 | + | -- issue: |
2 | ||
3 | local ped = createPed(1, 0, 0, 0) | |
4 | - | if isElement(ped then |
4 | + | if isElement(ped) then |
5 | setElementHealth(ped, 50) -- set its health to 50 | |
6 | setTimer( | |
7 | function (ped) | |
8 | outputChatBox(getElementHealth(ped)) -- this will return 100 | |
9 | end, | |
10 | 10000, 1, ped) | |
11 | end | |
12 | ||
13 | ||
14 | - | temp solution: |
14 | + | --temp solution: |
15 | ||
16 | local ped = createPed(1, 0, 0, 0) | |
17 | - | if isElement(ped then |
17 | + | if isElement(ped) then |
18 | setTimer( | |
19 | function (ped) | |
20 | setElementHealth(ped, 50) -- set its health to 50 | |
21 | end, | |
22 | 1000, 1, ped) | |
23 | ||
24 | setTimer( | |
25 | function (ped) | |
26 | outputChatBox(getElementHealth(ped)) -- this will return 50 | |
27 | end, | |
28 | 10000, 1, ped) | |
29 | end |