你是加在像PlayerPreThink整个回合执行的forward里吗??
复制程式
new norandom[33]
public plugin_init()
{
register_forward(FM_PlayerPreThink, "fwd_PlayerPreThink")
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
}
public fwd_PlayerPreThink(id)
{
if ((get_user_x1(id)) & (get_user_health(id) < 2000 ) && !norandom[id])
{
new rass = random_num(1, 5)
switch(rass)
{
case 1: norandom[id] = true
case 2: norandom[id] = true
case 3:
{
zp_make_user_x2[id] //这是什么??
norandom[id] = true
set_user_health(id, 10000)
set_hudmessage(255, 150, 20, -1.0, 0.17, 1, 0.0, 5.0, 1.0, 1.0, -1)
show_hudmessage(0, "X-2 出现!")
}
case 4: norandom[id] = true
case 5: norandom[id] = true
}
}
}
public event_round_start()
{
for (new id = 1; id <= 32; id++)
{
norandom[id] = false //新的回合消除这个变数
}
}
不知道这样有没有效