AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP] Kick the attacker when he kills the CT (https://forums.alliedmods.net/showthread.php?t=113533)

Excalibur.007 12-27-2009 22:14

[HELP] Kick the attacker when he kills the CT
 
How can I AUTOMATICALLY kick the T(Attacker) when the CT dies(Victim)?

Doc-Holiday 12-27-2009 23:26

Re: [HELP] Kick the attacker when he kills the CT
 
Quote:

Originally Posted by Excalibur.007 (Post 1033386)
How can I AUTOMATICALLY kick the T(Attacker) when the CT dies(Victim)?

register ham_killed
PHP Code:

if(get_user_team(attacker) == && get_user_team(victim) == 2)
{
         
KICK!!!!



fysiks 12-28-2009 00:22

Re: [HELP] Kick the attacker when he kills the CT
 
Quote:

Originally Posted by Excalibur.007 (Post 1033386)
How can I AUTOMATICALLY kick the T(Attacker) when the CT dies(Victim)?

This begs for an empty server.

Merc3y 12-28-2009 01:54

Re: [HELP] Kick the attacker when he kills the CT
 
Quote:

Originally Posted by fysiks (Post 1033455)
This begs for an empty server.

Maybe he trying to make it for his catcher server. :) If i'm not wrong.

Excalibur.007 12-28-2009 02:06

Re: [HELP] Kick the attacker when he kills the CT
 
Yeah Merc3y is right. I tried to use DeathMsg event but it doesn't kick the user.

Merc3y 12-28-2009 08:56

Re: [HELP] Kick the attacker when he kills the CT
 
Quote:

Originally Posted by Excalibur.007 (Post 1033538)
Yeah Merc3y is right. I tried to use DeathMsg event but it doesn't kick the user.

Show your currently code.

superang 12-28-2009 18:07

Re: [HELP] Kick the attacker when he kills the CT
 
don't use kick, but slay its more "cool"

Doc-Holiday 12-28-2009 18:27

Re: [HELP] Kick the attacker when he kills the CT
 
Quote:

Originally Posted by superang (Post 1034459)
don't use kick, but slay its more "cool"

PHP Code:

#include <amxmodx>
#include <amxmisc>

#define IsPlayer(%1) (1 <= %1 <= g_iMaxPlayers)

new g_iMaxPlayers;

public 
plugin_init()
{
    
register_plugin("Attacker""1.0""=(GrG)=");
    
RegisterHam(Ham_Killed"player""PlayerDeath");
    
g_iMaxPlayers get_maxplayers();
}

public 
PlayerDeath(victimattacker)
{
    if(
IsPlayer(attacker))
    {
        if(
get_user_team(victim) != get_user_team(attacker))
        {
            
server_cmd("kick #%d ^"Reason Goes Here^"",get_user_userid(id))
        }
    }



Excalibur.007 12-28-2009 18:47

Re: [HELP] Kick the attacker when he kills the CT
 
Quote:

Originally Posted by superang (Post 1034459)
don't use kick, but slay its more "cool"

Slaying isn't very good, since when you kill the CT he dies and you get slayed but you still get to play for next round.

fysiks 12-28-2009 19:07

Re: [HELP] Kick the attacker when he kills the CT
 
Quote:

Originally Posted by fysiks (Post 1033455)
This begs for an empty server.



All times are GMT -4. The time now is 04:04.

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