Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin

No Scope Kill Notifier /w Logging

by dodsynthetic · 2008-01-19 · 93 replies · 39678 views · 158 downloads

Read the thread (94 posts)

From the first post

Syn's No Scope Notifier v2.001
rn
rnThis 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..
rn
rn===========================
rnv2.001 Changes
rn===========================
rn- 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.
rn- Added new CVAR no_scope_percent to enable or disable the extra no scope to regular kill percnetage information.
rn
rn===========================
rnv1.9 Changes
rn===========================
rn- Some parts of the code were overhauled for speed. Engine is no longer used.
rn- Best shots/records now hold the top 3 players instead of 1.
rn- Added temporary best no scope shot per current map played with say command /noscoperound.
rn- Added CVAR no_scope_round to enable or disable temporary best shot record per map feature.
rn- 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.
rn- 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.
rn
rn===========================
rnv1.8 Changes
rn===========================
rn- Fixed no scope head shot totals for PsychoStats logging. Thanks Diamond-Optic for letting me know of the problem.
rn
rn===========================
rnv1.7 Changes
rn===========================
rn- Added percentage of no scope shots to other kills in the output of say command /noscopes.
rn- Added optional HUD message of no scope headshot.
rn- Added optional shot distance in feet or meters along with body part hit.
rn- Added some speed improvements.
rn- Added optional shot blocking with message when trying to use the scope.
rn- Added say command /noscopehits that shows no scope kills by hit box.
rn
rn===========================
rnv1.6 Changes
rn===========================
rn- Fixed on kill private chat message of total no scope kills. It was displaying with other
rn weapons and could flood the chat box. Thanks to Tank from BAM for spotting it.
rn- Fixed invalid player errors on player disconnect for keeping track of final score.
rn- Added no scope best shot distance record option.
rn- Added CVAR no_scope_record for enabling and disabling best no scope shot record feature.
rn
rn===========================
rnv1.5 Changes
rn===========================
rn- Added checking for players that weren't connected under MG non deployed reload message fix.
rn Gave invalid player errors in log. Not necessary but I like to keep things clean.
rn
rn===========================
rnv1.4 Changes
rn===========================
rn- Changed some natives to fakemeta equivalents. This includes the scope / non scope detection.
rn Should be 100% accurate now.
rn- Fixed MG non deployed reload small hud text message. Showed last no scope kill info along with
rn message about needing to deploy to reload. Since this message is apparently client side, I did
rn find a work around but it shifts the reload message to the left.
rn- Fixed crashing issue for detection of player team info. Thanks again johndoe on dodplugins.net
rn for providing the debug output.
rn
rn===========================
rnv1.3 Changes
rn===========================
rn- Changed get_user_team function to dod specific dod_get_pl_teamname. Reading the amxmodx forums
rn I found posts that stated get_user_team is buggy. This dropped no scope kill weapon stats on
rn failure. Thanks johndoe on dodplugins.net for spotting the crash.
rn
rn===========================
rnv1.2 Changes
rn===========================
rn- Added cvar to enable or disable TK no scope kill notification.
rn
rn===========================
rnv1.1 Changes
rn===========================
rn- Added cvars to adjust how long a no scope kill HUD notification stays on screen.
rn- Added cvar to mirror no scope kill HUD notification types in chat.
rn- Added detailed weapon stats logging for no scope kills.
rn- Added FF support. FF kills now do not add to the /noscopes total.
rn- Changed /noscopes to properly display "1 kill" instead of "1 kills".
rn- Clarified and added to the notes.
rn
rn===========================
rnFeatures:
rn===========================
rn- Choose between small and large HUD text display or chat only notification.
rn- No scope kill logging for use with Psychostats. Reports no scope kills by individual gun used.
rn- Optional no scope record keeping.
rn- Optional display of shot distance and body part hit.
rn- Reporting of total no scope kills per round along with percentage of no scope kills in regards to regular kills.
rn- Optional scoped shot blocking with message.
rn- Players are able to see their no scope kills by body part informaiton the entire map.
rn- Optional HUD notification of no scoped head shots.
rn
rn===========================
rnNotes:
rn===========================
rn- Tested on an AMXMODX v1.8 Linux server and v1.76 Windows server as well.
rn- 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.
rn
rn===========================
rnSay Commands:
rn===========================
rn/noscopes - Displays how many no scope kills a player has accumulated along with percentage of no scope shots.
rn
rn/noscopehits - Displays a player's total kills by hit box to a player
rn
rn/noscoperecord - Displays the best no scope records and who the holders are for the current map.
rn
rn/noscoperound - Displays the best no scope records and who the holders are for the current map
rnplayed. This is temporary data and is discarded on map change.
rn
rn===========================
rnCVARS:
rn===========================
rnno_scope_notify | 0 = off | 1 = on
rn- Gives confirmation on screen of a no scope kill. Default on.
rn
rnno_scope_notify_type | 0 = small | 1 = large | 2 = in chat
rn- Changes size and type of no scope kill notification. Default small.
rn
rnno_scope_notify_small_time | 0 = 3.8 sec | 1 = 4.8 sec | 2 = 5.8 sec | 3 = 6.8 sec
rn- Changes duration of small HUD no scope kill notification. Due to the nature of this type of HUD
rn message, the minimum is 3.8 seconds and the options available should be sufficient. Default 3.8.
rn
rnno_scope_notify_large_time | x or x.x
rn- Changes duration of large HUD no scope kill notification. You can enter an integer or real
rn number here. For example, a value of one would just be 1 second and a value of 1.5 would be
rn 1 and a 1/2 seconds. Default 3.0.
rn
rnno_scope_notify_tk_notify | 0 = off | 1 = on
rn- Enable or disable TK no scope notification. Default off.
rn
rnno_scope_notify_mirror_chat | 0 = off | 1 = on
rn- Enables or disables mirroring of no scope kill notification in chat box. This is helpful if
rn you have allot of people no scoping and the regular notification changes too fast to read.
rn This automatically checks to see if no_scope_notify_type is set to chat so you don't get
rn double notifications. Default off.
rn
rnno_scope_notify_chat | 0 = off | 1 = on
rn- Displays total no scope kills in chat privately to player on no scope kill. Default off.
rn
rnno_scope_notify_say | 0 = off | 1 = on
rn- Enables or disables the say command /noscopes. Default on.
rn
rnno_scope_logging | 0 = off | 1 = on
rn- Enables logging of no scope kills. Default off.
rn
rnno_scope_notify_distance | 0 = off | 1 = on
rn- Enables or disables showing of shot in "game distance" in no scope kill notification. Defualt
rn on.
rn
rnno_scope_notify_distance_type | 0 = meters | 1 = feet
rn- Sets whether shot in "game distance" is shown as meters or feet. Default meters.
rn
rnno_scope_notify_hitbox | 0 = off | 1 = on
rn- Enables or disables showing of hitbox hit in no scope kill notification. Default on.
rn
rnno_scope_notify_block_scope | 0 = off | 1 = on
rn- Enables or disables the blocking of scoped shots. Default off.
rn
rnno_scope_notify_block_notify | 0 = off | 1 = on
rn- Enables or disables telling a user that you can't fire scoped when blocking of scoped shots is
rn enabled. Default on.
rn
rnno_scope_record | 0 = off | 1 = on
rn- Enables or disables best no scope shot record feature. Default on.
rn
rnno_scope_round | 0 = off | 1 = on
rn- Enables or disables the temporary map best shot record feature. Default on.
rn
rnno_scope_notify_headshot | 0 = off | 1 = on
rn- Enables or disables displaying a no scope headshot notification on all player's HUD. Default on.
rn
rnno_scope_hits_say | 0 = off | 1 = on
rn- Enables or disables the say command /noscopehits. Default on.
rn
rnno_scope_percent | 0 = off | 1 = on
rn- Enables or disables additional no scope kill to regular kill percentage when using say command /noscopes.
rn
rn===========================
rnInstallation
rn===========================
rn- Compile the .sma file | An online compiler can be found here:
rn http:www.amxmodx.org/webcompiler.cgi
rn- Copy the compiled .amxx file into your addonsamxmodxplugins folder.
rn- Add the name of the compiled .amxx to the bottom of your addonsamxmodxconfigsplugins.ini
rn- Create a new folder named no_scope in your addonsamxmodxconfigs folder.
rn- Change the map or restart your server to start using the plugin!
rn
rn===========================
rnPsychostats v1.9.1:
rn===========================
rn- This version automatically picks up no scope kills. Nothing is needed on your part.
rn
rn===========================
rnPsychostats v3:
rn===========================
rn- To get no scope kills to show up in this version, login into an admin account. Now under
rn "configuration", click "weapons". You will need to add three new entries here by clicking the
rn "new" button. The first Unique ID will be NoScopeKar, second NoScopeSpring, lastly
rn NoScopeEnfield. The other options are up to you and how your PsychoStats are set up.

Files

syns_no_scope_notifier_v2.001.sma Plugin Source 66 KB 114 dl Download Compile

Added later in the thread

syns_no_scope_notifier.sma Plugin Source 81 KB 12 dl Download Compile
syns_no_scope_notifier.sma Plugin Source 71 KB 5 dl Download Compile
syns_no_scope_notifier.sma Plugin Source 71 KB 27 dl Download Compile

The thread

All 94 posts from 15 people on No Scope Kill Notifier /w Logging, kept as they were written.

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
01-19-2008, 07:13 PM #1

Syn's No Scope Notifier v2.001rnrnThis 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..rnrn===========================rnv2.001 Changesrn===========================rn- 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.rn- Added new CVAR no_scope_percent to enable or disable the extra no scope to regular kill percnetage information.rnrn===========================rnv1.9 Changesrn===========================rn- Some parts of the code were overhauled for speed. Engine is no longer used.rn- Best shots/records now hold the top 3 players instead of 1.rn- Added temporary best no scope shot per current map played with say command /noscoperound.rn- Added CVAR no_scope_round to enable or disable temporary best shot record per map feature.rn- 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.rn- 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.rnrn===========================rnv1.8 Changesrn===========================rn- Fixed no scope head shot totals for PsychoStats logging. Thanks Diamond-Optic for letting me know of the problem.rnrn===========================rnv1.7 Changesrn===========================rn- Added percentage of no scope shots to other kills in the output of say command /noscopes.rn- Added optional HUD message of no scope headshot.rn- Added optional shot distance in feet or meters along with body part hit.rn- Added some speed improvements.rn- Added optional shot blocking with message when trying to use the scope.rn- Added say command /noscopehits that shows no scope kills by hit box.rnrn===========================rnv1.6 Changesrn===========================rn- Fixed on kill private chat message of total no scope kills. It was displaying with otherrn weapons and could flood the chat box. Thanks to Tank from BAM for spotting it.rn- Fixed invalid player errors on player disconnect for keeping track of final score.rn- Added no scope best shot distance record option.rn- Added CVAR no_scope_record for enabling and disabling best no scope shot record feature.rnrn===========================rnv1.5 Changesrn===========================rn- Added checking for players that weren't connected under MG non deployed reload message fix. rn Gave invalid player errors in log. Not necessary but I like to keep things clean.rnrn===========================rnv1.4 Changesrn===========================rn- Changed some natives to fakemeta equivalents. This includes the scope / non scope detection.rn Should be 100% accurate now.rn- Fixed MG non deployed reload small hud text message. Showed last no scope kill info along withrn message about needing to deploy to reload. Since this message is apparently client side, I didrn find a work around but it shifts the reload message to the left.rn- Fixed crashing issue for detection of player team info. Thanks again johndoe on dodplugins.netrn for providing the debug output.rnrn===========================rnv1.3 Changesrn===========================rn- Changed get_user_team function to dod specific dod_get_pl_teamname. Reading the amxmodx forumsrn I found posts that stated get_user_team is buggy. This dropped no scope kill weapon stats onrn failure. Thanks johndoe on dodplugins.net for spotting the crash.rnrn===========================rnv1.2 Changesrn===========================rn- Added cvar to enable or disable TK no scope kill notification.rnrn===========================rnv1.1 Changesrn===========================rn- Added cvars to adjust how long a no scope kill HUD notification stays on screen.rn- Added cvar to mirror no scope kill HUD notification types in chat.rn- Added detailed weapon stats logging for no scope kills.rn- Added FF support. FF kills now do not add to the /noscopes total.rn- Changed /noscopes to properly display "1 kill" instead of "1 kills".rn- Clarified and added to the notes.rnrn===========================rnFeatures:rn===========================rn- Choose between small and large HUD text display or chat only notification.rn- No scope kill logging for use with Psychostats. Reports no scope kills by individual gun used.rn- Optional no scope record keeping.rn- Optional display of shot distance and body part hit.rn- Reporting of total no scope kills per round along with percentage of no scope kills in regards to regular kills.rn- Optional scoped shot blocking with message.rn- Players are able to see their no scope kills by body part informaiton the entire map.rn- Optional HUD notification of no scoped head shots.rnrn===========================rnNotes:rn===========================rn- Tested on an AMXMODX v1.8 Linux server and v1.76 Windows server as well.rn- 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.rnrn===========================rnSay Commands:rn===========================rn/noscopes - Displays how many no scope kills a player has accumulated along with percentage of no scope shots.rnrn/noscopehits - Displays a player's total kills by hit box to a playerrnrn/noscoperecord - Displays the best no scope records and who the holders are for the current map.rnrn/noscoperound - Displays the best no scope records and who the holders are for the current maprnplayed. This is temporary data and is discarded on map change.rnrn===========================rnCVARS:rn===========================rnno_scope_notify | 0 = off | 1 = onrn- Gives confirmation on screen of a no scope kill. Default on.rnrnno_scope_notify_type | 0 = small | 1 = large | 2 = in chatrn- Changes size and type of no scope kill notification. Default small.rnrnno_scope_notify_small_time | 0 = 3.8 sec | 1 = 4.8 sec | 2 = 5.8 sec | 3 = 6.8 secrn- Changes duration of small HUD no scope kill notification. Due to the nature of this type of HUDrn message, the minimum is 3.8 seconds and the options available should be sufficient. Default 3.8. rnrnno_scope_notify_large_time | x or x.xrn- Changes duration of large HUD no scope kill notification. You can enter an integer or realrn number here. For example, a value of one would just be 1 second and a value of 1.5 would bern 1 and a 1/2 seconds. Default 3.0.rnrnno_scope_notify_tk_notify | 0 = off | 1 = onrn- Enable or disable TK no scope notification. Default off.rnrnno_scope_notify_mirror_chat | 0 = off | 1 = onrn- Enables or disables mirroring of no scope kill notification in chat box. This is helpful if rn you have allot of people no scoping and the regular notification changes too fast to read.rn This automatically checks to see if no_scope_notify_type is set to chat so you don't get rn double notifications. Default off.rnrnno_scope_notify_chat | 0 = off | 1 = onrn- Displays total no scope kills in chat privately to player on no scope kill. Default off.rnrnno_scope_notify_say | 0 = off | 1 = onrn- Enables or disables the say command /noscopes. Default on.rnrnno_scope_logging | 0 = off | 1 = onrn- Enables logging of no scope kills. Default off.rnrnno_scope_notify_distance | 0 = off | 1 = onrn- Enables or disables showing of shot in "game distance" in no scope kill notification. Defualtrn on.rnrnno_scope_notify_distance_type | 0 = meters | 1 = feetrn- Sets whether shot in "game distance" is shown as meters or feet. Default meters.rnrnno_scope_notify_hitbox | 0 = off | 1 = onrn- Enables or disables showing of hitbox hit in no scope kill notification. Default on.rnrnno_scope_notify_block_scope | 0 = off | 1 = onrn- Enables or disables the blocking of scoped shots. Default off.rnrnno_scope_notify_block_notify | 0 = off | 1 = onrn- Enables or disables telling a user that you can't fire scoped when blocking of scoped shots isrn enabled. Default on.rnrnno_scope_record | 0 = off | 1 = onrn- Enables or disables best no scope shot record feature. Default on.rnrnno_scope_round | 0 = off | 1 = onrn- Enables or disables the temporary map best shot record feature. Default on.rnrnno_scope_notify_headshot | 0 = off | 1 = onrn- Enables or disables displaying a no scope headshot notification on all player's HUD. Default on.rnrnno_scope_hits_say | 0 = off | 1 = onrn- Enables or disables the say command /noscopehits. Default on.rnrnno_scope_percent | 0 = off | 1 = onrn- Enables or disables additional no scope kill to regular kill percentage when using say command /noscopes.rnrn===========================rnInstallationrn===========================rn- Compile the .sma file | An online compiler can be found here:rn http:www.amxmodx.org/webcompiler.cgirn- Copy the compiled .amxx file into your addonsamxmodxplugins folder.rn- Add the name of the compiled .amxx to the bottom of your addonsamxmodxconfigsplugins.inirn- Create a new folder named no_scope in your addonsamxmodxconfigs folder.rn- Change the map or restart your server to start using the plugin!rnrn===========================rnPsychostats v1.9.1:rn===========================rn- This version automatically picks up no scope kills. Nothing is needed on your part.rnrn===========================rnPsychostats v3:rn===========================rn- To get no scope kills to show up in this version, login into an admin account. Now underrn "configuration", click "weapons". You will need to add three new entries here by clicking thern "new" button. The first Unique ID will be NoScopeKar, second NoScopeSpring, lastlyrn NoScopeEnfield. The other options are up to you and how your PsychoStats are set up.

| |OnEHiTwOnDeR|SoCal
posted here
Posts: 320
Threads: 37
Joined: Mar 2007
01-20-2008, 02:28 AM #2

impressive...not tested...but i like the idea.

blobby
posted here
Posts: 421
Threads: 47
Joined: Apr 2007
01-20-2008, 11:27 AM #3

Nice one m8 looks good im gonna put this on my server but what i think would be good also is for the people who use psycho stats if this could be logged there 2nnblobby

Wilson [29th ID]
posted here
Posts: 623
Threads: 57
Joined: Oct 2005
01-20-2008, 11:29 AM #4

Code looks good m8.nnThere's a native in DoDx to catch scoping though, might be easier.

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
01-20-2008, 03:12 PM #5
Nice one m8 looks good im gonna put this on my server but what i think would be good also is for the people who use psycho stats if this could be logged there 2rnrnblobby
rnrnI will gladly add features but I'm not sure what you mean. Are you talking about logging to where psychostats is stored? I'm confused lol.

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
01-20-2008, 03:16 PM #6
;8894']Code looks good m8.nnThere's a native in DoDx to catch scoping though, might be easier.
nnlol If there is, it's labeled something I wouldn't think could give me the result needed. I looked in just about everything for getting weapon state with sniper rifles and the only way I could figure how to do it was by catching changes to a players field of view.

blobby
posted here
Posts: 421
Threads: 47
Joined: Apr 2007
01-20-2008, 06:17 PM #7

Yeah like Diamond-Optic has done with his push plugin it logs who dies from pushes so if you could add the code to make No scopes log to Psycho stats as well that would be top nnBlobby

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
01-20-2008, 07:44 PM #8
Yeah like Diamond-Optic has done with his push plugin it logs who dies from pushes so if you could add the code to make No scopes log to Psycho stats as well that would be top rnrnBlobby
rnrnIt already logs it's own separate kill type for Psychostats to pick up. :D Original kill log message is blocked and replaced with unique "killed with" weapon names when a no scoped kill is made. The unique ids can be found at the bottom of the documentation (see my original post up above). Instructions are also there for adding these to Psychostats v3.

{DwP} 325th ABN
posted here
Posts: 231
Threads: 12
Joined: Aug 2006
01-20-2008, 08:24 PM #9

hell im in on this to, sounds like a good plug. anyone that has tried it have any comments on its workings

blobby
posted here
Posts: 421
Threads: 47
Joined: Apr 2007
01-20-2008, 09:35 PM #10

Ok ive got this on my server and on my psycho stats works a treat one question you know the message that it shows when you get a noscope is one of the settings to make it a hud message ??nnBlobby

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
01-20-2008, 11:38 PM #11
Ok ive got this on my server and on my psycho stats works a treat one question you know the message that it shows when you get a noscope is one of the settings to make it a hud message ??rnrnBlobby
rnrnYeah, just set > no_scope_notify_type 1

blobby
posted here
Posts: 421
Threads: 47
Joined: Apr 2007
01-21-2008, 12:00 AM #12

Lol u know i really shouldn't ask all these questions i should know myself lol i can code hahaha TBH just to lazy to look ROFLnnNice work on this one m8 looks good and works a treat ill test it full 2moz because we are gonna have a noscope comption to see how it goes 4 u :PnnBlobby

{DwP} 325th ABN
posted here
Posts: 231
Threads: 12
Joined: Aug 2006
01-21-2008, 02:02 AM #13

ive got it running no errors the clan likes it already, kinda keeps everyone from always yelling oooo no scope cause they thought noone saw it. very nice i likes good job

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
01-21-2008, 04:28 AM #14
ive got it running no errors the clan likes it already, kinda keeps everyone from always yelling oooo no scope cause they thought noone saw it. very nice i likes good job
rnrnlol yeah this was one of my motivating factors to make it. Definitive proof haha. I may be adding an optional mode to block scoped shots too. It's annoying when we are playing no scopes only and someone comes on and scopes anyway even after telling them multiple times.

{DwP} 325th ABN
posted here
Posts: 231
Threads: 12
Joined: Aug 2006
01-21-2008, 02:42 PM #15

i looked last night maybe to many coors lites but is there anyway to adjust how long the hud message stays up on screen

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
01-21-2008, 04:34 PM #16

Only for the large hud message type. It's done with set hud_message and you will want to adjust the number that currently says 3.0. This is how long it will stay on screen and is currently 3 seconds. Actually, now that I think about it, I could easily make it so the small hud texts stays on longer if you want. I will add cvars to adjust display times too.

{DwP} 325th ABN
posted here
Posts: 231
Threads: 12
Joined: Aug 2006
01-21-2008, 05:32 PM #17

i like where it comes up just wanted it to stay alittle longer, a cvar for it would be perfect yes, again nicely done.

blobby
posted here
Posts: 421
Threads: 47
Joined: Apr 2007
01-24-2008, 06:55 PM #18

Ive found a little bug if you no scope your team mates it still counts as a no scope in game you should add something to make it obey ff just a heads upnnBlobby

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
01-24-2008, 08:51 PM #19
Ive found a little bug if you no scope your team mates it still counts as a no scope in game you should add something to make it obey ff just a heads uprnrnBlobby
rnrnAhh lol something I forgot to add. I'm used to no ff on my server so it slipped by me. I'm almost done with the next version that adds adjustable display time and the detailed weapon stats. I'll be sure to add that too.

blobby
posted here
Posts: 421
Threads: 47
Joined: Apr 2007
01-24-2008, 08:51 PM #20

Coolies cant wait till you put your new version up :P

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
01-26-2008, 11:31 PM #21

Ok, the new version is up and ready to go. I would have been done allot sooner but had stuff to do irl and not to mention that the custom weapons slots for stats did not fit my needs. I had to generate the detailed weapon stats manually which took more time.

blobby
posted here
Posts: 421
Threads: 47
Joined: Apr 2007
01-27-2008, 01:24 PM #22

Ok i have updated to the new version and all is good but did think of another thing you could fix when you kill a team mate with no scope it no longer logs now but it still displays the no scope message any way to stop this from happening on TKS ???nnRegardsnnBlobby

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
01-27-2008, 06:42 PM #23
Ok i have updated to the new version and all is good but did think of another thing you could fix when you kill a team mate with no scope it no longer logs now but it still displays the no scope message any way to stop this from happening on TKS ???rnrnRegardsrnrnBlobby
rnrnI gave it a new option to have it say killed their team mate or nothing at all on a TK. :D

J jondoe
posted here
Posts: 129
Threads: 6
Joined: Aug 2005
02-02-2008, 03:29 PM #24

I'm geting the following error in my amxx logs.rn[AMXX] Run time error 10 (plugin "syns_no_scope_notifier.amxx") (native "get_user_team") -rnrnI put it into debug mode and will post back what i find out.rnrnAlso did you ever think about adding say, Saying who killed who and at what range.rnNoscopes are easy close up but from across the map it takes some real skill.

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
02-02-2008, 06:03 PM #25
I'm geting the following error in my amxx logs.rn[AMXX] Run time error 10 (plugin "syns_no_scope_notifier.amxx") (native "get_user_team") -rnrnI put it into debug mode and will post back what i find out.rnrnAlso did you ever think about adding say, Saying who killed who and at what range.rnNoscopes are easy close up but from across the map it takes some real skill.
rnrnThanks for the info. I'll look into that more. As for the range I have it working along with hitbox info on my server. I just haven't released it yet. ;)

J jondoe
posted here
Posts: 129
Threads: 6
Joined: Aug 2005
02-02-2008, 10:21 PM #26

Ok here is a little more about whats going on with it.rnrn

rn"syns_no_scope_notifier.amxx")rnL 02/01/2008 - 23:11:03: [AMXX] Run time error 10: native error (native "get_user_team")rnL 02/01/2008 - 23:11:03: [AMXX]    [0] syns_no_scope_notifier.sma::client_disconnect (line 730)rnL 02/01/2008 - 23:15:28: Start of error session.rnL 02/01/2008 - 23:15:28: Info (map "dod_avalanche") (logfile "error_020108.log")rnL 02/01/2008 - 23:15:28: [DODX] Invalid player 13rnL 02/01/2008 - 23:15:28: [AMXX] Displaying debug trace (plugin "syns_no_scope_notifier.amxx")rnL 02/01/2008 - 23:15:28: [AMXX] Run time error 10: native error (native "get_user_team")rnL 02/01/2008 - 23:15:28: [AMXX]    [0] syns_no_scope_notifier.sma::client_damage (line 196)rn
dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
02-03-2008, 01:55 AM #27

Ok, I changed out the function for getting a users team. Apparently it has issues as reported on the amxmodx forums. I changed it to the dodfun version and should take care of the problem. Now back to finishing the voting system in the shrike bot menu plugin.

{DwP} 325th ABN
posted here
Posts: 231
Threads: 12
Joined: Aug 2006
02-03-2008, 02:18 AM #28

damn synthetic your a busy bee, way to stay with it man you got good stuff out there and you work thru errors and updates nice job. good seeing you in the server last night rock on yes yes

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
02-03-2008, 05:05 AM #29
damn synthetic your a busy bee, way to stay with it man you got good stuff out there and you work thru errors and updates nice job. good seeing you in the server last night rock on yes yes
rnrnlol oh yeah. I'm all over it. When we were doing melee only on rennes I was going prone and kept rifle butting wild child over and over in the head. He wasn't pleased lol.

J jondoe
posted here
Posts: 129
Threads: 6
Joined: Aug 2005
02-04-2008, 12:34 PM #30

Ok now im getting this run time error. I put it in debug mode and will post after i wake up.rnrn

rnL 02/04/2008 - 04:51:03: [DODFUN] Invalid player 20rnL 02/04/2008 - 04:51:03: [AMXX] Run time error 10 (plugin "syns_no_scope_notifier.amxx") (native "dod_get_pl_teamname") - debug not enabled!rnL rn
dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
02-04-2008, 12:37 PM #31
Ok now im getting this run time error. I put it in debug mode and will post after i wake up.rnrn
rnL 02/04/2008 - 04:51:03: [DODFUN] Invalid player 20rnL 02/04/2008 - 04:51:03: [AMXX] Run time error 10 (plugin "syns_no_scope_notifier.amxx") (native "dod_get_pl_teamname") - debug not enabled!rnL rn
rnrnProbably because I'm not checking to make sure the player is still in game. I'll add that in.

J jondoe
posted here
Posts: 129
Threads: 6
Joined: Aug 2005
02-14-2008, 06:19 PM #32

Have you added the fix for this synthectic ?.rnrnHere is the debug trace and theres another error here.rnrn

rnXX] Displaying debug trace (plugin "syns_no_scope_notifier.amxx")rnL 02/14/2008 - 12:15:32: [AMXX] Run time error 10: native error (native "dod_get_pl_teamname")rnL 02/14/2008 - 12:15:32: [AMXX]    [0] syns_no_scope_notifier.sma::client_damage (line 205)rnrnL 02/14/2008 - 12:15:40: [AMXX] Displaying debug trace (plugin "syns_no_scope_notifier.amxx")rnL 02/14/2008 - 12:15:40: [AMXX] Run time error 10: native error (native "dod_get_pl_teamname")rnL 02/14/2008 - 12:15:40: [AMXX]    [0] syns_no_scope_notifier.sma::client_disconnect (line 737)rn
rnrnI get these when using both 1.76c & 1.80. The plugin compiles fine for both.

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
02-17-2008, 09:15 AM #33

Sorry for the delay. I did some overhaul and some engine natives were changed to fakemeta since it seems to be the way to go. The crash on team detection should be fixed as I switched to a fakemeta method as well. I have also fixed a rare issue with the plugin that I encountered. It get's stuck thinking your scoped when your not. I could never get it to happen consistently so I have changed how it detects scope and non scope mode. Also added a non essential fix for the message to deploy when trying to reload an mg when not deployed.

C CLICKBOOM
posted here
Posts: 15
Threads: 1
Joined: Dec 2007
05-10-2008, 01:05 AM #34

Any ideas why i cant change commands. Trying to set some of the defaults to desired settings. Also what is n where does the .SMA file go.

C CLICKBOOM
posted here
Posts: 15
Threads: 1
Joined: Dec 2007
05-12-2008, 10:22 PM #35

bump bump bump

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
05-12-2008, 10:52 PM #36
Any ideas why i cant change commands. Trying to set some of the defaults to desired settings.
nnwhat exactly are you trying to do/change?nn
Also what is n where does the .SMA file go.
nnthe .sma file is the source code that you need to compile into a *.amxx file to run on your servernnto compile plugins, you can read THIS to learn how to do them on your machinenor you can use the online compiler here by clicking 'help tabs' on the nav menu on the lefthand side of the forums and selecting the amxx version you need it for. OR you could use the online compiler at amxmodx.orgnnn*** on a side note, im removing all the *.amxx files from posts in the non-developers section due to safety factors brought about after the UAIO incident and also because its good for ppl to learn to compile plugins on their own :)

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
08-15-2008, 03:55 AM #37

Just updated to v1.6. A couple fixes added and a new best no scope shot record feature added.

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
12-19-2008, 11:09 PM #38

think you could add another message for when the no scope is a headshot?nn..and also maybe with the /noscopes command or such have it show what percentage of your kills are no scopes..

Ba5ic
posted here
Posts: 181
Threads: 26
Joined: Nov 2005
12-20-2008, 05:46 AM #39

I'm running Version 1.6 and have just started receiving this in the error logs:-rnrnL 12/20/2008 - 08:42:29: [FAKEMETA] Invalid entityrnL 12/20/2008 - 08:42:29: [AMXX] Displaying debug trace (plugin "syns_weaponmod.amxx")rnL 12/20/2008 - 08:42:29: [AMXX] Run time error 10: native error (native "pev")rnL 12/20/2008 - 08:42:29: [AMXX] [0] 874.attach::func_weapon_touch (line 2430)rnrnAny idea'srnrnThanks

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
12-20-2008, 09:55 AM #40

@ Diamond - No problem, I'll gladly add that XD I have kept the version that displays distance in feet or meters private but going to make it a public feature as well.rnrn@ Basic - It's probably related to missing a check for a player that is alive. I'll fix this as well XD

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
12-20-2008, 10:00 AM #41

@ Basic - Oh, that's related to the weapons mod. I'll have a look at that. Same thing though, probably not checking for a valid entity or player. XD

Ba5ic
posted here
Posts: 181
Threads: 26
Joined: Nov 2005
12-20-2008, 10:34 AM #42
@ Basic - Oh, that's related to the weapons mod. I'll have a look at that. Same thing though, probably not checking for a valid entity or player. XD
rnrnThanks SynrnrnKeep up the great work as always :)

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
12-20-2008, 11:00 PM #43

ahh yeah i saw the 'no_scope_notify_distance_type' in the code for using feet or meters when i was adding the distance to the no scope msgs.. but then i noticed its not registered in plugin_init.. i was wondering about that lol...nnalso.. why no cvar pointers? :P

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
12-21-2008, 04:41 AM #44

LOL well I was used to using the old get cvar method and never used the pointer method when it came out. Changing all of my plugins to this has been lurking in the back of my mind haha and guess it's time to do it. I'm always up for efficiency and speed enhancments. XD

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
12-21-2008, 04:58 AM #45

oh come on! changing over to pcvars has got to be the simplest thing youve done in a while lol!

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
12-29-2008, 10:41 AM #46

New version up with some new goodies. No scope kill totals by body part, percentage of no scope to regular kill ratio, no scope kill shot distance in feet or meters along with body part hit info, HUD notification of no scope head shot, speed enhancement by using pcvar method, and scoped shot blocking.

I Is3
posted here
Posts: 6
Threads: 1
Joined: Jun 2008
12-30-2008, 08:36 AM #47

dodsynthetic make a record individual for every map :)

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
12-30-2008, 10:50 AM #48

Not a bad idea. I'll add that in. XD I was thinking about adding the best 3 shots instead of only 1 as well.

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
12-30-2008, 12:58 PM #49

yeah i was about to ask for that myself lol..nni was also thinking maybe a record for the current played map (as in not best overall for that map but best for the current game on that map) ..tho i was also thinking that might be getting into too much excessive junk lol.. tho you wouldnt need to save that info in a file since it would be reset when the map changes..nnnalso, think maybe you could convert this over to a non-deployed MG rambo notify plugin as well :P

Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
12-30-2008, 01:27 PM #50
rnalso, think maybe you could convert this over to a non-deployed MG rambo notify plugin as well :P
rnrnGreat idea :D

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
12-30-2008, 07:12 PM #51

ive noticed some inconsistencies with the data that appears in my psychostats with the logging enablednnlike if you look here: http://stats.avamods.com/stats/weapon.php?id=52nnyou notice that there are people who definitly have no scope headshots, yet on the 'hitbox zone' section on the left column its saying 0 for headnnnot sure if someone might know the reason behind this.. as when ive done logging for custom weapons for psychostats ive never had this problem (and i mean back when i did the log msgs myself and didnt use the custom weapon natives in amxx)nnand i would imagine that if it is able to tell that shots were headshots for individual no scope stats, it should definitly be able to get the same results for total headshots...nnthe same thing goes for the other 2 rifles toonnhttp://stats.avamods.com/stats/weapon.php?id=53nhttp://stats.avamods.com/stats/weapon.php?id=54

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
12-31-2008, 12:43 AM #52

ok it is the log messages.. take a look:nn

"weaponstats" (weapon "NoScopeKar") (shots "99") (hits "19") (kills "18") (headshots "2") (tks "0") (damage "2885") (deaths "5") (score "13")n"weaponstats2" (weapon "NoScopeKar") (head "0") (chest "1") (stomach "2") (leftarm "2") (rightarm "11") (leftleg "1") (rightleg "0")n
nweaponstats will show headshots.. nbut weaponstats2 has 0 for head

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
12-31-2008, 01:30 AM #53

At first, I thought this was an issue with PS as I know there were issues with head shot totals and percentage before with all guns in early version 3 because of incorrectly named variables but I noticed on about 3.0.7 and higher it appears to work with all guns now except no scoped shots so it may just be that I need to generate a standard kill log entry. The way it is now, it only generates end statistics. I'll check it out though.

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
12-31-2008, 01:31 AM #54

lol well that isn't right. That might have something to do with it. XD

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
12-31-2008, 01:43 AM #55

Ahh, I found it. I was misplacing variable order when creating the second part of the log messages. I'll have this fixed soon.nnEdit: Never mind XD I wasn't looking at it right. On goes the search.

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
12-31-2008, 03:54 AM #56

OK I did find it. I wasn't combining kill and non kill no scope headshots for the total in the weaponstats2 part of the log XD

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
12-31-2008, 09:15 PM #57

with v1.7nnnerrors such as:n

n[DODX] Invalid player 4n[AMXX] Displaying debug trace (plugin "syns_no_scope_notifier.amxx")n[AMXX] Run time error 10: native error (native "dod_get_user_score")n[AMXX] [0] syns_no_scope_notifier.sma::client_damage (line 1226)n
nnnas well as:n
n[DODX] Invalid player 9n[AMXX] Displaying debug trace (plugin "syns_no_scope_notifier.amxx")n[AMXX] Run time error 10: native error (native "dod_get_user_weapon")n[AMXX] [0] syns_no_scope_notifier.sma::client_damage (line 1210)n
Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
02-15-2009, 01:13 PM #58

Syns... isnt it about time to fix this :D i have no clue whats going on in your 800 lines long client_damage func :D but my errors is the same as those d-o posted above ;)

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
02-15-2009, 02:07 PM #59

i no longer get the errors.. nnchanged line 1205 (i think) from:n

if (players_zoomed[victim] == 0 && get_user_health(victim) <= 0)
nto:n
if (players_zoomed[victim] == 0 && get_user_health(victim) <= 0 && is_user_connected(victim))
nnand then like line 1226 it was:n
user_final_score[attacker] = dod_get_user_score(attacker)
nto this:n
if(is_user_connected(attacker))n    user_final_score[attacker] = dod_get_user_score(attacker)
nnand then in the beggining of the prethink function added this:n
if(!is_user_connected(id))n    return FMRES_IGNORED
dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
02-15-2009, 04:04 PM #60

I'll have the new one up soon. I just haven't had the time to finish setting it up to do records per map. XD Probably later tonight.

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
03-04-2009, 11:57 PM #61

Updated with some fixes and requested features.

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
03-11-2009, 02:00 AM #62

getting this.....nn

[AMXX] Displaying debug trace (plugin "syns_no_scope_notifier.amxx")n[AMXX] Run time error 4: index out of bounds n[AMXX] [0] syns_no_scope_notifier.sma::func_get_best (line 1658)
diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
03-11-2009, 06:41 PM #63

ok also this as well:nn

[DODX] Invalid player 8n[AMXX] Displaying debug trace (plugin "syns_no_scope_notifier.amxx")n[AMXX] Run time error 10: native error (native "dod_get_user_score")n[AMXX] [0] syns_no_scope_notifier.sma::client_damage (line 1348)
nnnis that cause this:n
if(is_user_connected(victim))n        user_final_score[attacker] = dod_get_user_score(attacker)
nnshould be checking if the attacker is connected and not the victim...

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
03-13-2009, 03:24 AM #64

lol fail. I'll get it fixed.

Tank
posted here
Posts: 581
Threads: 59
Joined: Jan 2007
03-19-2009, 12:27 AM #65
PHP Code:rnrnif(is_user_connected(victim))rn user_final_score[attacker] = dod_get_user_score(attacker) rnrn
rnrnIs that the only thing I have to change? Im so out of coding atm due to school. People like the plugin but the plugin is forwarding the same message as what D-O posted.

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
03-19-2009, 02:19 AM #66

That and there is a part about loading the top shots as well. XD I have some free time tonight and will finish/post the updated version tonight.

Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
03-19-2009, 02:21 PM #67

not long ago i read this: http://wiki.amxmodx.org/Optimizing_Plugins_(AMX_Mod_X_Scripting)rnrnand some of the things ive noticed was:rnrnrn

BRANCHING - When the processor takes a different path of code. For example, to call a function or to use an if statement, the processor will "branch". Modern processors attempt to predict pathways with "branch prediction", but it's best to avoid branching a lot if possible.
rnrn
Switch instead of IfrnIf you can, you should use switch cases instead of if. This is because for an if statement, the compiler must branch to each consecutive if case. Using the example from above, observe the switch version:
rnrnso i updated the whole client_damage function in this, and reduced with 79 lines in all i think it was. BUT i havent had time to test it for any mistakes yet! but if you want this in your update, here it is...

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
03-22-2009, 09:56 PM #68

Yeah I did change some of those horrendous if statements over to switches for speed but I've added the ones you did too now. Only one thing had to be changed with the weapon kills since they have to be tallied outside of scoped shots. Anyway, here is the recent update with other fixes. I haven't had allot of time for testing so I'll put this as a temp beta before I make an official release.

Tank
posted here
Posts: 581
Threads: 59
Joined: Jan 2007
03-22-2009, 09:58 PM #69

You the man Syn. I'll put it up right after I posted this. Go get your hiny on Steam and give it a go yourself, we miss you.

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
03-24-2009, 01:24 PM #70

instead of having this:n

switch(wpnindex)n            {n                case 6:{n                    player_regular_kills[attacker]++n                }n                case 9:{n                    player_regular_kills[attacker]++n                }n                case 35:{n                    player_regular_kills[attacker]++n                }n            }
couldnt you do this instead of having the player_regular_kills.... in there 3 times doing the same thingn
switch(wpnindex)n            {n            case 6,9,35: player_regular_kills[attacker]++n            }
Tank
posted here
Posts: 581
Threads: 59
Joined: Jan 2007
03-24-2009, 03:33 PM #71

Ok I am running this plugin and it works. Nothing to report so far, so my thanks and compliments on a job well done.rnrnI do however have a question, I guess for D-O. I use your released pack of Psychostats images for DoD and looking at the credits:rnrn

rnDoD 1.3 Weapon ImagesrnVersion 1.2rn12.30.08rnrnby diamond-opticrnhttp://www.AvaMods.com/rnrnrnChange Log:rnrn 07.18.08 - Version 1.0rn > Initial Releasernrn 12.25.08 - Version 1.1rn > Added image for 'artillery_shell'rn rn 12.30.08 - Version 1.2rn > Added images for 'No Scope' sniper riflesrn
rnrnI can't seem to get the No Scope images to work as they still show up as NoScopeKar etc. Any idea what I can do to fix this "issue"?rnrnThanks in advanced.

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
03-24-2009, 04:17 PM #72

hmm but the rest of them show up correctly??nnthey work fine for me... but for me they come up all lowercase... like noscopeenfield where yours show as NoScopeEnfield ... you could try renaming the image files to have the capital letters (ive noticed some linux webservers are anal about case sensitivity)nnif that fixes it i'll correct the filennn*****nnand btw just finally uploaded a new version of the image pack Ive had sitting here for months that has better images for the noscope rifles..nnhttp://www.psychostats.com/community/browse/Themes/72

Tank
posted here
Posts: 581
Threads: 59
Joined: Jan 2007
03-24-2009, 09:17 PM #73
hmm but the rest of them show up correctly??rnrnthey work fine for me... but for me they come up all lowercase... like noscopeenfield where yours show as NoScopeEnfield ... you could try renaming the image files to have the capital letters (ive noticed some linux webservers are anal about case sensitivity)rnrnif that fixes it i'll correct the file
rnrnThe rest shows up correctly and awesome :D So first off thanks for ever launching those files.rnrnI renamed the files and they did show up correctly. Reason why I used capital characters is because of this:rnrn
===========================rnPsychostats v3:rn===========================rn- To get no scope kills to show up in this version, login into an admin account. Now underrn"configuration", click "weapons". You will need to add three new entries here by clicking thern"new" button. The first Unique ID will be NoScopeKar, second NoScopeSpring, lastlyrnNoScopeEnfield. The other options are up to you and how your PsychoStats are set up.
rnrnI learned my lesson on second guessing Synthetic, so if he tells or posts something should be done, I do it and since his installation section shows upper cased characters I did :D.rnrnAnd thanks for putting out a new version. I actually like where all weapons show up as a picture and not half showing as text which kinda looked low budget to me.rnrnThanks again for helping.

Tank
posted here
Posts: 581
Threads: 59
Joined: Jan 2007
03-24-2009, 09:30 PM #74
L 03/24/2009 - 00:04:56: [DODX] Invalid player 5nL 03/24/2009 - 00:04:56: [AMXX] Displaying debug trace (plugin "syns_no_scope_notifier.amxx")nL 03/24/2009 - 00:04:56: [AMXX] Run time error 10: native error (native "dod_get_user_score")nL 03/24/2009 - 00:04:56: [AMXX] [0] syns_no_scope_notifier.sma::client_damage (line 1347)n
nnSorry Syn, I guess I spoke to soon. Any idea? If you want me to test anything or whatever before posting up, just hit me up on Steam.

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
03-25-2009, 06:21 PM #75

lol he forgot to fix that (i posted about it in post #63) n....simple fix for that error...nnwas:n

if(is_user_connected(victim))n        user_final_score[attacker] = dod_get_user_score(attacker)
change to:n
if(is_user_connected(attacker))n        user_final_score[attacker] = dod_get_user_score(attacker)
Tank
posted here
Posts: 581
Threads: 59
Joined: Jan 2007
03-25-2009, 07:25 PM #76

Thanks, adjusted and updated and I'll keep you guys posted what the outcome is.

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
03-26-2009, 04:48 AM #77

LOL That's just sad on my part... I even had a temp list of things I was changing and I had that problem checked off as fixed. WTF o.O I probably typed "victim" in there again not even thinking about it. =/ Anyway, if nothing else pops up, I make it official XD. Thanks for testing Tank it's muy apreciado.

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
04-05-2009, 03:53 AM #78
couldnt you do this instead of having the player_regular_kills.... in there 3 times doing the same thingrn
switch(wpnindex)rn            {rn            case 6,9,35: player_regular_kills[attacker]++rn            }
rnrnI learn something new every day. XD I've never seen a switch statement used like that before. I may as well change it. haha

Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
04-05-2009, 06:18 AM #79

idk if this will do any diffrence in perspective, but all the:rnrn

rnnew kar_stats_shots[33][1]rnnew kar_stats_hits[33][1]rnnew kar_stats_kills[33][1]rnnew kar_stats_headshots[33][1]rnnew kar_stats_tks[33][1]rnnew kar_stats_damage[33][1]rnnew kar_stats_deaths[33][1]rnnew kar_stats_head[33][1]rnnew kar_stats_chest[33][1]rnnew kar_stats_stomache[33][1]rnnew kar_stats_leftarm[33][1]rnnew kar_stats_rightarm[33][1]rnnew kar_stats_leftleg[33][1]rnnew kar_stats_rightleg[33][1]
rnrnetc. dont need to be declared as a 2D array, but it should save some memory if they were changed, i think...rnrnalso you can save alot of branches as well e.g:rnrn
// Keep track of total kills by hitboxrn			switch(hitplace)rn			{rn				case 0:{rn					total_stats_general[attacker]++rn				}rn				case 1:{rn					total_stats_head[attacker]++rn				}rn				case 2:{rn					total_stats_chest[attacker]++rn				}rn				case 3:{rn					total_stats_stomache[attacker]++rn				}rn				case 4:{rn					total_stats_leftarm[attacker]++rn				}rn				case 5:{rn					total_stats_rightarm[attacker]++rn				}rn				case 6:{rn					total_stats_leftleg[attacker]++rn				}rn				case 7:{rn					total_stats_rightleg[attacker]++rn				}rn				rn			}
rnrncan be:rnrn
	// Keep track of total kills by hitboxrn			switch(hitplace)rn			{rn				case 0:total_stats_general[attacker]++rn				rn				case 1:total_stats_head[attacker]++rn				rn				case 2:total_stats_chest[attacker]++rnrn				case 3:total_stats_stomache[attacker]++rn				rn				case 4:total_stats_leftarm[attacker]++rn				rn				case 5:total_stats_rightarm[attacker]++rnrn				case 6:total_stats_leftleg[attacker]++rn				rn				case 7:total_stats_rightleg[attacker]++rn			}
rnrnrni am close to saying its impossible to block weaponstats and weaponstats2 without any bugs. But the way you log that here it will double log damage, shots fired, hits etc. not kills thornrni blocked it with Ham_Weapon_PrimaryAttack and added unscoped rifles shoots with custom_weapon_shot. but it got damn buggy.

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
04-05-2009, 08:51 AM #80

Yeah, I did declare those arrays unnecessarily as 2D and just as I was about to put out another updated beta. XD For the switch/cases, as far as I know both methods should compile the exact same way, it's just a matter of syntax preference. As for the the stats, these are separate from original scoped shot stats and are used for no scope shots only. All original logging for scoped guns is untouched. rnrnAnyway, here is yet another beta for testing. I just played around with it and it's now about 6am in the morning. Way past bedtime. XD

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
04-07-2009, 08:51 PM #81

yeah i know its just a 'beta' but getting an error bout there being no 'func_types' function...

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
04-07-2009, 10:21 PM #82

lol That was a debugging function I had but removed. That's the second time I have left something in the plugin init now. Here we go.

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
04-17-2010, 04:14 PM #83

Small update for a bug I just happened to randomly notice while looking for some logging stuff today.

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
05-26-2010, 01:12 AM #84

I recently noticed I broke the scope shot blocking. This will be fixed in the next version.

A algier
posted here
Posts: 3
Threads: 0
Joined: Jan 2016
01-20-2016, 01:33 AM #85

Does anyone have a fixed version where scope blocking is working? Maybe an older version before it got broken. I don't think Syn is active anymore so I doubt he's going to release a fixed version.

F Fysiks
posted here
Posts: 108
Threads: 3
Joined: Aug 2007
01-20-2016, 02:52 AM #86

Does the message still show?nnI can't find any older versions that do it any differently. I don't have time to look at it tonight but I would try this:nnChange this:n

				if(pev(id,pev_button) & IN_ATTACK && pev(id,pev_oldbuttons) & IN_ATTACK)n
nnto this:nn
				if(pev(id,pev_button) & IN_ATTACK && !(pev(id,pev_oldbuttons) & IN_ATTACK))n
A algier
posted here
Posts: 3
Threads: 0
Joined: Jan 2016
01-20-2016, 04:05 AM #87

The no_scope_notify_block_notify message shows up fine.rnrnIt seems the line you changed made no difference. Clients can still scope in and shoot. No errors while compiling or debugging though.

F Fysiks
posted here
Posts: 108
Threads: 3
Joined: Aug 2007
01-21-2016, 01:06 AM #88
The no_scope_notify_block_notify message shows up fine.
rnrnI'll have to disagree with that statement. When I tested the plugin tonight, the message did not show up when I shot while not scoped. It actually shows up when I shoot while scoped.rnrnI'm questioning whether this feature ever worked because every version posted in this thread has this same fundamental error(s).

Zor
posted here
Posts: 688
Threads: 75
Joined: Jun 2006
01-22-2016, 01:16 PM #89

Well in the first version you are checking if the old button is true:nn

... pev(id,pev_oldbuttons) & IN_ATTACK)
nnwhereas with the second one you are checking for false:nn
... !(pev(id,pev_oldbuttons) & IN_ATTACK))
nnThis could be the reason for the reversal and saying no scope shot when scoped. I would revert it back to the first version but bracket it just in case:nn
if((pev(id,pev_button) & IN_ATTACK) && (pev(id,pev_oldbuttons) & IN_ATTACK))
nnThe compiler should read it fine the way it was, however when they are bracketed like that there is NOT way there can be a mistake.nnAs for the original problem, when did it break? New update on HLDS or some such?nCheers!

A algier
posted here
Posts: 3
Threads: 0
Joined: Jan 2016
01-23-2016, 02:56 AM #90
I recently noticed I broke the scope shot blocking. This will be fixed in the next version.
rnrnIt sounds like he broke it in the last version of the plugin. But if you go back and try earlier versions of the plugin the function is broken in the same way (in game, not sure if the code changed between versions) which leads me to believe that it was an engine update that did it. Or as fysiks said: it never worked in the first place.

F Fysiks
posted here
Posts: 108
Threads: 3
Joined: Aug 2007
01-24-2016, 05:52 PM #91

I think I misunderstood the purpose of this setting. I was thinking that it was trying to block noscope shots when it's actually trying to block scoped shots. Regardless, the code is unable to block the shots.nnThe change I posted checked for a rising edge in the IN_ATTACK state i.e. when the user first presses the attack button. I did this because if you only detect when both the current and old buttons have IN_ATTACK (this is how all versions use it), you missed the first instance of IN_ATTACK which is likely the one that actually triggers the shot event.nnUnfortunately, I tried several different things but was unable to get it to block the shot (regardless of being scoped).

Zor
posted here
Posts: 688
Threads: 75
Joined: Jun 2006
01-29-2016, 03:42 PM #92

If I remember correctly it was never to block the shot, it was to notify everyone that this sniper is firing unscoped. So if they are consistently getting kills unscoped you can probably determine they are either using a third party reticule, a piece of take on the monitor or some sort of cheat. This is due to the sniper rifle being more accurate in the unscoped than a Kar is. Having said that you can block the attack button, I would look at Sid Lukes weapons mod. He had a jammed weapon in that mod. So he blocked it somehow.rnrnCHeers!

F Fysiks
posted here
Posts: 108
Threads: 3
Joined: Aug 2007
01-29-2016, 09:19 PM #93

The code actually attempts to block the shot when scoped by trying to remove the attack command from pev_buttons but doesn't seem to work.

dodsynthetic
started this thread
Posts: 277
Threads: 15
Joined: Mar 2007
09-08-2016, 09:32 PM #94

Old as hell haha but if there is still interest, I will fix the scoped shot blocking.

DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC