Solved 123istered
Discussion in 'Rust Development' started by ZeusGOD, Sep 15, 2016.
-
Wulf Community Admin
I'd need to see your full code, not just a portion.
-
permission.RegisterPermission("chat.siro", this);
if (permission.UserHasPermission(uid, "chat.siro"))
{
prefixperson = "[Loli]";
color = "lightblue";
} -
Wulf Community Admin
Full code please, I can't tell what is going on just by the single line and snippet. -
It's a hard work
-
Code:
using Oxide.Core; using Oxide.Core.Plugins; using Oxide.Core.Libraries.Covalence; using Oxide.Game.Rust.Cui;using System; using System.Linq; using System.Collections.Generic; using System.Reflection;using Rust; using UnityEngine;namespace Oxide.Plugins { [Info("Chat", "NEKO", "1.0.3", ResourceId = 0)] class Chat : RustPlugin { Dictionary<ulong, List<int>> stats = new Dictionary<ulong, List<int>>(); void LoadData() { stats = Interface.Oxide.DataFileSystem.ReadObject<Dictionary<ulong, List<int>>>("player.stats"); } void SaveData() { Interface.Oxide.DataFileSystem.WriteObject("player.stats", stats); } private bool OnPlayerChat(ConsoleSystem.Arg arg) { permission.RegisterPermission("chat.siro", this); if (message.StartsWith("/")) return false; // code continues here return true; } } } -
Wulf Community Admin
Don't register the permission each time a player chats, only register in Init, Loaded, or whatever hook only triggers once per load.
-
how to fix that?
-
Wulf Community Admin
Register it in Init(), Loaded(), or whatever hook only triggers once. -
yep kk thank you bro!
[DOUBLEPOST=1474031509][/DOUBLEPOST]hey wulf how to theard delete ??
my chating sorce delete ! -
"Edit" your posts and remove content you dont want to display anymore, and leave at min 6 chars, like EDITED
-
Edited the posts for you.
