Raised This Month: $ Target: $400
 0% 

No speed loss when shot


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BRIGADIER
Member
Join Date: Oct 2008
Old 05-13-2009 , 12:10   No speed loss when shot
Reply With Quote #1

Just coming off of my Gun Game server, I saw this happen a few times already. Someone will be chasing someone with a knife and the pursued will get shot by some fool halfway across the map and that slight pause in run will get them knifed in the back. The idea I'm looking for, is if a player is running with a knife out and get shot, their run speed is unaffected. I'd like to thank anyone in advance for attempting this, or pointing me in the right direction. Thank you!
__________________
you gonna be sawry
BRIGADIER is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-13-2009 , 23:15   Re: No speed loss when shot
Reply With Quote #2

it's called painshock, there is already a plugin made but it's alot of code that can be done quicker, use this:
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
 
public plugin_init()
    
RegisterHam(Ham_TakeDamage"player""fwHam_playerDamage"1)
 
public 
fwHam_playerDamage(ididinflictorattackerdamagedamagebits)
{
    
set_pdata_float(id1081.0)
    return 
HAM_HANDLED

__________________

Last edited by Hunter-Digital; 05-15-2009 at 17:52. Reason: fixed, included fakemeta
Hunter-Digital is offline
BRIGADIER
Member
Join Date: Oct 2008
Old 05-14-2009 , 11:39   Re: No speed loss when shot
Reply With Quote #3

Thanks, where do I put that though? I don't know anything about the coding for plugins.
__________________
you gonna be sawry
BRIGADIER is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-14-2009 , 12:15   Re: No speed loss when shot
Reply With Quote #4

Copy-paste the code in a webcompiler and retrieve the .amxx file , then install it.
Arkshine is offline
BRIGADIER
Member
Join Date: Oct 2008
Old 05-14-2009 , 12:38   Re: No speed loss when shot
Reply With Quote #5

Gave it a try, and got this:
killshock.sma(9) : error 017: undefined symbol "set_pdata_float"

1 Error.
__________________
you gonna be sawry
BRIGADIER is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 05-14-2009 , 12:46   Re: No speed loss when shot
Reply With Quote #6

PHP Code:
#include <amxmodx> 
#include <hamsandwich> 
#include <fakemeta> 

public plugin_init() 
    
RegisterHam(Ham_TakeDamage"player""fwHam_playerDamage"1

public 
fwHam_playerDamage(ididinflictorattackerdamagedamagebits

    
set_pdata_float(id1081.0
    return 
HAM_HANDLED 

xbatista is offline
Send a message via Skype™ to xbatista
Reply



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 19:33.


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