Files

33 lines
987 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 — yok() (satır 276)
[← Test (2).js](index.md) · [← Master](../../wiki.md)
```javascript
function yok(c) {
var p = c.getSubject();
if (!isOwnerPlayer(p)) return;
var s = loadState();
var uuid = uuidOf(p);
var pos = p.getPosition();
if (s.vanish[uuid]) {
delete s.vanish[uuid];
saveState(s);
c.executeCommand("effect " + p.getName() + " minecraft:invisibility 0");
c.executeCommand("mp event trigger " + p.getName() + " Lal1");
appearEffect(c, p);
p.send("\u00a77Geri gorundun.");
return;
}
vanishEffect(c, p);
s.vanish[uuid] = true;
saveState(s);
c.executeCommand("effect " + p.getName() + " minecraft:invisibility 999999 0 true");
c.executeCommand("mp event trigger " + p.getName() + " Lal2");
c.getWorld().playSound("entity.endermen.teleport", pos.x, pos.y, pos.z, 0.8, 1.45);
p.send("\u00a77Yok oldun.");
}
```