Raised This Month: $ Target: $400
 0% 

hitting question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
haimmaik
Senior Member
Join Date: Jul 2005
Old 11-12-2005 , 15:43   hitting question
Reply With Quote #1

how do i do that if some1 is getting hit.. he wont slow down or lose his aim?

i mean.. when im getting hit in counterstike my walkingspeed is slowing down for a second and my aim is moving ... how can i disable it (more like when im getting hit.. i wont feel it..)
(xpt that my hp will get low)
haimmaik is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 11-12-2005 , 21:09  
Reply With Quote #2

I suck at explaining things, so try this:
Code:
#include <amxmodx> #include <fun> public plugin_init() {   register_event("Damage", "Event_Damage", "b", "2!0");   register_event("CurWeapon", "Event_CurWeapon", "be");   register_event("ResetHUD", "Event_ResetHUD", "b"); } #define MIN_DAMAGE 25 // minimum amount of damage before player slows down #define SLOW_SPEED 200.0 // max speed of injured players new bool:g_bSlow[33] = { false, ... }; public client_connect( id )   g_bSlow[id] = false; public Event_Damage( id ) {   new dmg = read_data(2); // get the damage recieved   // if the damage is greater than or equal to the defined value..   if(dmg >= MIN_DAMAGE)   {     set_user_maxspeed(id, SLOW_SPEED); // set his maxspeed     g_bSlow[id] = true; // set the bool to true   } } public Event_CurWeapon( id ) {   // if the bool is true..   if(g_bSlow[id] == true)     set_user_maxspeed(id, SLOW_SPEED); // set his speed } public Event_ResetHUD( id )   g_bSlow[id] = false; // set the bool to false when the player spawns again
__________________
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
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-12-2005 , 21:17  
Reply With Quote #3

Does a user's maxspeed really change when he gets hit? I know when you jump off of a big ledge, and you take damage which makes you walk slower momentarily, your maxspeed remains the same. I would assume it is the same for getting shot.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 11-12-2005 , 21:18  
Reply With Quote #4

Now that I think about it, I think it does ;)

__________________
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
haimmaik
Senior Member
Join Date: Jul 2005
Old 11-13-2005 , 00:09  
Reply With Quote #5

Quote:
Originally Posted by XxAvalanchexX
Does a user's maxspeed really change when he gets hit? I know when you jump off of a big ledge, and you take damage which makes you walk slower momentarily, your maxspeed remains the same. I would assume it is the same for getting shot.
yeah ur right... and same happens when some1 is shooting at u...
my question was how to DISABLE this? i want it to move normally on those situations.

v3x your code will just make it worse..
but u gave me an idea.. maybe i can rais the minspeed into something higher than the normal one.. and it'll work... if it really changes the maxspeed... then it should work.. but im almost sure it doesnt.. which makes me to belive that this probably wont work.. well.. ill try
haimmaik is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 11-13-2005 , 00:13  
Reply With Quote #6

maybe
Code:
public client_PreThink(id) {     if (!get_cvar_num("bh_enabled"))         return PLUGIN_CONTINUE     entity_set_float(id, EV_FL_fuser2, 0.0)     // Disable slow down after jumping
taken from bunny hop enable plugin?
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
haimmaik
Senior Member
Join Date: Jul 2005
Old 11-13-2005 , 00:14  
Reply With Quote #7

yep! good.. that will do half of the job..
haimmaik is offline
haimmaik
Senior Member
Join Date: Jul 2005
Old 11-13-2005 , 00:21  
Reply With Quote #8

HAY i found this -
EV_FL_pain_finished

what does it do?
haimmaik is offline
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 11-13-2005 , 02:09  
Reply With Quote #9

Quote:
Originally Posted by Suicid3
maybe
Code:
public client_PreThink(id) {     if (!get_cvar_num("bh_enabled"))         return PLUGIN_CONTINUE     entity_set_float(id, EV_FL_fuser2, 0.0)     // Disable slow down after jumping
taken from bunny hop enable plugin?
I did use entity_set_float(id, EV_FL_fuser2, 0.0) when trying to slow down when getting damage, it didnt work too well.
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
haimmaik
Senior Member
Join Date: Jul 2005
Old 11-13-2005 , 02:32  
Reply With Quote #10

no thats for the jumping part...
i still need something to disable the damage slow
(also fall damage)
haimmaik is offline
Reply


Thread Tools
Display Modes

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 00:00.


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