Giter Club home page Giter Club logo

sm-supersprayhandler's Introduction

Syntax update of Super Spray Handler

Not thoroughly tested. Will maintain this plugin and bugfix if errors arise.
https://forums.alliedmods.net/showthread.php?t=281488


Super Spray Handler

By: TheWreckingCrew6
The Complete Spray Management Plugin

Credits: This plugin is a combination of Shavit's Spray Manager plugin, which I (TheWreckingCrew6) have fixed up, and all the hard work of Nican132, CptMoore, and Lebson506th's Spray Trace plugin, which I have also fixed up. You could consider this a redux of both plugins.

Features:

  • Trace the owner of a spray
  • Remove a Spray
  • Admin Spray (Spray other peoples sprays)
  • Spray ban users
  • UnSprayban Users
  • Punish users directly through the plugin

Admin Menu Support:

  • Admin Menu
  • Spray Menu
  • Punishment Menu
  • Bantimes Menu
  • Currently Connected Menu
  • SpraybanList Menu

Commands:

  • sm_spraytrace - Trace the owner of the spray you're looking at, and open the punishment menu.
  • sm_removespray - Remove the spray you're looking at and open the punishment menu.
  • sm_qremovespray - Removes the spray you're looking at and doesn't open the punishment menu.
  • sm_removeallsprays - Removes all the sprays on the map at once.
  • sm_adminspray <Steam_ID/Name> - Spray the persons spray where you are looking.
  • sm_sprayban - Ban the user from spraying. Ever.
  • sm_sprayunban <Steam_ID/Name> - Unban a Spray Banned user.
  • sm_offlinesprayban <Steam_ID> [Name] - Spray ban someone not on the server.
  • sm_spraybans - Shows a list of currently connected spray banned players.

***All CVars are Automatically generated to "tf/cfg/sourcemod/plugin.ssh.cfg"***

Convars:

  • sm_ssh_enabled - Defaults to 1, set to 0 to disable SSH.
  • sm_ssh_overlap - Enable preventing users from spraying their sprays ontop of other sprays.
  • sm_ssh_auth - (Default: 1) Which authentication identifiers should be seen in the HUD? This is a math cvar, add the proper numbers for your likings. (Example: 1 + 4 = 5/Name + IP address) 1 - Name 2 - SteamID 4 - IP address
  • sm_ssh_refresh - (Default: 1.0) How often the program will trace to see player's spray to the HUD. 0 to disable.
  • sm_ssh_dista - (Default: 50) How far away the spray will be traced to.
  • sm_ssh_enableban - (Default: 1) Should banning be enabled in punishment menu?
  • sm_ssh_burntime - (Default: 10) How long the burn punishment is for.
  • sm_ssh_slapdamage - (Default: 5) How much damage the slap punishment is for. 0 to disable.
  • sm_ssh_enableslay - (Default: 0) Enables the use of Slay as a punishment.
  • sm_ssh_enableburn - (Default: 0) Enables the use of Burn as a punishment.
  • sm_ssh_enablepban - (Default: 1) Enables the use of a Permanent Ban as a punishment.
  • sm_ssh_enablekick - (Default: 1) Enables the use of Kick as a punishment.
  • sm_ssh_enablebeacon - (Default: 0) Enables putting a beacon on the sprayer as a punishment.
  • sm_ssh_enablefreeze - (Default: 0) Enables the use of Freeze as a punishment.
  • sm_ssh_enablefreezebomb - (Default: 0) Enables the use of Freeze Bomb as a punishment.
  • sm_ssh_enablefirebomb - (Default: 0) Enables the use of Fire Bomb as a punishment.
  • sm_ssh_enabletimebomb - (Default: 0) Enables the use of Time Bomb as a punishment.
  • sm_ssh_enablespraybaninmenu - (Default: 1) Enables Spray Ban in the Punishment Menu.
  • sm_ssh_drugtime - (Default: 0) set the time a sprayer is drugged as a punishment. 0 to disable.
  • sm_ssh_autoremove - (Default: 0) Enables automatically removing sprays when a punishment is dealt.
  • sm_ssh_restrict - (Default: 1) Enables or disables restricting admins to punishments they are given access to. (1 = commands they have access to, 0 = all)
  • sm_ssh_useimmunity - (Default: 1) Enables or disables using admin immunity to determine if one admin can punish another.
  • sm_ssh_global - (Default: 1) Enables or disables global spray tracking. If this is on, sprays can still be tracked when a player leaves the server.
  • sm_ssh_location - (Default: 1) Where players will see the owner of the spray that they're aiming at? 0 - Disabled 1 - Hud hint 2 - Hint text (like sm_hsay) 3 - Center text (like sm_csay) 4 - HUD
  • sm_ssh_hudtime - (Default: 1.0) How long the HUD messages are displayed.
  • sm_ssh_confirmactions - (Default: 1) Should you have to confirm spray banning or unspray banning someone?

Installation Instructions:

  • Place supersprayhandler.smx in your plugins folder.
  • Place translations/ssh.phrases.txt in your translations folder.
  • Place the following code with your own sql info into your databases.cfg. Title it "ssh" in the file.

MySql:

    "ssh"
    {
        "driver"      "default"
        "host"        "ip/hostname"
        "database"    "database"
        "user"        "username"
        "pass"        "password"
        "port"        "3306"
    }

SqLite:

    "ssh"
    {
        "driver"      "sqlite"
        "host"        "localhost"
        "database"    "ssh"
        "user"        "root"
        "pass"        ""
    }

sm-supersprayhandler's People

Contributors

blueberryy avatar deathreus avatar joinedsenses avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sm-supersprayhandler's Issues

Exception on CheckBan

L 01/11/2020 - 21:55:04: [SM] Blaming: supersprayhandler.smx
L 01/11/2020 - 21:55:04: [SM] Call stack trace:
L 01/11/2020 - 21:55:04: [SM] [0] SQL_LockDatabase
L 01/11/2020 - 21:55:04: [SM] [1] Line 587, supersprayhandler.sp::CheckBan
L 01/11/2020 - 21:55:04: [SM] [2] Line 233, supersprayhandler.sp::OnClientPutInServer
L 01/11/2020 - 21:55:04: [SM] Exception reported: Invalid database Handle 0 (error: 4)

load error

i keep getting a load error and im not sure why, only thing i can think of is im doing the SQL part wrong? im extremely new to this so the "coding" part(s) get me sometimes lol. do i copy both the " MySql" and "SqLite" and do i change anything in them when i put them into my database.cfg?

Spray hints not working

sm_ssh_location - (Default: 1) Where players will see the owner of the spray that they're aiming at? 0 - Disabled 1 - Hud hint 2 - Hint text (like sm_hsay) 3 - Center text (like sm_csay) 4 - HUD
Hint are not showing for players and admins
Game: Synergy

Non-standart symbols in nickname can crash server

For example player had russian nickname: Бешанный енот ⭐⭐.
If you watch on players spray server crashes:

SIGSEGV /SEGV_MAPERR accessing 0xbedb6000

Thread 0 (crashed):
   0: sourcemod.2.sdk2013.so!UserMessages::GetMessageIndex [ sm_stringhashmap.h:67 + 0x0 ] [ supersprayhandler.smx::.4480.StartMessageOne ]
      https://github.com/alliedmodders/sourcemod/blob/def6d0ff72e0d78c51007ee4b7fca1d83d566a77/public/sm_stringhashmap.h#L67

   1: jit_code_3627372544_1048576 + 0xce241 [ supersprayhandler.smx::.13716.Client_PrintKeyHintText ]
      eip: 0xd8423241  esp: 0xf8e02ac0  ebp: 0xf8e02ac8  

   2: jit_code_3627372544_1048576 + 0x82bc8 [ supersprayhandler.smx::CheckAllTraces ]
      eip: 0xd83d7bc8  esp: 0xf8e02ad0  ebp: 0xf8e02ad8  

Spraying next to a spray crashes both parties game entirely

We have been getting some complaints about members crashing when spraying sprays. This has only started after fixing a previous issue with sprays not spray banning perm. It was only session. We had that fixed and implemented. I have provided the cfg we are using and a video.

I would however like to request if its possible to find your plugin previous version so we can test and use that as we have a big community server to maintain. I'm not entirely sure how long this might take to be fixed or if there is any temp fixes

Untitled.video.-.Made.with.Clipchamp.1.mp4

`// Which authentication identifiers should be seen in the HUD?
// - This is a "math" cvar, add the proper numbers for your likings. (Example: 1 + 4 = 5/Name + IP address)
// 1 - Name
// 2 - SteamID
// 4 - IP address
// -
// Default: "3"
// Minimum: "1.000000"
sm_ssh_auth "3"

// Enables automatically removing sprays when a punishment is dealt.
// -
// Default: "1"
sm_ssh_autoremove "1"

// How long the burn punishment is for.
// -
// Default: "0"
sm_ssh_burntime "0"

// Should you have to confirm spray banning and un-spraybanning?
// -
// Default: "1"
sm_ssh_confirmactions "1"

// How far away (FROM YOUR MOUSE, NOT YOUR POSITION) the spray will be traced to.
// -
// Default: "50.0"
sm_ssh_dista "50.0"

// set the time a sprayer is drugged as a punishment. 0 to disable.
// -
// Default: "0"
sm_ssh_drugtime "0"

// Whether or not banning is enabled. 0 to disable temporary banning.
// -
// Default: "1"
sm_ssh_enableban "1"

// Enables putting a beacon on the sprayer as a punishment.
// -
// Default: "0"
sm_ssh_enablebeacon "0"

// Enables the use of Burn as a punishment.
// -
// Default: "0"
sm_ssh_enableburn "0"

// Enable "Super Spray Handler"?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_ssh_enabled "1"

// Enables the use of Fire Bomb as a punishment.
// -
// Default: "0"
sm_ssh_enablefirebomb "0"

// Enables the use of Freeze as a punishment.
// -
// Default: "0"
sm_ssh_enablefreeze "0"

// Enables the use of Freeze Bomb as a punishment.
// -
// Default: "0"
sm_ssh_enablefreezebomb "0"

// Enables the use of Kick as a punishment.
// -
// Default: "0"
sm_ssh_enablekick "0"

// Enables the use of a Permanent Ban as a punishment.
// -
// Default: "1"
sm_ssh_enablepban "1"

// Enables the use of Slay as a punishment.
// -
// Default: "0"
sm_ssh_enableslay "0"

// Enables Spray Ban in the Punishment Menu.
// -
// Default: "1"
sm_ssh_enablespraybaninmenu "1"

// Enables the use of Time Bomb as a punishment.
// -
// Default: "0"
sm_ssh_enabletimebomb "0"

// Enables or disables global spray tracking. If this is on, sprays can still be tracked when a player leaves the server.
// -
// Default: "1"
sm_ssh_global "0"

// How long the HUD messages are displayed.
// -
// Default: "1.0"
sm_ssh_hudtime "1.0"

// Where players will see the owner of the spray that they're aiming at? 0 - Disabled 1 - Hud hint 2 - Hint text (like sm_hsay) 3 - Center text (like sm_csay) 4 - HUD
// -
// Default: "1"
sm_ssh_location "1"

// Prevent spray-on-spray overlapping?
// If enabled, specify an amount of units that another player spray's distance from the new spray needs to be it or more, recommended value is 75.
// -
// Default: "0"
// Minimum: "0.000000"
sm_ssh_overlap "75"

// How often the program will trace to see player's spray to the HUD. 0 to disable.
// -
// Default: "0.1"
sm_ssh_refresh "0.1"

// Enables or disables restricting admins to punishments they are given access to. (1 = commands they have access to, 0 = all)
// -
// Default: "1"
sm_ssh_restrict "1"

// How much damage the slap punishment is for. 0 to disable.
// -
// Default: "0"
sm_ssh_slapdamage "0"

// Enables or disables using admin immunity to determine if one admin can punish another.
// -
// Default: "0"
sm_ssh_useimmunity "0"`

Spraying users sprays causing log errors

L 01/04/2019 - 12:31:00: [SM] Exception reported: Invalid plugin address
L 01/04/2019 - 12:31:00: [SM] Blaming: adminmenu.smx
L 01/04/2019 - 12:31:00: [SM] Call stack trace:
L 01/04/2019 - 12:31:00: [SM]   [0] TopMenu.Display
L 01/04/2019 - 12:31:00: [SM]   [1] Line 195, /home/builds/sourcemod/linux-1.10/build/plugins/adminmenu.sp::Command_DisplayMenu
L 01/04/2019 - 12:31:20: [SM] Exception reported: Heap leak detected: hp:36608 should be 36836!
L 01/04/2019 - 12:31:21: [SM] Exception reported: Heap went below heap boundary
L 01/04/2019 - 12:31:21: [SM] Blaming: supersprayhandler.smx
L 01/04/2019 - 12:31:21: [SM] Call stack trace:
L 01/04/2019 - 12:31:21: [SM]   [1] Line 1840, G:\Documents\TF2\SourceMod 1.9.0-6245\addons\sourcemod\scripting\sprayhandler.sp::MenuHandler_AdminSpray
L 01/04/2019 - 12:31:25: [SM] Exception reported: Invalid plugin address
L 01/04/2019 - 12:31:25: [SM] Blaming: adminmenu.smx
L 01/04/2019 - 12:31:25: [SM] Call stack trace:
L 01/04/2019 - 12:31:25: [SM]   [0] TopMenu.Display
L 01/04/2019 - 12:31:25: [SM]   [1] Line 195, /home/builds/sourcemod/linux-1.10/build/plugins/adminmenu.sp::Command_DisplayMenu
L 01/04/2019 - 12:31:25: [SM] Exception reported: Invalid plugin address
L 01/04/2019 - 12:31:25: [SM] Blaming: adminmenu.smx
L 01/04/2019 - 12:31:25: [SM] Call stack trace:
L 01/04/2019 - 12:31:25: [SM]   [0] TopMenu.Display
L 01/04/2019 - 12:31:25: [SM]   [1] Line 195, /home/builds/sourcemod/linux-1.10/build/plugins/adminmenu.sp::Command_DisplayMenu
L 01/04/2019 - 12:31:27: [SM] Exception reported: Invalid plugin address
L 01/04/2019 - 12:31:27: [SM] Exception reported: Invalid plugin address
L 01/04/2019 - 12:31:27: [SM] Exception reported: Invalid plugin address
L 01/04/2019 - 12:31:27: [SM] Exception reported: Invalid plugin address
L 01/04/2019 - 12:31:27: [SM] Exception reported: Invalid plugin address
L 01/04/2019 - 12:31:27: [SM] Exception reported: Invalid plugin address
L 01/04/2019 - 12:31:27: [SM] Exception reported: Invalid plugin address
L 01/04/2019 - 12:31:27: [SM] Exception reported: Invalid plugin address
L 01/04/2019 - 12:31:27: [SM] Exception reported: Invalid plugin address

Game: Synergy

Invalid memory access

Just got a lot of error messages in logs:

L 02/20/2020 - 13:43:11: [SM] Exception reported: Heap leak detected: hp:41 should be 36832!
L 02/20/2020 - 13:43:12: [SM] Exception reported: Invalid memory access
L 02/20/2020 - 13:43:12: [SM] Blaming: supersprayhandler.smx
L 02/20/2020 - 13:43:12: [SM] Call stack trace:
L 02/20/2020 - 13:43:12: [SM]   [1] Line 264, C:\Users\Arron\Documents\GitHub\SM-SuperSprayHandler\scripting\supersprayhandler.sp::CheckAllTraces
L 02/20/2020 - 13:43:30: [SM] Exception reported: Invalid memory access
L 02/20/2020 - 13:43:30: [SM] Blaming: supersprayhandler.smx
L 02/20/2020 - 13:43:30: [SM] Call stack trace:
L 02/20/2020 - 13:43:30: [SM]   [1] Line 232, C:\Users\Arron\Documents\GitHub\SM-SuperSprayHandler\scripting\supersprayhandler.sp::OnClientPutInServer
L 02/20/2020 - 13:44:38: [SM]   [1] Line 608, C:\Users\Arron\Documents\GitHub\SM-SuperSprayHandler\scripting\supersprayhandler.sp::Player_Decal
L 02/20/2020 - 13:44:38: [SM] Exception reported: Invalid plugin address
L 02/20/2020 - 13:44:38: [SM] Exception reported: Invalid plugin address
L 02/20/2020 - 13:48:05: [SM] Exception reported: Invalid memory access
L 02/20/2020 - 13:48:05: [SM] Blaming: supersprayhandler.smx
L 02/20/2020 - 13:48:05: [SM] Call stack trace:
L 02/20/2020 - 13:48:05: [SM]   [1] Line 225, C:\Users\Arron\Documents\GitHub\SM-SuperSprayHandler\scripting\supersprayhandler.sp::OnClientDisconnect
L 02/20/2020 - 13:48:05: [SM] Exception reported: Invalid memory access
L 02/20/2020 - 13:48:05: [SM] Blaming: supersprayhandler.smx

Plugin broke after 64-bit TF2 update

Hello!

After 64-bit TF2 update, the plugin crashes the server when trying to load it when there are players on the server (or when the first player connects to the server, if the plugin is loaded)

It's likely to be a global issue, for example, the Shounic server also disabled this plugin right now

Shavit's Spray Manager causes the same problem upon trial

I hope you have time to update the plugin :>

Sorry for my english!
Thank you!

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.