芝士太好吃了 【Lv:3】 正式会员 注册 2023/06/27 消息 45 金粒 17,296.59金粒 2024/11/26 #1 purpur 1.20.4 使用ap属性插件 显示玩家目前血量与最大血量 %player_health%输入后很多小数点 想取整数 有没有插件或者papi的附属可以解决这个问题? 带个图
MrXiaoM 【Lv:5】 VIP 开发者 正式会员 注册 2021/08/13 消息 475 金粒 2,630.56金粒 2024/11/26 #2 取整:%player_health_rounded% 保留2位小数:%math_2_{player_health}% (需要安装 math 变量扩展) Upvote 0 反对 解决方案
PuddingKC 布丁,好吃 管理成员 版主 开发者 正式会员 注册 2019/05/30 消息 796 金粒 3,131.97金粒 2024/11/26 #3 安装Math拓展,使用 %math_1:ceiling_{player_health}% 四舍五入,显示一位小数 Upvote 0 反对
MrXiaoM 【Lv:5】 VIP 开发者 正式会员 注册 2021/08/13 消息 475 金粒 2,630.56金粒 2024/11/26 #4 PuddingKC 说: 安装Math拓展,使用 %math_1:ceiling_{player_health}% 四舍五入,显示一位小数 点击展开... 默认(不输入:,即half-up)或者 half-even 才是四舍五入,ceiling 是向上取整 最后编辑: 2024/11/26 Upvote 0 反对
PuddingKC 说: 安装Math拓展,使用 %math_1:ceiling_{player_health}% 四舍五入,显示一位小数 点击展开... 默认(不输入:,即half-up)或者 half-even 才是四舍五入,ceiling 是向上取整
芝士太好吃了 【Lv:3】 正式会员 注册 2023/06/27 消息 45 金粒 17,296.59金粒 2024/11/26 #5 PuddingKC 说: 安装Math拓展,使用 %math_1:ceiling_{player_health}% 四舍五入,显示一位小数 点击展开... 管用了 能不能直接显示18这样而不是有小数点这样嘞?还有方法吗 Upvote 0 反对
PuddingKC 说: 安装Math拓展,使用 %math_1:ceiling_{player_health}% 四舍五入,显示一位小数 点击展开... 管用了 能不能直接显示18这样而不是有小数点这样嘞?还有方法吗