1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help with PVP skript

Discussion in 'Skript' started by zAngryyy, Feb 9, 2021.

Thread Status:
Not open for further replies.
  1. zAngryyy

    zAngryyy Member

    Joined:
    Feb 9, 2021
    Messages:
    2
    Likes Received:
    0
    Hi guys, i need your help :emoji_grinning:
    I need a skript that when a player kills another one in a certain region, he execute two commands.
    Else (if a player is in another region) he will executes two other actions.
    I think is will be similiar as this one:

    On player kill:
    If player is in region1
    {
    Execute player comando 1
    Wait 1 tick
    Execute player comando 2
    }
    else if player is in region2
    {
    Execute player comando 3
    Wait 1 tick
    Execute player comando 4
    }
     
  2. Nikd0

    Nikd0 Active Member

    Joined:
    May 30, 2020
    Messages:
    204
    Likes Received:
    19
    Code (Text):
    1. on death:
    2.     attacker is a player
    3.     victim is a player
    4.     if victim is in region "myregion1":
    5.         execute console command "say %attacker% killed %victim%"
    6.         ....
    7.     else if ...:
    Use attacker/victim, wait, execute console command
     
  3. Jakkeren

    Supporter

    Joined:
    Mar 23, 2017
    Messages:
    63
    Likes Received:
    3
    Code (Text):
    1. on death:
    2.      attacker is a player
    3.      victim is a player
    4.      if "%region at victim%" is "region":
    5.           broadcast "%attacker% killed %victim%" //let's not spam the console with kill/death messages, but rather use the vanilla function for broadcasting messages
    6.      else:
    7.           //do something else ..
     
Thread Status:
Not open for further replies.

Share This Page

Loading...