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.

Solved Change Sign Text

Discussion in 'Skript' started by ApplePenChicken, Oct 1, 2021.

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

    Joined:
    Aug 8, 2021
    Messages:
    32
    Likes Received:
    0
    I have been trying to change sign text for a 1v1 game in pvp
    I am not sure how to though.
    I tried set text of {_sign} to "Axe 1v1. %{axe1v1people1}%/2"
    and set line 1 of {_sign} to "Axe 1v1. %{axe1v1people1}%/2"
    but it does not work. no errors
    full code
    command /setaxe1v1sign1:
    permission:emoji_astonished:p
    trigger:
    if the player's target block is a wall sign:
    set {axe1v1signs1} to the player's targeted block
    send "You have set Axe 1v1 sign 1!"
    set {_sign} to the player's targeted block
    set text of {_sign} to "Axe 1v1. %{axe1v1people1}%/2"
    else:
    send "Hey!, That's not a sign!"

     
  2. Best Answer:
    Post #10 by oToghty, Oct 3, 2021
  3. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    40
    please use code blocks
     
  4. ApplePenChicken

    Joined:
    Aug 8, 2021
    Messages:
    32
    Likes Received:
    0
    I'm Not Sure How Sorry.
     
  5. oToghty

    VIP Supporter +

    Joined:
    Sep 1, 2020
    Messages:
    143
    Likes Received:
    5
    the 17th button or the 4th if you go from right to left upload_2021-10-2_22-36-42.png
     
  6. ApplePenChicken

    Joined:
    Aug 8, 2021
    Messages:
    32
    Likes Received:
    0
    Code (Text):
    1. on right click on sign:
    2.     if the event-block is the block at {axe1v1signs1}:
    3.         set {_sign} to event-block
    4.         if {axe1v1inqueue1.%player%} is false:
    5.             if {axe1v1people1} is less than 2:
    6.                 increase {axe1v1people1} by 1
    7.                 set text of {_sign} to "Axe 1v1. %{axe1v1people1}%/2"
    8.                 set {axe1v1inqueue1.%player%} to true
    9.                 loop all players:
    10.                     if {axe1v1inqueue1.%player%} is true:
    11.                         send "A player Joined Axe 1v1!"
    12.                 if {axe1v1people1} is 2:
    13.                     set text of {_sign} to "Axe 1v1. %{axe1v1people1}%/2 Game Started."
    14.                     loop all players:
    15.                         if {axe1v1inqueue1.%loop-player%} = true:
    16.                             teleport the loop-player to the block at {axe1v1arena1}
    17.                             set {axe1v1ingame1.%loop-player%} to true
    18.                             set {axe1v1inqueue1.%loop-player%} to false
    19.                             set {axe1v1people1} to 0
    20.                             clear loop-player's inventory
    21.                             give loop-player a diamond axe
    22.                             give loop-player a diamond sword
    23.                             give loop-player a crossbow
    24.                             give loop-player a bow
    25.                             give loop-player 7 arrows
    26.                             set loop-player's shield to a shield
    27.                             set loop-player's chestplate to a diamond chestplate
    28.                             set loop-player's helmet to a diamond helmet
    29.                             set loop-player's leggings to diamond leggings
    30.                             set loop-player's boots to diamond boots
    31.         else:
    32.             send "You are already in a Queue!"
    --- Double Post Merged, Oct 3, 2021, Original Post Date: Oct 3, 2021 ---
    Code (Text):
    1. command /setaxe1v1sign1:
    2.     permission:op
    3.     trigger:
    4.         if the player's target block is a wall sign:
    5.             set {axe1v1signs1} to the player's targeted block
    6.             send "You have set Axe 1v1 sign 1!"
    7.             set {_sign} to the player's targeted block
    8.             set text of {_sign} to "Axe 1v1. %{axe1v1people1}%/2"
    9.         else:
    10.             send "Hey!, That's not a sign!"
    set sign code
     
  7. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    40
    and what exactly isn't working?
     
  8. ApplePenChicken

    Joined:
    Aug 8, 2021
    Messages:
    32
    Likes Received:
    0
    Everything is working fine but the sign text being set.
     
  9. oToghty

    VIP Supporter +

    Joined:
    Sep 1, 2020
    Messages:
    143
    Likes Received:
    5
    set line 1 of ... to ""
     
  10. ApplePenChicken

    Joined:
    Aug 8, 2021
    Messages:
    32
    Likes Received:
    0
    What Addons would that work with? i did
    Code (Text):
    1. if the player's target block is a wall sign:
    2.             set {axe1v1signs1} to the player's targeted block
    3.             send "You have set Axe 1v1 sign 1!"
    4.             set {_sign} to the player's targeted block
    5.             set line 1 of {_sign} to "Axe 1v1. %{axe1v1people1}%/2"
    I only have Skript should I get others?
    I'm Thinking about getting Tuske and SkQuery but I'm not sure what ones to get for this project.

    Everything Works Fine But The Sign Text Just Does Not Show
     
  11. oToghty

    VIP Supporter +

    Joined:
    Sep 1, 2020
    Messages:
    143
    Likes Received:
    5
    1. Don't get Tuske and SkQuery, they're not needed
    2. Does the message "You have set axe 1v1 sign 1" get sent? if yes, broadcast the variable {_sign}, make sure it's set
     
  12. ApplePenChicken

    Joined:
    Aug 8, 2021
    Messages:
    32
    Likes Received:
    0
    Oh, I just destroyed the sign and replaced it then did the command on it.
    And It Works Fine! Thankyou
     
Thread Status:
Not open for further replies.

Share This Page

Loading...