Raised This Month: $51 Target: $400
 12% 

Infractions System v0.1.5


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands        Approver:   Hawk552 (427)
fezh
Veteran Member
Join Date: Dec 2008
Location: BANNED
Old 02-24-2010 , 11:08   Infractions System v0.1.5
Reply With Quote #1

.: Description :.

If you ever were in a vBulletin forum you should know the infractions system of that forum software. So, I simply ported this idea to AMXX.
For the people who have no idea about what I'm talking about it's simple:
If your behavior is inappropriate administrators can warn or add penalizations to you. After X amount of warnings you get an infraction, and after X amount of infractions you get banned. It's easy.


.: Requirements :.
  • STEAM
  • AMX Mod X version 1.8.1 or higher
  • NFVault
.: Multilingual :.
http://forums.alliedmods.net/showthread.php?t=119740

.: Commands :.

Admin Commands
  • amx_warning <name or #userid> <reason> - Adds a warning to a player with the given reason.
  • amx_infraction <name or #userid> <reason> - Adds an infraction to a player with the given reason.
  • amx_warning_remove <name or #userid> - Removes a warning to a player.
  • amx_infraction_remove <name or #userid> - Removes an infraction to a player.

Client Commands
  • say /warnings - Checks player's current warnings.
  • say /infractions - Checks player's current infractions.

.: Cvars :.
  • amx_infractions_bantime - Sets the ban time (in minutes) for when a player reaches the max infractions count. Default: 30.
  • amx_infractions_banmethod - Sets the ban method (0: normal ban | 1: ban from admincmd.amxx | 2: ban from AMXBans). Default: 1.
  • amx_warnings_max - Sets the available max warnings count. Default: 3.
  • amx_infractions_max - Sets the available max infractions count. Default: 3.

.: Changelog :.
Code:
- Version: 0.1.5 (February 24, 2010)
* Fixed file location.
* Made the kick message multilingual.
* Fixed little typo in the above.
* Prevented some bugs by checking >= instead of == in some cases.

- Version: 0.1.4 (February 24, 2010)
* Fixed major error in banning system.
* Replaced FVault with NFVault.
* Added multilingual system.
* Removed useless commands to clear vaults.

- Version: 0.1.1 (February 24, 2010)
* Fixed little bug with amx_infraction command.
* Added new cvar (amx_infractions_banmethod).

- Version: 0.1.0 (February 24, 2010)
* First public release.
.: Download :.

SQL VERSION (BETA): http://forums.alliedmods.net/showpos...0&postcount=35
Attached Files
File Type: sma Get Plugin or Get Source (infractions_system.sma - 2269 views - 7.4 KB)
File Type: zip infractions_system.zip (13.0 KB, 951 views)
File Type: txt infractions_system.txt (8.7 KB, 784 views)
__________________
"There is no knowledge, that is not power"

Last edited by fezh; 01-04-2011 at 18:40.
fezh is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 02-24-2010 , 11:13   Re: Infractions System v0.1.0
Reply With Quote #2

First!

Good plugin Fezh!
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 02-24-2010 , 11:57   Re: Infractions System v0.1.0
Reply With Quote #3

Nice work!
KadiR is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-24-2010 , 12:01   Re: Infractions System v0.1.0
Reply With Quote #4

Maybe a cvar for different methods of banning?
- banid
- amx_ban <player> <minutes>
- amx_ban <minutes> <player> (AMXBans)
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
fezh
Veteran Member
Join Date: Dec 2008
Location: BANNED
Old 02-24-2010 , 14:07   Re: Infractions System v0.1.0
Reply With Quote #5

Quote:
Originally Posted by Exolent[jNr] View Post
Maybe a cvar for different methods of banning?
- banid
- amx_ban <player> <minutes>
- amx_ban <minutes> <player> (AMXBans)
Added.
__________________
"There is no knowledge, that is not power"
fezh is offline
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 02-24-2010 , 14:15   Re: Infractions System v0.1.1
Reply With Quote #6

Nice
__________________
crazyeffect is offline
Send a message via MSN to crazyeffect
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 02-24-2010 , 15:18   Re: Infractions System v0.1.1
Reply With Quote #7

Sexy.
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
fezh
Veteran Member
Join Date: Dec 2008
Location: BANNED
Old 02-24-2010 , 17:02   Re: Infractions System v0.1.4
Reply With Quote #8

Updated again, check changelog.
__________________
"There is no knowledge, that is not power"
fezh is offline
xakintosh
I run no-steam servers!
Join Date: Feb 2010
Location: Edge of nowhere
Old 02-24-2010 , 17:03   Re: Infractions System v0.1.4
Reply With Quote #9

You shoud add menu to this perfect plugin
__________________
As soon as possible.
xakintosh is offline
Send a message via Yahoo to xakintosh Send a message via Skype™ to xakintosh
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-24-2010 , 17:14   Re: Infractions System v0.1.4
Reply With Quote #10

1. "infractions acumulation" -> "infractions accumulation".

2. "infractions accumulation" should be ML like all others.

3.
Code:
if ( ++g_iInfractionsCount[ iPlayer ] == g_iCacheCvarMaxInfractions )

Code:
if ( ++g_iInfractionsCount[ iPlayer ] >= g_iCacheCvarMaxInfractions )
Could bug if the max is changed and players infractions become higher than the max, thus adding more infractions won't ever equal the max.
That occurs a few times throughout the plugin.

4. nfvault uses an actual file to be passed to the functions.
Therefore, "amx_infractions" would be this path: "cstrike/amx_infractions" where it would be a file with no extension.
nfvault has a built-in function for you to use:
Code:
new g_szVaultFile[ 128 ]; public plugin_init( ) {     nfv_file( "amx_infractions.txt", g_szVaultFile, charsmax( g_szVaultFile ) ); }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:03.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode