Thread: Ham_Killed
View Single Post
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-03-2013 , 03:14   Re: Ham_Killed
Reply With Quote #5

YES.

PHP Code:
new bool:g_bShouldRespawn[33];

new 
g_iMaxPlayers;
#define IsPlayer(%0)    ( 1 <= (%0) <= g_iMaxPlayers )

public plugin_init()
{
    
RegisterHam(Ham_Killed"player""C_HAm_Kill_Post"1);

    
g_iMaxPlayers get_players();
}

public 
C_HAm_Kill_Post(victimkillershoudgib)
{
    
// XP Code here :
    
if( IsPlayer(killer) && killer != victim && cs_get_user_team(victim) != cs_get_user_team(killer) )
    {
        
// raise killer XP
    
}

    
// Respawn code here :
    
if( g_bShouldRespawn[victim] )
    {
        
g_bShouldRespawn[victim] = false;
        
ExecuteHam(Ham_CS_RoundRespawnvictim);
    }

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline