2
I need help with the plugin skript
code"
variables:
{Players} = 0
command /wc:
aliases: /waterclutch, /water clutch
description: Used to start a match of watercluth
trigger:
if {Players} = 1:
teleport the player to the location (0, 128, 0)
if {Players} = 2:
teleport the player to the location (0, 128, 5)
else:
send "Lobby full: %{Players}% players in lobby "
on command "/wc":
add 1 to {Players}
on command "/wcreset":
remove %{Players}% to {Players}
wait 1 second
broadcast "&aReset successful!"
"
I am attempting to reset the variable by subtracting it by its self but the script that is meant to do it is not working ie:
remove %{Players}% to {Players}
Any other ideas of how to do this?
variables:
{Players} = 0
command /wc:
aliases: /waterclutch, /water clutch
description: Used to start a match of watercluth
trigger:
if {Players} = 1:
teleport the player to the location (0, 128, 0)
if {Players} = 2:
teleport the player to the location (0, 128, 5)
else:
send "Lobby full: %{Players}% players in lobby "
on command "/wc":
add 1 to {Players}
on command "/wcreset":
remove %{Players}% to {Players}
wait 1 second
broadcast "&aReset successful!"
"
I am attempting to reset the variable by subtracting it by its self but the script that is meant to do it is not working ie:
remove %{Players}% to {Players}
Any other ideas of how to do this?
7
For Skript, you use command: instead of on command:
Was it the command you needed help with?
Was it the command you needed help with?
No but nice typo catch lol
wait nvm that was on purpose bc you cant remove and add variables on jus the command part so the "on command:" is used to add and subtract variables
???
I don't understand
You're registering the command twice, is what I think.
You should minify your code only to have it register once, and yet again, there is no "on command:".
I suggest checking the SKUnity or SkriptHub docs.
I don't understand
You're registering the command twice, is what I think.
You should minify your code only to have it register once, and yet again, there is no "on command:".
I suggest checking the SKUnity or SkriptHub docs.
Well, I recommend using Pastebin to paste your code into as it preserves indentation.
this post no longer maters any ways because I took a break and found a solution lol
I am smart aparently I fixed the issue if you wondering the same thing here is my code
variables:
{Players} = 0
command /wc:
aliases: /waterclutch, /water clutch
description: Used to start a match of watercluth
trigger:
if {Players} = 0:
teleport the player to the location (0, 128, 0)
message "Joined as player 1"
if {Players} = 1:
teleport the player to the location (0, 128, 5)
message "joined as player 2"
on command "/wc":
if {Players} = 0:
add 1 to {Players}
if {Players} = 1:
add 1 to {Players}
else:
send "Lobby full! %{Players}% players are in this lobby "
on command "/wcreset":
if {Players} = 2:
remove 2 from {Players}
wait 1 second
broadcast "&aReset successful!"
else:
wait 1 second
broadcast "&4Unable to reset!"
variables:
{Players} = 0
command /wc:
aliases: /waterclutch, /water clutch
description: Used to start a match of watercluth
trigger:
if {Players} = 0:
teleport the player to the location (0, 128, 0)
message "Joined as player 1"
if {Players} = 1:
teleport the player to the location (0, 128, 5)
message "joined as player 2"
on command "/wc":
if {Players} = 0:
add 1 to {Players}
if {Players} = 1:
add 1 to {Players}
else:
send "Lobby full! %{Players}% players are in this lobby "
on command "/wcreset":
if {Players} = 2:
remove 2 from {Players}
wait 1 second
broadcast "&aReset successful!"
else:
wait 1 second
broadcast "&4Unable to reset!"
