#include <amxmodx>
#define MESSAGESNOHP 4
#define MESSAGESHP 4
new alone_ann = 0
new messagesnohp[MESSAGESNOHP][] = {
"%i terrorista vs %i CT^n%s: Mostma'r minden rajtad mu'lik",
"%i terrorista vs %i CT^n%s: Reme'lem van na'lad e'letment'o' csomag",
"%i terrorista vs %i CT^n%s: Minden csapat ta'rsadat kinyirta'k, sok szerencse't",
"%i terrorista vs %i CT^n%s: Te vagy az u'tolso'"}
new messageshp[MESSAGESHP][] = {
"%i terrorista vs %i CT^n%s (%i hp): Mostma'r minden rajtad mu'lik",
"%i terrorista vs %i CT^n%s (%i hp): Reme'lem van na'lad e'letment'o' csomag",
"%i terrorista vs %i CT^n%s (%i hp): Minden csapat ta'rsadat kinyirta'k, sok szerencse't",
"%i terrorista vs %i CT^n%s (%i hp): Te vagy az u'tolso'"}
public roundend_msg(id)
alone_ann = 0
public death_msg(id)
{
new lmmode[8]
get_cvar_string("lastman_mode",lmmode,8)
new lmmode_bit = read_flags(lmmode)
new players_ct[32], players_t[32], ict, ite, last
get_players(players_ct,ict,"ae","CT")
get_players(players_t,ite,"ae","TERRORIST")
if (ict==1&&ite==1)
{
new name1[32], name2[32]
get_user_name(players_ct[0],name1,32)
get_user_name(players_t[0],name2,32)
set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
if (lmmode_bit & 1)
{
if (lmmode_bit & 2)
{
show_hudmessage(0,"%s (%i hp) vs. %s (%i hp)",name1,get_user_health(players_ct[0]),name2,get_user_health(players_t[0]))
}
else
{
show_hudmessage(0,"%s vs. %s",name1,name2)
}
if (lmmode_bit & 4)
{
client_cmd(0,"spk misccc/maytheforce")
}
}
}
else
{
if (ict==1&&ite>1&&alone_ann==0&&(lmmode_bit & 4))
{
last=players_ct[0]
client_cmd(last,"spk misccc/oneandonly")
}
else if (ite==1&&ict>1&&alone_ann==0&&(lmmode_bit & 4))
{
last=players_t[0]
client_cmd(last,"spk misccc/oneandonly")
}
else
{
return PLUGIN_CONTINUE
}
alone_ann = last
new name[32]
get_user_name(last,name,32)
if (lmmode_bit & 1)
{
set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
if (lmmode_bit & 2)
{
show_hudmessage(0,messageshp[ random_num(0,MESSAGESHP-1) ],ite ,ict ,name,get_user_health(last))
}
else
{
show_hudmessage(0,messagesnohp[ random_num(0,MESSAGESNOHP-1) ],ite ,ict ,name )
}
}
if (lmmode_bit & 4)
{
client_cmd(last,"spk misccc/maytheforce")
}
return PLUGIN_CONTINUE
}