Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lua callback when life or armor is gained #118

Open
R00Ki3 opened this issue Mar 11, 2015 · 0 comments
Open

Add lua callback when life or armor is gained #118

R00Ki3 opened this issue Mar 11, 2015 · 0 comments

Comments

@R00Ki3
Copy link
Member

R00Ki3 commented Mar 11, 2015

It would be nice to know when a player is healed from any source, by how much and what by. I'm not sure the best way to go about this. Either by adding an additional function or extending on an existing function like player_ondamage ?

Example:

function player_onheal( player, damageinfo? ) -- something like damageinfo?
    local Heal = damageinfo:GetHeal() -- Get Health Amount
    local Armor = damageinfo:GetArmor() -- Get Armor amount
    local Healer = damageinfo:GetHealer() -- Object or person doing the healing
    local Item = damageinfo:GetInflictor():GetClassName() -- Item doing the healing: Backpack, medkit, dispenser, ect.
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants