why this code doesn't works ?

EnderTnT

New Member
Member
Mar 11, 2021
1
0
1
iran
Code:
__title__ = 'A plugin that show player damage amount'
__author__ = 'Ender_TnT'
__version__ = '0.1'

import clr
clr.AddReferenceByPartialName("Fougerite")
import Fougerite

class DamageShow:

    def On_PlayerHurt(self, HurtEvent):
        if HurtEvent.Attacker is None or HurtEvent.Victim is None:
            return
        if HurtEvent.AttackerIsPlayer and HurtEvent.VictimIsPlayer:
            HurtEvent.Attacker.Notice("Health Baghi Mande Doshman: " + str(HurtEvent.Victim.Health))
            HurtEvent.Victim.Notice("Damage Vared Shode Be Shoma: " + str(HurtEvent.DamageAmount))
whats wrong ?
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,028
3,274
113
At your house.
github.com
Code:
__title__ = 'A plugin that show player damage amount'
__author__ = 'Ender_TnT'
__version__ = '0.1'

import clr
clr.AddReferenceByPartialName("Fougerite")
import Fougerite

class DamageShow:

    def On_PlayerHurt(self, HurtEvent):
        if HurtEvent.Attacker is None or HurtEvent.Victim is None:
            return
        if HurtEvent.AttackerIsPlayer and HurtEvent.VictimIsPlayer:
            HurtEvent.Attacker.Notice("Health Baghi Mande Doshman: " + str(HurtEvent.Victim.Health))
            HurtEvent.Victim.Notice("Damage Vared Shode Be Shoma: " + str(HurtEvent.DamageAmount))
whats wrong ?
Named file as DamageShow.py?
Are you getting any errors?