AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Headshot check (https://forums.alliedmods.net/showthread.php?t=185790)

Killer zm 05-21-2012 12:25

Headshot check
 
I want an simple code for mode zombie plague to check if an human is shoting only in the head off an zombie (victim) in some seconds. Please help . I need for a plugin.

hornet 05-22-2012 00:06

Re: Headshot check
 
PHP Code:

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <cstrike>

#define m_LastHitGroup        75        

public plugin_init() 
{
    
RegisterHamHam_TakeDamage"player""ham_TakeDamage_Post");
}

public 
ham_TakeDamage_PostiVictimiInflictoriAttackerFloat:flDamagedamagebits )
{
    if( 
cs_get_user_teamiVictim ) == CS_TEAM_T && get_pdata_intiVictimm_LastHitGroup ) == HIT_HEAD )
    {    
        
//shot the zombie in the head
    
}




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

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