Piotr
Member
Hi,
My goal was to prevent players from hiding in plain sight while NPCs or other players were in close range and I got it working for players by:
I can't get it working for nearby NPCs though. I tried but failed.
Any help please?
My goal was to prevent players from hiding in plain sight while NPCs or other players were in close range and I got it working for players by:
Code:
if (ok)
{
if (!m_CombatOverride)
{
foreach (Mobile check in m.GetMobilesInRange(range))
{
if (check.InLOS(m) && check.Combatant == m)
{
badCombat = true;
ok = false;
break;
}
}
// prevent players from hiding if other players are nearby
foreach (NetState ns in m.GetClientsInRange(5))
{
if (ns.Mobile != m)
{
badCombat = true;
ok = false;
break;
}
}
I can't get it working for nearby NPCs though. I tried but failed.
Any help please?