#pvpToggle

1 messages · Page 1 of 1 (latest)

steel ermine
#

pvpToggle

#
command /pvp:
    permission: pvp.toggle
    permission message: &cYou do not have permission to do that.
    trigger:
        if {map.pvp} is false:
            broadcast "&c%player% enabled PvP in all worlds."
            set {map.pvp} to true
        else if {map.pvp} is not false:
            broadcast "&c%player% disabled PvP in all worlds."
            set {map.pvp} to false

on damage:
    if attacker is a player:
        if victim is a player:
            if {map.pvp} is false:
                cancel event
                send "&cPvP is currently disabled at this time."```
thin beacon
#

Provlem?

#

Problem?

#

Error?

steel ermine
#

so like

#

if one person has it off

#

the person with it on can still be attacked by the person who has it off

#

i want it so they both need it on

lime perch
#

I have a feeling you didn't make that code

#

Nowhere is it at all related to players specifically, that toggles it server wide

#

You would need to make all of the variables a list with players uuid instead

night furnace
#

Or made by AI likely

#

Theres no way a human did if pvp is false and then else if pvp is not false instead of just else

short knoll
#

And use lists

#

What Expqnded said

steel ermine
#

hey

#

lunar

#

are u able to make it so

player's pvp is off by default

/pvp to turn on
or do /pvp again to turn off

then make it so they can only attack if they BOTH have pvp ON

short knoll
#

I won't make it for you we told you what was wrong