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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

/freeze

Discussion in 'Requests' started by BrettPlayMC, Jan 28, 2017.

  1. BrettPlayMC

    Supporter

    Joined:
    Jan 26, 2017
    Messages:
    692
    Likes Received:
    52
    Category: Player Management

    Suggested name: Freeze

    What I want: A simple script that freezes a player and sends a message to them every few seconds like on HCF servers.

    Ideas for commands: /freeze and /unfreeze

    Ideas for permissions: freeze.use and unfreeze.use

    When I'd like it by: Tonight? :emoji_stuck_out_tongue:
     
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    1,691
    Likes Received:
    119
    So a short little script that should do the trick will be this:

    Code (Skript):
    1. on join:
    2.     set {freeze.%player%} to false
    3.     stop
    4.  
    5. on quit:
    6.     clear {freeze.%player%}
    7.     stop
    8.  
    9. on any move:
    10.     if {freeze.%player%} is true:
    11.         cancel event
    12.         message "&cYou are freezed!"
    13.     stop
    14.  
    15. command /freeze <text="">:
    16.     trigger:
    17.         if player has permission "freeze.use":
    18.             loop all players:
    19.                 if "%arg 1%" is "%loop-player%":
    20.                     if {freeze.%loop-player%} is true:
    21.                         message "&cThis player is already freezed!"
    22.                     else:
    23.                         set {freeze.%loop-player%} to true
    24.                         message "&aYou have freezed &6%name of loop-player%&a!"
    25.                         message "&aYou were freezed by &6%name of player%&a!" to loop-player
    26.                     stop trigger
    27.             message "&cPlayer not found!"
    28.         else:
    29.             message "&cNo Permission!"
    30.         stop trigger
    31.  
    32. command /unfreeze <text="">:
    33.     trigger:
    34.         if player has permission "unfreeze.use":
    35.             loop all players:
    36.                 if "%arg 1%" is "%loop-player%":
    37.                     if {freeze.%loop-player%} is false:
    38.                         message "&cThis player isn't freezed!"
    39.                     else:
    40.                         set {freeze.%loop-player%} to false
    41.                         message "&aYou have unfreezed &6%name of loop-player%&a!"
    42.                         message "&aYou were unfreezed by &6%name of player%&a!" to loop-player
    43.                     stop trigger
    44.             message "&cPlayer not found!"
    45.         else:
    46.             message "&cNo Permission!"
    47.         stop trigger

    Important: You need SkQuery for this!
     
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    1,691
    Likes Received:
    119
    Half of that code is a waste of time, use
    Code (Text):
    1. set freeze state of player to true
     
  4. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    1,691
    Likes Received:
    119
    that needs of Umbaska 2 and Umb 2 is very buggy so it's not a waste of time at all.
     
    • Agree Agree x 2
  5. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    1,691
    Likes Received:
    119
    It works but whenever I move or push w or any button to move I get lagged back and "you are frozen" spammed in chat.
    Can you fix this?
     
    • Agree Agree x 1
  6. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    1,691
    Likes Received:
    119
    Yep, thats the reason why i make it this way. If the Umbaska 3 Retro Module will have this function this script can be much more compact. And also @ThinkingAboutIt, when i script something i try that it will work on as many version as possible. 1.11 won't be possible with Umbaska at the moment.

    Yeah, i will test this in the next hour. :emoji_slight_smile:
     
  7. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    1,691
    Likes Received:
    119
    Actually, if you can stay away from using that expression, it'll be better. It was poorly coded, and never fixed up back from my old SkExtras addon; and thus has gone through layers of iteration without a proper recode. It's easy to replicate though with script;

    Code (Skript):
    1.  
    2. function freezePlayer(p: player):
    3.     set fly state of {_p} to true
    4.     set fly speed of {_p} to 0
    5.     set is flying of {_p} to true
    6.     set {frozen::%{_p}%} to true
    7.  
    8. function unfreezePlayer(p: player):
    9.     set {frozen::%{_p}%} to false
    10.     set fly state of {_p} to false
    11.     reset fly speed of {_p}
    12.     set is flying of {_p} to false
    13.  
    14. on flight toggle:
    15.     if {frozen::%player%} is true:
    16.         cancel event
    17.  
    Edit: Made a silly mistake. Fixed.
     
    #7 ShaneBee, Jan 29, 2017
    Last edited by a moderator: Jan 30, 2017
    • Like Like x 1
    • Useful Useful x 1
  8. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    1,691
    Likes Received:
    119
    Yep, this is a nice code :emoji_slight_smile:. And @BrettPlayMC it is normal that you are "lagged" back. If you are freezed you cannot turn move or something like this at all :emoji_grinning:.
     
  9. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    1,691
    Likes Received:
    119
    I will use this but what about the command?
    I do not see it in your script. <3
     
  10. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    1,691
    Likes Received:
    119
    I think this code will work very well. It cleares out all variables that not needed and you can configure all messages yourself (even the <text=""> has one sense: you won't become Skript's message "Error: Player not found" --> so you can configure for every script you've made an other message and Skript doesn't define the message)

    So it will look like this:

    Code (Skript):
    1. function freezePlayer(p: player):
    2.     set fly state of {_p} to true
    3.     set fly speed of {_p} to 0
    4.     set is flying of {_p} to true
    5.     set {frozen::%{_p}%} to true
    6.     clear {_p}
    7.  
    8. function unfreezePlayer(p: player):
    9.     set {frozen::%{_p}%} to false
    10.     set fly state of {_p} to false
    11.     reset fly speed of {_p}
    12.     set is flying of {_p} to false
    13.     clear {_p}
    14.  
    15. on flight toggle:
    16.     if {frozen::%{_p}%} is true:
    17.         cancel event
    18.     stop
    19.  
    20. on join:
    21.     set {frozen::%player%} to false
    22.     stop
    23.  
    24. on quit:
    25.     unfreezePlayer(player)
    26.     remove {frozen::%player%}
    27.     stop
    28.  
    29. command /freeze <text="">:
    30.     trigger:
    31.         if player has permission "freeze.use":
    32.             loop all players:
    33.                 if "%arg 1%" is "%loop-player%":
    34.                     if {frozen::%loop-player%} is true:
    35.                         message "&cThis player is already freezed!"
    36.                     else:
    37.                         freezePlayer(player)
    38.                         message "&aYou have freezed &6%name of loop-player%&a!"
    39.                         message "&aYou were freezed by &6%name of player%&a!" to loop-player
    40.                     stop trigger
    41.             message "&cPlayer not found!"
    42.         else:
    43.             message "&cNo Permission!"
    44.         stop trigger
    45.  
    46. command /unfreeze <text="">:
    47.     trigger:
    48.         if player has permission "unfreeze.use":
    49.             loop all players:
    50.                 if "%arg 1%" is "%loop-player%":
    51.                     if {frozen::%loop-player%} is false:
    52.                         message "&cThis player isn't freezed!"
    53.                     else:
    54.                         unfreezePlayer(player)
    55.                         message "&aYou have unfreezed &6%name of loop-player%&a!"
    56.                         message "&aYou were unfreezed by &6%name of player%&a!" to loop-player
    57.                     stop trigger
    58.             message "&cPlayer not found!"
    59.         else:
    60.             message "&cNo Permission!"
    61.         stop trigger

    Haven't testet it yet but it should work.
     
  11. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    1,691
    Likes Received:
    119
    I fixed the code in my original post. My fault; I was rushing.
     
    • Like Like x 1
  12. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    1,691
    Likes Received:
    119
    1 problem, my server doesn't recognize this line:
    Code (Skript):
    1.     remove {frozen::%player%}
     
  13. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    1,691
    Likes Received:
    119
    Just use a delete rather than remove.
    The skript should work fine then, but there is one thing about it that I don't get.

    @Spirit1998HD, Why do the commands need to loop all players?
    Just use check whether the player is online, then check whether their frozen variable is true or not.

    Code (Skript):
    1. Command /freeze <player>:
    2.     Permission: freeze.freeze
    3.     Permission message: No permission.
    4.     Trigger:
    5.         if player-arg is online:
    6.             if {frozen::%arg 1%} is true:
    7.                 send "&5%arg 1%&7 is already frozen. Type &e/unfreeze &7to unfreeze them."
    8.             else:
    9.                 set {frozen::%arg 1%} to true
    10.                 send "&7You froze &5%arg 1%."
    11.         else:
    12.             send "&5%arg 1%&7 is not online."
    13.  
    14. Command /unfreeze <player>:
    15.     Permission: freeze.unfreeze
    16.     Permission message: No permission.
    17.     Trigger:
    18.         if player-arg is online:
    19.             if {frozen::%arg 1%} is true:
    20.                 set {frozen::%arg 1%} to false
    21.                 send "&7You unfroze &5%arg 1%."
    22.             else:
    23.  
    24.  
    25.                 send "&5%arg 1%&7 is already unfrozen. Type &e/freeze &7to freeze them."
    26.         else:
    27.             send "&5%arg 1%&7 is not online."
    28.  
    29. on any move:
    30.     if {frozen::%player%} is true:
    31.         cancel the event
    32. # I don't think messages are necessary because it's evident when the player is frozen,
    33. # but you can use this, it won't spam their chat.
    34. # Remove the #
    35. #        set action of player to "&5You may not move! &7You are frozen!"
    36. #A title works too
    37.  
    38. on flight toggle:
    39.     if {frozen::%player%} is true:
    40.         cancel the event
    41.  
    42. on quit:
    43.     delete {frozen::%player%}
    Untested. Addons needed: SkQuery, SkRayFall for action bar

    EDIT: {frozen.%player%} -> {frozen::%player%}
     
    #13 ShaneBee, Jan 31, 2017
    Last edited by a moderator: Jan 31, 2017
    • Like Like x 1
  14. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    1,691
    Likes Received:
    119
    Thank you I will try and test this! :emoji_slight_smile:
    --- Double Post Merged, Jan 31, 2017, Original Post Date: Jan 31, 2017 ---
    Ok I just tried it and got a ton of errors:
    Code (Skript):
    1. 30.01 18:59:38 [Server] INFO Encountered 44 errors while reloading freeze.sk!
    2. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 36:     delete {frozen.%player%}')
    3. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 33:         cancel the event')
    4. 30.01 18:59:38 [Server] ERROR can't understand this event: '    if {frozen::%player%} is true' (freeze.sk, line 32:     if {frozen::%player%} is true:')
    5. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 29:         cancel the event')
    6. 30.01 18:59:38 [Server] ERROR can't understand this event: '    if {frozen::%player%} is true' (freeze.sk, line 28:     if {frozen::%player%} is true:')
    7. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 25:             send "&5%arg 1%&7 is not online."')
    8. 30.01 18:59:38 [Server] ERROR can't understand this event: '        else' (freeze.sk, line 24:         else:')
    9. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 23:                 send "&5%arg 1%&7 is already unfrozen. Type &e/freeze &7to freeze them."')
    10. 30.01 18:59:38 [Server] ERROR can't understand this event: '            else' (freeze.sk, line 22:             else:')
    11. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 21:                 send "&7You unfroze &5%arg 1%."')
    12. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 20:                 set {frozen::%arg 1%} to false')
    13. 30.01 18:59:38 [Server] ERROR can't understand this event: '            if {frozen::%arg 1%} is true' (freeze.sk, line 19:             if {frozen::%arg 1%} is true:')
    14. 30.01 18:59:38 [Server] ERROR can't understand this event: '        if player-arg is online' (freeze.sk, line 18:         if player-arg is online:')
    15. 30.01 18:59:38 [Server] ERROR can't understand this event: '    Trigger' (freeze.sk, line 17:     Trigger:')
    16. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 16:     Permission message: No permission.')
    17. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 15:     Permission: freeze.unfreeze')
    18. 30.01 18:59:38 [Server] ERROR Required entry 'trigger' is missing in 'Command /unfreeze <player>' (freeze.sk, starting at line 14) (freeze.sk, line 14: Command /unfreeze <player>:')
    19. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 12:             send "&5%arg 1%&7 is not online."')
    20. 30.01 18:59:38 [Server] ERROR can't understand this event: '        else' (freeze.sk, line 11:         else:')
    21. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 10:                 send "&7You froze &5%arg 1%."')
    22. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 9:                 set {frozen::%arg 1%} to true')
    23. 30.01 18:59:38 [Server] ERROR can't understand this event: '            else' (freeze.sk, line 8:             else:')
    24. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 7:                 send "&5%arg 1%&7 is already frozen. Type &e/unfreeze &7to unfreeze them."')
    25. 30.01 18:59:38 [Server] ERROR can't understand this event: '            if {frozen::%arg 1%} is true' (freeze.sk, line 6:             if {frozen::%arg 1%} is true:')
    26. 30.01 18:59:38 [Server] ERROR can't understand this event: '        if player-arg is online' (freeze.sk, line 5:         if player-arg is online:')
    27. 30.01 18:59:38 [Server] ERROR can't understand this event: '    trigger' (freeze.sk, line 4:     trigger:')
    28. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 3:     permission message: No permission.')
    29. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 2:     permission: freeze.freeze')
    30. 30.01 18:59:38 [Server] ERROR Required entry 'trigger' is missing in 'Command /freeze <player>' (freeze.sk, starting at line 1) (freeze.sk, line 1: Command /freeze <player>:')
    31. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 35: on quit:')
    32. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 32:     if {frozen::%player%} is true:')
    33. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 31: on flight toggle:')
    34. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 28:     if {frozen::%player%} is true:')
    35. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 27: on any move:')
    36. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 24:         else:')
    37. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 22:             else:')
    38. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 19:             if {frozen::%arg 1%} is true:')
    39. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 18:         if player-arg is online:')
    40. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 17:     Trigger:')
    41. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 14: Command /unfreeze <player>:')
    42. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 11:         else:')
    43. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 8:             else:')
    44. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 6:             if {frozen::%arg 1%} is true:')
    45. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 5:         if player-arg is online:')
    46. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 4:     trigger:')
    47. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 1: Command /freeze <player>:')
    48. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 36:     delete {frozen.%player%}')
    49. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 33:         cancel the event')
    50. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 29:         cancel the event')
    51. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 25:             send "&5%arg 1%&7 is not online."')
    52. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 23:                 send "&5%arg 1%&7 is already unfrozen. Type &e/freeze &7to freeze them."')
    53. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 21:                 send "&7You unfroze &5%arg 1%."')
    54. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 20:                 set {frozen::%arg 1%} to false')
    55. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 16:     Permission message: No permission.')
    56. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 15:     Permission: freeze.unfreeze')
    57. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 12:             send "&5%arg 1%&7 is not online."')
    58. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 10:                 send "&7You froze &5%arg 1%."')
    59. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 9:                 set {frozen::%arg 1%} to true')
    60. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 7:                 send "&5%arg 1%&7 is already frozen. Type &e/unfreeze &7to unfreeze them."')
    61. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 3:     permission message: No permission.')
    62. 30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 2:     permission: freeze.freeze')
    63. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 35: on quit:')
    64. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 32:     if {frozen::%player%} is true:')
    65. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 31: on flight toggle:')
    66. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 28:     if {frozen::%player%} is true:')
    67. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 27: on any move:')
    68. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 24:         else:')
    69. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 22:             else:')
    70. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 19:             if {frozen::%arg 1%} is true:')
    71. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 18:         if player-arg is online:')
    72. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 17:     Trigger:')
    73. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 14: Command /unfreeze <player>:')
    74. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 11:         else:')
    75. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 8:             else:')
    76. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 6:             if {frozen::%arg 1%} is true:')
    77. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 5:         if player-arg is online:')
    78. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 4:     trigger:')
    79. 30.01 18:59:38 [Server] WARN Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (freeze.sk, line 1: Command /freeze <player>:')
    80. 30.01 18:59:38 [Server] INFO Reloading freeze.sk...
    81.  
     
    • Like Like x 1
  15. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    1,691
    Likes Received:
    119
    Weird... Some of these errors are in direct disagreement with what I wrote.

    Either I missed a colon, the way that XenForo handles tabs messed up my copy+paste.
    Can you test this simple /kill script to prove my hypothesis? I use this script myself, and it works.
    Command /kill:
    Description: Kill Self
    Usage: /kill
    Aliases: /suicide
    Executable by: players
    Permission: command.suicide
    permission message: &cSorry, you can't do that here.
    Trigger:
    send "&aYou will now die."
    kill the player

    I can give you a file if you my hypothesis is true.
     
  16. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    1,691
    Likes Received:
    119
    Can you post both in a file? :emoji_stuck_out_tongue:
    Xenforo is messing up and removing the spaces.
     
  17. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    1,691
    Likes Received:
    119
    So it was the tabs. I'll give you a mediafire link tomorrow. Sadly, I can't do it today, mediafire is blocked for some reason (idk)
     
  18. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    1,691
    Likes Received:
    119
    hastebin it.
     
  19. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    1,691
    Likes Received:
    119
    @A248 so the reason because i loop all players is simple... I hate if i type an "t" as argument the script takes somebody with an "t" in their name...
    For me thats very annoying. And a correction to you: Why you wan't to check if an player argument is online? This message of your script will never be shown, because a player argument is online everytime. So script would post his ugly message "Player is not online... Usage...". Also the use of a bossbar is in some parts not recommend because many servers use this bar as auto messenger. So here will be a code that only requires SKQuery as Addon:

    Code (Skript):
    1. command /freeze <offlineplayer>:
    2.     permission: freeze.use
    3.     permission message: &cNo permission!
    4.     trigger:
    5.         if argument is online:
    6.             if {frozen::%argument%} is true:
    7.                 message "&6%argument%&c is already frozen. Type &6/unfreeze &cto unfreeze them!"
    8.             else:
    9.                 set {frozen::%argument%} to true
    10.                 message "&aYou froze &6%argument%"
    11.                 message "&cYou were frozen by &6%player%" to argument
    12.         else:
    13.             message "&cPlayer not found!"
    14.  
    15. command /unfreeze <offlineplayer>:
    16.     permission: unfreeze.use
    17.     permission message: &cNo permission!
    18.     trigger:
    19.         if argument is online:
    20.             if {frozen::%argument%} is true:
    21.                 set {frozen::%argument%} to false
    22.                 message "&aYou unfroze &6%argument%"
    23.                 message "&aYou were unfrozen by &6%player%" to argument
    24.             else:
    25.                 message "&6%argument%&c is already unfrozen. Type &6/freeze &cto freeze them!"
    26.         else:
    27.             message "&cPlayer not found!"
    28.  
    29. on any move:
    30.     if {frozen::%player%} is true:
    31.         message "&cYou are frozen!"
    32.         cancel event
    33.  
    34. on flight toggle:
    35.     if {frozen::%player%} is true:
    36.         cancel event
    37.  
    38. on quit:
    39.     delete {frozen::%player%}
    Edit: Copying and pasting this into a .sk file works without problems, i tested it with this code.
     
  20. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    1,691
    Likes Received:
    119
    just delete it instead of set it to false and then check if it's set and not if it's true.
     
Loading...