#Consent/refusal to request

1 messages · Page 1 of 1 (latest)

lone edge
#

I'm going to make a command like /tpa, but I don’t know how to make sure that “Yes” and “No” are recorded in the chat and used further in the code..

tribal river
#

Use plugin for tpa

#

But

#

if you really need it

marsh pollen
tribal river
#

create variables if the player has entered the command “yes”, drop the variable as true, execute the command, with “no” exactly like this

#

Ладно

#

Аа третий

marsh pollen
lone edge
#

🤠🤠

#

код обязательно скидывать?

tribal river
#

Ля

#

Погоди

lone edge
#

As a newbie I wrote this

tribal river
#
    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 "Ошибка: запрос на телепортацию не найден."```
marsh pollen
lone edge
#

okay i'll check

lone edge
tribal river
#

Sorry

#

😥😥

marsh pollen
tribal river
#

Yes,Anglia

lone edge
marsh pollen
#

Without target player

lone edge
#

okay

#

Now he needs another event.. Now, I’ll add this event to the code and try variables.

#

it's working

frail sinew
tribal river
frail sinew
#

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