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

adv tk system


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DarkT1
Member
Join Date: Oct 2011
Old 03-26-2012 , 08:18   adv tk system
Reply With Quote #1

hi i need code that its tk system like this

(CT) (Name) attacked (Name) (13 HP)

(T) (Name) attacked (Name) (13 HP)

(spawn) (Name) attacked (Name) (how much HP)

Thanks

Last edited by DarkT1; 03-26-2012 at 08:18.
DarkT1 is offline
CreePs
Member
Join Date: Mar 2011
Old 03-26-2012 , 15:13   Re: adv tk system
Reply With Quote #2

i did like you ask for but i not tested it give it a try and tell me.

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

public plugin_init( ) {
    
register_plugin"TK Info""0.1""CreePs" )
    
    
RegisterHamHam_TakeDamage"player""bacon_takedamage_player" );
}

public 
bacon_takedamage_playervictiminflictorattackerFloat:damagedamage_type )
{
    if( 
get_user_teamattacker ) == get_user_teamvictim 
    && 
victim != attacker 
    
&& get_user_weaponattacker ) != CSW_HEGRENADE 
    {
        new 
vName32 ], aName32 ];
        
get_user_namevictimvNamesizeofvName ) - );
        
get_user_nameattackeraNamesizeofaName ) - );
        
        static const 
TeamName[ ][ ] =
        {
            
"UNASSIGNED",
            
"T",
            
"CT",
            
"SPEC"
        
}
            
        
client_printprint_chat"(%s) (%s) attacked (%s) (%f HP)"TeamNameget_user_teamvictim ) ], aNamevNamefloatrounddamage ) );
    }

    return 
HAM_IGNORED;

__________________
My Plugin's:

Last edited by CreePs; 03-27-2012 at 18:20.
CreePs is offline
DarkT1
Member
Join Date: Oct 2011
Old 03-27-2012 , 04:16   Re: adv tk system
Reply With Quote #3

it work but when someone planted the bomb and the bomb "killed" him.

its type like this
(T) (dH_MaN) attacked (dH_Man) (388.89 HP)

and when i take damge for self with grenade HG.

it type

(T) (dH_MaN) attacked (dH_Man) (68 HP)

can u do that it no type nothing
can u fix it?

Last edited by DarkT1; 03-27-2012 at 04:23.
DarkT1 is offline
CreePs
Member
Join Date: Mar 2011
Old 03-27-2012 , 05:25   Re: adv tk system
Reply With Quote #4

Quote:
Originally Posted by DarkT1 View Post
it work but when someone planted the bomb and the bomb "killed" him.

its type like this
(T) (dH_MaN) attacked (dH_Man) (388.89 HP)

and when i take damge for self with grenade HG.

it type

(T) (dH_MaN) attacked (dH_Man) (68 HP)

can u do that it no type nothing
can u fix it?
fixed look at the code now
__________________
My Plugin's:
CreePs is offline
DarkT1
Member
Join Date: Oct 2011
Old 03-27-2012 , 06:26   Re: adv tk system
Reply With Quote #5

not work..

its dont show and it dont take damge.. when i drop on me hg
DarkT1 is offline
CreePs
Member
Join Date: Mar 2011
Old 03-27-2012 , 06:42   Re: adv tk system
Reply With Quote #6

Quote:
Originally Posted by DarkT1 View Post
not work..

its dont show and it dont take damge.. when i drop on me hg
try now
__________________
My Plugin's:
CreePs is offline
DarkT1
Member
Join Date: Oct 2011
Old 03-27-2012 , 15:30   Re: adv tk system
Reply With Quote #7

work but can u bulit somethink that he disable the meesage
name attacked a teammat

and the end message i mean the (13.99 HP)

can u do it be only (13 HP) without .55 cuz it no super market lol (:
DarkT1 is offline
CreePs
Member
Join Date: Mar 2011
Old 03-27-2012 , 18:22   Re: adv tk system
Reply With Quote #8

Quote:
Originally Posted by DarkT1 View Post
work but can u bulit somethink that he disable the meesage
name attacked a teammat

and the end message i mean the (13.99 HP)

can u do it be only (13 HP) without .55 cuz it no super market lol (:
i disable the msg for HE Nade and i think the .55 will be removed now but im not sure need to check that
__________________
My Plugin's:
CreePs is offline
DarkT1
Member
Join Date: Oct 2011
Old 03-28-2012 , 05:24   Re: adv tk system
Reply With Quote #9

(T) (name) attacked (XS? dH) (0.000000 HP)
(T) (name) attacked (XS? dH) (0.000000 HP)
DarkT1 is offline
CreePs
Member
Join Date: Mar 2011
Old 03-28-2012 , 07:35   Re: adv tk system
Reply With Quote #10

here i have added block tk msg by coonormcleod and fixed the float and fixed the fake damage but this not 100% true it could be 1-3 hp less/more
PHP Code:
#include <amxmodx>
#include <hamsandwich>

public plugin_init( ) {
    
register_plugin"TK Info""0.1""CreePs" )
    
    
RegisterHamHam_TakeDamage"player""bacon_takedamage_player" );
    
    
// block teamattck msg by coonormcleod
    
register_message(get_user_msgid("TextMsg"), "Message_TextMsg")
}

public 
bacon_takedamage_playervictiminflictorattackerFloat:damagedamage_type )
{
    if( 
get_user_teamattacker ) == get_user_teamvictim )
    && 
victim != attacker
    
&& get_user_weaponattacker ) != CSW_HEGRENADE
    
&& get_cvar_num"mp_friendlyfire" ) )
    {
        new 
vName32 ], aName32 ];
        
get_user_namevictimvNamesizeofvName ) - );
        
get_user_nameattackeraNamesizeofaName ) - );
        
        static const 
TeamName[ ][ ] =
        {
            
"UNASSIGNED",
            
"T",
            
"CT",
            
"SPEC"
        
}
        
        
damage = ( damage 2.9 );
        new 
iDamage floatrounddamage );

        
client_printprint_chat"(%s) (%s) attacked (%s) (%d HP)"TeamNameget_user_teamvictim ) ], aNamevNameiDamage );
    }

    return 
HAM_IGNORED;
}

public 
Message_TextMsg(iMsgIdiMsgDestid)
{
    if( 
id )
    {
        new 
szMsg[23]
        
get_msg_arg_string(2szMsgcharsmax(szMsg))
        
// http://www.amxmodx.org/funcwiki.php?search=et_msg_arg&go=search
        
return equal(szMsg"#Game_teammate_attack")
        
// http://www.amxmodx.org/funcwiki.php?search=equal&go=search
    
}
    return 
PLUGIN_CONTINUE

__________________
My Plugin's:
CreePs 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 16:33.


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