Raised This Month: $51 Target: $400
 12% 

AWP Shake


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff        Approver:   v3x (159)
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 04-17-2005 , 21:57   AWP Shake
Reply With Quote #1

AWP Shake v1.02

Description:
Whenever you fire or scope with the AWP, it will cause you to shake slightly.

Cvars:
- awp_shake <1|0> - Turns the plugin off/on (Default: 1)

Required modules:
- Engine

Code:
#include <amxmodx> #include <engine> #define PLUGIN  "AWP Shake" #define VERSION "1.02" #define AUTHOR  "v3x" new g_iMsgScreenShake public plugin_init() {     register_plugin(PLUGIN,VERSION,AUTHOR)     register_event("CurWeapon","Current_Weapon","be","1=1")     register_cvar("awp_shake","1")     g_iMsgScreenShake = get_user_msgid("ScreenShake") } public plugin_modules() require_module("Engine") public Current_Weapon(id) {     if(!get_cvar_num("awp_shake"))         return PLUGIN_CONTINUE         new clip, ammo     new weapon = get_user_weapon(id,clip,ammo)         if(weapon == CSW_AWP)     {         if((get_user_button(id)&IN_ATTACK) || (get_user_button(id)&IN_ATTACK2))         {             message_begin(MSG_ONE,g_iMsgScreenShake,{0,0,0},id)             write_short( 1<<14 )             write_short( 1<<14 )             write_short( 1<<14 )             message_end()         }     }        return PLUGIN_CONTINUE }
Attached Files
File Type: sma Get Plugin or Get Source (awpshake.sma - 6478 views - 864 Bytes)
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
dkt
Junior Member
Join Date: Feb 2005
Old 04-18-2005 , 00:55  
Reply With Quote #2

It seems it did't work in my server.
No shaking before/after fire or in scope mode.
dkt is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 04-19-2005 , 11:25  
Reply With Quote #3

Works fine on mine (AMXModX 1.01 / CSTRIKE).
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
NiGHTFiRE
Senior Member
Join Date: Dec 2004
Location: Sweden
Old 04-19-2005 , 15:13  
Reply With Quote #4

Why did you add
Code:
public plugin_modules() require_module("Engine")
It compiles fine without it.
NiGHTFiRE is offline
Send a message via AIM to NiGHTFiRE Send a message via MSN to NiGHTFiRE
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 04-19-2005 , 18:59  
Reply With Quote #5

Because JGHG wants us to.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
NiGHTFiRE
Senior Member
Join Date: Dec 2004
Location: Sweden
Old 04-20-2005 , 10:10  
Reply With Quote #6

Well for me it still doesn't make sence. Why, you have already include that. and why only engine? why not amxmodx also?
NiGHTFiRE is offline
Send a message via AIM to NiGHTFiRE Send a message via MSN to NiGHTFiRE
neXXus`
Member
Join Date: Mar 2005
Location: Germany
Old 04-20-2005 , 15:42  
Reply With Quote #7

becos thats no module

#include imports content of the include file for compiling, containing functions and their syntax.

require_module will make sure the specified module is running, if not the plugin wont run, if not the plugin will try but not work properly i think
neXXus` is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 04-21-2005 , 13:39  
Reply With Quote #8

Should I make it so it's optional to shake the screen when scoping?
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
=NcB=preswylde
Junior Member
Join Date: Jan 2009
Old 01-13-2009 , 06:29   Re: AWP Shake
Reply With Quote #9

Quote:
Originally Posted by v3x View Post
Should I make it so it's optional to shake the screen when scoping?

Someone replied to this question with a no... but I disagree. I see this plugin as a slight realism addition to some realism servers, etc.

REALISTICALLY, if you were to zoom in your scope, you wouldn't shake.. BUT.. for those of us that have actually fired a .50 Cal sniper rifle, the screen shake could be used to simulate the real life physical trauma the shooter would experience when firing such a powerful rifle.

I understand if you don't feel like going back in and recoding this to add the cvar(s) to make the scoping shake optional, but I hope you understand that if I use this plugin without the change, I will simply just go into the code and strip it of it's references to the attack2 function. That's easy enough to do for me, but I think there might be others that would be interested in using this with the option.
=NcB=preswylde is offline
NiGHTFiRE
Senior Member
Join Date: Dec 2004
Location: Sweden
Old 04-21-2005 , 14:26  
Reply With Quote #10

No don't
NiGHTFiRE is offline
Send a message via AIM to NiGHTFiRE Send a message via MSN to NiGHTFiRE
Reply



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 20:21.


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