#type a name in chat

1 messages · Page 1 of 1 (latest)

limpid zinc
#

Example: you do /ban and it opens a gui and you click on ban (item is book) and you have to type a name in chat and then it bans the name that has been typed in chat using console!
(only thing I still need is that when you click the book it closes gui, sends a message with type a name in chat, and when he types it that player gets banned)

left pasture
#

On chat

#

Then parse message as a player

#

Where is your code

left pasture
limpid zinc
#

ye 1 sec

#

it is defenitly NOT THE BEST

#
command /testban:
  trigger:
    set {banchat::%player's uuid%} to true
    send "&aType a name in chat ⬇⬇" to player


on chat:
  if {banchat::%player's uuid%} is true:
    send "&c%{message::%player's uuid%}% &7Has been banned" to player
    cancel event

on join:
  set {banchat::%player's uuid%} to false
#

thats what I tried to make

#

it does not work..

#

and also doesnt look for playername

left pasture
#

Well

#

When you prefix a variable with _ it becomes a local variable; only accessible in and deleted after that event

#

Also the stop is useless

limpid zinc
#

ohhhhhhh

limpid zinc
#

so how do I do it so it only takes a player's name and they have to be online

#

@left pasture

#
command /testban:
  trigger:
    set {banchat::%player's uuid%} to true
    send "&aType a name in chat ⬇⬇" to player

on chat:
  if {banchat::%player's uuid%} is true:
    set {_message} to message
    send "&c%{_message}% &7Has been banned" to player
    delete {banchat::%player's uuid%}
    cancel event
#

thats what I have now

left pasture
#

No need to set it to false, you can just delete it

#

And in the case of {message} you would want it to be local. Although its cleaner not to use a variable at all

#

Just parse it as a(n offline) player

limpid zinc
#

so this

#

now I only need the pkayername thingie

left pasture
left pasture
limpid zinc
#

no I edited the other one

limpid zinc
limpid zinc
#

ohhhhhhhh

left pasture
#

^^

#

You can read the docs too