Raised This Month: $ Target: $400
 0% 

[Req] After hit CT will give low damage


Post New Thread Reply   
 
Thread Tools Display Modes
Mirk
Senior Member
Join Date: Nov 2012
Old 04-20-2014 , 11:14   Re: [Req] After hit CT will give low damage
Reply With Quote #11

Yes, I had in mind it
Mirk is offline
Spawner30
BANNED
Join Date: Dec 2013
Location: I Don't Know Yet
Old 04-20-2014 , 11:33   Re: [Req] After hit CT will give low damage
Reply With Quote #12

So We Have To Use This Too ???? ^.- ? !

PHP Code:
Ham_TraceAttack 

Last edited by Spawner30; 04-20-2014 at 11:35.
Spawner30 is offline
Send a message via Skype™ to Spawner30
Mirk
Senior Member
Join Date: Nov 2012
Old 04-20-2014 , 11:44   Re: [Req] After hit CT will give low damage
Reply With Quote #13

probably yes
Mirk is offline
Old 04-20-2014, 11:45
Spawner30
This message has been deleted by Spawner30.
Mirk
Senior Member
Join Date: Nov 2012
Old 04-20-2014 , 11:49   Re: [Req] After hit CT will give low damage
Reply With Quote #14

Sorry, but I need this. It is highlighted bold font.

Quote:
Originally Posted by Mirk View Post
So, When I slash/hit the player from CT team, so the player (CT player) will give low damage
Mirk is offline
Spawner30
BANNED
Join Date: Dec 2013
Location: I Don't Know Yet
Old 04-20-2014 , 12:08   Re: [Req] After hit CT will give low damage
Reply With Quote #15

Check It Now !
Spawner30 is offline
Send a message via Skype™ to Spawner30
Mirk
Senior Member
Join Date: Nov 2012
Old 04-20-2014 , 12:37   Re: [Req] After hit CT will give low damage
Reply With Quote #16

Does not work, "pev( iDamageTaker , pev_dmg_take )" be want replace. (probably )

Last edited by Mirk; 04-20-2014 at 12:37.
Mirk is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 04-20-2014 , 12:57   Re: [Req] After hit CT will give low damage
Reply With Quote #17

So, here is what I've made based on what did I understand from the whole request. Perhaps it's not right and it could be better, but I decided to post it here.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <cstrike>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "x"

new DmgCvar
new bool:Hitted[33]

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
DmgCvar register_cvar("damage_low""2")
    
RegisterHam(Ham_TakeDamage"player""Damage"1)
}

public 
Damage(victiminflictorattackerFloat:damageDamageBits)
{
    if(
is_user_connected(victim) && cs_get_user_team(victim) == CS_TEAM_CT)
        
Hitted[victim] = true
        
    
if(is_user_connected(attacker) && cs_get_user_team(attacker) == CS_TEAM_CT && Hitted[attacker] == true)
        
SetHamParamFloat(4damage get_pcvar_num(DmgCvar))
}

public 
client_death(id)
    
Hitted[id] = false
    
public client_disconnect(id)
    
Hitted[id] = false 
Repeat, you hit the CT player, and after you hit him, he makes twice lower damage on his enemies! That's all, waiting for critics.
__________________

Last edited by Flick3rR; 04-20-2014 at 13:09.
Flick3rR is offline
Send a message via Skype™ to Flick3rR
Mirk
Senior Member
Join Date: Nov 2012
Old 04-20-2014 , 13:06   Re: [Req] After hit CT will give low damage
Reply With Quote #18

You would not give me into this, please?

Quote:
Originally Posted by Mirk View Post
#

Last edited by Mirk; 05-05-2014 at 17:07.
Mirk is offline
Mirk
Senior Member
Join Date: Nov 2012
Old 04-20-2014 , 15:28   Re: [Req] After hit CT will give low damage
Reply With Quote #19

Thus I gave it, but does not work it:

#

sorry for double post

Last edited by Mirk; 05-05-2014 at 17:08.
Mirk is offline
NikKOo31
Senior Member
Join Date: May 2013
Location: Home
Old 04-20-2014 , 16:55   Re: [Req] After hit CT will give low damage
Reply With Quote #20

Hi buddy, I don't have time to test it, but I hope it helps you

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <fakemeta>
#include <cstrike>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new dmgmlt
new slashing[33]

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHam(Ham_TakeDamage"player""fw_takedamage"
    
RegisterHam(Ham_Player_PreThink"player""fw_PlayerPreThink")
    
dmgmlt register_cvar("amx_damagemultiplier""0.5")
}

public 
fw_takedamage(victiminflictorattackerFloat:damagebits
{
    if(!
is_user_alive(victim) || !is_user_connected(attacker) || cs_get_user_team(victim) != CS_TEAM_CT || !slashing[attacker])
        return 
HAM_IGNORED

    damage 
*= get_pcvar_float(dmgmlt)
    
SetHamParamFloat(4damage)
    return 
HAM_HANDLED
}

public 
fw_PlayerPreThink(id)
{
    static 
tempweapon
    weapon 
get_user_weapon(idtemptemp)
 
    if(
weapon == CSW_KNIFE)
    {
        static 
button
        button 
pev(idpev_button)

        if(
button IN_ATTACK)
            
slashing[id] = true
        
else
            
slashing[id] = false
    
}

To the others, if you are copying the code I posted, don't set yourself as authors
NikKOo31 is offline
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 20:50.


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