1. help me.
    If a user inputs a specific command, I want to delete "Teleportation.tpr" and "Teleportation.home" which are access permission of Teleportation mod.Specifically, as follows.

    If they do /join, I delete access permission of Teleportation and want to give access permission if I do /exit.
    Thank you for reading.
    Code:
     [ChatCommand("arena")]
            void ArenaDispatcher(PlayerSession player, string command, string[] args)
            {
                if (args.Length <= 0)
                {   // help and status
                    ShowMsg(player, "Arena status: " + ArenaMode() + " Players: " + PlayersOnArena());
                    ShowHelp(player, "Commands: /arena join | players | exit");
                    return;
                }
                try
                {
                    switch (args[0].ToLower())
                    {
                        case "mode":
                            {
                                if (!player.IsAdmin)
                                    return;
                                cmdArenaChangeMode(player, args);
                                break;
                            }
                        case "enter":
                        case "join":
                            {
                                cmdArenaJoin(player, args);
                                break;
                            }
                        case "quit":
                        case "exit":
                            {
                                cmdArenaExit(player, args);
                                break;
                            }
     
  2. Wulf

    Wulf Community Admin

    It'd be better to request a "CanTeleport" hook call in the Teleportation plugin, which you can then use to check if they are allowed to teleport out of the arena. Plugins for Rust already have this, and I use it in some of mine, but the Hurtworld plugin doesn't yet.
     
  3. I want to do it.
    However, I don't understand a way.
     
  4. He means that you should request a hook in Teleportation. Meaning you can have bool CanTeleport(PlayerSession) for example, which is being called by Teleportation when somebody tries to teleport, and you can return false to block it for example.
    You can request such per PM to the author or in the support thread of the plugin.
     
  5. This author does not show this Mod. And he gave up development. Therefore I cannot but look for a way.

    I understood that "bool CanTeleport(PlayerSession) false" was necessary.

    Please tell me my mistake.
    Thank you for reading.

    Code:
     case "join":
                            {
                                cmdArenaJoin(player, args)
                                bool CanTeleport(PlayerSession)
                               {
                                   return false;
                               };
                                break;
                            }
                        case "quit":
                        case "exit":
                            {
                                cmdArenaExit(player, args)
                                bool CanTeleport(PlayerSession)
                               {
                                   return true;
                               };
                                break;
                            }
     
  6. Wulf

    Wulf Community Admin

    LaserHydra is the author, and he hasn't given up on development of it. That isn't what you need either, the Teleportation plugin would need to call the hook CanTeleport in all other plugins, and cancel its actions if any return false.
     
  7. The author of mod where I correct is not LaserHydra.
    It is not Teleportation.cs that I correct.
     
  8. Wulf

    Wulf Community Admin

    @LaserHydra is the author of the Teleportation plugin, which is where the check I mentioned above needs to be in. Once the Teleportation plugin has the hook calling, your plugin can add that hook and return false.
     
  9. I mostly understood that. I wait for it. Thank you.