27 lines
674 B
Markdown
27 lines
674 B
Markdown
# MercanRey5.js — freezeEntity() (satır 88)
|
||
|
||
[← MercanRey5.js](index.md) · [← Master](../../wiki.md)
|
||
|
||
```javascript
|
||
function freezeEntity(entity, data)
|
||
{
|
||
try
|
||
{
|
||
entity.setMotion(0, 0, 0);
|
||
entity.lockPosition(data.x, data.y, data.z);
|
||
entity.lockRotation(data.yaw, data.pitch, data.yawHead);
|
||
}
|
||
catch (e)
|
||
{}
|
||
|
||
applyPotion(entity, ["slowness", "slow"], 12, 10);
|
||
applyPotion(entity, ["mining_fatigue", "dig_slowdown"], 12, 10);
|
||
applyPotion(entity, ["weakness"], 12, 4);
|
||
|
||
if (entity.isPlayer())
|
||
{
|
||
entity.sendActionBar("Jaque Mate: oyun 5 saniyeligine durdu.");
|
||
}
|
||
}
|
||
```
|