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)
#type a name in chat
1 messages · Page 1 of 1 (latest)
This is a place for help with code you already have, not a place to ask for code
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
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
ohhhhhhh
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
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
.
was there supposed to be code?
no I edited the other one
thats with functions probably cuz idk what that is
ohhhhhhhh