Discord Thread pvp command

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

This thread came from the skUnity Discord. You can't reply to it here but if you join the skUnity Discord, you'll be able to post a reply there. The thread link is part of the thread's message.
Status
Not open for further replies.
code_language.skript:
command /pvp:
    trigger:
        if {pvps::%player's uuid%} is true:
            set {pvps::%player's uuid%} to false
            send "&c&l[PVP] &7PvP is &aenabled. &7You can do /pvp again to disable PvP" to player
            stop
            else:
            set {pvps::%player's uuid%} to true
            send "&c&l[PVP] &7PvP is &cdisabled. &7You can do /pvp again to enable PvP" to player
            stop

        if {pvps::%player's uuid%} is not set:
            set {pvps::%player's uuid%} to false
            
on damage:
    if {pvps::%uuid of victim%} is true:
        cancel event
        send "&c&l[PVP] &7This player has PvP &cdisabled." to attacker
    if {pvps::%uuid of attacker%} is true:
        cancel event
        send "&c&l[PVP] &7You have PvP &cdisabled. &7You can do /pvp again to enable PvP" to attacker
it looks like that

help me uwu

Posted by: nitayk from the skUnity Discord.
 
Status
Not open for further replies.