Defines the Health Vial medical item for the Metropolice Force and Overwatch factions, which heals one and a half times Schema:GetHealAmount and has a Give option that runs the CharHeal command on another character.

Summary

Methods

Runs the CharHeal command with this item when the Give option is chosen.
Lets the item be dropped; nothing else happens.
Heals the player by Schema:GetHealAmount times 1.5, capped at max health, and fires the PlayerHealed hook.

Methods

ITEM:OnCustomFunction(player, name)

server gamemodes/cwhl2rp/schema/items/sh_health_vial.lua:30

Runs the CharHeal command with this item when the Give option is chosen.

Parameters

  • player
  • name

ITEM:OnDrop(player, position)

shared gamemodes/cwhl2rp/schema/items/sh_health_vial.lua:26

Lets the item be dropped; nothing else happens.

Parameters

  • player
  • position

ITEM:OnUse(player, itemEntity)

shared gamemodes/cwhl2rp/schema/items/sh_health_vial.lua:19

Heals the player by Schema:GetHealAmount times 1.5, capped at max health, and fires the PlayerHealed hook.

Parameters

  • player
  • itemEntity

Defined in