[Include] Detect Weapon Butt Attack
#1

Hello, this codes it's useful example if you use an system to modified damage weapons or other system... I check the anims at the players for detect this... very easy but good.

PHP код:
#DEFINE MAXWEAPONBUTTGUN 15 // cold steel <= 15 
OnPlayerAnimButtGun(playerid,weapondid

    if(
weapondid MAXWEAPONBUTTGUN// > at the cold steel you can modified this if you want... my GM dont use other cold steel
    

        if(
strcmp(GetPlayerAnimationNameEx(playerid), "GUN_BUTT"true)== || strcmp(GetPlayerAnimationNameEx(playerid), "GUN_STAND"true)    == || strcmp(GetPlayerAnimationNameEx(playerid), "GUN_BUTT_crouch"true) == ) return 1
    } 
    return 
0

GetPlayerAnimationNameEx(playerid

    new 
animlib[32]; 
     new 
animname[32]; 
       
GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32); 
    return 
animname

// example on OnPlayerTakeDamage
PHP код:
if(!OnPlayerAnimButtGun(issuerid,weaponid)) //false

//code 

// OR
if(OnPlayerAnimButtGun(issuerid,weaponid)) // true

//code 

Reply


Messages In This Thread
Detect Weapon Butt Attack - by HitnKill - 08.03.2013, 23:50
Re: Detect Weapon Butt Attack - by Whitetiger - 09.03.2013, 01:02
Respuesta: Detect Weapon Butt Attack - by Glimma - 09.03.2013, 01:08
Re : Detect Weapon Butt Attack - by LittleSamp - 09.03.2013, 10:24
Re : Detect Weapon Butt Attack - by HitnKill - 09.03.2013, 11:32

Forum Jump:


Users browsing this thread: 2 Guest(s)