Description:
Basically it allows server administrators to warn a player when they are breaking rules or just behaving bad. This plugin is useful because you won't lose your players as you do with kick / ban command. The plugin comes with fully customizable cVars and Sourcebans support for those who want it. The plugin also come with built in admin menu support and also cvars for punishments when they get warned.
Commands: sm_warn <#userid|nick> "reason" - Warn a player.
sm_unwarn <#userid|nick> "reason" - Deletes the newest warning on the player
sm_checkwarn <#userid|nick> - Check a players previous warnings.
sm_resetwarn <#userid|nick> "reason" - Erase the players warning history
Natives:
Spoiler
/********************************************* ************
* Issue a warning on a player
*
* @param client The client to issue a warning on
* @param reason The reason why you issue a warning on client
* @noreturn
********************************************* ************/
native smwarn_warn(client, String:reason[]);
/********************************************* ************
* Remove a warning on a player
*
* @param client The client to remove the warning on
* @param reason The reason why you remove the warning
* @noreturn
********************************************* ************/
native smwarn_unwarn(client, String:reason[]);
/********************************************* ************
* Reset a players warnings
*
* @param client The client to reset the warnings on
* @param reason The reason why you reset the warnings
* @noreturn
********************************************* ************/
native smwarn_resetwarn(client, String:reason[]);
Cvars:
Spoiler
// This file was auto-generated by SourceMod (v1.4.7-dev)
// ConVars for plugin "SM_warn.smx"
// Time to ban target: 0 - permanent
// -
// Default: "1"
sm_warn_banlength "1"
// Action to set when a player reach max warnings: 1 - kick, 2 - ban
// -
// Default: "1"
// Minimum: "1.000000"
// Maximum: "2.000000"
sm_warn_max_punishment "1"
// Set max warnings reached before action
// -
// Default: "3"
// Minimum: "1.000000"
// Maximum: "10.000000"
sm_warn_maxwarns "3"
// Show a motd panel to client on warn: 0 - disabled, 1 - enabled
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_warn_motdpanel "0"
// Titel of the motd page that will popup
// -
// Default: "SM warn panel titel"
sm_warn_motdpaneltitel "SM warn panel titel"
// Path to the motd panel that will popup
// -
// Default: ""
sm_warn_motdpanelurl ""
// Action to set when a player gets a warning: 1 - message player, 2 - slap player and message, 3 - slay player and message, 4 - Popup agreement and message, 5 - kick player with reason, 6 - ban player with reason
// -
// Default: "4"
// Minimum: "1.000000"
// Maximum: "6.000000"
sm_warn_punishment "4"
// Reset warnings when they reach the max warnings: 0 - Keep warnings, 1 - Delete warnings
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_warn_reset_warnings "0"
// Slap player with damage: 0 - no damage
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "100.000000"
sm_warn_slapdamage "0"
// Play a sound when a user receives a warning: 0 - disabled, 1 - enabled
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_warn_warnsound "1"
// Path to the sound that will play when a user receives a warning
// -
// Default: "sound/buttons/weapon_cant_buy.wav"
sm_warn_warnsoundpath "buttons/weapon_cant_buy.wav"
Installation:
Drag and drop the precompiled smx into (addons/sourcemod/plugins/)
Drag and drop the translations into (addons/sourcemod/translations/)
Drag and drop the following files into (addons/sourcemod/configs/) - sm_warn_reasons.cfg
- sm_unwarn_reasons.cfg
- sm_resetwarn_reasons.cfg
- sm_warn_agreement.cfg
Drag and drop SM_warn.cfg into (cfg/sourcemod/)
Edit your databases.cfg (addons/sourcemod/configs/) and add following lines
Information:
If the cvar for logging is enabled, the plugin will create a log in addons/sourcemod/logs/SM_warn.log.
Example log entry.
PHP Code:
// When an administrator warns a player L 10/08/2012 - 16:27:31: ADMIN (NICK: ecca | ID: STEAM_0:0:xxxxxx | IP: 10.0.0.4) issued a warning on PLAYER (NICK: ecca | ID: STEAM_xxxxxx | IP: 10.0.0.4) with reason: Abusive
// When an administrator resets a players warnings L 10/08/2012 - 16:27:31: ADMIN (NICK: ecca | ID: STEAM_0:0:xxxxxx | IP: 10.0.0.4) reseted warnings on PLAYER (NICK: ecca | ID: STEAM_xxxxxx | IP: 10.0.0.4) with reason: Abusive
Features:
Warn players with reason
Unwarn players (will delete their history)
Show number of warnings for admins on connect
Supports logging
Both sqlite and MySQL support
Fully customizable cVars for every handle
Supports both sourcebans and local bans
Admin menu interface with reasons
Uses showactivity to show the warn / unwarn handles
v.1.1.0 (3/02/13)
- [Added] Natives are now provided in a small area.
- [Added] Updater is now capable to show if the update is: recommended or critical
- [Changed] Timer has been changed to check every third hour instead.
v1.0.7 (19/01/13)
- [Added] Plugin can now notify when a new version is out. Requires socket extension
- [Fixed] Warn reason not displayed on kick
- [Fixed] Hostname should not cause problems anymore. Please do not use unicode characters in the hostname!
v1.0.6 Patch (24/10/12)
- [Fixed] MySQL query problem caused by server hostname
v1.0.6 (22/10/12)
- [Removed] Warningscount variable not in use
- [Removed] Warnigns bool not in use
- [Added] Last warning reason when ban for max warnings
- [Added] Hostname when user is warned
- [Fixed] Warn through admin menu should work smooth again (thanks drunkenbombers)
- [WARNING] Drop your old database!
v1.0.5 (12/10/12)
- [Added] The admins name & steamid are now saved to database
- [Added] Agreement menu as punishment
- [Added] Cute color on [SM warn] tag.
- [Fixed] Plugin version should be correct now.
- [Fixed] sm_checkwarn should now look a bit nice'r
- [Fixed] sm_checkwarn date output was wrong
- [Added] Plugin should try to reconnect to database if it loses it's connection
- [Edited] cVar sm_warn_punishment , check the config file!+
- [Notice] You can't use motd and warn menu option 4 togheter
- [WARNING] Drop your old database!
v1.0.4 (10/10/12)
- [Added] sm_checkwarn to the admin menu
- [Added] sm_resetwarn to the admin menu
- [Fixed] erorr caused by the datapacket
- [Changed] sm_unwarn, command now only resets one of the players warnings.
- [Added] sm_resetwarn, command will erase the players warnings history completely.
- [Added] Reason support for the new command "sm_resetwarn"
- [Added] commands can now be found under menu category "Warnings commands"
- [Fixed] cVars is a bit more sorted now (sorry for that)
- [Fixed] Increased max warnings to 10
- [Added] cVar "sm_warn_reset_warnings": Reset warnings when they reach the max warnings: 0 - Keep warnings, 1 - Delete warnings
- If cVar is set to keep warnings the "sm_resetwarn" will be set to root flag
- [WARNING] Delete your old database or plugin will not work as expected!
v1.0.3 (09/10/12)
- [Added] Whole plugins is now using translations
- [Added] sm_unwarn to admin menu
- [Added] 3 new translations
- Swedish
- German
. French
- [Added] Reasons is now using cfg file
- [Added] Ability to check the players warning history (sm_checkwarn <#userid|name>)
- [Added] Kick reason if case 4 or 5 is selected as punish
- [Fixed] Code that waren't in use
- [Fixed] Possible mysql injection exploit
- [WARNING] You need to delete your old table because of sql update.
v1.0.2 (08/10/12)
- [Added] phrases support.
- [Edited] Output text a little bit
- [Added] Reasons on reseting warnings
- [Added] Sound on warning
- [Added] MOTD panel on warning
- [Added] Reason support for sm_unwarn
v1.0.1 (08/10/12)
- [Fixed] Spell mistake: banlenght -> banlength.
- [Added] SQLITE support
- [Added] Reason support
- [Removed] Command sm_warn_setup
- [Edited] The text a little bit
v1.0.0 (08/10/12)
- Initial release
Changelog: Translations:
Quote:
v1.0.7 (19/01/13) - [Added] Phrase "warn_update"
v1.0.6 Patch (24/10/12) - [Fixed] error in the phrase "warn_warnconnect" v1.0.6 (22/10/12) - [Fixed] some phrases i think
v1.0.5 (12/10/12) - [Fixed] Translations should now be completed
v1.0.4 (10/10/12)
- [Added] alot of translations because of new command
- [Fixed] French translation incompleted
- [Fixed] German translation incompleted
- [Fixed] Swedish translation grammar
Sound interesting but:
- you cannot choose what kind of warning you send to the player, like camping, swearing, spaming(...) ?
- Would the command be available in the admin menu (i.e. in the player commands), like the kick/ban options?
What does a warning look like? A chatmessage? With TwistedPandas Plugin I am able to set a webpage to show in MOTD-Window and I am able to play a warning Sound.
Does this Plugin show how many warnings a player gained in the after he joined?
I would love to replace TwistedPandas with your Plugin, but can you please add this features?
Also i added a feature list in the first post of the plugin
Sorry I have not seen that ^^
MOTD-Panel:
If you warn someone the warned one gets the Panel where the MOTD is in. (MOTD=Message of the Day, the screen that appears if you connect to a server) The Admin can set, what URL is shown in the panel. For example on our Server this Page is shown.