AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Scout No Scope (Updated: v1.0.1, 10/12/08) (https://forums.alliedmods.net/showthread.php?t=78679)

XARIUS 10-08-2008 13:12

Scout No Scope (Updated: v1.0.1, 10/12/08)
 
3 Attachment(s)
General:

I'm a big fan of the scout, and enjoy some scoutzknivez from time to time. I was on a server yesterday that had a neat eventscripts based noscope mod, so I decided to make one for SourceMod.

Info:

This plugin will automatically remove and give the scout back when a user tries to scope. It happens very quickly, so there's very little delay. Removing the weapon and giving it back was the only way I could find to reliably "unscope".

Optionally, with a cvar, you can enable bullet path laser beams as well (sharks not included).

Usage:

Sit back and have fun.

Installation:
  • Copy noscope.smx to addons/sourcemod/plugins/
  • Copy noscope.sp to addons/sourcemod/scripting/
  • Copy noscope.phrases.txt to addons/sourcemod/translations/
Configuration:
  • sm_noscope_enabled - Enables or disables this plugin. (Default: 1)
  • sm_noscope_bulletpath - Enable bullet path laser beams. (Default: 0)
Notes:

This was primarily designed for scout servers, or scout maps, however there is nothing preventing you from using it on a normal server. It will not affect awps or auto's. I did not include a config file since there's really only one cvar to set. Use per-map config files if you want to enable the plugin (or bullet path effects) on certain maps.

Changelog:

Version 1.0.1:

Minor code cleanup. Added a few new entries to the translations file. Updating the translation file is required!

Version 1.0:


Public Release.

Known Issues:

None that I know of!

Additional Comments:

Thanks to Nican & Crimson for the laser beam code (found in scripting) :up:

CrimsonGT 10-08-2008 14:25

Re: Scout No Scope
 
No problem ;)

I have also been attempting to do this with the Sniperrifle in TF2, but haven't found a method I am happy with yet. Still trying to just straight up find a vfunc to remove zoom all together. I have tried removing zoom on prethink, changing their FOV rapidly to make the game auto unzoom them, etc. Still no luck.

Does your method show it start to zoom in?

*Edit*

Nevermind, forgot CSS had a game event for zoom. *shakes fist at valve*

XARIUS 10-08-2008 17:54

Re: Scout No Scope
 
Quote:

Originally Posted by CrimsonGT (Post 696993)
No problem ;)

I have also been attempting to do this with the Sniperrifle in TF2, but haven't found a method I am happy with yet. Still trying to just straight up find a vfunc to remove zoom all together. I have tried removing zoom on prethink, changing their FOV rapidly to make the game auto unzoom them, etc. Still no luck.

Does your method show it start to zoom in?

*Edit*

Nevermind, forgot CSS had a game event for zoom. *shakes fist at valve*

The only other way I found to do this was with the GetClientbuttons, but that requires setting it up OnGameFrame, I believe. I didn't wanna mess with that.

I tried doing FakeClientCommandEx("+attack2..timer..-attack2") but that never worked either.

I also tried plain old ClientCommand, but, as expected, it was blocked. Maybe it's not blocked in TF2?

XARIUS 10-08-2008 18:07

Re: Scout No Scope
 
Oh, I almost forgot. If you can use GetClientButtons to catch the zoom key (then verify it's a sniper rifle), I think you can use EquipPlayerWeapon to reset their view. This worked for me in CSS, but it would empty their ammo reserves. I didn't feel like going thru the trouble to reset the ammo, so I just went with the strip and give option.

Hope that helps.

X

CrimsonGT 10-08-2008 20:21

Re: Scout No Scope
 
Was anything like blantantly obvious? Like did it start to zoom then zoom out, or was it obvious they didnt have a weapon for a second or something? TF2 the sniper rifle doesnt have ammo reserves, so if it does the same thing that would be fine.

Im not sure what you mean though, were you changing there weapon to something else, or just re equipping it.

XARIUS 10-08-2008 20:53

Re: Scout No Scope
 
Quote:

Originally Posted by CrimsonGT (Post 697132)
Was anything like blantantly obvious? Like did it start to zoom then zoom out, or was it obvious they didnt have a weapon for a second or something? TF2 the sniper rifle doesnt have ammo reserves, so if it does the same thing that would be fine.

Im not sure what you mean though, were you changing there weapon to something else, or just re equipping it.

Nothing blatantly obvious at all, it totally voided the scope animation. In CS anyway. Pretty much the same way this plugin works visually. You hit scope, you never see it zoom, and your gun dissappears for maybe a tenth of a second.

I wasn't changing their weapon, just issuing EquipPlayerWeapon(client, entityIndex). Obviously I have no idea how this would react in TF2.

XARIUS 10-08-2008 21:09

Re: Scout No Scope
 
Just found a server running this already. It's a blast!

I hadn't used it except for testing on Dust2 with some bots, so I wasn't sure exactly how well it would work out gameplay wise. Turned out to be way more fun that I expected!

fpsbrian 10-09-2008 09:03

Re: Scout No Scope
 
yeah man, this plugin is awesome!

CrimsonGT 10-09-2008 17:59

Re: Scout No Scope
 
That worked for me Xarius, I appreciate it :P It is pretty ghetto, but it works for now :P Apparently EquipPlayerWeapon() or w/e doesnt work in TF2 so I had to go find the offsets for it :(

XARIUS 10-09-2008 18:08

Re: Scout No Scope
 
Quote:

Originally Posted by CrimsonGT (Post 697539)
That worked for me Xarius, I appreciate it :P It is pretty ghetto, but it works for now :P Apparently EquipPlayerWeapon() or w/e doesnt work in TF2 so I had to go find the offsets for it :(

Sucky :( I'm finishing up a headshot only mod. When I get some time tomorrow or this weekend, I'll take a stab at some tf2 randomness and see if I can come up with something.

X


All times are GMT -4. The time now is 11:47.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.