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 our 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.

Solved player is in world error

Discussion in 'Skript' started by EricDasBrot, Jun 5, 2017.

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

    EricDasBrot Member

    Joined:
    Jun 1, 2017
    Messages:
    22
    Likes Received:
    0
    hello. i have a problem. i hope you can help me.

    on damage:
    if player is in world "Lobby_3":
    cancel event
    --- Double Post Merged, Jun 5, 2017, Original Post Date: Jun 5, 2017 ---
    oh, and i started with script 1 week ago. xd

     
  2. Best Answer:
    Post #4 by ShaneBee, Jun 5, 2017
  3. ShaneBee

    Supporter +

    Joined:
    Sep 7, 2017
    Messages:
    1,459
    Likes Received:
    96
    Does this apply to the attacker or victim? Replace player to either attacker or victim, depending on who you are trying to specify.
     
  4. ShaneBee

    Supporter +

    Joined:
    Sep 7, 2017
    Messages:
    1,459
    Likes Received:
    96
    Attacker and victim :/.

    Sorry, i am a noob.
     
  5. ShaneBee

    Supporter +

    Joined:
    Sep 7, 2017
    Messages:
    1,459
    Likes Received:
    96
    Code (Skript):
    1. on damage:
    2.     if attacker and victim are in world "Lobby_3":
    3.         cancel event
    If you only want to apply this for players and not entities, then do
    Code (Skript):
    1.  
    2. on damage of player:
    3.     if attacker is a player:
    4.         if attacker and victim are in world "Lobby_3":
    5.             cancel event
    6.  
     
  6. ShaneBee

    Supporter +

    Joined:
    Sep 7, 2017
    Messages:
    1,459
    Likes Received:
    96
    I thank you so much!
     
Thread Status:
Not open for further replies.
Loading...