AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   how do you lower gun recoil? (https://forums.alliedmods.net/showthread.php?t=28755)

Rolnaaba 05-21-2006 22:58

how do you lower gun recoil?
 
I am making a plugin that makes the AK more powerfull, but I am at a loss when it comes to the comand for lowering recoil lol any one able to post some small that would demonstrate how to lower the recoil of a gun on Counter-Strike?

Hawk552 05-21-2006 23:00

You can try this:

Code:
entity_set_vector(id,EV_VEC_punchangle,Float:{0.0,0.0,0.0})

Or whatever to suit your needs. I've heard that reduces recoil, but I'm not sure.

You should run that in something like client_PreThink.

Rolnaaba 05-21-2006 23:09

ok I will try that in a prethink ty if anyone else has any other ideas...or knows for sure plz do not hesitate to post lol

Peli 05-21-2006 23:13

try looking here.
http://forums.alliedmods.net/showthread.php?t=19607

DarkSnow 05-22-2006 00:37

To my knowlege the punchangle is only a visual effect that alters the players viewport at z-axis that returns back to zero, while the "real" aim is not affected (if punchangle works the same way in hl as in q)

jtp10181 05-22-2006 06:40

http://forums.alliedmods.net/showthr...p?t=34292+zero

v3x 05-22-2006 14:18

Code:
#include <amxmodx> #include <fakemeta> #include <engine_const> public plugin_init() {   register_plugin("No recoil sample" , "0.1" , "v3x");   register_forward(FM_PlayerPreThink , "fm_PreThink"); } new bool:norecoil[33]; public client_putinserver(id)   norecoil[id] = false; public fm_PreThink(id) {   if(!is_user_alive(id) || !norecoil[id])     return FMRES_IGNORED;   if(pev(id , pev_button) & IN_ATTACK)      pev(id , pev_punchangle , Float:{0.0,0.0,0.0});   return FMRES_IGNORED; }
Something like that.

Rolnaaba 05-22-2006 20:51

kk ty I have added it to my scripts and will test it later :)

v3x 05-23-2006 14:23

Post updated. It now uses Fakemeta instead of Engine.

Note: If you want to set recoil on a person you need to set it to true on the player's index:
Code:
norecoil[id] = true;
Set to false to take it off.

Hawk552 05-23-2006 20:04

Quote:

Originally Posted by v3x
Post updated. It now uses Fakemeta instead of Engine.

Note: If you want to set recoil on a person you need to set it to true on the player's index:
Code:
norecoil[id] = true;
Set to false to take it off.

Why did you declare the global var after the plugin_init function? :?

It's really bad for readability.


All times are GMT -4. The time now is 16:24.

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