Skip to content

Commit 04d61b1

Browse files
committed
Minor fixes (clothes)
- Code formatting - Typos
1 parent f884c19 commit 04d61b1

File tree

7 files changed

+26
-26
lines changed

7 files changed

+26
-26
lines changed

functions/Clothes_and_body/addClothingModel.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ client:
1010
description: A string determining the clothes model that will be added.
1111
- name: clothesType
1212
type: int
13-
description: A integer representing the clothes slot/type the clothes should be added to.
13+
description: A [[int]] representing the clothes slot/type the clothes should be added to.
1414
templateList: clothingTypes
1515
examples:
1616
- path: examples/addClothingModel-1.lua
1717
returns:
1818
values:
1919
- type: bool
2020
name: result
21-
description: Returns true if the clothing was added, and false otherwise.
21+
description: Returns **true** if the clothing was added, and **false** otherwise.
2222
version:
2323
added: 1.6.0 r23124
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
function deathMessageOnWasted ( ammo, attacker, weapon, bodypart )
2-
if ( attacker ) then -- if we have an attacker
3-
if ( getElementType ( attacker ) == "player" ) then -- make sure the element that killed him was a player
4-
tempString = getPlayerName ( attacker ) .. " killed " .. getPlayerName ( source ) .. " (" .. getWeaponNameFromID ( weapon ) .. ")"
5-
if ( bodypart == 9 ) then -- if he was shot in the head
6-
tempString = tempString .. " (HEADSHOT!)"
7-
else
8-
tempString = tempString .. " (" .. getBodyPartName ( bodypart ) .. ")"
9-
end
10-
outputChatBox ( tempString )
1+
function deathMessageOnWasted(ammo, attacker, weapon, bodypart)
2+
if (attacker) then -- if we have an attacker
3+
if (getElementType(attacker) == "player") then -- make sure the element that killed him was a player
4+
tempString = getPlayerName(attacker) .. " killed " ..getPlayerName(source) .. " (" ..getWeaponNameFromID(weapon) .. ")"
5+
if (bodypart == 9) then -- if he was shot in the head
6+
tempString = tempString .. " (HEADSHOT!)"
7+
else
8+
tempString = tempString .. " (" .. getBodyPartName(bodypart) ..")"
9+
end
10+
outputChatBox(tempString)
11+
else
12+
outputChatBox(getPlayerName(source) .. " died. (" ..getWeaponNameFromID(weapon) .. ") (" ..getBodyPartName(bodypart) .. ")")
13+
end
1114
else
12-
outputChatBox ( getPlayerName ( source ) .. " died. (" .. getWeaponNameFromID ( weapon ) .. ") (" .. getBodyPartName ( bodypart ) .. ")" )
15+
outputChatBox(getPlayerName(source) .. " died. (" ..getWeaponNameFromID(weapon) .. ") (" ..getBodyPartName(bodypart) .. ")")
1316
end
14-
else
15-
outputChatBox ( getPlayerName ( source ) .. " died. (" .. getWeaponNameFromID ( weapon ) .. ") (" .. getBodyPartName ( bodypart ) .. ")" )
16-
end
1717
end
18-
addEventHandler ( "onPlayerWasted", root, deathMessageOnWasted )
18+
addEventHandler("onPlayerWasted", root, deathMessageOnWasted)

functions/Clothes_and_body/examples/getClothesByTypeIndex-1.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ function scriptNextClothes(thePlayer, key, clothesType)
1515
addPedClothes(thePlayer, texture, model, clothesType)
1616
end
1717
end
18-
addCommandHandler("nextClothes", scriptNextClothes)
18+
addCommandHandler("nextClothes", scriptNextClothes)

functions/Clothes_and_body/getBodyPartName.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ shared: &shared
88
templateList: bodyParts
99
returns:
1010
values:
11-
- type: string
11+
- type: string|false
1212
name: body part name
13-
description: This function returns a string containing the body part name if the ID is valid, false otherwise.
13+
description: This function returns a [[string]] containing the body part name if the ID is valid, **false** otherwise.
1414

1515
server:
1616
<<: *shared

functions/Clothes_and_body/getClothesByTypeIndex.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ shared: &shared
1111
description: An integer representing the index (0 based) set of clothes in the list you wish to retrieve. Each type has a different number of valid indexes.
1212
returns:
1313
values:
14-
- type: string
14+
- type: string|false
1515
name: texture
1616
- type: string
1717
name: model
18-
description: This function returns 2 strings, a texture and model respectively, false if invalid arguments were passed to the function.
18+
description: This function returns 2 [[string]]s, a texture and model respectively, **false** if invalid arguments were passed to the function.
1919

2020
server:
2121
<<: *shared

functions/Clothes_and_body/getClothesTypeName.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ shared: &shared
88
templateList: clothingTypes
99
returns:
1010
values:
11-
- type: string
11+
- type: string|false
1212
name: name
13-
description: This function returns a string (the name of the clothes type) if found, false otherwise.
13+
description: This function returns a [[string]] (the name of the clothes type) if found, **false** otherwise.
1414

1515
server:
1616
<<: *shared

functions/Clothes_and_body/getTypeIndexFromClothes.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ shared: &shared
1010
description: A string determining the corresponding clothes model that you wish to retrieve the type and index from. See the [clothes catalog](/reference/ID_Lists/CJ_Clothes).
1111
returns:
1212
values:
13-
- type: int
13+
- type: int|false
1414
name: type
1515
- type: int
1616
name: index
17-
description: This function returns two integers, type and index respectively, false if invalid arguments were passed to the function.
17+
description: This function returns two [[int]]s, type and index respectively, **false** if invalid arguments were passed to the function.
1818

1919
server:
2020
<<: *shared

0 commit comments

Comments
 (0)