2.0.0

18 Mar 2017

Changelog

Player class
User groups
General cleanup
Additional settings
Player session variables

New default settings

{
   startingCash = 0 -- Set the amount of money you want people to start with
   enableRankDecorators = false -- Sets a decorator with the players permission_level on their entity.
}

Default user groups

-- First parameter is group name, second is inheritance

-- User group, lowest possible.
user = Group("user", "")

-- Admin, is allowed to run administrative functions
admin = Group("admin", "user")

-- Superadmin, can run any command, bypasses command levels
superadmin = Group("superadmin", "admin")

New user class functions

-- Returns permission_level of that player
Player:getPermissions()

-- Sets the permission level to the specified argument
Player:setPermissions(level)

-- Kicks the player with the specified reason
Player:kick(reason)

-- Sets the player money to the specified amount
Player:setMoney(amount)

-- Adds to the current total amount of money
Player:addMoney(amount)

-- Removes from the current amount of money
Player:removeMoney(amount)

-- Sets a session var for the player
Player:setSessionVar(key, value)

-- Gets the specified session var, or nil.
Player:getSessionVar(key)

Events

-- Adds a new group with the groupname of your choise, you can make it inherit from custom groups or from the main ones. Inhereting from superadmin means that group has access to everything.
TriggerEvent("es:addGroup", "groupname", "inherits")

-- Returns all of the groups inside of the: groups argument
TriggerEvent("es:getAllGroups", function(groups) end)

Compatibility issues

A. Update your currently database, ( go to the table “users” and add a new column called: “group” with type of VARCHAR. Then edit: “money” change its type to: “double”. ) B. Remove your DB and use the new provided SQL.