This plugin will give admins the ability to permanently ban a player's ability to use the in-game spray function. Once banned, a player will not be able to spray anymore until an admin unbans them.
Admin can also view the ban list of currently connected players. Players can also view a menu to check the status of their spray ban status.
New in 0.0.3.4+, ability to use SteamID in command to ban sprays when player isn't online.
New in 0.0.3.7, basic spray on spray protection with cvar sm_banedsprays_protection
[SM] Listing commands for: Banned Sprays
[Name] [Type] [Help]
sm_banspray admin Permanently remove a players ability to use spray
sm_banspray_list admin List of player's currently connected who are banned from using sprays
sm_banspray_steam admin Manually add a SteamID to the list of players who are banned from using sprays
sm_deletespray admin Remove a player's spray by either looking at it or providing a player's name
sm_unbanspray admin Permanently remove a players ability to use spray
sm_settings (this is a SM command)
- This is what players will use to check the status of their ban
"sm_bannedsprays_update" = "0"
- Use Updater to update this plugin when updates are available?
0 = No
1 = Yes
"sm_bannedsprays_display" = "4" min. 1.000000 max. 7.000000
- Display Options (add them up and put total in CVar)
1 = CenterText
2 = HintText
4 = HudHintText
"sm_bannedsprays_tracedist" = "25.0" min. 1.000000 max. 250.000000
- How far away the spray is from the aim to be traced
"sm_bannedsprays_tracerate" = "3.0" min. 1.000000
- Rate at which to check all player sprays (in seconds)
"sm_bannedsprays_trace" = "1"
- Trace all player sprays to display info when aimed at?
0 = No
1 = Yes
"sm_bannedsprays_debug" = "0"
- Enable some debug logging?
0 = No
1 = Yes
"sm_bannedsprays_tmploc" = "0.00 0.00 0.00"
- Location for sprays to be moved to.
Must have 2+ decimal places to be valid
"sm_bannedsprays_auth" = "0"
- If player's SteamID hasn't been authenticated yet, restrict sprays?
0 = No, allow
1 = Yes Do Not Allow
"sm_bannedsprays_remove" = "1"
- Remove the player's spray after they are banned from using sprays?
0 = Leave Spray
1 = Remove Spray
"sm_bannedsprays_protection" = "0"
- Distance, in hammer units, to not allow another user to spray next to a user's current spray.
0 = Disabled
>0 = Distance to protect sprays
The plugin is compiled to have admins with the ban flag able to use the commands. You can override the command "AllowSprayTrace" to be whatever you want.
* 0.0.1.0 * Initial Beta Release
* 0.0.2.0 * Added sm_banspray_list for admins to check if anyone connected to the server is banned
* from using sprays
* 0.0.3.0 + Added CVar to allow or restrict sprays before client(s) authorized
* + Added ability to remove any sprays a player sprayed if they're banned.
* 0.0.3.1 + Added option to turn on spray tracing so when aiming at spray it will display who sprayed it
* including their name, steamID, and time sprayed. All controlled with CVars.
* 0.0.3.2 + Added command "sm_removespray" to remove spray without banning sprays. Either aim at a spray
* and use the command or provide a player's name and the spray will be removed.
* 0.0.3.3 * Changed command from sm_removespray to sm_deletespray
* 0.0.3.4 + Added command to perform offline spray bans with SteamID sm_banspray_steamid
* * Switched from colors.inc to morecolors.inc
* + Added lateload function
* + Added translation file for phrases
* + Added REGEX to validate SteamID
* 0.0.3.5 + Added Updater functionality
* + Added AutoExecConfig include
* 0.0.3.6 + Added LogAction stuff
* 0.0.3.7 + Added basic spray over spray protection (disabled by default) Credit goes to MasterOfTheXP (https://forums.alliedmods.net/showpost.php?p=2064364&postcount=4)
* 0.0.3.8 * Fixed CVar description for sm_bannedsprays_version
A few include files if you wish to manually compile.
None that I'm aware of
NOTE: All player's ability to use a spray before cookies are cached are restricted (this usually is not a problem, just wanted to let you know). There is now a CVar so you can determine the ability of using sprays before cookies are cached (defaulted to NOT allow sprays).
For now, just drop the .smx in your sourcemod/plugins folder. I will be adding a translation file later on so this can get approved. I wasn't planning on releasing this plugin, but I've seen a few requests for it lately.I've updated this plugin as of 0.0.3.4 to have a translation file, make sure you place that in your translations folder.