/freeze

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

BrettPlayMC

Supporter
Jan 26, 2017
715
53
28
SkUnity Street
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:
 
So a short little script that should do the trick will be this:

code_language.skript:
on join:
    set {freeze.%player%} to false
    stop

on quit:
    clear {freeze.%player%}
    stop

on any move:
    if {freeze.%player%} is true:
        cancel event
        message "&cYou are freezed!"
    stop

command /freeze <text="">:
    trigger:
        if player has permission "freeze.use":
            loop all players:
                if "%arg 1%" is "%loop-player%":
                    if {freeze.%loop-player%} is true:
                        message "&cThis player is already freezed!"
                    else:
                        set {freeze.%loop-player%} to true
                        message "&aYou have freezed &6%name of loop-player%&a!"
                        message "&aYou were freezed by &6%name of player%&a!" to loop-player
                    stop trigger
            message "&cPlayer not found!"
        else:
            message "&cNo Permission!"
        stop trigger

command /unfreeze <text="">:
    trigger:
        if player has permission "unfreeze.use":
            loop all players:
                if "%arg 1%" is "%loop-player%":
                    if {freeze.%loop-player%} is false:
                        message "&cThis player isn't freezed!"
                    else:
                        set {freeze.%loop-player%} to false
                        message "&aYou have unfreezed &6%name of loop-player%&a!"
                        message "&aYou were unfreezed by &6%name of player%&a!" to loop-player
                    stop trigger
            message "&cPlayer not found!"
        else:
            message "&cNo Permission!"
        stop trigger

Important: You need SkQuery for this!
 
So a short little script that should do the trick will be this:

code_language.skript:
on join:
    set {freeze.%player%} to false
    stop

on quit:
    clear {freeze.%player%}
    stop

on any move:
    if {freeze.%player%} is true:
        cancel event
        message "&cYou are freezed!"
    stop

command /freeze <text="">:
    trigger:
        if player has permission "freeze.use":
            loop all players:
                if "%arg 1%" is "%loop-player%":
                    if {freeze.%loop-player%} is true:
                        message "&cThis player is already freezed!"
                    else:
                        set {freeze.%loop-player%} to true
                        message "&aYou have freezed &6%name of loop-player%&a!"
                        message "&aYou were freezed by &6%name of player%&a!" to loop-player
                    stop trigger
            message "&cPlayer not found!"
        else:
            message "&cNo Permission!"
        stop trigger

command /unfreeze <text="">:
    trigger:
        if player has permission "unfreeze.use":
            loop all players:
                if "%arg 1%" is "%loop-player%":
                    if {freeze.%loop-player%} is false:
                        message "&cThis player isn't freezed!"
                    else:
                        set {freeze.%loop-player%} to false
                        message "&aYou have unfreezed &6%name of loop-player%&a!"
                        message "&aYou were unfreezed by &6%name of player%&a!" to loop-player
                    stop trigger
            message "&cPlayer not found!"
        else:
            message "&cNo Permission!"
        stop trigger

Important: You need SkQuery for this!
Half of that code is a waste of time, use
Code:
set freeze state of player to true
 
So a short little script that should do the trick will be this:

code_language.skript:
on join:
    set {freeze.%player%} to false
    stop

on quit:
    clear {freeze.%player%}
    stop

on any move:
    if {freeze.%player%} is true:
        cancel event
        message "&cYou are freezed!"
    stop

command /freeze <text="">:
    trigger:
        if player has permission "freeze.use":
            loop all players:
                if "%arg 1%" is "%loop-player%":
                    if {freeze.%loop-player%} is true:
                        message "&cThis player is already freezed!"
                    else:
                        set {freeze.%loop-player%} to true
                        message "&aYou have freezed &6%name of loop-player%&a!"
                        message "&aYou were freezed by &6%name of player%&a!" to loop-player
                    stop trigger
            message "&cPlayer not found!"
        else:
            message "&cNo Permission!"
        stop trigger

command /unfreeze <text="">:
    trigger:
        if player has permission "unfreeze.use":
            loop all players:
                if "%arg 1%" is "%loop-player%":
                    if {freeze.%loop-player%} is false:
                        message "&cThis player isn't freezed!"
                    else:
                        set {freeze.%loop-player%} to false
                        message "&aYou have unfreezed &6%name of loop-player%&a!"
                        message "&aYou were unfreezed by &6%name of player%&a!" to loop-player
                    stop trigger
            message "&cPlayer not found!"
        else:
            message "&cNo Permission!"
        stop trigger

Important: You need SkQuery for this!
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?
 
that needs of Umbaska 2 and Umb 2 is very buggy so it's not a waste of time at all.

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.

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?

Yeah, i will test this in the next hour. :emoji_slight_smile:
 
Half of that code is a waste of time, use
Code:
set freeze state of player to true

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_language.skript:
function freezePlayer(p: player):
    set fly state of {_p} to true
    set fly speed of {_p} to 0
    set is flying of {_p} to true
    set {frozen::%{_p}%} to true
  
function unfreezePlayer(p: player):
    set {frozen::%{_p}%} to false
    set fly state of {_p} to false
    reset fly speed of {_p}
    set is flying of {_p} to false
  
on flight toggle:
    if {frozen::%player%} is true:
        cancel event

Edit: Made a silly mistake. Fixed.
 
Last edited by a moderator:
  • Like
Reactions: Snow-Pyon
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_language.skript:
function freezePlayer(p: player):
    set fly state of {_p} to true
    set fly speed of {_p} to 0
    set is flying of {_p} to true
    set {frozen::%{_p}%} to true
  
function unfreezePlayer(p: player):
    set {frozen::%{_p}%} to false
    set fly state of {_p} to false
    reset fly speed of {_p}
    set is flying of {_p} to false
  
on flight toggle:
    if {frozen::%{_p}%} is true:
        cancel event

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:.
 
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_language.skript:
function freezePlayer(p: player):
    set fly state of {_p} to true
    set fly speed of {_p} to 0
    set is flying of {_p} to true
    set {frozen::%{_p}%} to true
 
function unfreezePlayer(p: player):
    set {frozen::%{_p}%} to false
    set fly state of {_p} to false
    reset fly speed of {_p}
    set is flying of {_p} to false
 
on flight toggle:
    if {frozen::%{_p}%} is true:
        cancel event
I will use this but what about the command?
I do not see it in your script. <3
 
I will use this but what about the command?
I do not see it in your script. <3

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_language.skript:
function freezePlayer(p: player):
    set fly state of {_p} to true
    set fly speed of {_p} to 0
    set is flying of {_p} to true
    set {frozen::%{_p}%} to true
    clear {_p}
 
function unfreezePlayer(p: player):
    set {frozen::%{_p}%} to false
    set fly state of {_p} to false
    reset fly speed of {_p}
    set is flying of {_p} to false
    clear {_p}
 
on flight toggle:
    if {frozen::%{_p}%} is true:
        cancel event
    stop

on join:
    set {frozen::%player%} to false
    stop

on quit:
    unfreezePlayer(player)
    remove {frozen::%player%}
    stop

command /freeze <text="">:
    trigger:
        if player has permission "freeze.use":
            loop all players:
                if "%arg 1%" is "%loop-player%":
                    if {frozen::%loop-player%} is true:
                        message "&cThis player is already freezed!"
                    else:
                        freezePlayer(player)
                        message "&aYou have freezed &6%name of loop-player%&a!"
                        message "&aYou were freezed by &6%name of player%&a!" to loop-player
                    stop trigger
            message "&cPlayer not found!"
        else:
            message "&cNo Permission!"
        stop trigger

command /unfreeze <text="">:
    trigger:
        if player has permission "unfreeze.use":
            loop all players:
                if "%arg 1%" is "%loop-player%":
                    if {frozen::%loop-player%} is false:
                        message "&cThis player isn't freezed!"
                    else:
                        unfreezePlayer(player)
                        message "&aYou have unfreezed &6%name of loop-player%&a!"
                        message "&aYou were unfreezed by &6%name of player%&a!" to loop-player
                    stop trigger
            message "&cPlayer not found!"
        else:
            message "&cNo Permission!"
        stop trigger

Haven't testet it yet but it should work.
 
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_language.skript:
function freezePlayer(p: player):
    set fly state of {_p} to true
    set fly speed of {_p} to 0
    set is flying of {_p} to true
    set {frozen::%{_p}%} to true
    clear {_p}
 
function unfreezePlayer(p: player):
    set {frozen::%{_p}%} to false
    set fly state of {_p} to false
    reset fly speed of {_p}
    set is flying of {_p} to false
    clear {_p}
 
on flight toggle:
    if {frozen::%{_p}%} is true:
        cancel event
    stop

on join:
    set {frozen::%player%} to false
    stop

on quit:
    unfreezePlayer(player)
    remove {frozen::%player%}
    stop

command /freeze <text="">:
    trigger:
        if player has permission "freeze.use":
            loop all players:
                if "%arg 1%" is "%loop-player%":
                    if {frozen::%loop-player%} is true:
                        message "&cThis player is already freezed!"
                    else:
                        freezePlayer(player)
                        message "&aYou have freezed &6%name of loop-player%&a!"
                        message "&aYou were freezed by &6%name of player%&a!" to loop-player
                    stop trigger
            message "&cPlayer not found!"
        else:
            message "&cNo Permission!"
        stop trigger

command /unfreeze <text="">:
    trigger:
        if player has permission "unfreeze.use":
            loop all players:
                if "%arg 1%" is "%loop-player%":
                    if {frozen::%loop-player%} is false:
                        message "&cThis player isn't freezed!"
                    else:
                        unfreezePlayer(player)
                        message "&aYou have unfreezed &6%name of loop-player%&a!"
                        message "&aYou were unfreezed by &6%name of player%&a!" to loop-player
                    stop trigger
            message "&cPlayer not found!"
        else:
            message "&cNo Permission!"
        stop trigger

Haven't testet it yet but it should work.
1 problem, my server doesn't recognize this line:
code_language.skript:
    remove {frozen::%player%}
 
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_language.skript:
Command /freeze <player>:
    Permission: freeze.freeze
    Permission message: No permission.
    Trigger:
        if player-arg is online:
            if {frozen::%arg 1%} is true:
                send "&5%arg 1%&7 is already frozen. Type &e/unfreeze &7to unfreeze them."
            else:
                set {frozen::%arg 1%} to true
                send "&7You froze &5%arg 1%."
        else:
            send "&5%arg 1%&7 is not online."

Command /unfreeze <player>:
    Permission: freeze.unfreeze
    Permission message: No permission.
    Trigger:
        if player-arg is online:
            if {frozen::%arg 1%} is true:
                set {frozen::%arg 1%} to false
                send "&7You unfroze &5%arg 1%."
            else:


                send "&5%arg 1%&7 is already unfrozen. Type &e/freeze &7to freeze them."
        else:
            send "&5%arg 1%&7 is not online."

on any move:
    if {frozen::%player%} is true:
        cancel the event
# I don't think messages are necessary because it's evident when the player is frozen,
# but you can use this, it won't spam their chat.
# Remove the #
#        set action of player to "&5You may not move! &7You are frozen!"
#A title works too

on flight toggle:
    if {frozen::%player%} is true:
        cancel the event

on quit:
    delete {frozen::%player%}
Untested. Addons needed: SkQuery, SkRayFall for action bar

EDIT: {frozen.%player%} -> {frozen::%player%}
 
Last edited by a moderator:
  • Like
Reactions: BrettPlayMC
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_language.skript:
Command /freeze <player>:
    Permission: freeze.freeze
    Permission message: No permission.
    Trigger:
        if player-arg is online:
            if {frozen::%arg 1%} is true:
                send "&5%arg 1%&7 is already frozen. Type &e/unfreeze &7to unfreeze them."
            else:
                set {frozen::%arg 1%} to true
                send "&7You froze &5%arg 1%."
        else:
            send "&5%arg 1%&7 is not online."

Command /unfreeze <player>:
    Permission: freeze.unfreeze
    Permission message: No permission.
    Trigger:
        if player-arg is online:
            if {frozen::%arg 1%} is true:
                set {frozen::%arg 1%} to false
                send "&7You unfroze &5%arg 1%."
            else:


                send "&5%arg 1%&7 is already unfrozen. Type &e/freeze &7to freeze them."
        else:
            send "&5%arg 1%&7 is not online."

on any move:
    if {frozen::%player%} is true:
        cancel the event
# I don't think messages are necessary because it's evident when the player is frozen,
# but you can use this, it won't spam their chat.
# Remove the #
#        set action of player to "&5You may not move! &7You are frozen!"
#A title works too

on flight toggle:
    if {frozen::%player%} is true:
        cancel the event

on quit:
    delete {frozen.%player%}
Untested. Addons needed: SkQuery, SkRayFall for action bar
Thank you I will try and test this! :emoji_slight_smile:
[doublepost=1485824428,1485824326][/doublepost]
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_language.skript:
Command /freeze <player>:
    Permission: freeze.freeze
    Permission message: No permission.
    Trigger:
        if player-arg is online:
            if {frozen::%arg 1%} is true:
                send "&5%arg 1%&7 is already frozen. Type &e/unfreeze &7to unfreeze them."
            else:
                set {frozen::%arg 1%} to true
                send "&7You froze &5%arg 1%."
        else:
            send "&5%arg 1%&7 is not online."

Command /unfreeze <player>:
    Permission: freeze.unfreeze
    Permission message: No permission.
    Trigger:
        if player-arg is online:
            if {frozen::%arg 1%} is true:
                set {frozen::%arg 1%} to false
                send "&7You unfroze &5%arg 1%."
            else:


                send "&5%arg 1%&7 is already unfrozen. Type &e/freeze &7to freeze them."
        else:
            send "&5%arg 1%&7 is not online."

on any move:
    if {frozen::%player%} is true:
        cancel the event
# I don't think messages are necessary because it's evident when the player is frozen,
# but you can use this, it won't spam their chat.
# Remove the #
#        set action of player to "&5You may not move! &7You are frozen!"
#A title works too

on flight toggle:
    if {frozen::%player%} is true:
        cancel the event

on quit:
    delete {frozen.%player%}
Untested. Addons needed: SkQuery, SkRayFall for action bar
Ok I just tried it and got a ton of errors:
code_language.skript:
30.01 18:59:38 [Server] INFO Encountered 44 errors while reloading freeze.sk!
30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 36:     delete {frozen.%player%}')
30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 33:         cancel the event')
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:')
30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 29:         cancel the event')
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:')
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."')
30.01 18:59:38 [Server] ERROR can't understand this event: '        else' (freeze.sk, line 24:         else:')
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."')
30.01 18:59:38 [Server] ERROR can't understand this event: '            else' (freeze.sk, line 22:             else:')
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%."')
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')
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:')
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:')
30.01 18:59:38 [Server] ERROR can't understand this event: '    Trigger' (freeze.sk, line 17:     Trigger:')
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.')
30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 15:     Permission: freeze.unfreeze')
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>:')
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."')
30.01 18:59:38 [Server] ERROR can't understand this event: '        else' (freeze.sk, line 11:         else:')
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%."')
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')
30.01 18:59:38 [Server] ERROR can't understand this event: '            else' (freeze.sk, line 8:             else:')
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."')
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:')
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:')
30.01 18:59:38 [Server] ERROR can't understand this event: '    trigger' (freeze.sk, line 4:     trigger:')
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.')
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.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>:')
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:')
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:')
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:')
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:')
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:')
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:')
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:')
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:')
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:')
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:')
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>:')
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:')
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:')
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:')
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:')
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:')
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>:')
30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 36:     delete {frozen.%player%}')
30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 33:         cancel the event')
30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 29:         cancel the event')
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."')
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."')
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%."')
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')
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.')
30.01 18:59:38 [Server] ERROR invalid line - all code has to be put into triggers (freeze.sk, line 15:     Permission: freeze.unfreeze')
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."')
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%."')
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')
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."')
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.')
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.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:')
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:')
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:')
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:')
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:')
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:')
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:')
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:')
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:')
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:')
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>:')
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:')
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:')
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:')
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:')
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:')
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>:')
30.01 18:59:38 [Server] INFO Reloading freeze.sk...
 
  • Like
Reactions: A248
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.
 
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.
Can you post both in a file? :emoji_stuck_out_tongue:
Xenforo is messing up and removing the spaces.
 
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)
 
@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_language.skript:
command /freeze <offlineplayer>:
    permission: freeze.use
    permission message: &cNo permission!
    trigger:
        if argument is online:
            if {frozen::%argument%} is true:
                message "&6%argument%&c is already frozen. Type &6/unfreeze &cto unfreeze them!"
            else:
                set {frozen::%argument%} to true
                message "&aYou froze &6%argument%"
                message "&cYou were frozen by &6%player%" to argument
        else:
            message "&cPlayer not found!"

command /unfreeze <offlineplayer>:
    permission: unfreeze.use
    permission message: &cNo permission!
    trigger:
        if argument is online:
            if {frozen::%argument%} is true:
                set {frozen::%argument%} to false
                message "&aYou unfroze &6%argument%"
                message "&aYou were unfrozen by &6%player%" to argument
            else:
                message "&6%argument%&c is already unfrozen. Type &6/freeze &cto freeze them!"
        else:
            message "&cPlayer not found!"

on any move:
    if {frozen::%player%} is true:
        message "&cYou are frozen!"
        cancel event

on flight toggle:
    if {frozen::%player%} is true:
        cancel event

on quit:
    delete {frozen::%player%}

Edit: Copying and pasting this into a .sk file works without problems, i tested it with this code.