#Consent/refusal to request
1 messages · Page 1 of 1 (latest)
Esli udobno mogu pomoch' v ls
create variables if the player has entered the command “yes”, drop the variable as true, execute the command, with “no” exactly like this
Ладно
Аа третий


As a newbie I wrote this
trigger:
if arg-1 is not set:
send "Используйте: /tpa <игрок>"
stop
send "Вы отправили запрос на телепортацию к %arg-1%. Напишите 'accept' для принятия запроса или 'deny' для отклонения."
set {_player} to arg-1
wait 60 seconds
delete {_player}
on chat:
cancel event
if message is "accept":
if {_player} is set:
teleport player to {_player}
send "Телепортация выполнена."
else:
send "Ошибка: запрос на телепортацию не найден."
else if message is "deny":
if {_player} is set:
send "Запрос на телепортацию отклонен."
else:
send "Ошибка: запрос на телепортацию не найден."```
Check if message is "..."
okay i'll check
I'll watch this too
Oo you are from Anglia?
Yes,Anglia
trigger:
...
if target player's message is "Yes" or "yes":
send anything to player```
"Can't compare 'target player's message' with a text"
Just message
Without target player
okay
Now he needs another event.. Now, I’ll add this event to the code and try variables.
it's working
This won’t work
Why
You’re using local variables
Outside of the event they originate in (the command)
{_player} will never be set in the on chat: event
Just set a variable with the player’s uuid to true and delete it after they chat if the message is “Yes” or “No”
Or make tpaccept and tpdeny commands and add a command prompt