on rightclick on sign

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

Buzdrev

Member
Feb 25, 2017
23
0
0
25
I'm using this but it works only on empty sign:
Code:
on right click on sign:
    if {minigames.%player%} is true:
        set {minigames.%player%} to false
I tried it that way too but with no luck:
Code:
on right click on sign:
    1st line of clicked block is "&1[Minigame]"
    2nd line of clicked block is "&2Quit"
    if {minigames.%player%} is true:
        set {minigames.%player%} to false
 
Did you try:
code_language.skript:
on right click on sign:
    line 1 of block is "&1[Minigame]"
    line 2 of block is "&2Quit"
    if {minigames.%player%} is true:
        set {minigames.%player%} to false
 
Yes:
Code:
on right click on sign:
    line 1 of block is "&1[Minigame]"
    line 2 of block is "&2Quit"
    send "working"
    if {minigames.%player%} is true:
        set {minigames.%player%} to false
        send "working"
In this way nothing happens.
Code:
on right click on sign:
    send "working"
    if {minigames.%player%} is true:
        set {minigames.%player%} to false
        send "working"
If it is this way it's working but only on empty sign.
 
Spigot version 1.9.4 (This server is running CraftBukkit version git-Spigot-c6871e2-0cd0397 (MC: 1.9.4) (Implementing API version 1.9.4-R0.1-SNAPSHOT)
Skript version: 2.2-dev37c
 
Question, are you sure that the variable {minigames.%player%} is actually set to true? Try this just to test
code_language.skript:
    if {minigames.%player%} is not set:
        set {minigames.%player%} to false
        send "working2"
 
Yes, I'm sure that it is set to true and the problem is not there because:
Code:
[LIST=1]
[*]on right click on sign:
[*]    send "working"    #When i click on sign I don't get this message, so the variable isn't our problem.
[*]    if {minigames.%player%} is true:
[*]        set {minigames.%player%} to false
[*]        send "working"
[/LIST]
 
This might be an issue with 1.9 then??!! Im not sure
I tested with 4 different signs.
2 wall signs (1 with writing on it and one blank)
2 ground signs (1 with writing on it and one blank)

I used the code:
code_language.skript:
on right click on sign:
    send "test" to player
When I clicked on each of the 4 signs, each time it sent "test" to me.
This was tested on 1.12.2 so I have no idea how it works on older versions.
 
Status
Not open for further replies.