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

Sniper Charge


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay        Approver:   YamiKaitou (5)
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 06-29-2008 , 23:15   Sniper Charge
Reply With Quote #1

Sniper Charge 1.01 by Avalanche (last updated 06/30/08)

I actually stole this idea from another game, and I love it. In order to fire the AWP (and optionally Scout), you have to hold down primary fire as it charges up, and once it's charged, you can release fire to shoot. While charging, you have a lasersight to give away your position. It makes sniping a lot more challenging.

There are three charge modes. Mode 1 is as described: hold down fire to charge, and once charged you can release fire to shoot. Mode 2 is like Halo's Spartan Laser: as soon as the charge is full, it automatically shoots. Mode 3 is like TF2's Sniper: you can fire at any time you want, but the damage you do is based on how full your charge is.

Screenshot of the two charge meter styles
Video of the two charge meter styles in action

This requires AMXX 1.80, Cstrike, Fakemeta, and Ham Sandwich. Note that any cvar changes will not take effect until a map change or until the round is restarted (sv_restartround). Because the cvars can be checked every frame, they are cached to save processing.

I would like to give credit to Jussi Kivilinna (http://koti.mbnet.fi/axh/) for his Metamod Lasersight plugin, as I based all of my lasersight code right out of that.

Here is the full cvar list:
  • charge_mode_awp (default 1)
    • The charge mode for the AWP. See description above. Set to 0 to disable.
  • charge_time_awp (default 3.0)
    • How long it takes to fully charge the AWP.
  • charge_movespeed_awp (default 0.75)
    • The percentage of regular speed that you move at while charging the AWP.
  • charge_zoomonly_awp (default 0)
    • If enabled, you can only charge the AWP while scoped, and cannot unscope while charging.
  • charge_laser_awp (default 1)
    • Whether or not the AWP has a lasersight beam while charging.
  • charge_dot_awp (default 1)
    • Whether or not the AWP has a lasersight dot while charging.
  • charge_meter_awp (default 1)
    • The style of charge meter for the AWP. See screenshot/video above. Set to 0 to disable.
  • charge_sounds_awp (default 1)
    • Whether or not the AWP has charging sounds.
  • charge_mode_scout (default 0)
    • The charge mode for the Scout. See description above. Set to 0 to disable.
  • charge_time_scout (default 3.0)
    • How long it takes to fully charge the Scout.
  • charge_movespeed_scout (default 0.75)
    • The percentage of regular speed that you move at while charging the Scout.
  • charge_zoomonly_scout (default 0)
    • If enabled, you can only charge the Scout while scoped, and cannot unscope while charging.
  • charge_laser_scout (default 1)
    • Whether or not the Scout has a lasersight beam while charging.
  • charge_dot_scout (default 1)
    • Whether or not the Scout has a lasersight dot while charging.
  • charge_meter_scout (default 1)
    • The style of charge meter for the Scout. See screenshot/video above. Set to 0 to disable.
  • charge_sounds_scout (default 1)
    • Whether or not the Scout has charging sounds.
Attached Files
File Type: sma Get Plugin or Get Source (snipercharge.sma - 3637 views - 20.9 KB)
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS

Last edited by XxAvalanchexX; 06-30-2008 at 22:01.
XxAvalanchexX is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-30-2008 , 01:23   Re: Sniper Charge
Reply With Quote #2

Look like i may not restrict awp anymore on my server, awesome.
I suggest you to cache cvars 7sec after mapchange, so amxx.cfg and per maps .cfg have been executed.
__________________
- tired and retired -
ConnorMcLeod is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-30-2008 , 04:55   Re: Sniper Charge
Reply With Quote #3

Interesting, really.
__________________
Arkshine is offline
Pamaliska
Senior Member
Join Date: Apr 2006
Location: Edinburgh, UK
Old 06-30-2008 , 07:06   Re: Sniper Charge
Reply With Quote #4

OFT: tf2 rules. I've added many things from it into cs. The only thing I want to add is that sprite thingy when you dominate someone or make a critical hit or even get an achievement. However, I cannot do that be cause of the absence of proper sprites.

Last edited by Pamaliska; 06-30-2008 at 07:09.
Pamaliska is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 06-30-2008 , 15:23   Re: Sniper Charge
Reply With Quote #5

connorr: You're right, I forgot about that. Updated then, thanks.

arkshine: Ribbit.

Pamaliska: Surely it wouldn't be too hard to steal the resource from TF2 and turn it into a HL sprite?
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
DA
Veteran Member
Join Date: Nov 2005
Location: Germany/Münster
Old 06-30-2008 , 15:34   Re: Sniper Charge
Reply With Quote #6

Awesome! GJ
__________________
DA is offline
mando127
Veteran Member
Join Date: Dec 2006
Location: virginia
Old 06-30-2008 , 16:57   Re: Sniper Charge
Reply With Quote #7

nice mod love it
__________________
mando127 is offline
Send a message via Skype™ to mando127
AntiBots
Veteran Member
Join Date: May 2008
Location: La Plata, Bs As, Argenti
Old 06-30-2008 , 19:29   Re: Sniper Charge
Reply With Quote #8

Is Very fanny

Exelent
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
Iswa!
Junior Member
Join Date: May 2008
Old 06-30-2008 , 21:10   Re: Sniper Charge
Reply With Quote #9

Is very Nice ..
Iswa! is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 06-30-2008 , 21:16   Re: Sniper Charge
Reply With Quote #10

Hey! Avalanche.. very nice man
Styles is offline
Send a message via AIM to Styles Send a message via MSN to Styles
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 08:52.


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