Defines the Sleeping Pills (Non-prescription) medical item (snotbad) of the Diseases plugin, which sets the
Fatigue character data to 100 and cures insomnia with a one in two chance of a relapse six minutes later, when it
is swallowed or given to the player being looked at with its Give action.
Summary
Methods
Gives the pills to the player being looked at with "Give"; same effect as using them.
OnDrop(player, position)shared
Lets the item be dropped, with no extra effect.
Cures insomnia with a one in two chance of relapse after six minutes, and sets
Fatigue to 100.Methods
ITEM:OnCustomFunction(player, name)
server gamemodes/cwhl2rp/plugins/diseases/plugin/items/sh_snotbad.lua:39Gives the pills to the player being looked at with "Give"; same effect as using them.
Fires PlayerHealed with the giver as the healer. Returns false when no player is looked at.
Parameters
- player
- name
ITEM:OnDrop(player, position)
shared gamemodes/cwhl2rp/plugins/diseases/plugin/items/sh_snotbad.lua:63Lets the item be dropped, with no extra effect.
Parameters
- player
- position
ITEM:OnUse(player, itemEntity)
shared gamemodes/cwhl2rp/plugins/diseases/plugin/items/sh_snotbad.lua:21Cures insomnia with a one in two chance of relapse after six minutes, and sets Fatigue to 100.
Fires PlayerHealed.
Parameters
- player
- itemEntity