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 CTF skript

Discussion in 'Skript' started by Vane, May 27, 2019.

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

    Vane New Member

    Joined:
    May 27, 2019
    Messages:
    7
    Likes Received:
    0
    Hello there, I have ctf skript made, works fine however since I disabled event damage and when I fall into void or someone else falls into void it doesn't kill us.
    --- Double Post Merged, May 27, 2019, Original Post Date: May 27, 2019 ---
    Code (Text):
    1. on damage:
    2.     cancel event
    3.     if {CTF::PLAYERS::%attacker%::IN-GAME} is true:
    4.         if {CTF::PLAYERS::%victim%::IN-GAME} is true:
    5.             if {CTF::ARENAS::%{CTF::PLAYERS::%attacker%::ARENA}%::STATE} = 1:
    6.                 if {CTF::PLAYERS::%attacker%::TEAM} != {CTF::PLAYERS::%victim%::TEAM}:
    7.                     uncancel event
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    Thats because of
    Code (Skript):
    1. if {CTF::PLAYERS::%attacker%::IN-GAME} is true:
    There is no attacker in a damage event caused by the void, therefor the event is staying cancelled
     
  3. Vane

    Vane New Member

    Joined:
    May 27, 2019
    Messages:
    7
    Likes Received:
    0
    mind helping me, a friend wrote that for me and im new to skript
     
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    You could try something like:
    Code (Skript):
    1. on damage:
    2.     if damage cause is not void:
    3.         cancel event
    4.         #your other code here
     
  5. Vane

    Vane New Member

    Joined:
    May 27, 2019
    Messages:
    7
    Likes Received:
    0
    Like this?
    Code (Text):
    1. on damage:
    2.     if damage cause is not void:
    3.     cancel event
    4.     if {CTF::PLAYERS::%attacker%::IN-GAME} is true:
    5.         if {CTF::PLAYERS::%victim%::IN-GAME} is true:
    6.             if {CTF::ARENAS::%{CTF::PLAYERS::%attacker%::ARENA}%::STATE} = 1:
    7.                 if {CTF::PLAYERS::%attacker%::TEAM} != {CTF::PLAYERS::%victim%::TEAM}:
    8.                     uncancel event
    --- Double Post Merged, May 28, 2019, Original Post Date: May 28, 2019 ---
    Still not killing me on void and no errors when reloading skript
     
  6. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    Notice how my code is indented and yours is not?
    Screen Shot 2019-05-27 at 4.08.59 PM.png
     
  7. Vane

    Vane New Member

    Joined:
    May 27, 2019
    Messages:
    7
    Likes Received:
    0
    Might of found a solution
    Code (Text):
    1. on damage:
    2.     if damage cause is not void:
    3.         cancel event
    4.             if {CTF::PLAYERS::%attacker%::IN-GAME} is true:
    5.                 if {CTF::PLAYERS::%victim%::IN-GAME} is true:
    6.                     if {CTF::ARENAS::%{CTF::PLAYERS::%attacker%::ARENA}%::STATE} = 1:
    7.                         if {CTF::PLAYERS::%attacker%::TEAM} != {CTF::PLAYERS::%victim%::TEAM}:
    8.                             uncancel event
    actually that didn't work
     
  8. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    344
    Likes Received:
    22
    Code (Skript):
    1.  
    2. [INDENT][LIST=1]
    3. [*]on damage:
    4. [*]    if damage cause is not void:
    5. [*]        cancel event
    6. [*]            if {CTF::PLAYERS::%attacker%::IN-GAME} is true:
    7. [*]                if {CTF::PLAYERS::%victim%::IN-GAME} is true:
    8. [*]                    if {CTF::ARENAS::%{CTF::PLAYERS::%attacker%::ARENA}%::STATE} = 1:
    9. [*]                        if {CTF::PLAYERS::%attacker%::TEAM} != {CTF::PLAYERS::%victim%::TEAM}:
    10. [*]                            uncancel event
    11. [/LIST][/INDENT]
    12.  
     
Thread Status:
Not open for further replies.

Share This Page

Loading...