Coder Social home page Coder Social logo

hitmarker's Introduction

Hitmarker

A simple plugin that displays a hitmarker in the center of the screen when hitting an enemy.
This video demonstrates how this plugin works.

Installation

Installing the plugin consists of several steps:

  1. Download this plugin;
  2. Go to the root folder of the game (for example C:\Program Files (x86)\Steam\steamapps\common\Sven Co-op) and move the svencoop folder there;
  3. If the operating system prompts you to replace the files, replace them;
  4. Next, go to the ..\Sven Co-op\svencoop folder and find there the text file default_plugins.txt;
  5. Open this file and paste the following text into it:
	"plugin"
	{
		"name" "Hitmarker"
		"script" "Hitmarker"
	}
  1. After completing the previous steps, you can run the game and check the result.

Commands

When you start the game and connect to your server, you will have the following plugin commands at your disposal, which you will have to write in the game chat to activate them.

Command MinValue MaxValue DefValue Description Usage
.hm, /hm or !hm 0 1 1 Allows you to enable or disable this feature. (AdminsOnly) Usage: .hm or /hm or !hm <enabled>. Example: !hm 1
.hm_size, /hm_size or !hm_size 0 5 2 Allows you to change the size of the hitmarker.
0 - Disabled;
1 - Very Small;
2 - Small;
3 - Normal;
4 - Big;
5 - Very Big.
Usage: .hm_size or /hm_size or !hm_size <size>. Example: !hm_size 2
.hm_hsnd, /hm_hsnd or !hm_hsnd 0 5 1 Allows you to change the sound when hitting an enemy.
0 - Mute;
1 - COD;
2 - Bell;
3 - Bubble;
4 - Nya;
5 - Anime.
Usage: .hm_hsnd or /hm_hsnd or !hm_hsnd <sound>. Example: !hm_hsnd 1
.hm_ksnd, /hm_ksnd or !hm_ksnd 0 2 0 Allows you to change the sound when killing an enemy.
Currently not working.
Usage: .hm_ksnd or /hm_ksnd or !hm_ksnd <sound>. Example: !hm_ksnd 2
.hm_holdtime, /hm_holdtime or !hm_holdtime 0.0 1.0 0.3 Allows you to change the display time of the hitmarker on the screen. Usage: .hm_holdtime or /hm_holdtime or !hm_holdtime <time>. Example: !hm_holdtime 0.3
.hm_fadetime, /hm_fadetime or !hm_fadetime 0.0 1.0 0.1 Allows you to change the fade time of the hitmarker. Usage: .hm_fadetime or /hm_fadetime or !hm_fadetime <time>. Example: !hm_fadetime 0.1
.hm_screenfadetime, /hm_screenfadetime or !hm_screenfadetime 0.0 1.0 0.3 Allows you to specify the screen fade time. Usage: .hm_screenfadetime or /hm_screenfadetime or !hm_screenfadetime <time>. Example: !hm_screenfadetime 0.3
.hm_screenholdtime, /hm_screenholdtime or !hm_screenholdtime 0.0 1.0 0.3 Allows you to specify the color hold time on the screen. Usage: .hm_screenholdtime or /hm_screenholdtime or !hm_screenholdtime <time>. Example: !hm_screenholdtime 0.3
.hm_screencolor, /hm_screencolor or !hm_screencolor 0 0 0 0 255 255 255 255 25 0 205 55 Allows you to specify the color of the screen when killing an enemy. Usage: .hm_screencolor or /hm_screencolor or !hm_screencolor <red> <green> <blue> <alpha>. Example: !hm_screencolor 25 0 205 55
.hm_hcolor, /hm_hcolor or !hm_hcolor 0 0 0 0 255 255 255 255 255 255 255 125 Allows you to change the color when hitting an enemy. Usage: .hm_hcolor or /hm_hcolor or !hm_hcolor <red> <green> <blue> <alpha>. Example: !hm_hcolor 255 255 255 125
.hm_kcolor, /hm_kcolor or !hm_kcolor 0 0 0 0 255 255 255 255 255 0 0 125 Allows you to change the color when killing an enemy. Usage: .hm_kcolor or /hm_kcolor or !hm_kcolor <red> <green> <blue> <alpha>. Example: !hm_kcolor 255 0 0 125
.hm_ao, /hm_ao or !hm_ao 0 1 0 Allows you to enable this feature only for admins or for all players. (AdminsOnly)
0 - For everyone;
1 - Admins only.
Usage: .hm_ao or /hm_ao or !hm_ao <adminsonly>. Example: !hm_ao 0
.hm_reset, /hm_reset or !hm_reset - - - Allows you to reset the settings to the default settings. No arguments.

REMEMBER: The server may freeze with a large number of players. I will try to fix this in the future.
REMEMBER: The killsound folder is not in use yet. In the future, sound will be added when killing an enemy.
REMEMBER: If you set the color of the hitmarker to black, then it simply will not be displayed on your screen.
REMEMBER: Also, setting the alpha channel for the hitmarker to 0 will disable it.
REMEMBER: You can also draw your own hitmarker sprite and replace one of the existing files.
REMEMBER: The hitmarker only works when you fire a weapon or attack with a melee weapon (does not work on grenades).

GIF

  • No Screen Fade (!hm_screencolor 0 0 0 0)

    GIF1

  • Screen Fade (!hm_screencolor 25 0 205 55)

    GIF2

Screenshots

  • Screenshot 1

    Screenshot_1
  • Screenshot 2

    Screenshot_2
  • Screenshot 3

    Screenshot_3

hitmarker's People

Contributors

kekekekkek avatar

Watchers

 avatar

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.