Zrips / CMI

117 stars 99 forks source link

Is it possible to add command after the tpaccept being accepted? #8825

Open bobhenl opened 4 months ago

bobhenl commented 4 months ago

Hi, is it possible to add some commands to other commands / actions, like accepting tpaccept?

In EventCommands is only playerTeleport, but this includes all teleportation types, and in the locale_EN I don't see any option to add another command. It's probably not possible, just asking to be sure

bobhenl commented 4 months ago

I guess I can solve it by defining own tpa & tpahere in customalias and executing two commands with asPlayer cmi tpa, or is there better solution?

EDIT: Tried this:

  tpa:
    Cmds:
    - asConsole! cmi actionbarmsg [playerName] -s:7 &cIf you won't attack anyone within
      15s you are protected & can tp away.
    - asPlayer! cmi tpa $1-
    AddTabs: true
    CustomTabs:
    - '[playername]'

with & without AddTabs but it broken tab completion, it's not suggesting player names... even when I have:

  /tpa:
    Enabled: true
    Tab: false

I wanted to notify players that they have invulnerability enabled for 15s (btw there probably isn't a placeholder for it yet), but not really sure if there's an efficient way of doing it that will let me tab complete their names.

Not sure if the last issue isn't bug, that tab completion of names isn't working when setting tab: false for aliases