AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Block player stopped when take damage. (https://forums.alliedmods.net/showthread.php?t=247485)

FromTheFuture 09-02-2014 14:41

Block player stopped when take damage.
 
Hi. How to block the stop when player take a damage?
I think about pev_maxspeed.

zmd94 09-02-2014 19:50

Re: Block player stopped when take damage.
 
What do you mean? Do you want that when someone is taking a damage, he cannot stop? If he stop, he will automatically moving to somewhere?

yokomo 09-03-2014 01:18

Re: Block player stopped when take damage.
 
This called painshock free. See ZP code on Ham_TakeDamage POST forward, you will find it method.

FromTheFuture 09-03-2014 15:34

Re: Block player stopped when take damage.
 
Quote:

Originally Posted by yokomo (Post 2193346)
This called painshock free. See ZP code on Ham_TakeDamage POST forward, you will find it method.

Thank You, but I found it here https://forums.alliedmods.net/showpo...3&postcount=16

colossus 09-03-2014 15:55

Re: Block player stopped when take damage.
 
PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <hamsandwich>

public plugin_init()
{
    
register_plugin("Block Damage Shock""1.0""colossus")
    
RegisterHam(Ham_TraceAttack"player""fw_TraceAttack")
}

public 
fw_TraceAttack(victimattackerFloat:damageFloat:direction[3], tracehandledamage_type)
    return (!(
<= victim <= get_maxplayers() && is_user_connected(victim))) ? HAM_IGNORED HAM_SUPERCEDE 

Test!!

alan_el_more 09-03-2014 17:35

Re: Block player stopped when take damage.
 
PHP Code:

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

const OFFSET_PAINSHOCK 108
const OFFSET_LINUX 5

public plugin_init ()
{
register_plugin
"Pain Shock Free" "0.1" "alan_el_more" )
RegisterHam
Ham_TakeDamage "player" "fw_TakeDamage_Post" )
}

public 
fw_TakeDamage_Post
victim)
{
set_pdata_float
victimOFFSET_PAINSHOCK 1.0 OFFSET_LINUX )



Unkolix 09-05-2014 09:09

Re: Block player stopped when take damage.
 
Quote:

Originally Posted by zmd94 (Post 2193279)
What do you mean? Do you want that when someone is taking a damage, he cannot stop? If he stop, he will automatically moving to somewhere?

Nope. You know that moment when you get hit by a bullet and you get slowed? That's what he wants to get rid of.

zmd94 09-05-2014 09:48

Re: Block player stopped when take damage.
 
Quote:

Originally Posted by Unkolix (Post 2194134)
Nope. You know that moment when you get hit by a bullet and you get slowed? That's what he wants to get rid of.

Now, I got it. ;)

HamletEagle 09-05-2014 11:25

Re: Block player stopped when take damage.
 
Then setting m_flPainShock offset to 0 is the best way to do it.

FromTheFuture 09-05-2014 11:30

Re: Block player stopped when take damage.
 
I do it with set_pdata_float(id, m_flVelocityModifier, 1.0);


All times are GMT -4. The time now is 13:22.

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