Raised This Month: $401 Target: $400
 100% 

COD: HitMarkers [Last Update: 24/01/2020]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff        Approver:   HamletEagle (33)
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 01-16-2020 , 13:42   COD: HitMarkers [Last Update: 24/01/2020]
Reply With Quote #1

Call of Duty: HitMarkers

Description.
  • A simple plugin displaying a symbol inside your crosshair everytime you hit an enemy, just like in Call of Duty. Made this plugin since there aren't any of this kind yet. The plugin is standard set to only display a hitmarker when using a sniper. set amx_hmsnipers "0" to enable it for all guns.

Plugin Cvars.
  • The whole hitmarker has a bunch of settings that can be changed by cvars, listed below

Code:
amx_hitmarkers "1" - Enables/disables the plugin. Enabled on default.
amx_hmrainbow "1" - Enables/disables rainbow colors. Enabled on default.
amx_hmrandom "1" - Enables/disables random hitmarker symbols. Enabled on default.
amx_hmsnipers "1" - Enables/disables hitmarkers on snipers only. Enabled on default.
amx_hmsounds "1" - Enables/disables hitmarker sounds. Enabled on default.
amx_hmsymbol "x" - Sets the symbol of the hitmarker (only works when amx_hmrandom "0")
amx_hmrcolor "165" - Sets the RGB Red code. (This won't work when amx_hmrainbow = 1)
amx_hmgcolor "165" - Sets the RGB Green code. (This won't work when amx_hmrainbow = 1)
amx_hmbcolor "165" - Sets the RGB Blue code. (This won't work when amx_hmrainbow = 1)
amx_hmxpos "-1.0" - Sets the x position.
amx_hmypos "-1.0" - Sets the y position.
amx_hmholdtime "0.5" - Sets the holdtime of the hitmarker
Hitmarker Symbols.
  • When amx_hmrandom is "1", a random symbol will be picked to display inside your crosshair. When it's "0", a simple "x" will be displayed.
Code:
  • "-"
  • "\"
  • "|"
  • "/"
  • "*"
  • "+"
  • "x"
Pictures.
Spoiler


Updates.
Code:
  • 1.0: First release
  • 1.1: Implented DJEarthQuake's idea
    • Added rainbow colors + cvars
    • Added random symbols + cvars
  • 1.2: Released a version which only works for Sniper rifles.
  • 1.3:
    • Added a cvar for snipers and merged both plugins into 1. Thanks to HamletEagle.
    • Optimized my code a lot thanks to Bugsy, thanks for showing me.
  • 1.4: Added hitmarker sounds controlable with a cvar.
  • 1.5:
    • Added a cvar to adjust the hitmarker symbol to your likings
    • Optimized the code a bit.
Credits.
Please, if any bugs occure, let me know. Suggestions and improvements are always welcome too.
Attached Files
File Type: sma Get Plugin or Get Source (HitMarkers.sma - 208 views - 3.8 KB)
File Type: zip HitMarkers.zip (4.0 KB, 123 views)
__________________


My Plugins:

Last edited by Napoleon_be; 02-10-2020 at 08:43. Reason: Update 1.5
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: All over the place.
Old 01-16-2020 , 17:26   Re: COD: HitMarker [First release: 16/01/2020]
Reply With Quote #2

Thanks @Napoleon_be!

Made a random color spinner version. All mods.
Attached Files
File Type: sma Get Plugin or Get Source (HitMarX.sma - 73 views - 1.3 KB)
__________________
"It's not the actual programming that's interesting. But it's what you can accomplish with the end results that are important." -Dennis Ritchie
"Mathematics, rightly viewed, possesses not only truth, but supreme beauty a beauty cold and austere, like that of sculpture..." -Bertrand Russell

Last edited by DJEarthQuake; 02-06-2020 at 09:20. Reason: Posted late.
DJEarthQuake is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 01-17-2020 , 07:12   Re: COD: HitMarker [First release: 16/01/2020]
Reply With Quote #3

Thanks for the idea's man, i've implented them in my plugin and added cvars for them. Whole topic has been updated, and you have been given credits inside the .sma and on this topic. Ofcourse i had to optimize your code a bit.
__________________


My Plugins:

Last edited by Napoleon_be; 01-17-2020 at 08:29.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
iclassdon
AlliedModders Donor
Join Date: May 2006
Old 01-17-2020 , 08:54   Re: COD: HitMarkers [First release: 16/01/2020]
Reply With Quote #4

Have any screens? I have it loaded up on my server but its does nothing in terms of hit markers. I'm not sure what I'm looking for.

[ 32] COD: Hitmarkers 1.1 NapoleoN# HitMarkers.amxx running

I am using Advanced Bullets damage will that affect your plugins functionality?

[ 9] Advanced Bullet Damage 1.0 Sn!ff3r abd.amxx running
__________________

iclassdon is offline
Send a message via MSN to iclassdon
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 01-17-2020 , 08:56   Re: COD: HitMarkers [First release: 16/01/2020]
Reply With Quote #5

Quote:
Originally Posted by iclassdon View Post
Have any screens? I have it loaded up on my server but its does nothing in terms of hit markers. I'm not sure what I'm looking for.

[ 32] COD: Hitmarkers 1.1 NapoleoN# HitMarkers.amxx running

I am using Advanced Bullets damage will that affect your plugins functionality?

[ 9] Advanced Bullet Damage 1.0 Sn!ff3r abd.amxx running
Redownload my latest uploaded .sma and compile localy, that might be the problem. I have just adjusted my code, tested everything and everything worked. I also have abd.amxx on my server and that isn't the problem. Feel free to add me on steam and i'll see what i can do. Steam profile is in my signature
__________________


My Plugins:
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
iclassdon
AlliedModders Donor
Join Date: May 2006
Old 01-17-2020 , 09:05   Re: COD: HitMarkers [First release: 16/01/2020]
Reply With Quote #6

Its working now thanks. This is interesting anyway to pick a specific symbol instead? I have disabled the random feature.

I would prefer "+" as my static symbol.
__________________


Last edited by iclassdon; 01-17-2020 at 09:09.
iclassdon is offline
Send a message via MSN to iclassdon
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 01-17-2020 , 09:09   Re: COD: HitMarkers [First release: 16/01/2020]
Reply With Quote #7

lines 83 and 103 can be modified to what you want. just simply replace "x" to anything u like, for example "+"
__________________


My Plugins:
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: All over the place.
Old 01-17-2020 , 09:29   Re: COD: HitMarkers [First release: 16/01/2020]
Reply With Quote #8

@Napoleon_be
Thanks for making that matrix string. I started out that way but couldn't wrap it up right. More importantly is the cstrike code. Once team is put in there it slams the door closed on all mods that are not team based like Deathmatch and this won't work. Something this simple should work universally on HLDS don't you think?
@iclassdon
As a fond user and programmer of ABD, it would take the attention away from this plugin being so ubiquitous.

URL Advanced Bullet Damage code to cannibalise. Conner made a suggestion that was ignored. I added it. Also there is a arcade classic plugin I added to it making it work for Half-life also. Before ABD was bound to only Cstrike.

The top and bottom numbers on RGB are just black and white and are just as probable to blend in on 1 bullet shooting underwater as 0 255 0 or 0 0 255.
__________________
"It's not the actual programming that's interesting. But it's what you can accomplish with the end results that are important." -Dennis Ritchie
"Mathematics, rightly viewed, possesses not only truth, but supreme beauty a beauty cold and austere, like that of sculpture..." -Bertrand Russell

Last edited by DJEarthQuake; 01-17-2020 at 10:19. Reason: Accidently pressed SEND! lol wtf
DJEarthQuake is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 01-17-2020 , 09:31   Re: COD: HitMarkers [First release: 16/01/2020]
Reply With Quote #9

Quote:
Originally Posted by DJEarthQuake View Post
@Napoleon_be
Thanks for making that matrix string. I started out that way but couldn't wrap it up right. More importantly is the cstrike code. Once team is put in there it slams the door closed on all mods that are not team based like Deathmatch and this won't work. Something this simple should work universally on HLDS don't you think?
So you're saying i should use cstrike_running()?
__________________


My Plugins:
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: All over the place.
Old 01-17-2020 , 10:03   Re: COD: HitMarkers [First release: 16/01/2020]
Reply With Quote #10

Code:
public PostTakeDamage(iVictim, iAttacker){     if( is_user_connected(iAttacker) && (get_pcvar_num(pPlugin)) || (cstrike_running()) && (get_user_team(iVictim)) != (get_user_team(iAttacker)) )

Yes please make for this for all mods. It's that easy! This can be stripped down a little.

Code:
public PostTakeDamage(iVictim, iInflictor, iAttacker, Float:iDamage, iDamagebits)
All that is not needed unless say when over 100HP damage is done to make random color strobe like from this plugin does on confirmed kills.
Code:
(iAttacker == iInflictor)
Inflictor is the entity that caused the damage (such as a gun)

If using that maybe change the explosives to show something else for a hit.
__________________
"It's not the actual programming that's interesting. But it's what you can accomplish with the end results that are important." -Dennis Ritchie
"Mathematics, rightly viewed, possesses not only truth, but supreme beauty a beauty cold and austere, like that of sculpture..." -Bertrand Russell
DJEarthQuake is offline
Reply


Thread Tools
Display Modes

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 00:04.


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