Approved Moderator Function [Deleted]

Status
Not open for further replies.

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
DreTaX submitted a new resource:

Moderator Function - Create Moderator list on your server, for your plugins.

Creating a simple moderator list is pretty easy.

All you have to do, is to go to Magma folder, and create a Directory called Moderators.

After that, create a file Called: Moderators.js in the directory. Open the javascript file up, and paste:

JavaScript:
function On_PluginInit() {
    // Get moderators ini file.
    var moderators = Moderators();
    // Put them in an array
    var mods = moderators.EnumSection("Moderators");
    var counted = mods.Length;
    var i = 0;
    for (var...
Read more about this resource...
 
  • Agree
Reactions: overkill

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
DreTaX updated Moderator Function with a new update entry:

Python Support

Python:
__author__ = 'DreTaX'
__version__ = '1.0'
import clr

clr.AddReferenceByPartialName("Fougerite")
import Fougerite


"""
    Methods
"""

def ModeratorsIni():
    if not Plugin.IniExists("Moderators"):
        ini = Plugin.CreateIni("Moderators")
        ini.AddSetting("Moderators", "ModNameHere", "76561197999999999")
        ini.Save()
    return Plugin.GetIni("Moderators")

"""
    Class
"""

class Moderators:
    def On_PluginInit(self):
        mods =...
Read the rest of this update entry...
 
Status
Not open for further replies.