AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   AWP Shake (https://forums.alliedmods.net/showthread.php?t=12552)

v3x 04-17-2005 21:57

AWP Shake
 
1 Attachment(s)
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 }

dkt 04-18-2005 00:55

It seems it did't work in my server.
No shaking before/after fire or in scope mode.

v3x 04-19-2005 11:25

Works fine on mine (AMXModX 1.01 / CSTRIKE).

NiGHTFiRE 04-19-2005 15:13

Why did you add
Code:
public plugin_modules() require_module("Engine")
It compiles fine without it.

v3x 04-19-2005 18:59

Because JGHG wants us to.

NiGHTFiRE 04-20-2005 10:10

Well for me it still doesn't make sence. Why, you have already include that. and why only engine? why not amxmodx also?

neXXus` 04-20-2005 15:42

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

v3x 04-21-2005 13:39

Should I make it so it's optional to shake the screen when scoping?

NiGHTFiRE 04-21-2005 14:26

No don't

v3x 07-18-2005 18:50

OK, for people who had problems with this plugin in the past.. I've made some updates to it. I've changed some returns in the weapon event so it should work now. Also, some minor updates like updating it to my new coding style. :P


All times are GMT -4. The time now is 15:18.

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