mnbmnb5266
|
分享:
x0
|
[晴天][快樂] 参照
new g_frags[33], g_deaths[33] new bool:g_infect_last_human
public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type) // Swarm round or plague round if (g_swarmround || g_plagueround) return HAM_IGNORED; // human is killed // Last human if (fnGetHumans() == 1 && (!g_nemround && !g_survround && !g_swarmround && !g_plagueround)) { g_infect_last_human = true server_cmd("sv_restart 5") // force server restart } infection_explode(ent) // Victim is survivor? if (g_survivor[victim] && get_user_health(victim) > g_survivor_hp/4) { fm_set_user_health(victim, pev(victim, pev_health)-(g_survivor_hp/4)) continue; } // Last human if (fnGetHumans() == 1 && (!g_nemround && !g_survround && !g_swarmround && !g_plagueround)) { g_infect_last_human = true server_cmd("sv_restart 5") // force server restart } public fw_PlayerPreThink(id) if (g_infect_last_human) { g_frags[id] = pev(id, pev_frags) g_deaths[id] = fm_get_user_deaths(id) } public fw_PlayerSpawn_Post(id) if (g_infect_last_human) { UpdateFrags(id, id, g_frags[id], g_deaths[id], 1) if (id == get_playersnum()) g_infect_last_human = false } public message_textmsg() if (g_infect_last_human) { logevent_round_end() return PLUGIN_HANDLED; } g_scorehumans = 0 g_scorezombies = 0 logevent_round_end() public fnCheckLastZombie()
//g_lasthuman[id] = true
|