Ejemplo n.º 1
0
        public void FactionCMD(IPlayer player, int charId, int id)
        {
            try
            {
                if (player == null || !player.Exists || player.GetCharacterMetaId() <= 0)
                {
                    return;
                }
                if (player.AdminLevel() <= 8)
                {
                    HUDHandler.SendNotification(player, 4, 5000, "Keine Rechte."); return;
                }
                if (ServerFactions.IsCharacterInAnyFaction(charId))
                {
                    ServerFactions.RemoveServerFactionMember(ServerFactions.GetCharacterFactionId(charId), charId);
                }

                ServerFactions.CreateServerFactionMember(id, charId, ServerFactions.GetFactionMaxRankCount(id), charId);
                player.SendChatMessage($"Done.");
            }
            catch (Exception e)
            {
                Alt.Log($"{e}");
            }
        }