Solved Im having some issue with my plugin

MrNunoPT

New Member
Member
Aug 5, 2017
21
5
3
23
LOL
That is another plugin!i think that Error is about ShowDamage Plugin..
Thank you <3
Python:
__title__ = 'DamageShow'
__author__ = 'MrNunoPT'
__version__ = '0.1'


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


class DamageShow:
    def On_PlayerHurt(self, HurtEvent):
        if HurtEvent.Attacker is None: return
        if HurtEvent.AttackerIsPlayer and HurtEvent.VictimIsPlayer:
           HurtEvent.Attacker.Notice("Seu Oponente: " + HurtEvent.Victim.Name + " Vida:" + str(HurtEvent.Victim.Health))
          
    def On_NPCHurt(self, HurtEvent):
        if HurtEvent.AttackerIsPlayer:
           HurtEvent.Attacker.Notice("Vida Restante: " + str(HurtEvent.Victim.Health))
   
    def On_EntityHurt(self, HurtEvent):
            HurtEvent.Attacker.Notice("Vida Restante " + str(HurtEvent.Entity.Health))
    
                   
#Credits:Rave ---> HurtEvent.Attacker is None: return
#Credits:Dretax ---> HurtEvent.Entity.Health
For me its working no errors
 
  • Like
Reactions: Jakkee and Assassin

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
Python:
__title__ = 'DamageShow'
__author__ = 'MrNunoPT'
__version__ = '0.1'


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


class DamageShow:
    def On_PlayerHurt(self, HurtEvent):
        if HurtEvent.Attacker is None: return
        if HurtEvent.AttackerIsPlayer and HurtEvent.VictimIsPlayer:
           HurtEvent.Attacker.Notice("Seu Oponente: " + HurtEvent.Victim.Name + " Vida:" + str(HurtEvent.Victim.Health))
         
    def On_NPCHurt(self, HurtEvent):
        if HurtEvent.AttackerIsPlayer:
           HurtEvent.Attacker.Notice("Vida Restante: " + str(HurtEvent.Victim.Health))
  
    def On_EntityHurt(self, HurtEvent):
            HurtEvent.Attacker.Notice("Vida Restante " + str(HurtEvent.Entity.Health))
   
                  
#Credits:Rave ---> HurtEvent.Attacker is None: return
#Credits:Dretax ---> HurtEvent.Entity.Health
For me its working no errors
That wasn't the case buddy, he had the wrong code...
 
  • Like
Reactions: MrNunoPT