im still geting it seeing scientists
void OnEntityTakeDamage(BaseCombatEntity entity, HitInfo info) { if (!entity || !(entity is BasePlayer) || !(info.Initiator is BasePlayer))
Merged post
there has to be a better way any ideas?
void OnEntityTakeDamage(BaseCombatEntity entity, HitInfo info) { if (!entity || !(entity is BasePlayer) || !(info.Initiator is BasePlayer))
Merged post
there has to be a better way any ideas?
void OnEntityTakeDamage(BaseCombatEntity entity, HitInfo info)
{
var Sleeping = BasePlayer.sleepingPlayerList as List<BasePlayer>;
if (!entity || !(entity is BasePlayer) || !(info.Initiator is BasePlayer) || info.Initiator is NPCMurderer || info.Initiator is BaseNpc || info.Initiator is NPCPlayerApex || entity is NPCMurderer || entity is BaseNpc || entity is NPCPlayerApex)
return;
BasePlayer player = entity as BasePlayer;
var attacker = info.Initiator as BasePlayer;
if (!player.IsSleeping())
return;
ulong playerId = player.userID;
double timeStamp = GrabCurrentTime();
var t = pcdData.pEntity[playerId].LogOutDay + LastSeenSeconds;
var f = pcdData.pEntity[playerId].Found;
var e = pcdData.pEntity[playerId].Event;
if (player.IsSleeping() && (pcdData.pEntity.ContainsKey(playerId)) && (timeStamp > t) && (f < 1) && (e))
{
PrintToChat(string.Format(lang.GetMessage("found", this), player.displayName, attacker.displayName));
pcdData.pEntity[playerId].Found = 1;
SaveData();
return;
}
}