Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin
Archive › Old Forum Threads › Help › Scripting Help › lower recoil on an wpn like MP40
6 posts, 3 people · 848 views Thread Rating: ★★★★★
closedlower recoil on an wpn like MP40
Started by ghzero on 02-13-2009, 03:02 PM
ghzero
started this thread
Posts: 160
Threads: 42
Joined: Sep 2007
02-13-2009, 03:02 PM #1

hello,rnfor an new idea that make it possible to deploy an mp like MP40, STEN, THOMSON on a wall I'am searching for an way to reduced the default recoil of that mp's in the player-standing situation. reason : an deployed mp (like an a wall or sandbag) has less recoil as normal.rnif you have any hint for me, it can help to finish an nice plugin..

Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
02-14-2009, 07:15 PM #2

i dont think its possible in dod, and its not the same thing as for CS, ive tryed to set the punch angle to 0 but thats not doing anything. also i found a stock wilson posted around here somewhere that didnt work either.. i tested it like this:rnrn

register_forward(FM_PlayerPreThink,"FM_PreThink")rnrnpublic FM_PreThink(id)rn{rnrnset_pev(id,pev_punchangle, Float:{0.0, 0.0, 0.0})rn}
ghzero
started this thread
Posts: 160
Threads: 42
Joined: Sep 2007
02-15-2009, 09:37 AM #3

yes I noticed that this way (from cstrike) not works in dod.rnrnbut do you know if is possible to ,,lock,, the aimingpoint during attack'ing with an mp to have the nearly result..effect of lower recoil?! maybe before shoot in prething catch the coord of aimingpoint save them an put this again to to player in next frame if he still is shooting ?!

Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
02-15-2009, 01:24 PM #4

well maybe u can do some kinda traceline thing idk, but please tell if u find a way. rnI tryed a couble of things and it didnt work. after that i talked to one of the uber-g33ks around here and he told me that he couldnt do it, then i left it alone :)

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
02-15-2009, 02:01 PM #5

ive tried getting the origin of where you are aiming and after shooting set it back to that.. but it always acted all wierd for me and to me was worse then doing nothing at all lol

Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
02-15-2009, 02:04 PM #6

just tryed this and it didnt work either...rnrnrn

#include <amxmodx>rn#include <fakemeta>rn#include <engine>rnrnpublic plugin_init()rn{rn	register_plugin("No Recoil", "0.1", "Knekter");rn	register_cvar("mp_norecoil", "1");rn	rn	register_forward(FM_TraceLine, "forward_traceline", 1);rn}rnrnpublic client_PreThink(id)rn{rn	if(!get_cvar_num("mp_norecoil"))rn		return PLUGIN_CONTINUE;rn	rn	if(get_user_button(id) & IN_ATTACK)rn		entity_set_vector(id, EV_VEC_punchangle, Float:{0.0, 0.0, 0.0});rn	rn	return PLUGIN_CONTINUE;rn}rnrnpublic forward_traceline(Float:v1[3], Float:v2[3], noMonsters, id)rn{rn	if(!is_user_connected(id) || !is_user_alive(id))rn		return FMRES_IGNOREDrn	rn	new hit[3], Float:fHit[3]rn	get_user_origin(id, hit, 4)rn	IVecFVec(hit, fHit)rn	rn	set_tr(TR_vecEndPos, fHit)rn	rn	return FMRES_IGNOREDrn}
Archive › Old Forum Threads › Help › Scripting Help › lower recoil on an wpn like MP40
DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC