Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[BUG]Safe Zones...
#1
So, I nulled out the check to see if the attacker was admin, or if the victim was admin, therefore making it possible for Admins to PK and be PK'd. However, when I went to attack my other char, it said that I couldn't attack in a safe zone. I was in the default map, and I checked the properties, and there was no map moral, selected.... Any ideas?
Reply
#2
teh problem is this one..
Code:
If Not Map(GetPlayerMap(Attacker)).Moral = MAP_MORAL_NONE Or GetPlayerPK(Victim) = NO Then

this will make all non-pk player cannot be attacked

replace it with this
Code:
If Not Map(GetPlayerMap(Attacker)).Moral = MAP_MORAL_NONE And GetPlayerPK(Victim) = NO Then
Reply
#3
No that's not a bug...it's suppose to be like that. If they are in a safe zone or the player they are trying to attack isn't a PKer then it says it's a safe zone. If they aren't in a safe zone and the player they are trying to attack is a PKer then continue on with the attack.
Reply
#4
GIAKEN Wrote:No that's not a bug...it's suppose to be like that. If they are in a safe zone or the player they are trying to attack isn't a PKer then it says it's a safe zone. If they aren't in a safe zone and the player they are trying to attack is a PKer then continue on with the attack.

But then theres only two morals: Safe Zone, and None. In none, you should be able to attack someone... right?
Reply
#5
Yes and that's what it does...
Reply
#6
GIAKEN Wrote:Yes and that's what it does...

Yes, but in a map with no moral, you still cannot attack someone. So it's impossible to attack someone at all.
Reply
#7
Try this:

Code:
' Check if map is attackable
    If Not Map(GetPlayerMap(Attacker)).Moral = MAP_MORAL_NONE Then
        If GetPlayerPK(Victim) = NO Then
            Call PlayerMsg(Attacker, "This is a safe zone!", BrightRed)
            Exit Function
        End If
    End If

Delete the old If statement and replace with that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)