用户:ZCHWill666查看:7 回复:3 评论:7 创建时间:2020-06-07T15:44:50
金币商量!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
world.onPlayerJoin(({ entity }) => {
entity.enableDamage = true;
entity.player.onPress(({ button, raycast:{ hitEntity, direction } }) => {
if (button !== 'action0' || !hitEntity) {
return;
}
hitEntity.velocity.x += direction.x;
hitEntity.velocity.y += 0.5;
hitEntity.velocity.z += direction.z;
hitEntity.hurt(20 * Math.random() + 5, {/*这里是伤害调整,5可以改成其他数字*/
attacker: entity,
});
});
});
world.onDie(({ entity, attacker }) => {
if (attacker) {
world.say(attacker.player.name + ' 残忍的杀害了可怜的 ' + entity.player.name)
}
entity.player.forceRespawn();
});
点赞0
评论
world.onPlayerJoin(({ entity }) => {
entity.enableDamage = true;
entity.player.onPress(({ button, raycast:{ hitEntity, direction } }) => {
if (button !== 'action0' || !hitEntity) {
return;
}
if(hitEntity.isPlayer===true){
hitEntity.velocity.y += 0.5;
}
hitEntity.hurt(20 * Math.random() + 5, {/*照样可以改伤害*/
attacker: entity,
});
if(entity.player.name == "名字鬼知道"){//这是外挂里面写谁的名字都可以
hitEntity.hurt(999999, {
attacker: entity,
});
}
});
});
world.onDie(({ entity, attacker }) => {
if (attacker) {
world.say(attacker.player.name + ' 残忍地击杀了 ' + entity.player.name)
}
entity.player.forceRespawn();
});点赞0
评论