dodsynthetic
01-19-2008, 07:13 PM
Syn's No Scope Notifier v2.001
This plugin will display no scope kills and keeps track of them. I know I've seen servers with something similar but could never find the plugin so I just made my own. It works with the scoped Kar, Springfield, and Enfield. It should be possible to port this to other mods just by changing out the mod specific include, get_user_weapon, and alter/add weapon id numbers, etc..
===========================
v2.001 Changes
===========================
- Found and fixed a bug with displaying no scope to regular kill percentage. It was triggered with CVAR no_scope_notify_headshot instead of a seperate CVAR causing to only work when headshot notification was enabled.
- Added new CVAR no_scope_percent to enable or disable the extra no scope to regular kill percnetage information.
===========================
v1.9 Changes
===========================
- Some parts of the code were overhauled for speed. Engine is no longer used.
- Best shots/records now hold the top 3 players instead of 1.
- Added temporary best no scope shot per current map played with say command /noscoperound.
- Added CVAR no_scope_round to enable or disable temporary best shot record per map feature.
- Best shot records are now on a per map basis. You will need to create a folder named "no_scope" in your amxmodx configs directory.
- Fixed a couple issues of not checking if a player was still connected when performing some functions. Thanks again Diamond-Optic for sharing your log info.
===========================
v1.8 Changes
===========================
- Fixed no scope head shot totals for PsychoStats logging. Thanks Diamond-Optic for letting me know of the problem.
===========================
v1.7 Changes
===========================
- Added percentage of no scope shots to other kills in the output of say command /noscopes.
- Added optional HUD message of no scope headshot.
- Added optional shot distance in feet or meters along with body part hit.
- Added some speed improvements.
- Added optional shot blocking with message when trying to use the scope.
- Added say command /noscopehits that shows no scope kills by hit box.
===========================
v1.6 Changes
===========================
- Fixed on kill private chat message of total no scope kills. It was displaying with other
weapons and could flood the chat box. Thanks to Tank from BAM for spotting it.
- Fixed invalid player errors on player disconnect for keeping track of final score.
- Added no scope best shot distance record option.
- Added CVAR no_scope_record for enabling and disabling best no scope shot record feature.
===========================
v1.5 Changes
===========================
- Added checking for players that weren't connected under MG non deployed reload message fix.
Gave invalid player errors in log. Not necessary but I like to keep things clean.
===========================
v1.4 Changes
===========================
- Changed some natives to fakemeta equivalents. This includes the scope / non scope detection.
Should be 100% accurate now.
- Fixed MG non deployed reload small hud text message. Showed last no scope kill info along with
message about needing to deploy to reload. Since this message is apparently client side, I did
find a work around but it shifts the reload message to the left.
- Fixed crashing issue for detection of player team info. Thanks again johndoe on dodplugins.net
for providing the debug output.
===========================
v1.3 Changes
===========================
- Changed get_user_team function to dod specific dod_get_pl_teamname. Reading the amxmodx forums
I found posts that stated get_user_team is buggy. This dropped no scope kill weapon stats on
failure. Thanks johndoe on dodplugins.net for spotting the crash.
===========================
v1.2 Changes
===========================
- Added cvar to enable or disable TK no scope kill notification.
===========================
v1.1 Changes
===========================
- Added cvars to adjust how long a no scope kill HUD notification stays on screen.
- Added cvar to mirror no scope kill HUD notification types in chat.
- Added detailed weapon stats logging for no scope kills.
- Added FF support. FF kills now do not add to the /noscopes total.
- Changed /noscopes to properly display "1 kill" instead of "1 kills".
- Clarified and added to the notes.
===========================
Features:
===========================
- Choose between small and large HUD text display or chat only notification.
- No scope kill logging for use with Psychostats. Reports no scope kills by individual gun used.
- Optional no scope record keeping.
- Optional display of shot distance and body part hit.
- Reporting of total no scope kills per round along with percentage of no scope kills in regards to regular kills.
- Optional scoped shot blocking with message.
- Players are able to see their no scope kills by body part informaiton the entire map.
- Optional HUD notification of no scoped head shots.
===========================
Notes:
===========================
- Tested on an AMXMODX v1.8 Linux server and v1.76 Windows server as well.
- Detailed no scope kill weapon stats do not interfere with regular scope weapon stats. They still log as normal when no scope logging is on. IE a no scoped kill still counts as a regular stat kill for that type of gun.
===========================
Say Commands:
===========================
/noscopes - Displays how many no scope kills a player has accumulated along with percentage of no scope shots.
/noscopehits - Displays a player's total kills by hit box to a player
/noscoperecord - Displays the best no scope records and who the holders are for the current map.
/noscoperound - Displays the best no scope records and who the holders are for the current map
played. This is temporary data and is discarded on map change.
===========================
CVARS:
===========================
no_scope_notify | 0 = off | 1 = on
- Gives confirmation on screen of a no scope kill. Default on.
no_scope_notify_type | 0 = small | 1 = large | 2 = in chat
- Changes size and type of no scope kill notification. Default small.
no_scope_notify_small_time | 0 = 3.8 sec | 1 = 4.8 sec | 2 = 5.8 sec | 3 = 6.8 sec
- Changes duration of small HUD no scope kill notification. Due to the nature of this type of HUD
message, the minimum is 3.8 seconds and the options available should be sufficient. Default 3.8.
no_scope_notify_large_time | x or x.x
- Changes duration of large HUD no scope kill notification. You can enter an integer or real
number here. For example, a value of one would just be 1 second and a value of 1.5 would be
1 and a 1/2 seconds. Default 3.0.
no_scope_notify_tk_notify | 0 = off | 1 = on
- Enable or disable TK no scope notification. Default off.
no_scope_notify_mirror_chat | 0 = off | 1 = on
- Enables or disables mirroring of no scope kill notification in chat box. This is helpful if
you have allot of people no scoping and the regular notification changes too fast to read.
This automatically checks to see if no_scope_notify_type is set to chat so you don't get
double notifications. Default off.
no_scope_notify_chat | 0 = off | 1 = on
- Displays total no scope kills in chat privately to player on no scope kill. Default off.
no_scope_notify_say | 0 = off | 1 = on
- Enables or disables the say command /noscopes. Default on.
no_scope_logging | 0 = off | 1 = on
- Enables logging of no scope kills. Default off.
no_scope_notify_distance | 0 = off | 1 = on
- Enables or disables showing of shot in "game distance" in no scope kill notification. Defualt
on.
no_scope_notify_distance_type | 0 = meters | 1 = feet
- Sets whether shot in "game distance" is shown as meters or feet. Default meters.
no_scope_notify_hitbox | 0 = off | 1 = on
- Enables or disables showing of hitbox hit in no scope kill notification. Default on.
no_scope_notify_block_scope | 0 = off | 1 = on
- Enables or disables the blocking of scoped shots. Default off.
no_scope_notify_block_notify | 0 = off | 1 = on
- Enables or disables telling a user that you can't fire scoped when blocking of scoped shots is
enabled. Default on.
no_scope_record | 0 = off | 1 = on
- Enables or disables best no scope shot record feature. Default on.
no_scope_round | 0 = off | 1 = on
- Enables or disables the temporary map best shot record feature. Default on.
no_scope_notify_headshot | 0 = off | 1 = on
- Enables or disables displaying a no scope headshot notification on all player's HUD. Default on.
no_scope_hits_say | 0 = off | 1 = on
- Enables or disables the say command /noscopehits. Default on.
no_scope_percent | 0 = off | 1 = on
- Enables or disables additional no scope kill to regular kill percentage when using say command /noscopes.
===========================
Installation
===========================
- Compile the .sma file | An online compiler can be found here:
http:www.amxmodx.org/webcompiler.cgi
- Copy the compiled .amxx file into your addons\amxmodx\plugins folder.
- Add the name of the compiled .amxx to the bottom of your addons\amxmodx\configs\plugins.ini
- Create a new folder named no_scope in your addons\amxmodx\configs folder.
- Change the map or restart your server to start using the plugin!
===========================
Psychostats v1.9.1:
===========================
- This version automatically picks up no scope kills. Nothing is needed on your part.
===========================
Psychostats v3:
===========================
- To get no scope kills to show up in this version, login into an admin account. Now under
"configuration", click "weapons". You will need to add three new entries here by clicking the
"new" button. The first Unique ID will be NoScopeKar, second NoScopeSpring, lastly
NoScopeEnfield. The other options are up to you and how your PsychoStats are set up.
This plugin will display no scope kills and keeps track of them. I know I've seen servers with something similar but could never find the plugin so I just made my own. It works with the scoped Kar, Springfield, and Enfield. It should be possible to port this to other mods just by changing out the mod specific include, get_user_weapon, and alter/add weapon id numbers, etc..
===========================
v2.001 Changes
===========================
- Found and fixed a bug with displaying no scope to regular kill percentage. It was triggered with CVAR no_scope_notify_headshot instead of a seperate CVAR causing to only work when headshot notification was enabled.
- Added new CVAR no_scope_percent to enable or disable the extra no scope to regular kill percnetage information.
===========================
v1.9 Changes
===========================
- Some parts of the code were overhauled for speed. Engine is no longer used.
- Best shots/records now hold the top 3 players instead of 1.
- Added temporary best no scope shot per current map played with say command /noscoperound.
- Added CVAR no_scope_round to enable or disable temporary best shot record per map feature.
- Best shot records are now on a per map basis. You will need to create a folder named "no_scope" in your amxmodx configs directory.
- Fixed a couple issues of not checking if a player was still connected when performing some functions. Thanks again Diamond-Optic for sharing your log info.
===========================
v1.8 Changes
===========================
- Fixed no scope head shot totals for PsychoStats logging. Thanks Diamond-Optic for letting me know of the problem.
===========================
v1.7 Changes
===========================
- Added percentage of no scope shots to other kills in the output of say command /noscopes.
- Added optional HUD message of no scope headshot.
- Added optional shot distance in feet or meters along with body part hit.
- Added some speed improvements.
- Added optional shot blocking with message when trying to use the scope.
- Added say command /noscopehits that shows no scope kills by hit box.
===========================
v1.6 Changes
===========================
- Fixed on kill private chat message of total no scope kills. It was displaying with other
weapons and could flood the chat box. Thanks to Tank from BAM for spotting it.
- Fixed invalid player errors on player disconnect for keeping track of final score.
- Added no scope best shot distance record option.
- Added CVAR no_scope_record for enabling and disabling best no scope shot record feature.
===========================
v1.5 Changes
===========================
- Added checking for players that weren't connected under MG non deployed reload message fix.
Gave invalid player errors in log. Not necessary but I like to keep things clean.
===========================
v1.4 Changes
===========================
- Changed some natives to fakemeta equivalents. This includes the scope / non scope detection.
Should be 100% accurate now.
- Fixed MG non deployed reload small hud text message. Showed last no scope kill info along with
message about needing to deploy to reload. Since this message is apparently client side, I did
find a work around but it shifts the reload message to the left.
- Fixed crashing issue for detection of player team info. Thanks again johndoe on dodplugins.net
for providing the debug output.
===========================
v1.3 Changes
===========================
- Changed get_user_team function to dod specific dod_get_pl_teamname. Reading the amxmodx forums
I found posts that stated get_user_team is buggy. This dropped no scope kill weapon stats on
failure. Thanks johndoe on dodplugins.net for spotting the crash.
===========================
v1.2 Changes
===========================
- Added cvar to enable or disable TK no scope kill notification.
===========================
v1.1 Changes
===========================
- Added cvars to adjust how long a no scope kill HUD notification stays on screen.
- Added cvar to mirror no scope kill HUD notification types in chat.
- Added detailed weapon stats logging for no scope kills.
- Added FF support. FF kills now do not add to the /noscopes total.
- Changed /noscopes to properly display "1 kill" instead of "1 kills".
- Clarified and added to the notes.
===========================
Features:
===========================
- Choose between small and large HUD text display or chat only notification.
- No scope kill logging for use with Psychostats. Reports no scope kills by individual gun used.
- Optional no scope record keeping.
- Optional display of shot distance and body part hit.
- Reporting of total no scope kills per round along with percentage of no scope kills in regards to regular kills.
- Optional scoped shot blocking with message.
- Players are able to see their no scope kills by body part informaiton the entire map.
- Optional HUD notification of no scoped head shots.
===========================
Notes:
===========================
- Tested on an AMXMODX v1.8 Linux server and v1.76 Windows server as well.
- Detailed no scope kill weapon stats do not interfere with regular scope weapon stats. They still log as normal when no scope logging is on. IE a no scoped kill still counts as a regular stat kill for that type of gun.
===========================
Say Commands:
===========================
/noscopes - Displays how many no scope kills a player has accumulated along with percentage of no scope shots.
/noscopehits - Displays a player's total kills by hit box to a player
/noscoperecord - Displays the best no scope records and who the holders are for the current map.
/noscoperound - Displays the best no scope records and who the holders are for the current map
played. This is temporary data and is discarded on map change.
===========================
CVARS:
===========================
no_scope_notify | 0 = off | 1 = on
- Gives confirmation on screen of a no scope kill. Default on.
no_scope_notify_type | 0 = small | 1 = large | 2 = in chat
- Changes size and type of no scope kill notification. Default small.
no_scope_notify_small_time | 0 = 3.8 sec | 1 = 4.8 sec | 2 = 5.8 sec | 3 = 6.8 sec
- Changes duration of small HUD no scope kill notification. Due to the nature of this type of HUD
message, the minimum is 3.8 seconds and the options available should be sufficient. Default 3.8.
no_scope_notify_large_time | x or x.x
- Changes duration of large HUD no scope kill notification. You can enter an integer or real
number here. For example, a value of one would just be 1 second and a value of 1.5 would be
1 and a 1/2 seconds. Default 3.0.
no_scope_notify_tk_notify | 0 = off | 1 = on
- Enable or disable TK no scope notification. Default off.
no_scope_notify_mirror_chat | 0 = off | 1 = on
- Enables or disables mirroring of no scope kill notification in chat box. This is helpful if
you have allot of people no scoping and the regular notification changes too fast to read.
This automatically checks to see if no_scope_notify_type is set to chat so you don't get
double notifications. Default off.
no_scope_notify_chat | 0 = off | 1 = on
- Displays total no scope kills in chat privately to player on no scope kill. Default off.
no_scope_notify_say | 0 = off | 1 = on
- Enables or disables the say command /noscopes. Default on.
no_scope_logging | 0 = off | 1 = on
- Enables logging of no scope kills. Default off.
no_scope_notify_distance | 0 = off | 1 = on
- Enables or disables showing of shot in "game distance" in no scope kill notification. Defualt
on.
no_scope_notify_distance_type | 0 = meters | 1 = feet
- Sets whether shot in "game distance" is shown as meters or feet. Default meters.
no_scope_notify_hitbox | 0 = off | 1 = on
- Enables or disables showing of hitbox hit in no scope kill notification. Default on.
no_scope_notify_block_scope | 0 = off | 1 = on
- Enables or disables the blocking of scoped shots. Default off.
no_scope_notify_block_notify | 0 = off | 1 = on
- Enables or disables telling a user that you can't fire scoped when blocking of scoped shots is
enabled. Default on.
no_scope_record | 0 = off | 1 = on
- Enables or disables best no scope shot record feature. Default on.
no_scope_round | 0 = off | 1 = on
- Enables or disables the temporary map best shot record feature. Default on.
no_scope_notify_headshot | 0 = off | 1 = on
- Enables or disables displaying a no scope headshot notification on all player's HUD. Default on.
no_scope_hits_say | 0 = off | 1 = on
- Enables or disables the say command /noscopehits. Default on.
no_scope_percent | 0 = off | 1 = on
- Enables or disables additional no scope kill to regular kill percentage when using say command /noscopes.
===========================
Installation
===========================
- Compile the .sma file | An online compiler can be found here:
http:www.amxmodx.org/webcompiler.cgi
- Copy the compiled .amxx file into your addons\amxmodx\plugins folder.
- Add the name of the compiled .amxx to the bottom of your addons\amxmodx\configs\plugins.ini
- Create a new folder named no_scope in your addons\amxmodx\configs folder.
- Change the map or restart your server to start using the plugin!
===========================
Psychostats v1.9.1:
===========================
- This version automatically picks up no scope kills. Nothing is needed on your part.
===========================
Psychostats v3:
===========================
- To get no scope kills to show up in this version, login into an admin account. Now under
"configuration", click "weapons". You will need to add three new entries here by clicking the
"new" button. The first Unique ID will be NoScopeKar, second NoScopeSpring, lastly
NoScopeEnfield. The other options are up to you and how your PsychoStats are set up.