Files

26 lines
637 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Darklord.js — findPlayerLoose() (satır 2114)
[← Darklord.js](index.md) · [← Master](../../wiki.md)
```javascript
function findPlayerLoose(c, name)
{
name = lower(trim(String(name || "")));
if (name.length === 0) return null;
var exact = findPlayer(c, name);
if (exact) return exact;
var players = allPlayers(c);
for (var i = 0; i < listSize(players); i++)
{
var pl = listGet(players, i);
if (!pl || !pl.getName) continue;
var pn = lower(pl.getName());
if (pn === name || pn.indexOf(name) >= 0) return pl;
}
return null;
}
```