Coder Social home page Coder Social logo

phistory's Introduction

Big Banner

pHistory

Screenshots

8bced4e1bab48bda68b6d226458c6254 0aa883ad1dc30482b69a32a737c0e647 b9436a631631fcd589e3ae56790c49f1 0add7d2eff50eac7a68a1213bc191d83 44e4fa50012bc3bf3c28a92d8e299182

pHistory allows you to view all punishment history of a player. Need to know whether to ban them for their 2nd offense of something? Do they have a history of spamming chat, being toxic, or loopholing? Now you know. You can also leave notes about a player's behavior, whether they are helpful and assistive or a pain the the rear-end, its all here for you and your staff team.

Features:

  • By default, tracks the following ULX commands
    • Slay
    • Mute
    • Gag
    • Jail
    • Kick
    • Ban
  • Allows personalized notes on a player's behavior
  • Add, edit, or delete notes
  • Customization of the following
    • Chat command
    • All colors of the menu
    • Groups who may access the menu
    • Groups who may edit/delete notes that weren't made by them

Supports:

  • ALL GAMEMODES
  • ULX

Installation

Installation is easy! Once the addon has been downloaded, drag the pHistory folder into your addons folder. Then, navigate to addons/pHistory/lua/phistory/phistory_config.lua and edit to your liking. Listed below are the essentials for getting pHistory setup for your server.

pHistory.Config.logType: Where to log punishments and notes. Currently local storage and MySQL are supported. For MySQL to work, you must have MySQLOO module installed on your gmod server.

pHistory.Config.chatCommand: The chat message that staff members must enter to open the menu.

pHistory.Config.adminMod: The admin mod you are currently using. Only ULX supported right now. FAdmin and ServerGuard support in the future.

pHistory.Config.allowedGroups: Which ranks have access to the menu. Access to the menu allows them to open the menu, search a player's history and make notes.

pHistory.Config.canDeleteEditNotes: Which ranks can delete notes not made by them. By default, only staff members can modify/delete their own notes. Ranks in this usergroup can modify/delete notes not made by them.

Developer Integration

Already using a ULX command: Go to pHistory/admin_mods/ulx.lua Below commandTypeLogging["banid"] add the following using how you would like to store the punishment. {command} is how the command is run if you were to use the console Ex("ban" since in console you use "ulx ban"; "kick" since in console you use "ulx kick")

commandTypeLogging["{command}"] = function(eAdmin, args)
	-- Code body
	pHistory.Data:AddPunishment(sPlySteamId, eAdmin, sType, sReason)
end

If you want to log outside of the file with your own style, just add the following function where you please pHistory.Data:AddPunishment(sPlySteamId, eAdmin, sType, sReason) Args:

  • sPlySteamId: The SteamId64 of the player you want to add the punishment to
  • eAdmin: The entity of the staff member who is punishing the player
  • sType: The type of punishment that shows up in the menu (Gag, kick, etc.). Make it whatever best describes the punishment
  • sReason: The reason associated with the command. If you don't want a reason to be associated with it, just fill it in as "N/A"

phistory's People

Contributors

mydimeisup avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.