improve docs and remove irrelevant example
This commit is contained in:
@@ -78,14 +78,7 @@ end)
|
||||
## How do i give a character a certain affliction
|
||||
|
||||
```lua
|
||||
local burnPrefab
|
||||
|
||||
for k, v in pairs(AfflictionPrefab.ListArray) do
|
||||
if v.Identifier == "burn" then
|
||||
burnPrefab = v
|
||||
break
|
||||
end
|
||||
end
|
||||
local burnPrefab = AfflictionPrefab.Prefabs["burn"]
|
||||
|
||||
local char = Character.CharacterList[1]
|
||||
local limb = char.AnimController.MainLimb
|
||||
|
||||
@@ -10,22 +10,6 @@ Hook.Add('chatMessage', 'suicide_mod', function(msg, client)
|
||||
end)
|
||||
```
|
||||
|
||||
```lua
|
||||
local characters = Character.CharacterList
|
||||
local biteWoundsPrefab
|
||||
|
||||
for k, v in pairs(AfflictionPrefab.ListArray) do
|
||||
if v.name == "Bite wounds" then
|
||||
biteWoundsPrefab = v
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
for k, v in pairs(characters) do
|
||||
v.CharacterHealth.ApplyAffliction(v.AnimController.MainLimb, biteWoundsPrefab.Instantiate(100));
|
||||
end
|
||||
```
|
||||
|
||||
```lua
|
||||
Hook.Add("itemApplyTreatment", "testItemApplyTreatment", function (item, user, character, targetlimb)
|
||||
if item.name == "Bandage" then
|
||||
|
||||
Reference in New Issue
Block a user