#define item_Interact:%1(%2)          \
			forward item_Interact_%1(%2); \
			public item_Interact_%1(%2)


item::Interact:Bandage(playerid)
{
	#define BANDAGE_TIME (6)
	if(GetPVarInt(playerid,"holding_f_iFAct") == 0)
	{
		new give_id = GetNearestPlayer(playerid,2.0);
		if(give_id != -1)
		{
			if(PlayerStatus[give_id][BleedingLevel] <= 0.0) goto sel_playerid;
			if(PlayerStatus[give_id][KoTime] >= 1)	ApplyAnimation(playerid,"MEDIC","CPR",4.0,1,0,0,0,0);
			else									ApplyAnimation(playerid,"COP_AMBIENT","COPBROWSE_LOOP",4.0,1,0,0,0,0);
			goto sel_done;
		}
		sel_playerid:
		give_id = playerid;
		if(PlayerStatus[playerid][BleedingLevel] <= 0.0) return 0;
		ApplyAnimation(playerid,"SWEET","Sweet_injuredloop",4.0,1,0,0,0,0);
		sel_done:
		SetPVarInt(playerid,"holding_f_iFAct",1);
		SetPVarInt(playerid,"holding_f_iFAct_id",give_id);
		return 1;
	}
	else if(GetPVarInt(playerid,"holding_f_iFAct") >= 1)
	{
		new time = GetPVarInt(playerid,"holding_f_iFAct"),
			give_id = GetPVarInt(playerid,"holding_f_iFAct_id");
		SetPVarInt(playerid,"holding_f_iFAct",++time);
		if(!IsPlayerConnected(give_id) || PlayerEvent[give_id][IstTot] >= 1 || PlayerStatus[give_id][BleedingLevel] <= 0.0) return item::StopPlayerInteract(playerid),0;
		if(DistanceBetweenPlayers(playerid,give_id) >= 2.0) return item::StopPlayerInteract(playerid),0;
		if(time == BANDAGE_TIME)
		{
		    if(IsPlayerAttachedObjectSlotUsed(give_id,BLEEDING_SLOT)) RemovePlayerAttachedObject(give_id,BLEEDING_SLOT);
			PlayerStatus[give_id][BleedingLevel] = 0.0;
			item::StopPlayerInteract(playerid);
		}
		return 1;
	}
	return 0;
}

item::Interact:_E__Wrench(playerid)
{
	#define REPAIR_HP_S	(75.0)
	#define REPAIR_DIST	(5.0)
	if(GetPVarInt(playerid,"holding_f_iFAct") == 0)
	{
		for(new veh; veh<MAX_VEHICLES; veh++)
		{
			if(!IsVehicleConnected(veh) || VehicleInfo[veh][cIsDead]) continue;
			new Float:p[3];
			GetVehiclePos(veh,p[0],p[1],p[2]);
			if(!IsPlayerInRangeOfPoint(playerid,REPAIR_DIST,p[0],p[1],p[2])) continue;
			if(!car::IsPlayerAtVehicleBonnet(playerid,veh)) continue;
			new Float:hp;
			GetVehicleHealth(veh,hp);
			if(hp >= 950.0) continue;
			ApplyAnimation(playerid, "INT_SHOP", "SHOP_CASHIER", 4.0, 1, 0, 0, 0, 0, 1);
			SetPVarInt(playerid,"holding_f_iFAct_id",veh);
			UpdateStatusProgressBar(playerid,hp/950.0);
			return 1;
		}
		return 0;
	}
	else if(GetPVarInt(playerid,"holding_f_iFAct") >= 1)
	{
		new veh = GetPVarInt(playerid,"holding_f_iFAct_id");
		if(!IsVehicleConnected(veh) || VehicleInfo[veh][cIsDead]) return item::StopPlayerInteract(playerid),1;
		new Float:p[3];
		GetVehiclePos(veh,p[0],p[1],p[2]);
		if(!IsPlayerInRangeOfPoint(playerid,REPAIR_DIST,p[0],p[1],p[2])) return item::StopPlayerInteract(playerid),1;
		if(!car::IsPlayerAtVehicleBonnet(playerid,veh)) return item::StopPlayerInteract(playerid),1;
		new Float:hp;
		GetVehicleHealth(veh,hp);
		hp += REPAIR_HP_S;
		SetVehicleHealth(veh,hp);
		UpdateStatusProgressBar(playerid,hp/950.0);
		if(hp >= 950.0) return item::StopPlayerInteract(playerid),1;
	}
	return 1;
}






