You can Make Last Human Survivor
Quote:
zp_lasthuman_survivor "1" - Turn ON/OFF Last human is Survivor
|
& this SMA
PHP Code:
#include <amxmodx>
#include <zombieplague>
#include <hamsandwich>
#include <fakemeta>
#define PLUGIN "[ZP]Extension: Last Human is Survivor"
#define VERSION "1.0"
#define AUTHOR "Bummps"
new g_lasthuman[33]
new g_maxplayers
const Float:HUD_EVENT_X = -1.0
const Float:HUD_EVENT_Y = 0.17
new cvar_lasthumansurvivor
public plugin_init()
{
RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1)
RegisterHam(Ham_Killed, "player", "fw_PlayerKilled_Post", 1)
register_forward(FM_ClientDisconnect, "fw_ClientDisconnect_Post", 1)
cvar_lasthumansurvivor = register_cvar("zp_lasthuman_survivor", "1")
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public fw_PlayerSpawn_Post()
{
check_last_human()
}
public fw_playerKilled_Post()
{
check_last_human()
}
public fw_ClientDisconnect_post()
{
check_last_human()
}
public check_last_human()
{
static id
for (id = 1; id <= g_maxplayers; id++)
if (get_pcvar_num(cvar_lasthumansurvivor) == 0)
return
if (g_lasthuman[id])
{
set_hudmessage(20, 20, 255, HUD_EVENT_X, HUD_EVENT_Y, 1, 0.0, 5.0, 1.0, 1.0, -1)
new name[32]
get_user_name(id, name, 31)
show_hudmessage(0, "%s e o sobrevivente!", name)
zp_make_user_survivor(id)
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1046\\ f0\\ fs16 \n\\ par }
*/
__________________