Hi, team.
is possible?
function PLUGIN:LogEvent(logdata)
ConVar.Server.Log("oxide/logs/RemoveAAA.txt", logdata)
RemoveAAA [Unmaintained]
Discussion in 'Plugin Support' started by Tuntenfisch, Jan 23, 2016.
-
Wulf Community Admin
-
i love you!!!
very very thank
=D -
You might want to change the Permission function to this:
Code:bool HasPermission(ConsoleSystem.Arg arg, string permission) { if (arg.isAdmin || arg.connection == null) return true; return this.permission.UserHasPermission(arg.connection.userid.ToString(), Title.ToLower() + "." + permission); }
-
-
-
Could you add a black list to prohibit certain items?
-
Players are able to spawn stuff over the f1 menu since 0.4.0 when you use CommandBlocker and RemoveAA. This didnt happen with 0.3.2
[Warning] Calling hook OnRunCommand resulted in a conflict between the following plugins: commandblock, RemoveAAA -
-
Same with 0.3.3 players can spawn.
-
-
Hmm, I just checked arg.isAdmin and arg.cmd.isAdmin and both are true for me (so it at least can't be that)
Looking trough the OnRunCommand code make me wonder though, why call arg.Player() this much, and then put a variable that returns when there's no player object... imo this should be on top and the rest of the code use that variable... (Hello performance)
This also slims down the if checks so that you can use the ChatMessage's after the actual condition (which helps make things easier to read)
Then you have a lot of checks for each command that could be probably merged into global checks (so that checks are atomic) ex.
the check if ItemManager.CreateByPartialName is null could be put above the command specific code. In the end this not only improves performance but also reduces the points where things can go wrong (for example copy&paste errors)
While working on that I'll try to come up with a plan to tackle that warning, or at least come up with a trick to prevent people being able to use the command even if there's a conflict, or something like that... -
-
Anyway, you can actually override commands by registering them, if it doesn't exist the command is created, if it does it'll be added to a list.
Meaning each plugin can run their specific code when a command is run.
It'd be probably best to do it this way then to override OnRunCommand (same goes to CommandBlock...)Last edited by a moderator: Apr 9, 2016 -
I changed the last lines of permissions from the version 0.3.2 and now my players can not take the object.
Code:bool HasPermission(ConsoleSystem.Arg arg, string permission) { if (arg.cmd.isAdmin && arg.connection == null) return true; if (arg.connection != null) return this.permission.UserHasPermission(arg.connection.userid.ToString(), Title.ToLower() + "." + permission); return false; }
-
Code:[ConsoleCommand("giveid")] void GiveIDCommand(ConsoleSystem.Arg arg) { // do something }
[DOUBLEPOST=1460225540][/DOUBLEPOST] -
set permissions only for admins. for the other players says you do not have usage rights
I mean a mistake with the issue of items to all players -
Wulf Community Admin
-