08.03.2013, 23:50
(
Последний раз редактировалось HitnKill; 09.03.2013 в 11:48.
)
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.
// example on OnPlayerTakeDamage
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)== 0 || strcmp(GetPlayerAnimationNameEx(playerid), "GUN_STAND", true) == 0 || strcmp(GetPlayerAnimationNameEx(playerid), "GUN_BUTT_crouch", true) == 0 ) return 1;
}
return 0;
}
GetPlayerAnimationNameEx(playerid)
{
new animlib[32];
new animname[32];
GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
return animname;
}
PHP код:
if(!OnPlayerAnimButtGun(issuerid,weaponid)) //false
{
//code
}
// OR
if(OnPlayerAnimButtGun(issuerid,weaponid)) // true
{
//code
}