Help me with my skript please!!!

Discussion in 'Skript' started by DinPro, Jun 3, 2017.

Thread Status:
Not open for further replies.
  1. Hello, I am making a skript that's about Redirecting your friends, But for for some reason when I try to send a redirect that I DID NOT SEND to someone it still keeps saying that I have already redirected that person, But I did not. PLEASE help! Thanks.

    Code (Text):
    command /redirect <text> <player>:
        trigger:
            if arg 1 is not set:
                message "&a---------------&3Redirect&a---------------"
                message "&a/redirect send <player> &7- &6Send a redirect request"
                message "&a/redirect accept <player> &7- &6Accepts a redirect request"
                message "&a/redirect deny <player> &7- &6Deny a redirect request"
            if arg 1 is "send":
                if arg 2 is a player:
                    if arg 2 is online:
                        if player has permission "redirect.send":
                            player isn't arg-2
                            if {redirect.%player%.send.%arg-2%} isn't true:
                                set {redirect.%player%.send.%arg-2%} to true
                                message "&eSuccessfully sent the request to %arg 2%"
                                send "&e%player% &asent you a redirect request." to arg 2
                                send "&aAccept by typing &b/redirect accept %player%" to arg 2
                                exit
                            else:
                                send "&cYou already sent &6%arg-2% &ca redirect"
                        else:
                            message "&cYou don't have permission!"
                    else:
                        message "&6%arg-2% &cis not online!"
            if arg 1 is "accept":
                if arg 2 is a player:
                    if arg 2 is online:
                        if player has permission "redirect.accept":
                            player isn't arg-2
                            if {redirect.%arg-2%.send.%player%} is true:
                                message "&eSuccessfully accepted the request to %arg 2%"
                                give 1 diamond to the player
                                give 1 diamond to arg 2
                                execute console command "/playsound note.harp @a"
                                broadcast "&b%player% &aand &b%arg-2% &ahave REDIRECTED! Redirect a friend and earn rewards! &b/redirect"
                                exit
                            else:
                                send "&6%arg-2% &chasn't redirected you."
                        else:
                            message "&cYou don't have permission!"
                    else:
                        message "&6%arg-2% &cis not online!"
            if arg 1 is "deny":
                if arg 2 is a player:
                    if arg 2 is online:
                        if player has permission "redirect.deny":
                            if {redirect.%arg-2%.send.%player%} is true:
                                message "&eSuccessfully accepted the request to %arg 2%"
                                message "&cSuccessfully denied the request from &6%arg 2%"
                                send "&6%player% &cDenied your request." to arg 2
                                exit
                        else:
                            message "&cYou don't have permission!"
                    else:
                        message "&6%arg-2% &cis not online!"
            else:
                message "&a---------------&3Redirect&a---------------"
                message "&a/redirect send <player> &7- &6Send a redirect request"
                message "&a/redirect accept <player> &7- &6Accepts a redirect request"
                message "&a/redirect deny <player> &7- &6Deny a redirect request"
     
  2. Instead of "exit", use "stop".
     
  3. Still when I redirect a random online person it just says that I did but I didn't
     
  4. change:
    if {redirect.%player%.send.%arg-2%} isn't true:

    to

    if {redirect.%player%.send.%arg-2%} isn't set:
     
  5. Ohhh thnx
     
  6. THANK YOU SOOOO MUCH IT WORKS NOW!!!
     
Thread Status:
Not open for further replies.