I got 0 use for chayhandler. ^^ Just waiting for u r update. I really don't know anything about permissions
BetterChat
Moved
Total Downloads: 26,139 - First Release: Apr 21, 2015 - Last Update: Jan 12, 2018
- 4.9898/5, 98 likes
-
Actually I don't really understand how the whole thing is working. I didn't find anything explaining the system well.
----
kk kinda understand it...
You got groups which you can add.
Then you got permissions added by plugins,
which you can add to the group.Last edited by a moderator: Apr 22, 2015 -
LaserHydra if u want help withe the permission system check the chathandler or my version or some other changed versions like m-Godmode
-
-
Its possible to make this plugin compatible to ChatHandler but its not really worth since the functionality can completely be done by ChatHandler itself so it yould be redundant to use both plugins.
Im also not sure if @LaserHydra would have enough knowledge to do so. -
LaserHydra updated Name Colors with a new update entry:
Update 1.1.0
Last edited by a moderator: Apr 23, 2015 -
LaserHydra updated Name Colors with a new update entry:
standard config
-
Code:
[Oxide] 1:10 PM [Error] Failed to load plugin namecolors File: namecolors.lua Line: 112 invalid arguments to method call: at NLua.Lua.ThrowExceptionFromError (Int32 oldTop) [0x00000] in <filename unknown>:0 at NLua.Lua.CallFunction (System.Object function, System.Object[] args, System.Type[] returnTypes) [0x00000] in <filename unknown>:0 at NLua.Lua.CallFunction (System.Object function, System.Object[] args) [0x00000] in <filename unknown>:0 at NLua.LuaFunction.Call (System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Lua.Plugins.LuaPlugin.Load () [0x00000] in <filename unknown>:0 at Oxide.Lua.Plugins.LuaPluginLoader.Load (System.String directory, System.String name) [0x00000] in <filename unknown>:0 at Oxide.Core.OxideMod.LoadPlugin (System.String name) [0x00000] in <filename unknown>:0
-
-
LaserHydra updated Name Colors with a new update entry:
fixed delay (untested)
-
Ok i just tested the Colors and they work now...
But as a owner i write double Posts in 2 diffrent Colors. How to manage this <-- fixed with the auth false
after disabled auth getting this error
Code:[Error] Failed to run a 60.00 timer File: namecolors.lua Line: 122 invalid arguments to method call: at NLua.Lua.ThrowExceptionFromError (Int32 oldTop) [0x00000] in <filename unknown>:0 at NLua.Lua.CallFunction (System.Object function, System.Object[] args, System.Type[] returnTypes) [0x00000] in <filename unknown>:0 at NLua.LuaFunction.Call (System.Object[] args, System.Type[] returnTypes) [0x00000] in <filename unknown>:0 at NLua.Method.LuaDelegate.CallFunction (System.Object[] args, System.Object[] inArgs, System.Int32[] outArgs) [0x00000] in <filename unknown>:0 at LuaGeneratedClass1.CallFunction () [0x00000] in <filename unknown>:0 at Oxide.Core.Libraries.Timer+TimerInstance.Update () [0x00000] in <filename unknown>:0
Last edited by a moderator: Apr 23, 2015 -
Just keep getting this error as well, no matter how I set the config up and it won't work
:
Code:[Oxide] 9:42 AM [Error] Failed to call hook 'OnPlayerChat' on plugin 'Custom Nam e Colors' File: namecolors.lua Line: 135 argument number 2 is invalid: at NLua.Method.LuaMethodWrapper.Call (LuaState luaState) [0x00000] in <filenam [Oxide] 9:42 AM [Error] Failed to call hook 'OnPlayerChat' on plugin 'Custom Nam e Colors' File: namecolors.lua Line: 135 argument number 2 is invalid: at NLua.Method.LuaMethodWrapper.Call (LuaState luaState) [0x00000] in <filenam
-
thank you for understanding. Also try Deleting your config and reloading the plugin. That may fix some issues.
[DOUBLEPOST=1429803571][/DOUBLEPOST]
Im at home soon.
State: Done!Last edited by a moderator: Apr 24, 2015 -
LaserHydra updated Name Colors with a new update entry:
permission system fixed
-
Wont load
[Oxide] 8:39 PM [Error] Failed to load plugin namecolors
File: namecolors.lua Line: 112 invalid arguments to method call: -
Won't load for me either
-
Wulf Community Admin
Code:PLUGIN.Title = "Name Colors" PLUGIN.Description = "Change default chat name colors." PLUGIN.Author = "LaserHydra" PLUGIN.Version = V(1, 1, 2) PLUGIN.ResourceId = 979function PLUGIN:Init() command.AddChatCommand("colors", self.Plugin, "ColorList") if self.Config.PermissionsEnabled == "true" then if not permission.GroupExists("vip") then permission.CreateGroup("vip", "V.I.P.", 0) end permission.RegisterPermission("color_mod", self.Plugin) permission.RegisterPermission("color_owner", self.Plugin) permission.RegisterPermission("color_player", self.Plugin) permission.RegisterPermission("color_vip", self.Plugin) permission.GrantGroupPermission("admin", "color_owner", self.Plugin) permission.GrantGroupPermission("moderator", "color_mod", self.Plugin) permission.GrantGroupPermission("player", "color_player", self.Plugin) permission.GrantGroupPermission("vip", "color_vip", self.Plugin) end self:LoadDefaultConfig() endfunction PLUGIN:LoadDefaultConfig() self.Config.AuthlevelColors = self.Config.AuthlevelColors or {} self.Config.AuthlevelColors.AuthLevel2 = self.Config.AuthlevelColors.AuthLevel2 or "orange" self.Config.AuthlevelColors.AuthLevel1 = self.Config.AuthlevelColors.AuthLevel1 or "yellow" self.Config.AuthlevelColors.AuthLevel0 = self.Config.AuthlevelColors.AuthLevel0 or "lime" self.Config.PermissionColors = self.Config.PermissionColors or {} self.Config.PermissionColors.player = self.Config.PermissionColors.player or "lime" self.Config.PermissionColors.moderator = self.Config.PermissionColors.moderator or "yellow" self.Config.PermissionColors.owner = self.Config.PermissionColors.owner or "orange" self.Config.PermissionColors.vip = self.Config.PermissionColors.vip or "aqua" self.Config.PermissionsEnabled = tostring(self.Config.PermissionsEnabled) or "false" self.Config.AuthlevelEnabled = nil -- Removed self.Config.ConsoleWarningDelaySeconds = nil -- Removed self:SaveConfig() endfunction PLUGIN:ColorList(player) local colorList = { "aqua", "black", "blue", "brown", "darkblue", "green", "grey", "lightblue", "lime", "magenta", "maroon", "navy", "olive", "orange", "purple", "red", "silver", "teal", "white", "yellow" } local colors = "" for k, color in pairs(colorList) do colors = colors .. "\n" .. "<color=" .. color .. ">" .. string.upper(color) .. "</color>" end rust.SendChatMessage(player, "Available name colors:" .. colors) endfunction PLUGIN:OnPlayerChat(arg) local player = arg.connection.player local userId = rust.UserIDFromPlayer(player) local message = arg:GetString(0, "text") if self.Config.PermissionsEnabled == "true" then if permission.UserHasPermission(userId, "color_player") then rust.BroadcastChat("<color=" .. self.Config.PermissionColors.player .. ">" .. player.displayName .. "</color><color=white>", "</color>" .. message, userId) elseif permission.UserHasPermission(userId, "color_mod") then rust.BroadcastChat("<color=" .. self.Config.PermissionColors.moderator .. ">" .. player.displayName .. "</color><color=white>", "</color>" .. message, userId) elseif permission.UserHasPermission(userId, "color_owner") then rust.BroadcastChat("<color=" .. self.Config.PermissionColors.owner .. ">" .. player.displayName .. "</color><color=white>", "</color>" .. message, userId) elseif permission.UserHasPermission(userId, "color_vip") then rust.BroadcastChat("<color=" .. self.Config.PermissionColors.vip .. ">" .. player.displayName .. "</color><color=white>", "</color>" .. message, userId) end else if player.net.connection.authLevel == 0 then rust.BroadcastChat("<color=" .. self.Config.AuthlevelColors.AuthLevel0 .. ">" .. player.displayName .. "</color><color=white>", "</color>" .. message, userId) elseif player.net.connection.authLevel == 1 then rust.BroadcastChat("<color=" .. self.Config.AuthlevelColors.AuthLevel1 .. ">" .. player.displayName .. "</color><color=white>", "</color>" .. message, userId) elseif player.net.connection.authLevel == 2 then rust.BroadcastChat("<color=" .. self.Config.AuthlevelColors.AuthLevel2 .. ">" .. player.displayName .. "</color><color=white>", "</color>" .. message, userId) end end return false end
Attached Files:
-
-
Thanks wulf!
-
-
Wulf Community Admin