本文整理汇总了C#中GTA.Ped.HasBeenDamagedBy方法的典型用法代码示例。如果您正苦于以下问题:C# Ped.HasBeenDamagedBy方法的具体用法?C# Ped.HasBeenDamagedBy怎么用?C# Ped.HasBeenDamagedBy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GTA.Ped
的用法示例。
在下文中一共展示了Ped.HasBeenDamagedBy方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: isCharDamagedByExplosions
//最後に受けたダメージが爆風(+素手)によるものなのか調べる関数
private bool isCharDamagedByExplosions(Ped ped)
{
if (ped.HasBeenDamagedBy(Weapon.Unarmed) || ped.HasBeenDamagedBy(Weapon.Heavy_RocketLauncher) || ped.HasBeenDamagedBy(Weapon.Misc_Rocket) || ped.HasBeenDamagedBy(Weapon.Misc_Explosion) || ped.HasBeenDamagedBy(Weapon.Thrown_Grenade))
{
return true;
}
else
{
return false;
}
}
示例2: GetCOD
private string GetCOD(Ped ped)
{
string S = "OTHER";
if (ped.HasBeenDamagedBy(Weapon.Melee_PoolCue)) { S = "POOL CUE"; }
if (ped.HasBeenDamagedBy(Weapon.Misc_AnyMelee)) { S = "ANY MELEE"; }
if (ped.HasBeenDamagedBy(Weapon.Misc_RammedByCar)) { S = "TRAFFIC ACCIDENT"; }
if (ped.HasBeenDamagedBy(Weapon.Misc_Fall)) { S = "FALL"; }
if (ped.HasBeenDamagedBy(Weapon.Misc_AnyWeapon)) { S = "ANY WEAPON"; }
if (ped.HasBeenDamagedBy(Weapon.Misc_RunOverByCar)) { S = "TRAFFIC ACCIDENT"; }
if (ped.HasBeenDamagedBy(Weapon.Handgun_DesertEagle)) { S = "D.E."; }
if (ped.HasBeenDamagedBy(Weapon.Handgun_Glock)) { S = "GLOCK"; }
if (ped.HasBeenDamagedBy(Weapon.Heavy_FlameThrower)) { S = "FLAME THROWER"; }
if (ped.HasBeenDamagedBy(Weapon.Heavy_Minigun)) { S = "MINIGUN"; }
if (ped.HasBeenDamagedBy(Weapon.Heavy_RocketLauncher)) { S = "RPG-7"; }
if (ped.HasBeenDamagedBy(Weapon.Misc_Rocket)) { S = "RPG-7"; }
if (ped.HasBeenDamagedBy(Weapon.Melee_BaseballBat)) { S = "BASEBALLBAT"; }
if (ped.HasBeenDamagedBy(Weapon.Melee_Knife)) { S = "KNIFE"; }
if (ped.HasBeenDamagedBy(Weapon.Rifle_AK47)) { S = "AK47"; }
if (ped.HasBeenDamagedBy(Weapon.Rifle_M4)) { S = "M4"; }
if (ped.HasBeenDamagedBy(Weapon.Shotgun_Baretta)) { S = "SHOTGUN BARETTA"; }
if (ped.HasBeenDamagedBy(Weapon.Shotgun_Basic)) { S = "SHOTGUN BASIC"; }
if (ped.HasBeenDamagedBy(Weapon.SMG_MP5)) { S = "MP5"; }
if (ped.HasBeenDamagedBy(Weapon.SMG_Uzi)) { S = "UZI"; }
if (ped.HasBeenDamagedBy(Weapon.SniperRifle_Basic)) { S = "PSG-1"; }
if (ped.HasBeenDamagedBy(Weapon.SniperRifle_M40A1)) { S = "M40A1"; }
if (ped.HasBeenDamagedBy(Weapon.Thrown_Grenade)) { S = "GRENADE"; }
if (ped.HasBeenDamagedBy(Weapon.Thrown_Molotov)) { S = "MOLOTOV"; }
if (ped.HasBeenDamagedBy(Weapon.Unarmed)) { S = "UNARMED"; }
if (ped.HasBeenDamagedBy(Weapon.Misc_Explosion)) { S = "EXPLOSION"; }
if (ped.HasBeenDamagedBy(Weapon.Episodic_18)) { S = "ADVANCED RPG-7"; }
if (ped.HasBeenDamagedBy(Weapon.Episodic_19)) { S = "ADVANCED RPG-7"; }
if (ped.HasBeenDamagedBy(ped)) { S = S + "/SUICIDE"; }
return S;
}
示例3: AddPed
public void AddPed(Ped p)
{
Timers[index] = 120;
str[index] = ((Share.eModel)p.Model.Hash).ToString() + "( " + GetCOD(p) + " )";
KilledByPlayer[index] = p.HasBeenDamagedBy(player.Character);
if (KilledByPlayer[index])
{
Share.AddPoint(1);
}
IsMissionChar[index] = p.isRequiredForMission;
index = (index + 1) % max;
return;
}