Jump to content

4 Screenshots

  • 257
  • 3
  • 16.84 kB

About Expiring Permissions

This is a simple, lightweight and easy to use plugin that allows you to grant permissions and groups for a specific amount of time. It also supports the creation of permission packs, which makes it easy to grant a large number of permissions at a time.

 

Features

  • Information panel with current user privileges.
  • Customize notification in all popular notification plugins.
  • Full-featured API for plugin developers (ability to create your own interface or integrate display of privileges into your game menu plugin).
  • Ability to create privilege packs.

 

Supported plugins:

 

Permissions

  • expiringpermissions.admin - to use commands to grant and revoke privileges.
  • expiringpermissions.gui - to show a panel with the player's current privileges.

 

Commands

Commands can be entered from wherever you want: via chat, game console (F1) or server console.

  • eperms (configurable) – shows a panel with the current privileges of the current player.
  • setpack steamid/nickname packname time – to temporarily grant a pack of privileges to a player.
  • revokepack steamid/nickname packname – forcibly revoke a pack of privileges from a player.
  • grantperm steamid/nickname permission time title – temporarily grant a player a permission.
  • revokeperm steamid/nickname permission – forcibly revoke a player's permission.
  • addgroup steamid/nickname group time title – temporarily add a player to the group.
  • removegroup steamid/nickname group – forcibly remove a player from a group.

Description of command arguments:

  • steamid/nickname - steamid or nickname of your choice.
  • permission/group - plugin permission/oxide group.
  • packname - package name from the Package name field in the config.
  • time - duration of privileges, in the format 7d10h20m (e.g. 14d, 1d5h, 10m and etc.).
  • title (optional) - name that will be displayed in the panel and indicated in messages to the player. If it is not specified, the plugin will write *title not specified*.

 

General settings

Check interval [sec] – interval for checking expiring player privileges.

Show the start and end date of the permission in the panel (depends on the time on the physical server)? – in addition to the privilege name (if specified), the panel will display the privilege activation date and expiration date. Keep in mind that the plugin works with the time of the server machine (physical server). If the time and date are not configured there, they will be displayed incorrectly in the plugin.

Type of notifications when permission are granted (none, title - only with name, all)

  • none – the player will not be notified when a privilege is granted to him.
  • title – the player will be notified about those privileges that have the name specified.
  • all – the player will be notified when all privileges have been granted.  If the privilege does not have a name set, *title not specified* will be displayed.

Type of notifications when permission expire (none, title - only with name, all) – similar to the setting above, only when the privilege is revoked/expired.

Show a notification if the permission is manually revoked? – show a notification to the player when an administrator manually removes a privilege.

 

Notification settings

Notification type (Chat, GameTips, Notify, GUIAnnouncements) – if this section is enabled, you must specify the type/plugin to notify the player of different warnings.

Just below that are the customization fields for the specific type of notification.

 

Setting permission packages

To display privileges correctly in the panel, you can create packs. They allow you to collect several privileges or groups together. In this way you reduce the number of commands and assign a name to this pack, which will be displayed in the panel and when the player is notified. This is actually very convenient and saves problems and confusion.

Display name – package name, it is displayed in the panel and in notifications.

Package name – package short name, it is used when using commands.

Permissions – list of permissions that will be included in the package.

Groups – list of groups that will be included in the package.

Then you just use the setpack command where you specify the name of the pack. Then everything in the pack (permissions and groups) will be given to the player.

 

Plugin Api

object ExpPermCanSetPackage(BasePlayer target, TimeSpan timeSpan, string packageName) { return null; } // before the pack is issued
void ExpPermOnPackageSet(BasePlayer target, TimeSpan timeSpan, string packageName) // after issuing the pack
object ExpPermCanRevokePackage(BasePlayer target, string packageName) { return null; } // before the pack is revoked 
void ExpPermOnPackageRevoked(BasePlayer target, string packageName) // after the pack is revoked
  
object ExpPermCanGrantPermission(BasePlayer target, string permission, TimeSpan timeSpan, string title) { return null; } // before the permission is granted
void ExpPermOnPermissionGranted(BasePlayer target, string permission, TimeSpan timeSpan, string title) // after the permission is granted
object ExpPermCanRevokePermission(BasePlayer target, string permission) { return null; } // before the permission is revoked
void ExpPermOnPermissionRevoked(BasePlayer target, string permission) // after the permission is revoked
  
object ExpPermCanAddToGroup(BasePlayer target, string group, TimeSpan timeSpan, string title) { return null; } // before adding a player to the group
void ExpPermOnAddedToGroup(BasePlayer target, string permission, TimeSpan timeSpan, string title) // after adding a player to the group
object ExpPermCanRemoveFromGroup(BasePlayer target, string group) { return null; } // before a player is removed from the group
void ExpPermOnRemovedFromGroup(BasePlayer target, string group) // after a player is removed from the group
  
void ExpPermOnPackageExpired(string userId, string title, string packName) // when the privilege pack expired
void ExpPermOnPermissionExpired(string userId, string title, string permName) // when the permission expired
void ExpPermonGroupExpired(string userId, string title, string groupName) // when the group expired
// *use the title to display the name of the privileges in your plugin
  
ExpiringPermissions.Call<bool>("HasActivePermissions", string userID);
ExpiringPermissions.Call<bool>("TryGetPlayerData", out List<Dictionary<string, object>> packages, out List<Dictionary<string, object>> permissions, out List<Dictionary<string, object>> groups);
/* 
	packages/permissions/groups Dictionary contains:
    	["value"] = string
    	["title"] = string
    	["startDate"] = DateTime
    	["expireDate"] = DateTime
*/

 

Plugin Config

Example of plugin configuration in English:

Quote
{
  "Command to open the craft panel": "eperms",
  "Check interval [sec]": 60.0,
  "Show the start and end date of the permission in the panel (depends on the time on the physical server)?": true,
  "Type of notifications when permission are granted (none, title - only with name, all)": "all",
  "Type of notifications when permission expire (none, title - only with name, all)": "all",
  "Show a notification if the permission is manually revoked?": true,
  "Plugin notifications": {
    "Notification type (Chat, GameTips, Notify, GUIAnnouncements)": "GameTips",
    "Chat: icon for chat messages": 0,
    "GameTips: notification type (info, warning)": "warning",
    "Notify: notification type": 0,
    "GUIAnnouncements: banner color": "Grey",
    "GUIAnnouncements: text color": "White",
    "GUIAnnouncements: vertical position": 0.03
  },
  "Setting permission packages": [
    {
      "Display name": "Backpacks",
      "Package name": "backpacks",
      "Permissions": [
        "backpacks.use",
        "backpacks.size.12"
      ],
      "Groups": []
    },
    {
      "Display name": "Vanish + Radar",
      "Package name": "",
      "Permissions": [
        "vanish.allow",
        "vanish.unlock"
      ],
      "Groups": [
        "radar"
      ]
    }
  ]
}

Example of plugin configuration in Russian. If you need Russian config, open it (ExpiringPermissions.cs) before loading the plugin, and at the top set the variable "isRus = true". Then save and upload this file to your server.

Quote
{
  "Команда для открытия панели": "eperms",
  "Интервал проверки [сек]": 60.0,
  "Отображать в панели дату начала и конца действия привилегий (зависит от времени на физическом сервере)?": true,
  "Тип уведомлений при выдаче привилегий (none - откл., title - только с отобр. именем, all - все)": "all",
  "Тип уведомлений при окончании действия привилегий (none - откл., title - только с отобр. именем, all - все)": "all",
  "Показывать уведомление, когда привилегия снята вручную?": true,
  "Настройка уведомлений плагина": {
    "Тип уведомления (Chat, GameTips, Notify, GUIAnnouncements)": "GameTips",
    "Chat: иконка для сообщений в чате": 0,
    "GameTips: тип уведомления (info, warning)": "warning",
    "Notify: тип уведомления": 0,
    "GUIAnnouncements: цвет банера": "Grey",
    "GUIAnnouncements: цвет текста": "White",
    "GUIAnnouncements: отступ сверху": 0.03
  },
  "Настройка наборов привилегий": [
    {
      "Отображаемое имя": "Доп. рюкзак",
      "Название набора": "backpacks",
      "Привилегии": [
        "backpacks.use",
        "backpacks.size.12"
      ],
      "Группы": []
    },
    {
      "Отображаемое имя": "Невидимость + Радар",
      "Название набора": "",
      "Привилегии": [
        "vanish.allow",
        "vanish.unlock"
      ],
      "Группы": [
        "radar"
      ]
    }
  ]
}

 

 

 


MTriper's Collection

User Feedback

1.5m

Downloads

Total number of downloads.

7.3k

Customers

Total customers served.

108.5k

Files Sold

Total number of files sold.

2.2m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.