Skip to content

Commit

Permalink
加个计时器
Browse files Browse the repository at this point in the history
readyup有个让旁观显示正确分数功能冲突,延迟执行解决...
  • Loading branch information
cH1yoi committed Oct 22, 2024
1 parent d01592b commit 41b55e3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Binary file modified addons/sourcemod/plugins/hana/exp_roundstate.smx
Binary file not shown.
11 changes: 10 additions & 1 deletion addons/sourcemod/scripting/exp_roundstate.sp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ public void OnPluginStart()
RegConsoleCmd("sm_exp", CMD_Exp);
}

public void OnRoundIsLive(){
// 加个牛马计数器
public void OnRoundIsLive()
{
CreateTimer(3.0, Timer_DelayedRoundIsLive);
}

public Action Timer_DelayedRoundIsLive(Handle timer){
int surs, infs;
int surc, infc;
int suravg2, infavg2;
Expand Down Expand Up @@ -46,7 +52,10 @@ public void OnRoundIsLive(){
CPrintToChatAll("[{green}EXP{default}] {red}感染者: %i{default} (平均 %i / 标准差 %i)", infs, infs/infc, infavg2);
CPrintToChatAll("{default}使用{green} !exp{default} 查看每个人的经验分");

return Plugin_Handled;

}

public Action CMD_Exp(int client, int args){
int surs, infs;
int surc, infc;
Expand Down

0 comments on commit 41b55e3

Please sign in to comment.