用户:
哈利波特_查看:4 回复:3 评论:4 创建时间:2020-05-06T11:05:34
网址https://box3create.codemao.cn/games/8190783fd70725959f24
公子熙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(0.1, {
attacker: entity,
});
}
});
});
world.onDie(({ entity, attacker }) => {
if (attacker) {
world.say(attacker.player.name + ' 重重一击了 ' + entity.player.name)
}
entity.player.forceRespawn();
});//pvp代码
点赞0
评论