Raised This Month: $12 Target: $400
 3% 

TT can't kill CT how I can make this?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
merkava
Junior Member
Join Date: Jun 2008
Old 07-27-2009 , 06:37   TT can't kill CT how I can make this?
Reply With Quote #1

I have only one idea on this.

Code:
public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    set_task(1.0, "cmDCheckHP", _,_,_, "b")
    
    // Add your own code here
}

public cmDCheckHP(id)
{
    new alive = is_user_alive(id)
    new team = cs_get_user_team(id)
    new hp = get_user_health(id)
    
    if((alive) || (team) == CS_TEAM_CT) {
        if(hp < 100) {
            set_user_health(id, 255)
        }
    }
} 


But this idea is negative. Unfortunately, it doesn't work
Well... I need help.


Last edited by merkava; 07-27-2009 at 07:30.
merkava is offline
anssik
Senior Member
Join Date: May 2006
Location: Suomi Finland Perkele
Old 07-27-2009 , 07:46   Re: TT can't kill CT how I can make this?
Reply With Quote #2

Untested, but should work.
Attached Files
File Type: sma Get Plugin or Get Source (no_kill_ct.sma - 728 views - 434 Bytes)
__________________
anssik is offline
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 07-27-2009 , 08:00   Re: TT can't kill CT how I can make this?
Reply With Quote #3

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

public plugin_init( ) 
{   
    
RegisterHamHam_TakeDamage"player""fwd_TakeDamage");
}

public 
fwd_TakeDamagevictiminflictorattackerFloat:damagedmgbits )
{
    if ( 
is_user_alive(  attacker ) )
    {
        if ( 
get_user_teamattacker ) == )
        {
             return 
HAM_SUPERCEDE;
        }

        return 
HAM_IGNORED;

Try this, not tested.
__________________
Achievements API - a simple way for you to create your OWN custom achievements!
Xellath is offline
merkava
Junior Member
Join Date: Jun 2008
Old 07-27-2009 , 08:09   Re: TT can't kill CT how I can make this?
Reply With Quote #4

Okey. I will test it. Thanks for the time which you devoted to me.
merkava is offline
Mlk27
Veteran Member
Join Date: May 2008
Old 07-27-2009 , 08:22   Re: TT can't kill CT how I can make this?
Reply With Quote #5

Code:
public fwd_TakeDamage( victim, inflictor, attacker, Float:damage, dmgbits ) {     if (is_user_alive(attacker))     {
        if (get_user_team(victim) == 2 && get_user_team(attacker) == 1)
        {              return HAM_SUPERCEDE;         }         return HAM_IGNORED; }
Mlk27 is offline
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 07-27-2009 , 08:22   Re: TT can't kill CT how I can make this?
Reply With Quote #6

Quote:
Originally Posted by merkava View Post
Okey. I will test it. Thanks for the time which you devoted to me.
Well, it took like 10 minutes to write, so it's not a big loss.

I am on vacation and I am surfing on my phone, so I cannot type as fast as I would on a computer.

Hope it works!
__________________
Achievements API - a simple way for you to create your OWN custom achievements!
Xellath is offline
merkava
Junior Member
Join Date: Jun 2008
Old 07-27-2009 , 15:11   Re: TT can't kill CT how I can make this?
Reply With Quote #7

anssik your plugin is runing good.

Xellath your don't worked good :>
merkava 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 08:03.


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