AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How can i detect (https://forums.alliedmods.net/showthread.php?t=113967)

AppStore 12-31-2009 17:31

How can i detect
 
How can I tell if I am one of the attacker and one of the terrorist victim?

floatman 12-31-2009 18:32

Re: How can i detect
 
I don't understand... something like this?
PHP Code:

#include <amxmodx>
#include <hamsandwich>

static const theattacker[] = "AppStore";
static const 
thevictim[] = "AppStore1";

public 
plugin_init()
    
RegisterHam(Ham_Killed"player""fw_HamHookKill");

public 
fw_HamHookKill(iAttackeriVictimshouldgib)
{
    new 
attname[32], vicname[32];
    
get_user_nameiAttackerattnamecharsmax(attname) );
    
get_user_nameiVictimvicnamecharsmax(vicname) );

    if( 
equali(attnametheattacker) )
        
client_print(iAttackerprint_chat"%s, you are the attacker!"attname);
    
    else if( 
equali(vicnamethevictim) )
        
client_print(iVictimprint_chat"%s, you are the victim!"vicname);

    return 
HAM_IGNORED;




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

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