AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   FFF1 kill fix (https://forums.alliedmods.net/showthread.php?t=195994)

quLeryuzz 09-14-2012 01:21

FFF1 kill fix
 
hi, I did as a player scores his team-mate shoots himself +1.The problem is that the passing score of +1 if the player kills himself again.
player console "kill" = +1 frag ---- I do not want it

PHP Code:

#include <amxmodx>
#include <hamsandwich>
#include <fun>
public plugin_init()
{
    
register_plugin("Takim Arkadasi Skor + 1","1.0","CSmiLeFaCe")
    
RegisterHam(Ham_Killed,        "player""oyuncugeberdiginde")
}
public 
oyuncugeberdiginde(victimattackershouldgib)
{
    if(
get_user_team(attacker) == 1)
    {
        if(
get_user_team(victim) == 1)
        {
            
set_user_frags(attackerget_user_frags(attacker) +2)
        }
    }
    if(
get_user_team(attacker) == 2)
    {
        if(
get_user_team(victim) == 2)
        {
            
set_user_frags(attackerget_user_frags(attacker) +2)
        }
    }
    return 
PLUGIN_HANDLED;



YamiKaitou 09-14-2012 01:24

Re: FFF1 kill fix
 
PHP Code:

if (victim == attacker)
    return 
HAM_IGNORED


quLeryuzz 09-14-2012 01:29

Re: FFF1 kill fix
 
thanks.


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

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