教えてほしいです -- 蒼汰ᐖ 2026-04-30 08:54:49
自分のcpsが見えるコード?を教えてほしいです
let counter = {}
let time = 0
tick = (ms) => {
time++
for(const i in counter){
if(counter[i][0] < time - 20){
counter[i].shift()
}
api.setClientOption(i,"RightInfoText",`CPS:${counter[i].length}`)
}
}
onPlayerClick = (playerId) => {
(counter[playerId] ??= []).push(time)
}
onPlayerLeave = (pId) =>{
if(counter[pId] === undefined){return}
delete counter[pId]
}
- 一応作ってみました -- 柏餅 (2026-04-30 17:27:06)