#variables

1 messages · Page 1 of 1 (latest)

earnest scaffold
#
    {_hat2.%player%} = false
    {_pumperm.%player%} = true
command /Pumpkin:
  trigger:
    if {_hat2.%player%} is true:
      send "&c&lHey! &r&7You Can't Execute That Command During Combat!"
      stop
    else:
      teleport player to {pump}
      play sound "block.note_block.pling" with volume 10 and pitch 2 to player
on command "/Pumpkin":
  if {_pumperm.%player%} is set:
    cancel event
    send "&cYou don't have permission to execute that command!"
command /pumpkinperm:
  permission: op
  trigger:
    clear {_pumperm.%player%}
command /pumpkinpermoff:
  permission: op
  trigger:
    set {_pumperm.%player%} to true```
it doesnt allow me to teleport event tho {_pumperm.%player%}is cleared
polar lark
#

{_} ( temp variables) are not nested meaning they get deleted after the trigger has finished

earnest scaffold
#

so what should i do exactly?

amber venture
#

remove the _

#

@earnest scaffold

earnest scaffold
#

still

amber venture
#

you removed all underscores?

earnest scaffold
#

yes

dusky flower
#

Use delete not clear, im not sure if that changes anything but it is worth trying

idle epoch
#

send current code pls

#

wait, wth do you mean variables: (something with %player%)

#

I dont think %player% is defined there

#

also, you could put the permission check in the command

#
command /Pumpkin:
  trigger:
    {pumperm.%player%} is set
    if {hat2.%player%} is true:
      send "&c&lHey! &r&7You Can't Execute That Command During Combat!"
      stop
    else:
      teleport player to {pump}
      play sound "block.note_block.pling" with volume 10 and pitch 2 to player

also, where do you define {pump} ?

#

@earnest scaffold I'll be here for another hour prob if u reply fast enough

earnest scaffold
idle epoch
#

only if {pumperm.%player%} is set and hat2 is false or unset

#

that's what your code does