猫史档案馆


pvp代码:这里有

用户:Chara_juchuief_exeChara_juchuief_exe查看:3 回复:10 评论:3 创建时间:2020-03-25T21:00:37


//一个简单的射击PvP
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(2 * Math.random() + 1, {
attacker: entity,
});
});
});

world.onDie(({ entity, attacker }) => {
if (attacker) {
world.say(attacker.player.name + ' killed ' + entity.player.name)
}
entity.player.forceRespawn();
});
undefined;


回复

上一页1 页 / 共 1下一页
cool-creepercool-creeper

沙发

点赞0


评论


Chara_juchuief_exeChara_juchuief_exe

你领了

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

奖励是和我做朋友,哈哈哈哈哈哈哈哈哈哈或或或或或或或或或或或或或或或或或或哈哈哈哈哈哈哈哈哈哈或或或或或或或或或或或或或或或或或或呵呵

点赞0


评论


MC呆萌大明MC呆萌大明

沙发沙发沙发沙发沙发

点赞0


评论


BSS巴塞罗那足球俱乐部BSS巴塞罗那足球俱乐部

//一个简单的射击PvP
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(2 * Math.random() + 1, {
attacker: entity,
});
});
});

world.onDie(({ entity, attacker }) => {
if (attacker) {
world.say(attacker.player.name + ' killed ' + entity.player.name)
}
entity.player.forceRespawn();
});
undefined;

点赞0


评论


两个小八路两个小八路

谁都会

点赞0


评论


两个小八路两个小八路

谁都会看开发API实体

点赞0


评论


不起眼的账号不起眼的账号

//一个简单的射击PvP
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(2 * Math.random() + 1, {
            attacker: entity,
        });
    });
});

world.onDie(({ entity, attacker }) => {
    if (attacker) {
        world.say(attacker.player.name + ' killed ' + entity.player.name)
    }
    entity.player.forceRespawn();
});
undefined;

点赞0


评论


SCS_user_eee2detYg0SCS_user_eee2detYg0

谁都会……

点赞0


评论


不起眼的账号不起眼的账号

center_image

点赞0


评论


cool-creepercool-creeper

请原谅我3个月前在此抢了沙发(滑稽)

点赞0


评论