#Command as op
1 messages · Page 1 of 1 (latest)
I don’t think execute as op is a thing. Just teleport them to the location
Also you should probably use a list
Maddie suggests that you read this embed
List variables are a much cleaner way of storing multiple values, especially objects that are unique to something (the money of a player, the warps of the server), as they can be looped, added to, removed from, accessed, and deleted all at once, making variable organization a breeze. A list basically maps objects to their corresponding unique indices.
To make a list, we simply use the list variable separator :: in the variable's name: {money::%uuid of player%}, {warps::%{_warpName}%}, {luckyNumbers::*}.
For example:
set {_list::*} to 1, 2, 3, and 4
set {list::%uuid of player%} to player```
As already mentioned, lists have indices and values. For instance, in set {money::%uuid of player%} to 100 the index is the uuid of the player and the value is 100. We can also access all the values at once by using ::*. This last part means we can replace a lot of common loops with simple lists, like send "You're on team red!" to {team-red::*} instead of looping through all players and checking if each one is on team red.
{%player%.money} -> {money::%player's uuid%}
{home.warps.%player%} -> {warps::%player's uuid%::home}
{%player%.cooldown} -> {cooldown::%player's uuid%}```
i did earlier in the code but i didn't send that part
isn't there a thing where they can't have exucuted commands that require perms unless the player has op
Sure
You can op the player
Then deop the player
Bad idea though
why not teleport them with skript
That would work perfectly
i did earlier in the code but i didn't send that part
They could teleport them using an effect instead of a command
It really is not
You can always use
teleport player to {loc}
Instead of making a command
Commands are like rip off functions 😭😭
this still won't work
on death of player:
if {region.checkpoint} is 1:
teleport victim to -11.150, 115, 62.420
```
You could also set a variable to a location, and teleport them to that variable
oh wait i found the problem
nvm
on region enter:
if region is "dirtcity":
set {region.checkpoint} to 1
if region is "corruptioncity":
set {region.checkpoint} to 2
if region is "glassciv":
set {region.checkpoint} to 3
if region is "grove":
set {region.checkpoint} to 4
if region is "magmaciv":
set {region.checkpoint} to 5
if region is "mininglv1":
set {region.checkpoint} to 6
if region is "watertown":
set {region.checkpoint} to 7
on death of player:
if {region.checkpoint} is 1:
teleport victim to location at -11.150, 115, 62.420 in world "world"
these vars arent player specific
meaning everyone will share a checkpoint...
also
x8ight suggests that you read this embed
Code blocks make it easier for helpers to identify potential errors -- help them help you!
```vb
on chat:
broadcast "This is how you format code!"
```
on chat:
broadcast "This is how you format code!"
On US keyboards, the grave character (`) is located above the tab key on the top left of the keyboard
{var.%player%} or {var::%player%}
{var::%player's uuid%}
Maddie suggests that you read this embed
List variables are a much cleaner way of storing multiple values, especially objects that are unique to something (the money of a player, the warps of the server), as they can be looped, added to, removed from, accessed, and deleted all at once, making variable organization a breeze. A list basically maps objects to their corresponding unique indices.
To make a list, we simply use the list variable separator :: in the variable's name: {money::%uuid of player%}, {warps::%{_warpName}%}, {luckyNumbers::*}.
For example:
set {_list::*} to 1, 2, 3, and 4
set {list::%uuid of player%} to player```
As already mentioned, lists have indices and values. For instance, in set {money::%uuid of player%} to 100 the index is the uuid of the player and the value is 100. We can also access all the values at once by using ::*. This last part means we can replace a lot of common loops with simple lists, like send "You're on team red!" to {team-red::*} instead of looping through all players and checking if each one is on team red.
{%player%.money} -> {money::%player's uuid%}
{home.warps.%player%} -> {warps::%player's uuid%::home}
{%player%.cooldown} -> {cooldown::%player's uuid%}```