6 posts,
4 people · 978 views
Thread Rating: ★★★★★
| closedEliminate Speed reduction when shot. |
| Started by Beek on 12-06-2008, 12:57 AM |
B
Beek
Threads: 3
Joined: Jan 2008
started this thread
Posts: 9Threads: 3
Joined: Jan 2008
12-06-2008, 12:57 AM
#1
Found this plug on AMXX site but it doesn't seem to work for DOD. Can anyone fix this so it will work?rnrnThanksrnrn
rn/* AMX Mod X script.rn rn Pain Shock Free Pluginrn rn (c) Copyright 2007, Simon Logic (e-mail: slspam@land.ru)rn This file is provided as is (no warranties).rnrn Info:rn When a player is hit he slows down a bit because of a pain shock. rn Sometimes it's very annoying, especially when playing dynamic style rn mod, e.g. CSDM. This plugin can turn off original player's slowdown rn on bullet hit.rnrn Requirements:rn * CS/CZ modrn * AMX/X 1.7x or higherrn * Fakemeta modulern rn New cvars:rn * amx_painshockfree <0|1> (default=1)rnrn History:rn 1.0.0 [2007-12-16]rn * first releasern*/rnrn#include <amxmodx>rn#include <fakemeta>rnrn#define MY_PLUGIN_NAME "Pain Shock Free"rn#define MY_PLUGIN_VERSION "1.0.0"rn#define MY_PLUGIN_AUTHOR "Simon Logic"rnrnrnnew bool:g_bRestoreVelrnnew Float:g_vecVel[3]rnnew g_cvarPainShockFreernnew g_fmPlayerPreThinkrnnew g_fmPlayerPreThink_Postrn//-----------------------------------------------------------------------------rnpublic plugin_init()rn{rn register_plugin(MY_PLUGIN_NAME, MY_PLUGIN_VERSION, MY_PLUGIN_AUTHOR)rnrn g_cvarPainShockFree = register_cvar("amx_painshockfree", "1", FCVAR_SERVER)rnrn g_fmPlayerPreThink = register_forward(FM_PlayerPreThink, "onPlayerPreThink")rn g_fmPlayerPreThink_Post = register_forward(FM_PlayerPreThink, "onPlayerPreThink_Post", 1)rn}rn//-----------------------------------------------------------------------------rnpublic plugin_end()rn{rn if(g_fmPlayerPreThink)rn unregister_forward(FM_PlayerPreThink, g_fmPlayerPreThink)rn if(g_fmPlayerPreThink_Post)rn unregister_forward(FM_PlayerPreThink, g_fmPlayerPreThink_Post, 1)rn}rn//-----------------------------------------------------------------------------rnpublic onPlayerPreThink(id)rn{rn if(get_pcvar_num(g_cvarPainShockFree))rn {rn if(pev_valid(id) && is_user_alive(id) rn && (FL_ONGROUND & pev(id, pev_flags)))rn {rn pev(id, pev_velocity, g_vecVel)rn g_bRestoreVel = truern }rn rn return FMRES_HANDLEDrn }rn rn return FMRES_IGNOREDrn}rn//-----------------------------------------------------------------------------rnpublic onPlayerPreThink_Post(id)rn{rn if(g_bRestoreVel)rn {rn g_bRestoreVel = falsernrn if(!(FL_ONTRAIN & pev(id, pev_flags)))rn {rn // NOTE: within DLL PlayerPreThink Jump() function is called;rn // there is a conveyor velocity addiction we should care ofrnrn static iGEntrn rn iGEnt = pev(id, pev_groundentity)rn if(pev_valid(iGEnt) && (FL_CONVEYOR & pev(iGEnt, pev_flags)))rn {rn static Float:vecTemp[3]rn rn pev(id, pev_basevelocity, vecTemp)rn rn g_vecVel[0] += vecTemp[0]rn g_vecVel[1] += vecTemp[1]rn g_vecVel[2] += vecTemp[2]rn } rnrn set_pev(id, pev_velocity, g_vecVel)rn rn return FMRES_HANDLEDrn }rn }rnrn return FMRES_IGNOREDrn}rn//-----------------------------------------------------------------------------rnrnposted here
Posts: 337Threads: 23
Joined: Aug 2007
12-06-2008, 01:51 AM
#2
B
Beek
Threads: 3
Joined: Jan 2008
started this thread
Posts: 9Threads: 3
Joined: Jan 2008
12-06-2008, 02:27 AM
#3
https://www.dodplugins.net/forums/showthread.php?t=119&highlight=staminarnrnThis plugin adjusts your stamina. I've already increased my stamina to always be 100% but when you get shot your speed still slows down. That is what I want to eliminate.
posted here
Posts: 337Threads: 23
Joined: Aug 2007
12-06-2008, 10:34 AM
#4
Sorry, misunderstood you. rnWhat about this one.rnhttps://www.dodplugins.net/forums/showthread.php?t=1021&highlight=stamina
posted here
Posts: 581Threads: 59
Joined: Jan 2007
12-06-2008, 11:06 AM
#5
In all honesty, the plugin you are requesting is to my knowledge the first plugin posted by meathead.nnYou want to remove or reduce the stamina retraction when you get shot. So when you get shot, you slow down. You want to reduce or remove that.nnInformation:n
n- Remake of an old plugin by FireStormn- Max stamina goes down as you take damagenn- CVAR to set hp level for effect to beginn- CVAR to set how much hp takes away each stamina pointnnnAnd these are the cvars:nnCVARs:n
ndod_staminahp "1" //turn ON(1)/OFF(0)ndod_staminahp_starthp "100" //HP level at which to start lowering max staminandod_staminahp_ratio "2" //Amount of HP that will subtract 1 stamina pointnnnSetting dod_staminahp_starthp at 0 would mean you removed the entire stamina-get-shot thingy. Or set dod_staminahp_ratio at 0. With different settings you can reduce the get-shot-thingy.nnPerhaps I'm also misunderstanding you, but I based my answers or advices on the plugin you provided. I don't know if this plugin will interfear with your always-full-stamina plugin you talk about.
posted here
Posts: 776Threads: 75
Joined: Nov 2007
12-06-2008, 11:16 AM
#6
meathead i think he just wants the shock thing that slows u down when u get hit, to go away :D not ppl sprinting around like they where on amfetamin all the time :D however i cant see the code should be a special CS thing.. does it work on CS??

