Files

29 lines
812 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.
# Test (2).js — unlockByName() (satır 398)
[← Test (2).js](index.md) · [← Master](../../wiki.md)
```javascript
function unlockByName(c, owner, targetName) {
var target = c.getServer().getPlayer(targetName);
if (!target) {
owner.send("\u00a7cOyuncu online degil: " + targetName);
return;
}
var s = loadState();
var uuid = uuidOf(target);
if (!s.locked[uuid]) {
owner.send("\u00a7eBu oyuncu tuzakta degil.");
return;
}
delete s.locked[uuid];
saveState(s);
unlockPosition(target);
var pos = target.getPosition();
removeSound(c, pos.x, pos.y + 1, pos.z);
owner.send("\u00a77" + target.getName() + " serbest birakildi.");
target.send("\u00a77Lal kapanindan serbest birakildin.");
}
```