複製程式
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
new Float:get_gametime
public plugin_init()
{
register_plugin("undefined", "1.0", "MyChat:a7811311622")
register_event("HLTV", "event_RoundStart", "a", "1=0", "2=0")
}
public event_RoundStart()
{
get_gametime = get_gametime()
}
public client_PreThink(id)
{
if (get_gametime() - get_gametime >= (get_cvar_float("mp_roundtime")*60) - 2.0)
{
if (cs_get_user_team(id) == CS_TEAM_CT)
{
ExecuteHamB(Ham_Killed, id, 0, 1)
}
}
}
未測試…不確定attacker的ID值為0是否為世界…