#include <amxmodx>
#include <fakemeta>
#include <zombieplague>

new g_has_tried[33]
new g_maxplayers

public plugin_init()
{
	register_plugin("[ZP] Suicide Punisher","1.1","fezh")

	register_forward(FM_ClientKill,"fw_ClientKill")

	register_event("HLTV","event_round_start","a","1=0","2=0")

	g_maxplayers = get_maxplayers()
}

public event_round_start()
	for(new id = 1; id <= g_maxplayers; id++)
		g_has_tried[id]=false

public fw_ClientKill(id)
{
	if(!is_user_alive(id))
		return FMRES_IGNORED;

	if(g_has_tried[id])
	{
		client_print(id,print_chat,"[ZP] Don't try to suicide if you don't like lose ammo packs.")
		return FMRES_IGNORED;
	}

	zp_set_user_ammo_packs(id,0)

	static name[32]
	get_user_name(id,name,sizeof name -1)
	set_hudmessage(0,255,0,0.02,0.30,1,6.0,5.0)
	show_hudmessage(id,"%s has lost his ammo packs for try suicide!",name)

	g_has_tried[id]=true

	return FMRES_IGNORED;
 }