public _WAR3_showHUDItems(parm2[2]){					// Displays the player's items in the bottom center of the screen
	#if ADVANCED_DEBUG == 1
		writeDebugInfo("items",parm2[0])
	#endif
#if MOD == 0
	if(!iCvar[FT_ITEMS_IN_HUD])
		return PLUGIN_CONTINUE
#endif

	new temp[128]
	new message[256]
	new id = parm2[0]

	new item_name[ITEM_NAME_LENGTH], item_name2[ITEM_NAME_LENGTH]
	itemname(p_data[id][P_ITEM],id,item_name,ITEM_NAME_LENGTH_F)
	itemname2(p_data[id][P_ITEM2],id,item_name2,ITEM_NAME_LENGTH_F)

	if (p_data[id][P_ITEM]!=0 && p_data[id][P_ITEM2]!=0){			// User has 2 items
		if (p_data[id][P_ITEM2]==ITEM_RING)
			format(temp,127,"%L",id,"CURRENT_ITEMS_RING",item_name,item_name2,p_data[id][P_RINGS])
		else
			format(temp,127,"%L",id,"CURRENT_ITEMS",item_name,item_name2)
	}
	else if (p_data[id][P_ITEM]==0 && p_data[id][P_ITEM2]!=0){		// User only has an item from shopmenu2
		if (p_data[id][P_ITEM2]==ITEM_RING)
			format(temp,127,"%L",id,"CURRENT_ITEM_RING",item_name2,p_data[id][P_RINGS])
		else
			format(temp,127,"%L",id,"CURRENT_ITEM",item_name2)
	}
	else if (p_data[id][P_ITEM]!=0 && p_data[id][P_ITEM2]==0)		// User only has an item from shopmenu2
		format(temp,127,"%L",id,"CURRENT_ITEM",item_name)

	add(message,255,temp)

	set_hudmessage(255,255,255,-1.0,0.945,2, 1.5, 40.0, 0.02, 5.0, 1) 
	if (is_user_alive(id))
		show_hudmessage(id,message)

// 640x480:		.017 .850
// 800x600:		.013 .881
// 1024x768:	.010 .908
// 1280x1024:	.008 .935
//set_hudmessage(224, 160, 0, 0.010, 0.908, HUDMESSAGE_FX_FADEIN, 10.0, 1.0, 2.0, 3.0, HUDMESSAGE_CHAN_ITEM)
//show_hudmessage(id, "Undead Level: 10")

// 640x480:		.017 .880
// 800x600:		.013 .908
// 1024x768:	.010 .928
// 1280x1024:	.008 .948
//set_hudmessage(224, 160, 0, 0.010, 0.928, HUDMESSAGE_FX_FADEIN, 10.0, 1.0, 2.0, 3.0, 1)
//show_hudmessage(id, "Current Item: Blah Item here")

	//set_hudmessage(224, 160, 0, 0.011, 0.91, HUDMESSAGE_FX_FADEIN, 10.0, 1.0, 2.0, 3.0, HUDMESSAGE_CHAN_ITEM)
	//show_hudmessage(id, message)

	set_task(1.0,"_WAR3_showHUDItems",TASK_ITEMS+id,parm2,2)
	return PLUGIN_CONTINUE
}

public Item_Set_Helm(id, status){

	if(id==0)
		return PLUGIN_CONTINUE

	// set_user_hitzones(shooter, the one getting hit, zone)
	new const MAXPLAYERS = get_global_int(GL_maxClients)
	new zone = 0

	if(status==1){		// Give helm
		zone = 253
		console_print(id,"### Helm enabled")
	}
	else{				// Reset zones to normal
		zone = 255
		console_print(id,"### Helm disabled")
	}

	for (new j = 1; j <= MAXPLAYERS; j++){
		if((zone==255 && p_data[P_ITEM2][id]!=ITEM_HELM) || zone==253)
			set_user_hitzones(j, id, zone)
	}

	return PLUGIN_CONTINUE
}

public cmd_Rings(id){
	#if ADVANCED_DEBUG == 1
		writeDebugInfo("rings5",id)
	#endif

	if (!is_user_alive(id))
		return PLUGIN_HANDLED

	if (iCvar[FT_CD]) {
		if (!WAR3_CD_installed(id)){
			return PLUGIN_CONTINUE
		}
	}

	if(iCvar[FT_RACES]<5)
		return PLUGIN_CONTINUE

	new usermoney
	new parm[2]
	parm[0]=id

	if (p_data[id][P_ITEM2]==ITEM_AMULET)
		p_data_b[id][PB_SILENT] = false
	if (p_data[id][P_ITEM2]==ITEM_HELM)
		Item_Set_Helm(id,1)
	if (p_data[id][P_ITEM2]==ITEM_CHAMELEON)
		changeskin(id,SKIN_RESET)
	
	while(p_data[id][P_RINGS]<5){
		usermoney = get_user_money(id)
		if(usermoney<itemcost2[ITEM_RING-1])
			break
		set_user_money(id,usermoney-itemcost2[ITEM_RING-1],1)
		++p_data[id][P_RINGS]
		p_data[id][P_ITEM2]=ITEM_RING
		if(!task_exists(TASK_ITEM_RINGERATE+id))
			regenerate(parm)
	}

	WAR3_Display_Level(id,DISPLAYLEVEL_NONE)

	return PLUGIN_HANDLED
}
