AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Kill instantly with headshot (https://forums.alliedmods.net/showthread.php?t=224344)

wicho 08-23-2013 03:17

Kill instantly with headshot
 
Hi everybody well i make a class human to zombie plague to kill instantly with headshot with deagle but i want to kill instantly with knife too i try with some methods but dont work, can someone help me to make this? thx in advance..

this is the code i use:

PHP Code:

public fw_TraceAttack(victimattackerFloat:damageFloat:direction[3], tracedamagebits)
{
    new 
bool:isWeaponDeagle flag_get(g_IsSurvivorattacker) && get_user_weapon(attacker) == CSW_DEAGLE true false
    
    
// Avoid from self damage or it's not a deagle 
    
if (victim == attacker || !isWeaponDeagle)    
        return 
HAM_IGNORED;
    
    if (
get_tr2(traceTR_iHitgroup) == HIT_HEAD)         
        
ExecuteHam(Ham_Killedvictimattacker2)        
    
    return 
HAM_IGNORED




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

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