• 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.
Jun 5, 2022
4
0
1
24
Usage: /tpa [playername]
Code:
command /tpa [<player>]:
    trigger:
        if arg-1 is set:
            if arg-1 is online:
                if {tpalist::*} contains arg-1:
                    send "&a%arg-1% &falready have a tpa request pending."
                else:
                    if arg-1 is player:
                        send "&fThis is &ayou!"
                    else:
                        add arg-1 to {tpalist::*}
                        add player to {tpalist.%arg-1%::*}
                        send "&bYou have a tpa request.%newline%&aType /tpaccept to accept it.%newline%&cType /tpdeny to deny it." to arg-1
                        send "&fYou have sent a tpa request to &a%arg-1%." to player
            else:
                send "&a%arg-1% &fis &coffline."
        else:
            send "&fPlease define a &aplayer."

command /tpaccept:
    trigger:
        if {tpalist::*} contains player:
            send "&aAccepting &ftpa request..."
            remove player from {tpalist::*}
            send "&fYou have accepted &a%player%&f's tpa request." to player
            wait 1 second
            teleport {tpalist.%player%::*} to player
        else:
            send "&fYou have &cno &ftpa requests."
command /tpdeny:
    trigger:
        if {tpalist::*} contains player:
            send "&cDenying &ftpa request..."
            remove player from {tpalist::*} 
            send "&fYou have &cdenied &a%player%&f's tpa request." to player
        else:
            send "&fYou have &cno &ftpa requests."
 
Status
Not open for further replies.