Yes I can help. Basic things like hooks. Not everybody know how to work with source so I can add sometimes some pages.
Ya got It.Yes I can help. Basic things like hooks. Not everybody know how to work with source so I can add sometimes some pages.
I forgot to tell Mike to add the Damage method in 1.0.8 (Maybe I didn't even list it on the git)Yes I can help. Basic things like hooks. Not everybody know how to work with source so I can add sometimes some pages.
RadiationCheck = []
class Test:
TakeDamage = None
def On_PluginInit(self):
self.TakeDamage = Util.TryFindReturnType("TakeDamage")
# Respawned and fresh connected players are handled here.
def On_PlayerSpawned(self, Player, SpawnEvent):
RadiationCheck.append(Player)
def On_PlayerKilled(self, DeathEvent):
if DeathEvent.Victim is not None:
RadiationCheck.remove(DeathEvent.Victim)
def On_PlayerDisconnected(self, Player):
RadiationCheck.remove(Player)
def RadCheckCallback(self, timer):
timer.Kill()
for player in RadiationCheck:
if int(player.RadLevel) >= 150:
# You can add radiation:
player.AddRads(50)
#or:
self.TakeDamage.HurtSelf(player.PlayerClient.controllable.character, None)
Plugin.CreateTimer("RadCheck", 6000).Start()
Alright. But you can use that, It will be just the same, I just added the takedamage class as a variable there, so you can access It.Ok thanks. I'll wait until some new version, because this is crucial plugin for my server.
Do you know why after some time (I don't know what, maybe 24 hours) it's stop working? No error or something, rad just stops killing. I have ideas that it's maybe some cheater, or maybe Admin God have something to do with this. But naah, it looks like just an effect of time. It's working again for some hours when I restart server.
It's similiar to some spikes bug. Sometimes it's working against everybody, sometimes killing just owner of them. No idea why.
On_PlayerHurt:
AttributeError: can't assign to read-only property Health of type 'Player'
It's probably not showing It since the method is missing.Looks like there you forgot about more variables/properties/methods or however you call them:
Was working fine in 1.0.8 rc2:
And looks like you can still assign Health to building parts, or NPC's.Code:On_PlayerHurt: AttributeError: can't assign to read-only property Health of type 'Player'
Coming back to rads:
It's not even showing me errors with my old RAD Zone plugin.. Debugging is a little bit harder now. If it's timer, it should show me error again and again and again. I didn't update code yet.
Yeah, Health property no longer has a setter.Looks like there you forgot about more variables/properties/methods or however you call them:
Was working fine in 1.0.8 rc2:
And looks like you can still assign Health to building parts, or NPC's.Code:On_PlayerHurt: AttributeError: can't assign to read-only property Health of type 'Player'
Coming back to rads:
It's not even showing me errors with my old RAD Zone plugin.. Debugging is a little bit harder now. If it's timer, it should show me error again and again and again. I didn't update code yet.
I didn't delete It. It was probably mike. Go and complain on the github issues please so he won't forget to do it. If you want, I can get you a dll with a setter for now. Do you need It?@DreTaX Maybe I will try (shit.. another account.....) but.. Why did you delete it? Now I really can't update my server, as whole gameplay is basing on Health etc.
Maaan![]()
Player.AddRads(amount)@DreTaX Maybe I will try (shit.. another account.....) but.. Why did you delete it?
Until next version comes, you can also do: Player.PlayerClient.controllable.health = 100I mean you (your dev team), not just you. I don't know who is whoIt's weird when there is something and boom, next version it's deleted.
If you could, I will be happy. But I think there is more issues, what I can't find before I get this working Health etc
def RadCheckCallback(self):
Server.Broadcast("Timer")
Plugin.KillTimer("RadCheck")
for player in RadiationCheck:
rad = int(player.RadLevel)
Server.Broadcast("Checking rad: "+str(rad))
if rad >= 150:
self.TakeDamage.HurtSelf(player.PlayerClient.controllable.character, None)
Server.Broadcast("Radiation above 150")
#player.Damage(float(rad/80))
Plugin.CreateTimer("RadCheck", 6000).Start()
def RadCheckCallback(self, timer):
Server.Broadcast("Timer")
timer.Kill()
for player in RadiationCheck:
rad = int(player.RadLevel)
Server.Broadcast("Checking rad: "+str(rad))
if rad >= 150:
self.TakeDamage.HurtSelf(player.ourPlayer.controllable.character, float(rad / 80))
Server.Broadcast("Radiation above 150")
#player.Damage(float(rad/80))
Plugin.CreateTimer("RadCheck", 6000).Start()