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.

/tpa Skript

Discussion in 'Skript' started by Ali Tuna BAYLAN, Jun 5, 2022.

Thread Status:
Not open for further replies.
  1. Ali Tuna BAYLAN

    Joined:
    Jun 5, 2022
    Messages:
    4
    Likes Received:
    0
    Usage: /tpa [playername]
    Code (Text):
    1. command /tpa [<player>]:
    2.     trigger:
    3.         if arg-1 is set:
    4.             if arg-1 is online:
    5.                 if {tpalist::*} contains arg-1:
    6.                     send "&a%arg-1% &falready have a tpa request pending."
    7.                 else:
    8.                     if arg-1 is player:
    9.                         send "&fThis is &ayou!"
    10.                     else:
    11.                         add arg-1 to {tpalist::*}
    12.                         add player to {tpalist.%arg-1%::*}
    13.                         send "&bYou have a tpa request.%newline%&aType /tpaccept to accept it.%newline%&cType /tpdeny to deny it." to arg-1
    14.                         send "&fYou have sent a tpa request to &a%arg-1%." to player
    15.             else:
    16.                 send "&a%arg-1% &fis &coffline."
    17.         else:
    18.             send "&fPlease define a &aplayer."
    19.  
    20. command /tpaccept:
    21.     trigger:
    22.         if {tpalist::*} contains player:
    23.             send "&aAccepting &ftpa request..."
    24.             remove player from {tpalist::*}
    25.             send "&fYou have accepted &a%player%&f's tpa request." to player
    26.             wait 1 second
    27.             teleport {tpalist.%player%::*} to player
    28.         else:
    29.             send "&fYou have &cno &ftpa requests."
    30. command /tpdeny:
    31.     trigger:
    32.         if {tpalist::*} contains player:
    33.             send "&cDenying &ftpa request..."
    34.             remove player from {tpalist::*}
    35.             send "&fYou have &cdenied &a%player%&f's tpa request." to player
    36.         else:
    37.             send "&fYou have &cno &ftpa requests."
     
Thread Status:
Not open for further replies.

Share This Page

Loading...