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; }
About deletion and a grant of permission
Discussion in 'Hurtworld Development' started by Ronne, Jan 8, 2016.
-
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.
-
I want to do it.
However, I don't understand a way. -
You can request such per PM to the author or in the support thread of the plugin. -
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; }
-
Wulf Community Admin
-
It is not Teleportation.cs that I correct. -
Wulf Community Admin
-