Raised This Month: $ Target: $400
 0% 

Gratis HP for kill and HS


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Piranja
Junior Member
Join Date: Jul 2011
Old 06-01-2012 , 05:53   Gratis HP for kill and HS
Reply With Quote #1

Hello
Is there any plugin wich gives you gratis HP for kill and for HS.
10 HP for kill, 30 HP for HS. Max HP unlimited.

thanks )
Piranja is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-01-2012 , 06:15   Re: Gratis HP for kill and HS
Reply With Quote #2

Try this

PHP Code:
#include <amxmodx>
#include <fakemeta>
 
#define m_iTeam 114
 
public plugin_init()
{
 
register_plugin("HP on Kill!","1.0","<VeCo>")
 
 
register_event("DeathMsg","Event_DeathMsg","a")
}
 
public 
Event_DeathMsg()
{
 static 
i_killer
 i_killer 
read_data(1)
 
 if(!
is_user_connected(i_killer)) return
 
 static 
i_victim
 i_victim 
read_data(2)
 
 if(
get_pdata_int(i_victim,m_iTeam) == get_pdata_int(i_killer,m_iTeam)) return
 
 
set_pev(i_killer,pev_health,pev(i_killer,pev_health) + (read_data(3) ? 30.0 10.0))

__________________

Last edited by <VeCo>; 06-01-2012 at 06:16.
<VeCo> is offline
Old 06-01-2012, 08:07
leonard19941
This message has been deleted by leonard19941.
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-01-2012 , 09:23   Re: Gratis HP for kill and HS
Reply With Quote #3

Ok, try this.
Attached Files
File Type: sma Get Plugin or Get Source (hp_on_kill.sma - 809 views - 1.5 KB)
__________________
<VeCo> is offline
Old 06-01-2012, 11:32
leonard19941
This message has been deleted by leonard19941.
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-01-2012 , 11:45   Re: Gratis HP for kill and HS
Reply With Quote #4

Not tested.
Attached Files
File Type: sma Get Plugin or Get Source (hp_on_kill.sma - 400 views - 2.6 KB)
__________________
<VeCo> is offline
leonard19941
Veteran Member
Join Date: Jun 2011
Old 06-01-2012 , 18:48   Re: Gratis HP for kill and HS
Reply With Quote #5

Quote:
Originally Posted by <VeCo> View Post
Not tested.
[EN]
Remove the "Cvar: g_pMoneyTeam = register_cvar (" fr_money_team "," 2 ");', and set the default plugin for the' CTs', i mean if a 'CT' commits suicide that will keep the money, you send the message by the say and to sound out, but if suicide a 'T' that nothing happens, same with the knife, if a 'CT' kills one 'T' with the knife to give you money, to send the message to the say and to send the sound to the victim, but if a 'T' kills with the knife that nothing happens.


It works perfectly, but i found some bugs:

1. If i change my team as 'CT' makes me as if i had committed suicide, takes my money, i put the message and makes the sound.

2. If i 'Slay' through he admin menu makes me as if I had committed suicide, takes my money, i put the message and makes the sound.


[ES]
Quitar la 'Cvar: g_pMoneyTeam = register_cvar( "fr_money_team", "2" );', y poner el plugin por defecto para los 'CTs', osea si un 'CT' se suicida que le quite el dinero, que le envie el mensaje por el say y que le salga el sonido, pero si se suicida un 'T' que no pase nada, lo mismo con el cuchillo, si un 'CT' mata a un 'T' con el cuchillo que le de el dinero, que envie el mensage por el say y que envie el sonido a la victima, pero si un 'T' mata con el cuchillo que no pase nada.


Funciona perfectamente, pero encontre unos bugs:

1. Si me cambio de equipo siendo 'CT' me pone como si me hubiera suicido, me quita dinero, me pone el mensaje y hace el sonido.

2. Si me doy 'Slay' atravez del menu de admin me pone como si me hubiera suicido, me quita dinero, me pone el mensaje y hace el sonido.


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

#include <amxmodx>
#include <fakemeta>

#define VERSION "1.0"

#define m_iTeam 114
#define m_iAccount 115

new const suicide[ ] = "furien_xready/suicide.wav";
new const 
humiliation[ ] = "furien_xready/humiliation.wav";

new 
g_pMoneyKillKnife;
new 
g_pMoneyLostSuicide;
new 
g_pMoneyTeam;

new 
g_iMsgSayText;

public 
plugin_init( )
{
    
register_plugin"Money Knife Kill & Lost Money Suicide"VERSION"<VeCo>" );
    
    
g_pMoneyKillKnife register_cvar"fr_money_kill_knife""3000" );
    
g_pMoneyLostSuicide register_cvar"fr_money_lost_suicide""3000" );
    
g_pMoneyTeam register_cvar"fr_money_team""2" );
    
    
register_event"DeathMsg""DeathMsg""a" );

    
g_iMsgSayText get_user_msgid"SayText" );
}

public 
plugin_precache( )
{
    
precache_soundsuicide );
    
precache_soundhumiliation );
}

public 
DeathMsg( )
{
    static 
iKiller;
    
iKiller read_data)
    
    if( !
is_user_connectediKiller ) )
        return;
    
    static 
iVictim;
    
iVictim read_data)
    
    static 
pData_KillerMoneypData_KillerTeamiTeam;
    
pData_KillerMoney get_pdata_intiKillerm_iAccount );
    
pData_KillerTeam get_pdata_intiKillerm_iTeam );
    
    
iTeam get_pcvar_numg_pMoneyTeam )
    
    if( 
get_pdata_intiVictimm_iTeam ) == pData_KillerTeam )
    {
        if( 
iKiller == iVictim && ( !iTeam || pData_KillerTeam == iTeam ) )
        {
            static 
mSuicide;
            
mSuicide get_pcvar_numg_pMoneyLostSuicide )
            
            
set_pdata_intiKillerm_iAccountmax0pData_KillerMoney mSuicide ) )
            
            static 
vName32 ];
            
get_user_nameiVictimvNamecharsmaxvName ) )
            
            
ChatColor0"!g[ Furien ] !yJugador !g%s !yperdio !g$%i !ypor !gSuicidarse !y!"vNamemSuicide );
            
            
client_cmdiVictim"spk ^"%s^""suicide )
        }
        
        return;
    }
    
    if( !
iTeam || pData_KillerTeam == iTeam )
    {
        static 
szWeapon];
        
read_data4szWeaponcharsmaxszWeapon ) );
        
        if( 
szWeapon] == 'k' )
        {
            static 
mKnife;
            
mKnife get_pcvar_numg_pMoneyKillKnife )
            
            
set_pdata_intiKillerm_iAccountmin16000pData_KillerMoney mKnife ), )
            
            static 
kName32 ], vName32 ];
            
get_user_nameiKillerkNamecharsmaxkName ) )
            
get_user_nameiVictimvNamecharsmaxvName ) )
            
            
ChatColor0"!g[ Furien ] !yJugador !g%s !yhumillo al Furien !g%s !yy gano !g$%i !y!"kNamevNamemKnife );
            
            
client_cmdiVictim"spk ^"%s^""humiliation );
        }
    }
}

stock ChatColoridinput[ ], any:... )
{
    new 
g_iCount 1uPlayers32 ];
    static 
MsgId191 ];
    
vformatMsgId190input);

    
replace_allMsgId190"!y""^1" ); // Default Color
    
replace_allMsgId190"!g""^4" ); // Green Color
    
replace_allMsgId190"!team""^3" ); // Team Color
    
    
if ( id uPlayers] = id; else get_playersuPlayersg_iCount"ch" );
    {
        for ( new 
0g_iCounti++ )
        {
            if ( 
is_user_connecteduPlayers] ) )
            {
                
message_beginMSG_ONE_UNRELIABLEg_iMsgSayText_uPlayers] );
                
write_byteuPlayers] );
                
write_stringMsgId );
                
message_end( );
            }
        }
    }

__________________

Last edited by leonard19941; 06-12-2012 at 11:35.
leonard19941 is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-02-2012 , 09:54   Re: Gratis HP for kill and HS
Reply With Quote #6

Yes, because slay and dying by changing team are considered as suicide.
__________________
<VeCo> is offline
leonard19941
Veteran Member
Join Date: Jun 2011
Old 06-02-2012 , 10:01   Re: Gratis HP for kill and HS
Reply With Quote #7

Quote:
Originally Posted by <VeCo> View Post
Yes, because slay and dying by changing team are considered as suicide.
That might fix it ?
__________________
leonard19941 is offline
Old 06-17-2012, 21:17
leonard19941
This message has been deleted by leonard19941.
Old 07-01-2012, 19:46
leonard19941
This message has been deleted by leonard19941.
Old 07-15-2012, 04:41
leonard19941
This message has been deleted by ConnorMcLeod. Reason: don't bump untill 15 days have passed
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 00:12.


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