|
楼主 |
发表于 2008-3-14 21:34:33
|
显示全部楼层
来自 中国–广西–柳州
回复: 求一个获取多少局的代码,谢谢。
very much谢谢,还请问个问题,获取当前局数是第几局是不是get_cvar_num("g_rounds")?辛苦了。#include <amxmodx>
#include <amxmisc>
#include <cstrike>
new g_rounds
public init()
{
register_logevent("round_start", 2, "0=World triggered", "1=Round_Start")
register_event("TextMsg", "round_restart", "a", "2=#Game_Commencing", "2=#Game_will_restart_in")
}
public round_start()
{
g_rounds++
if(g_rounds == 3)
{
client_print(0,print_chat,"ooooooooo第三局了哦")
}
}
public round_restart()
{
g_rounds = 0
} 编译很正常,但和机器人测试没有任何效果,请问这代码有错吗? |
|