D
Deleted member 5254
just delete it instead of set it to false and then check if it's set and not if it's true.
This would be variables that are crap. And they need a bit of storage and so on... It would be cleaner so.
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!
just delete it instead of set it to false and then check if it's set and not if it's true.
Well, my script above works for me. I don't know why you got 44 errors.
Anyways, here is a pastebin and file:
http://pastebin.com/z2c7uy10
https://mega.nz/#!hYlWjAzK!VrWt5Fytk2DEJheJYrcbESrdvgNBzW6F3te5CHP9muk
I changed {frozen::%player%} to {frozen.%player%}
@Spirit1998HD , I just tried and Skript ensures the player is online first. I typed /freeze X into the console and X was not online, but I received 'there is no player online whose name starts with X". You can use the loop if you want, I don't really care.
I used an action bar, not bossbar. They're different. Action bars are what you see when you switch tools.
To demonstrate things better.@BrettPlayMC why a video?
command /freeze [<string>]:
trigger:
if arg 1 parsed as player is not set:
send "&7Usage: /freeze [player]."
stop
set gamemode of arg 1 parsed as player to survival
set walk speed of arg 1 parsed as player to 0
set fly speed of arg 1 parsed as player to 0
set hunger of arg 1 parsed as player to 3
# Requires Bensku's Skript
set saturation of arg 1 parsed as player to 20
apply jump 200 to arg 1 parsed as player for 1 day
command /unfreeze [<string>]:
trigger:
if arg 1 parsed as player is not set:
send "&7This player is offline."
stop
if arg 1 parsed as player doesn't have jump:
send "&7This player is not freezed."
stop
set walk speed of arg 1 parsed as player to 0.2
set fly speed of arg 1 parsed as player to 0.1
set hunger of arg 1 parsed as player to 10
# Requires Bensku's Skript
set saturation of arg 1 parsed as player to 10
remove jump from player
Because that syntax doesn't make sense...It's doesnt work for me.Code:set is flying for player to true
@Gatt Which addon is responsible for it?
Will test!There's is another way to do this:
Code:command /freeze [<string>]: trigger: if arg 1 parsed as player is not set: send "&7Usage: /freeze [player]." stop set gamemode of arg 1 parsed as player to survival set walk speed of arg 1 parsed as player to 0 set fly speed of arg 1 parsed as player to 0 set hunger of arg 1 parsed as player to 3 # Requires Bensku's Skript set saturation of arg 1 parsed as player to 20 apply jump 200 to arg 1 parsed as player for 1 day command /unfreeze [<string>]: trigger: if arg 1 parsed as player is not set: send "&7This player is offline." stop if arg 1 parsed as player doesn't have jump: send "&7This player is not freezed." stop set walk speed of arg 1 parsed as player to 0.2 set fly speed of arg 1 parsed as player to 0.1 set hunger of arg 1 parsed as player to 10 # Requires Bensku's Skript set saturation of arg 1 parsed as player to 10 remove jump from player
Can be upgraded to save player's hunger and saturation.
Doesn't detect anything, so most likely won't cause any lag.
The player can still move if he has a hacked client.
Because that syntax doesn't make sense...
Will test!
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.
no because "is flying" isn't an expression nor an effect.It's make sense
That isn't English either so that doesn't make sense as well. See my point?It's make sense
Because that is a function. Is this correct @Gatt?@BrettPlayMC @Snow-Pyon So why @Gatt used this in his script (https://forums.skunity.com/threads/freeze.169/#post-859) as effect?
https://github.com/nfelly/Umbaska/b...c224/src/uk/co/umbaska/Misc/ExprForceFly.java ;p
Because him might be using Umbaska 2 which is truly buggy and not being updated anymore, just use the flight mode expression of skQuery.@BrettPlayMC @Snow-Pyon So why @Gatt used this in his script (https://forums.skunity.com/threads/freeze.169/#post-859) as effect?
https://github.com/nfelly/Umbaska/b...c224/src/uk/co/umbaska/Misc/ExprForceFly.java ;p
Because him might be using Umbaska 2 which is truly buggy and not being updated anymore, just use the flight mode expression of skQuery.
Sorry for the bump but can you make it save peoples hunger/heath?There's is another way to do this:
Code:command /freeze [<string>]: trigger: if arg 1 parsed as player is not set: send "&7Usage: /freeze [player]." stop set gamemode of arg 1 parsed as player to survival set walk speed of arg 1 parsed as player to 0 set fly speed of arg 1 parsed as player to 0 set hunger of arg 1 parsed as player to 3 # Requires Bensku's Skript set saturation of arg 1 parsed as player to 20 apply jump 200 to arg 1 parsed as player for 1 day command /unfreeze [<string>]: trigger: if arg 1 parsed as player is not set: send "&7This player is offline." stop if arg 1 parsed as player doesn't have jump: send "&7This player is not freezed." stop set walk speed of arg 1 parsed as player to 0.2 set fly speed of arg 1 parsed as player to 0.1 set hunger of arg 1 parsed as player to 10 # Requires Bensku's Skript set saturation of arg 1 parsed as player to 10 remove jump from player
Can be upgraded to save player's hunger and saturation.
Doesn't detect anything, so most likely won't cause any lag.
The player can still move if he has a hacked client.
Sorry for the bump but can you make it save peoples hunger/heath?
Also why are you using [<string>]? Could I replace it with [<player>]?
Also can you put the script in hastebin?
command /freeze [<player>]:
usage: /freeze [<player>]
trigger:
set {health.%uuid of arg-1%} to arg-1's health
set {hunger.%uuid of arg-1%} to arg-1's hunger
set gamemode of arg-1 to survival
set walk speed of arg-1 to 0
set fly speed of arg-1 to 0
set hunger of arg-1 to 3
set saturation of arg-1 to 20
apply jump 200 to arg-1 for 1 day
command /unfreeze [<player>]:
trigger:
if arg-1 isn't set:
send "&7%arg-1% is offline."
stop
if arg-1 doesn't have jump:
send "&7%arg-1% isn't freezed."
stop
set arg-1's health to {health.%uuid of arg-1%}
set arg-1's hunger to {hunger.%uuid of arg-1%}
delete {health.%uuid of arg-1%}
delete {hunger.%uuid of arg-1%}
set walk speed of arg-1 to 0.2
set fly speed of arg-1 to 0.1
set saturation of arg-1 to 10
remove jump from arg-1